8.5: Working with APIs in Javascript – p5.js Tutorial

[ad_1]
This video demonstrates how to work with an API. The example uses open weather map. How do you form an API query? How do you get an API key? How do you use the JSON data the API sends you back? Oh, and what is an API?

All examples:

Contact:

Next video:

JavaScript basics:

HTML/CSS basics:

Full Data playlist:

Help us caption & translate this video!


Posted

in

by

Tags:

Comments

36 responses to “8.5: Working with APIs in Javascript – p5.js Tutorial”

  1. Daniel Uribe Avatar

    This helped tons as I'm just learning how to call API's with Javascript. I'll definitely take a look at your other videos.

  2. Jordy Mcnab Avatar

    Subscribed! Your personality makes your videos not dull. You also have a great ability to break down the concepts.

  3. Rishav Bhowmik Avatar

    Can you tell what to do with loadJSON without P5

  4. Jang Bang Avatar

    Thank you so much for bringing your enthusiasm online and making learning a positive experience!

  5. Krishna Karang Avatar

    Cool and fun presentation, enjoying it very much… especially for API newbie like me… two thumbs up for you… thanks

  6. I am fucking your waifu and there's nothing you can do about it Avatar

    How do I get the little human to do it? He won't even pop up on my editor…

  7. Arham Aalam Avatar

    I got this error :
    Fetch API cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

  8. Sachin Chauhan Avatar

    Hi, From weeks I have been trying to understand how to fetch data from an API and load it in my program… your method worked.. thanks and yes you made it enjoyable…

  9. Dan Haddock Avatar

    Also, if you are following along with this for some reason the units to not get applied unless added before the AppID. That was the case for myself.

  10. Dan Haddock Avatar

    Incredible and practical explanation of this technology. API's seem like a great way to teach JavaScript. Thanks for sharing Dan!

  11. Dharanya Lavanya Avatar

    What else can we use instead of p5.js?

  12. Albert Koppelmaa Avatar

    City=England, it's everyday broooo

  13. Younes PhD Henni Avatar

    do they teach like this in school ?!

  14. BRUNO FAM Avatar

    I´m beginning to learn Javascript and I hope to explore it with API in the future… I really appreciate your way to teach and to share your knowledge with us. Thanks a lot and keep doing it please!!!

  15. Gabriel Opare Jnr Avatar

    Hey there Im trying to use the vimeo API. the feedback I get is 401 authentication required on line 3.
    this is my line 3.
    $vdata= file_get_contents('https://api.vimeo.com/videos?query='.$search.'&page='.$p.'&per_page=5&access_token='.$vimeo_token.'');

    What do I do now? Im quite new to the whole API thing

  16. Efe Daniel Onah-Ojobo Avatar

    Great tutorial you kept smile on my face.

    I am currently working on project and it requires me fetching user details(bio) and send it to an API. I kindly need your help on how to go about it.

  17. Chang Yue sin Avatar

    no picture came out when i run your code.. why is that so?

  18. Thomas Wolter Avatar

    Great tutorial. I love the way you teach! Very special. Many thanks for it.
    I only wished that API was explained with Ajax and not with p5.js.

  19. Reisesucht Avatar

    Hi Daniel I hope you see my message. I am working with the Google Maps Javascript Api. In my Drop Down menu the user of website has the option to select diferent buttons. These buttons stand for different tempretures. Like 25 Celsius, 30 Celsius… I want that the countries which current tempreture average fit to which button the user has selected get highlighted on the google maps api. I really have no idea how to do this. Do you have a tip for me.
    Fabian

  20. Yeong Song Ren Avatar

    Incredible Tutorial! Thanks!

  21. juana pu Avatar

    Is there any tool that can show all keys and value for each API URL? Everytime when i use an API, it is very difficult for me to find out wht kind of key i should put in the URL~~

  22. Aata-allah Rchidi Avatar

    Thank you i understand everything, but when i add my key its doesnt work, i cant see the JSON.

  23. Matthew Jones Avatar

    wow you are impressive. Great work.

  24. Просто Русич Avatar

    And what about Dark Sky API? Is there any significant difference from the openweathermap? I wanna make a weather informer in javascript using Dark Sky API and don't know what to start with

  25. AdityaFingerstyle Avatar

    If anyone's getting the "Access-Control-Allow-Origin'" error, using this browser extension will help.

    https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi/related?hl=en-US

  26. Topsoil Depletion Awareness Avatar

    If you were to move your code in setup() would you still need if(weather)?

  27. Sarah Kerrigan Avatar

    The real content starts at 12:10

  28. Vialli Novelo Avatar

    nice tutorial… really cought my attention and learn something to be a beginner..thanks

  29. Chaaos2 Avatar

    You're awesome dood thanks for all your great videos! Love your style yo!

  30. Uzoma Acholonu Avatar

    finally a video with info i can use. WELL DONE!

  31. CrescentFresh Avatar

    Do you ever do talks? I need to witness you in person sharing your knowledge! Incredible teacher.

Leave a Reply

Your email address will not be published. Required fields are marked *