From the course: Introduction to Web APIs
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Make a request to the Giphy API - REST Tutorial
From the course: Introduction to Web APIs
Make a request to the Giphy API
- [Instructor] In the exercise files for this video I've included an index.html file and an empty script.js file so we can start writing code to make a request to the GIPHY API. We'll make a request to the GIPHY API the same way we made the request to the H Plus Sports API. The one small but important difference is that we need to include our authorization key in the API URL. First, let's write our fetch method, and then the URL for the GIPHY API. Now to get the specific URL endpoint, we're going to have to go back and look at the documentation. As we said in the last video, we're going to be using the random endpoint so we can get a random squirrel GIF. The URL is here, so we can copy and paste that into our code. Now, we could take kind of a shortcut and use the API explorer, but I think it's a little more helpful when first working with APIs and documentation to do it more manually. So let's go and do this in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Authentication with an API key4m 42s
-
(Locked)
Make a request to the Giphy API4m 13s
-
(Locked)
Filter response with parameters2m 9s
-
(Locked)
Access data in the response2m 2s
-
(Locked)
Use the response data in HTML1m 15s
-
(Locked)
Challenge: Explore the Giphy API1m 24s
-
(Locked)
Solution: Explore the Giphy API1m 50s
-
(Locked)
-
-
-