This is a simple app that gets weather information from a third party. I wrote this to run on my pi.
- Run 'npm install'
Response
- Returns 200.
{}
Request
locationId - The city id.
Example
/weather/v1/forecast?locationId=123456
Response
{
"city": {
"cityId": 5913695,
"cityName": "Cambridge",
"cityCountryCode": "CA"
},
"weatherData": [
{
"time": "2015-12-29 00:00:00",
"temp": -5.28,
"tempHigh": -3.44,
"tempLow": -5.28,
"humidity": 78,
"description": "overcast clouds",
"weatherIcon": "http://api.openweathermap.org/img/w/04n.png"
},
{<--->},
{<--->},
{<--->}
]
Request
q - The search value.
Example
/weather/v1/forecast?q=Waterloo, Ontario
Response
{
"weatherData": [
{
"locationId": 5913695,
"temp": -5.29,
"tempHigh": -4,
"tempLow": -7,
"humidity": 85,
"description": "snow",
"weatherIcon": "http://api.openweathermap.org/img/w/13d.png"
}
]
}