How to Test an API Using Postman
Zenva
ACCESS the FULL COURSE here: https://academy.zenva.com/product/educational-gamedev-academy/?zva_src=youtube-edu
TRANSCRIPT
Welcome back, everyone. Before we hop on Unity and create our app, we wanna actually test out the API and be able to visualize the actual JSON file that we get. So, to do this, we're gonna be using Postman. Postman is a API development environment, which allows us to connect to an API and get a result from it, basically. So, what you wanna do, is you wanna go to getpostman.com. You then want to sign up or sign in if you've already got an account, and then scroll down to the bottom of the page, where it has the downloads link here, under resources. Click that, and then it will take you to the download page. Just download the version of Postman that is for your operating system. If you're on Windows, it's right here, Mac, and Linux. And once that's done, you should then be able to install Postman and launch it up. Now, this is what it looks like inside of the Postman app, and what we wanna do is in here, where it says enter, request URL, enter in that URL that we copied last lesson. If you remember, it was the, if we click on Data API here on the firework displays, we can just copy the API here up to the limit. So pretty much we want it just the resource ID at the end of the URL. So once you got that, and go here, in the inside of the enter request URL, we can paste that in and oh, you already have that resource ID popped up here, okay and we want for another key here, now these are the parameters, so these are the little parameters here, after when you see the question mark, that's the start of the parameters and then every parameter from then is separated by an & sign, Okay, so what we want our, we actually don't need another key at the moment because, I'll just show you how we get all the results first of all. So lets click on send, and as you can see we have a JSON file here and this is a result of all the upcoming firework displays, I think there is probably around, yeah looks like there might be twenty or so at the moment. So get it all here, and inside of the JSON file here, we have our results container, and inside of the result container we have the records. Now the records are what we are looking for, and each record has an ID, a display date, a time, a suburb, a postcode, a display address, an event type and a display type, and we'll be using all that information, inside of the app to display to the user, and even allow them to filter by the date, if they wanna filter by events that are coming up today, during the week or during the month. So yeah, we'll have all that. But what if we wanna search by a suburb? Okay, so lets just say here we wanna search for all events that are in Toowoomba for example. So we'd go up ... https://www.youtube.com/watch?v=1NXoTd4WBQc
9032665 Bytes