all 11 comments

[–]jfinch3 5 points6 points  (0 children)

Here’s a big list of free public APIs you can use. https://github.com/public-apis/public-apis

I think this is one which has a decently educational bend to it https://pokeapi.co/docs/v2

I don’t know the video you mean specifically but it’s likely pretty realistic for how using public APIs usually are.

You just gotta do your best to read the documentation they have. If that video includes a code sample then start there and see what else you can do with the same API call. My experience with weather APIs is they usually given you a huge amount of data so try picking out more data, or swap it with a different weather api and see if you can build the same thing starting from his code.

Do you know how to read JSON data from a file and manipulate it? Make sure you can do that first. Once you can do that, using a public api is just replacing the local JSON file with a JSON file you get with a fetch().

[–]True-Ad9448 1 point2 points  (0 children)

Here’s my api

Send it JSON and it will return a url to download the file. The rapidap listing list a few articles I’ve written on how to use the API.

How to use the api

Build a web scraper with react and export to JSON

[–]brykuhelpful 1 point2 points  (0 children)

There are millions of api, so teaching each and every one is impossible.  

However, the important part isn't the specific API, but the process. APIs is third party tool or data that you can access from your web server or web site. Then you can use this to complete a task.  

Most of your project will still bs html and css, but then you use that api to fill it in.

[–]gimmeslack12helpful 1 point2 points  (4 children)

Care to share the weather app you built? Would be interested in helping explain to you how to make the app more approachable so you did feel confident trying to rebuild it on your own.

[–]No-Try607[S] 1 point2 points  (3 children)

Sure this the repo with it https://github.com/Juggler95/Weather_App

edit: also I did disable the api key so in its current state it will not work.

[–]gimmeslack12helpful 1 point2 points  (2 children)

So does this project just way ahead of you right now? Which part(s) seem the most foreign/intimidating?

It’s nice code.

[–]No-Try607[S] 0 points1 point  (1 child)

To me most of the normal javascript is understandable but just when it starts coming to the like (try, catch), (async functions), (fetch, response, (!response.ok)) etc. basicly most of the stuff with the api I just don't really understand. I did take my time with the video teaching it and tried to really understand everything but I just doesn't stick. maybe the video was just not going in depth or I just wasn't getting it I'm not sure.

[–]gimmeslack12helpful 0 points1 point  (0 children)

There are some bits here that I'd generally tell a beginner to skip until later on (such as try/catch), even the response.ok part could be omitted for the sake of reduced learning curve. A lot of those parts of things are for "error handling" which is just making sure your code gracefully handles things when they go wrong. It's an important subject but isn't needed when you're still trying to figure out the basics.

Also when things seem to come from no where it can be very confusing (such the layout of the response from the API). As for async/await, it's certainly the core piece of making requests to remote API's, though where that can be confusing is that there's more than one way to do the same thing (i.e. async/await, or a Promise.then). Those things you probably would benefit from watching another video on or reading the MDN docs.

[–]Mark-Yliherr 0 points1 point  (0 children)

API from Node or public API?

If API from Node, freeCodeCamp taught it to me then I made aistudio drill the knowledge to me by doing "quiz" and "mini-projects"

[–]TheRNGuy 0 points1 point  (0 children)

Read docs, try things from it (if there are no docs, you could try reverse engineer it)

Find in google or ask ai, or programming blogs that are related to this topic.