Your long weekend planner is done, and you’ve explained it to the mentor and changed it for a fifth friend. Every request it sends, though, goes to an API the course chose for you, with docs you read together. In your own projects, nobody hands you the API or the steps.
In this item, you’ll build a small program of your own on a keyless public API that you choose, with the same method you used for the planner. You’ll pitch it to the mentor, plan it, build it one feature at a time, and then explain your code and change it. Everything else depends on the API you build on, so start by choosing it.
Choose a Keyless API
Your program depends on a server you don’t control, so pick one you can rely on before you write any code. The checks are the ones you made in Read an API’s Docs, now with nobody to make them for you:
- It’s documented. The docs name a base URL, at least one endpoint with its parameters, and an example response. Without those, you’d be guessing the response’s shape.
- It’s keyless. You can call it without an account, an API key, or a sign-in. If the docs ask you to register or send a key in a header, pick another API. This course keeps to keyless APIs, so your review stays about requests and responses, not about keeping secrets.
- It’s free for what you’re doing. Read the terms and the limits. A small program for yourself and your friends should stay well under them.
- It answers. Send one request with
curl -ior a shortfetch()script, without any key. Look for a200, aContent-Typeofapplication/json, and a body shaped like the docs’ example.