Weather app moral support

Weather app moral support
0

#1

I’m on the weather app project and I don’t even know where to begin.

I got a key from the weather api suggested in the challenge guidelines (open weather map).

I have no clue how to get JSON data from the api.

My general understanding of how it should work is that when the user goes to my weather app (on code pen), a call is made to the api to get weather data for their city (how do I get their city? navigator.geolocation??). It comes back as an object and I update my html with the key:value pairs in that object.
I know I’m supposed to use $getJSON().

I’m feeling inept and intimidated by APIs and retrieving JSON data…and then handling that data. Can someone get me on track?


#2

Hi,

I would recommend to first do your our general layout (HTML and CSS),

Then you will see what you need to do in your JS.

$.getJSON(openWeatherUrl, function(data){
//yourcode
$("#temp").html(data.main.temp);//to update your HTML
});

Read the API documentation you will get most of the information you need :slight_smile:


#3

I would reccommend using SimpleWeather.Js because it’s a really nice Yahoo! Weather jQuery plugin, you don’t need an API key, and it’s really simple and easy to use!