Using a Public API - Tutorial for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 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

ความคิดเห็น • 49

  • @MrBermak
    @MrBermak 4 ปีที่แล้ว +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 3 ปีที่แล้ว +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

  • @Knards
    @Knards 5 ปีที่แล้ว +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 2 ปีที่แล้ว

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

  • @anandprakash4995
    @anandprakash4995 5 ปีที่แล้ว +1

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

  • @LovisaSandhu
    @LovisaSandhu 5 ปีที่แล้ว

    Thanks for the help!

  • @Ahmed-fk8rs
    @Ahmed-fk8rs 5 ปีที่แล้ว

    Very Helpful, Thank You Mr. J :)

  • @sophiebarrie5749
    @sophiebarrie5749 2 หลายเดือนก่อน

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

  • @osch421
    @osch421 2 ปีที่แล้ว

    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

  • @Blueflamey
    @Blueflamey 3 ปีที่แล้ว +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 3 ปีที่แล้ว

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

  • @BeAPickle
    @BeAPickle 5 ปีที่แล้ว +1

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

  • @user-yj1jj9gp7z
    @user-yj1jj9gp7z 5 หลายเดือนก่อน

    Really nice tutorial about the APIs

  • @tikiboatsrentalcuracao7529
    @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!

  • @AjayKumar-un2fz
    @AjayKumar-un2fz 4 ปีที่แล้ว

    Great video for beginners..

  • @ranierocapitillo7313
    @ranierocapitillo7313 4 ปีที่แล้ว

    This video is awesome.

  • @muhammadsafiullah8428
    @muhammadsafiullah8428 4 ปีที่แล้ว

    That's helpful

  • @iNVICTUX
    @iNVICTUX 5 ปีที่แล้ว

    Gracias amigo

  • @nabeeltahir6013
    @nabeeltahir6013 5 ปีที่แล้ว

    Nice tutorial

  • @jaqhass
    @jaqhass 3 ปีที่แล้ว

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

  • @Jeasleyiii
    @Jeasleyiii 4 ปีที่แล้ว

    very helpful video

  • @VeriousSmithIII
    @VeriousSmithIII 5 ปีที่แล้ว +4

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

    • @DevDamian
      @DevDamian 5 ปีที่แล้ว +2

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

  • @JimKernix
    @JimKernix 2 ปีที่แล้ว

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

    • @JimKernix
      @JimKernix 2 ปีที่แล้ว

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

  • @DavidMadrigalHernandez
    @DavidMadrigalHernandez 5 ปีที่แล้ว +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 5 ปีที่แล้ว

      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 5 ปีที่แล้ว

      How?

    • @DavidMadrigalHernandez
      @DavidMadrigalHernandez 5 ปีที่แล้ว +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 5 ปีที่แล้ว +1

      Thank you! I'll check it out.

    • @levinsondsouza
      @levinsondsouza 5 ปีที่แล้ว

      nice

  • @JimKernix
    @JimKernix 2 ปีที่แล้ว

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

  • @alexanderarea6157
    @alexanderarea6157 2 ปีที่แล้ว

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

  • @prerakhere
    @prerakhere 5 ปีที่แล้ว

    J?

  • @PabloHernandez-tf4do
    @PabloHernandez-tf4do 2 ปีที่แล้ว

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

  • @user-ir7sw8sn8h
    @user-ir7sw8sn8h 5 ปีที่แล้ว

    Сенкс!

  • @ScottMorgan88
    @ScottMorgan88 5 ปีที่แล้ว +1

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

  • @karlomagnoguadalupe4843
    @karlomagnoguadalupe4843 ปีที่แล้ว

    damn, very interesting hmmm :/

  • @femaledeer
    @femaledeer 5 ปีที่แล้ว +10

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

    • @techyleviathan2054
      @techyleviathan2054 5 ปีที่แล้ว +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 5 ปีที่แล้ว

      @@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.