Using a Public API - Tutorial for Beginners

Sdílet
Vložit
  • čas přidán 25. 11. 2018
  • Learn how to use a public API in your project. In this tutorial you will learn to use the openweathermap.org public API but everything you learn here will help you to use any other public API.
    🔗Get your API Key: openweathermap.org/appid
    🔗Icon URL: openweathermap.org/img/w/11d.png
    🔗Using getJSON: api.jquery.com/jquery.getjson/
    🔗Javascript Math properties: developer.mozilla.org/en-US/d...
    🔗Free Vectors by: www.vecteezy.com
    ⭐️Tutorial from iEatWebsites. Check out their channel for more great tutorials: / @ieatwebsites
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: medium.freecodecamp.org

Komentáře • 49

  • @MrBermak
    @MrBermak Před 4 lety +7

    Exceptional. For a long time I was looking for a good tutorial about the APIs. Finally I found a very good one.

  • @krislui852
    @krislui852 Před 3 lety +4

    had some lectures about api on some of the other programming courses I took, but none of them really show the process from getting the api key to using it. great video

  • @anandprakash4995
    @anandprakash4995 Před 5 lety +1

    explained very well !! good job i learn a lot !!

  • @Knards
    @Knards Před 5 lety +7

    Excellent way to learn json and objects. Thanks. A switch for wind direction is anyone wants it
    var deg = Math.floor(data.wind.deg);
    switch (true) {
    case deg >= 360 && deg = 22 && deg = 45 && deg = 67 && deg = 90 && deg = 112 && deg = 135 && deg = 157 && deg = 180 && deg = 202 && deg = 225 && deg = 247 && deg = 270 && deg = 292 && deg = 315 && deg = 337 && deg

  • @420Mlov
    @420Mlov Před 2 lety

    Thank you so much for this. It was straight, to the point, understandable, and works. Exactly what I needed.

  • @Ahmed-fk8rs
    @Ahmed-fk8rs Před 5 lety

    Very Helpful, Thank You Mr. J :)

  • @Blueflamey
    @Blueflamey Před 3 lety +3

    Nice tutorial! If I may suggest though, instead of floor(), round() function would be a good use. Then again, it's an effort to do these kinds of tutorials so, keep it up!

  • @SusanWinters
    @SusanWinters Před 3 lety

    Thank you sir. We need many more tutorials like this - working with different APIs. What else could we do for city pages?

  • @LovisaSandhu
    @LovisaSandhu Před 5 lety

    Thanks for the help!

  • @sophiebarrie5749
    @sophiebarrie5749 Před 2 měsíci

    Thank you so much! I'm a very new developer and I've been looking for a tutorial like this everywhere so thank you!

  • @user-yj1jj9gp7z
    @user-yj1jj9gp7z Před 4 měsíci

    Really nice tutorial about the APIs

  • @osch421
    @osch421 Před 2 lety

    I was using a different API and got stuck on authentication so googled using api tutorial... 2.24 in and your video helped me figure out where I was going wrong. Small silly syntax issue

  • @BeAPickle
    @BeAPickle Před 5 lety +1

    How did this work with a space in a city name New York ?

  • @AjayKumar-un2fz
    @AjayKumar-un2fz Před 4 lety

    Great video for beginners..

  • @tikiboatsrentalcuracao7529

    Where can i find in the daily/weekly report, the items i've sold per item. i can only find the total of invoices and the total amount. Please help!

  • @ranierocapitillo7313
    @ranierocapitillo7313 Před 4 lety

    This video is awesome.

  • @VeriousSmithIII
    @VeriousSmithIII Před 5 lety +4

    Helpful video. What is the reason that you are not using ES6 (JSONparse, let, querySelector())? Why jQuery?

    • @DevDamian
      @DevDamian Před 5 lety +2

      That what I thought as well. They should learn modern ways of doing things not the old ways.

  • @jaqhass
    @jaqhass Před 3 lety

    Kek. Nice touch with antarctica. The coordinates of -81.38, 28.54. Love it. XD

  • @iNVICTUX
    @iNVICTUX Před 5 lety

    Gracias amigo

  • @DavidMadrigalHernandez
    @DavidMadrigalHernandez Před 5 lety +1

    I liked this tutorial. The only thing that bugged me was the hardcoded url strings. In my opinion, instead of hardcoding the long url strings into the main code body, why not set them as seperate variables for cleaner looking code?

    • @DavidMadrigalHernandez
      @DavidMadrigalHernandez Před 5 lety

      To demonstrate what I mean above, here is what I ultimately ended up with that works pretty well.
      gist.github.com/MEXdave1997/64a967d99d09b83b99ae9cb24fdc173d

    • @toobstr
      @toobstr Před 5 lety

      How?

    • @DavidMadrigalHernandez
      @DavidMadrigalHernandez Před 5 lety +3

      @@toobstr go through the gist I linked. All I did was seperate the URLs as seperate variables above everything else, and then used the variables when contructing the API call

    • @toobstr
      @toobstr Před 5 lety +1

      Thank you! I'll check it out.

    • @levinsondsouza
      @levinsondsouza Před 5 lety

      nice

  • @nabeeltahir6013
    @nabeeltahir6013 Před 5 lety

    Nice tutorial

  • @muhammadsafiullah8428
    @muhammadsafiullah8428 Před 4 lety

    That's helpful

  • @Jeasleyiii
    @Jeasleyiii Před 4 lety

    very helpful video

  • @JimKernix
    @JimKernix Před 2 lety

    I can see to the right of the screen the integrity scrip tag attribute. Do we need that?

    • @JimKernix
      @JimKernix Před 2 lety

      Also, why is your endpoint formtted json while min looks like it is minified?

  • @JimKernix
    @JimKernix Před 2 lety

    Does anyone know how to convert the sunrise and sunset time into hours:minutes?

  • @alexanderarea6157
    @alexanderarea6157 Před 2 lety

    I clicked 'Get Api' but I haven't got any key

  • @prerakhere
    @prerakhere Před 5 lety

    J?

  • @PabloHernandez-tf4do
    @PabloHernandez-tf4do Před 2 lety

    For some reason this API has the weather in my city so terribly wrong

  • @ScottMorgan88
    @ScottMorgan88 Před 5 lety +1

    .floor() will round down. You need .round() to round to the nearest degree.

  • @user-ir7sw8sn8h
    @user-ir7sw8sn8h Před 5 lety

    Сенкс!

  • @karlomagnoguadalupe4843

    damn, very interesting hmmm :/

  • @femaledeer
    @femaledeer Před 5 lety +10

    I dont see how this is for a beginner. Nothing is explained well.

    • @techyleviathan2054
      @techyleviathan2054 Před 5 lety +7

      actually it was pretty basic.
      The title said it clearly .. API for beginners. (Not HTML, CSS, JavaScript, Coding in General and CS science for beginners). The implementation was really straight forward. If you didn't understand the other principles I suggest you to start from HTML and CSS , then JavaScript.
      After a month or two of hard studying, come back and rewatch the video.

    • @artvandalay13
      @artvandalay13 Před 5 lety

      @@techyleviathan2054 1. Don't be an ass and maybe go back to your hole in your third-world country. 2. It says for beginners. What you just said is for intermediate learners.