#openweather
Simple Weather Retrieval Module for http://openweathermap.org/
Version
1.0.4
Installation
$ npm i --save openweather
Usage
Obtain api "key" from http://openweathermap.org/ after registration. It is called "APPID". You may load it as an environment variable or include it as an optional parameter.
var openWeather = require('openweather');
openWeather.getWeather(coords, function(result){
console.log(result);
}, [key]);
{"latitude": 37, "longitude": -122 }
{
"city": "San Francisco",
"country": "ca"
}
{
"zip": "94115"
}
{
"lon": -123.12,
"lat": 49.25,
"city": "Vancouver",
"country": "CA",
"sunset": 1467433243,
"sunrise": 1467375137,
"humidity": 68,
"pressure": 1019,
"icon": "http://openweathermap.org/img/w/04d.png",
"weather": "Clouds",
"weatherDes": "broken clouds",
"windSpeed": 3.6,
"avgTempK": 293.07,
"minTempK": 289.15,
"maxTempK": 296.48,
"avgTempC": 19.92,
"minTempC": 16,
"maxTempC": 23.33,
"avgTempF": 67.86,
"minTempF": 60.8,
"maxTempF": 73.99
}
};
License
MIT