API Call Playground
Now that I've gotten a firm grasp of HTML and CSS, my current obsession is learning javascript. One of the most common things websites do is ask other websites for data. Sending the request and receiving the response is not as easy as running a simple command like fetch()
and then displaying the data as an item on the page. Below are a few API calls I've coded. There are only GET requests right now. More types of calls and a detailed guide to come.
Bored API GET
Lets find you something to do. From https://www.boredapi.com/api/activity
Waiting...
Date & Time GET
The current date and time from http://worldtimeapi.org/api/timezone/America/Chicago
Waiting...
Cat Facts GET
A single cat fact from https://cat-fact.herokuapp.com/facts/
Click to get a cat fact.
{JSON} Placeholder GET
Based on SvelteKit documentation and ChatGPT guidance. URL: https://jsonplaceholder.typicode.com/todos/1
Waiting...
{JSON} Placeholder 2 GET
Based on this tutorial. URL: https://jsonplaceholder.typicode.com/todos/1
News GET
Some articles from https://api.thenewsapi.com/v1/news/top?&locale=us&limit=3
I don't work yet :(