Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function (){
- var root = 'http://api.openweathermap.org';
- $.ajax({
- type: 'GET',
- url: root + '/data/2.5/weather?q=plovdiv&appid=db50e8e2dfc0f5e4e4c98d1f473bef57',
- success: function(weather) {
- console.log(weather);
- console.log('Weather in ' + weather.name + ', ' + weather.sys.country);
- console.log(weather.weather[0].description);
- console.log('_______________________________________________________');
- console.log('Wind: ' + weather.wind.speed);
- console.log('Cloudiness : ' + weather.weather[0].description);
- console.log('Pressure : ' + weather.main.pressure + ' hpa');
- console.log('Humidity : ' + weather.main.humidity + '%');
- console.log('Sunrise : ' + weather.sys.sunrise);
- console.log('Sunset : ' + weather.sys.sunset);
- console.log('Geo coords : [' + weather.coord.lat + ',' + weather.coord.lon + ']');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement