Now that you've worked in APIs, learn how to comb through an API's documentation! By reading about what an API can do and how to use it, you'll be able to add amazing features and functionality to your projects and applications.
- DOM & Events
- APIs & AJAX
- Fork and clone this repository.
- Change into the new directory.
- Fulfill the listed requirements.
Starter code is available in lib/
. You are required to turn in your
submission by making a pull request on the original repository.
First, use fetch()
to make a GET request to the Cat API and console log the
response object.
- Navigate to the Cat API Documentation and read through the documentation.
- Use the following endpoint: https://api.thecatapi.com/v1/images/search
- In
script.js
, usefetch()
and the "Get a Random Kitty" URL to make a GET request and console log the response object.
How will you know if your request was successful?
Next, use the Cat API to display an image of a random cat every time the user clicks a button! You will add functionality to the Random Cat button that has been provided for you.
- Add functionality so that when the Random Cat button is clicked, an image of a random cat appears!
When a user enters the name of the category into the input field, a random cat from that category appears!
Take a moment to refamiliarize yourself with the Plagiarism policy. Plagiarized work will not be accepted.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.