The truth is, I love cats, and I thought making a gallery with random cats would be a cute idea! And for the first time, I learned how to work with an API in JavaScript.
Well, when you click the 'show another' button, the website code requests a URL from an API containing a random cat image, which is then displayed to you!
Well... this was my first time working with a JavaScript API. I already knew how to do it in Python, but I learned how to use JavaScript :D
I chose a modern design and minimalist colors; the website uses a background color of #ddd, the container color is #fff (pure white), and for the button to make it eye-catching, I opted for a red #c91b1b.
- What is the ID used for?
The ID is mainly used for debugging.
- Which API did I use?
I used the API:
https://api.thecatapi.com/v1/images/search, it returns a random image of a cat 🐈
(A programmer cat, hehe, this represents me :))