Concern-Tag : weather
This concern is all about weather. It is dependent upon openweathermap.com. It is possible to request the current weather data and a forecast for the next 5 days in 3 hour intervals
-
** location ** (String): Specifies the location to query
- {city name},{country code}: Specify the city name and probably the country code de (for example
"Suttgart,de"
) - {zip code},{country code}: Specify the country name and the country code (for example
"04516,de"
)
- {city name},{country code}: Specify the city name and probably the country code de (for example
-
** condition.id ** (Integer): Identifier to not math strings
- TBD: either plain from here or a little bit condensed
-
** condition.description ** (String): Describes the weather in one word
-
** temp ** (Float): Temperature in Degrees
-
** data ** (JSON): Data dump from the API in the form found at either here or here
[List of all supported request types]:
Type-Tag: weather_current
- location (String): see
- data (JSON): of type 1[Description]
Request
{
"type": "weather_current",
"payload": {
"location": "Stuttgart,de"
}
}
Response
{
"type": "weather_current",
"payload": {
"data": {
"coord": {"lon":145.77,"lat":-16.92},
"weather": [{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],
"base":"cmc stations",
"main":{"temp":293.25,"pressure":1019,"humidity":83,"temp_min":289.82,"temp_max":295.37},
"wind":{"speed":5.1,"deg":150},
"clouds":{"all":75},
"rain":{"3h":3},
"dt":1435658272,
"sys":{"type":1,"id":8166,"message":0.0166,"country":"AU","sunrise":1435610796,"sunset":1435650870},
"id":2172797,
"name":"Cairns",
"cod":200
}
}
}
Type-Tag: weather_current_TBD
Currenctly not implemented has to be specified for further use
- location (String): [Description]
- conditions (array of conditions): [Description]
- temp (Float): [Description]
Request
{
"type": "weather_current",
"payload": {
"location": "Stuttgart,de"
}
}
Response
{
"type": "weather_current",
"payload": {
"conditions": {
/*TODO*/
}
}
}
Type-Tag: weather_forecast
Will return the weather data with a 5 day forecast and for a 3h time frame
- location (String): see
- time (String): unix time stamp (UTC) to request the data of
- data (JSON): of type 1[Description]
Request
{
"type": "weather_forecast",
"payload": {
"location": "Stuttgart,de"
"time": "1406106045"
}
}
Response
{
"type": "weather_current",
"payload": {
"data": {
"dt":1406106000,
"main":{
"temp":298.77,
"temp_min":298.77,
"temp_max":298.774,
"pressure":1005.93,
"sea_level":1018.18,
"grnd_level":1005.93,
"humidity":87,
"temp_kf":0.26},
"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],
"clouds":{"all":88},
"wind":{"speed":5.71,"deg":229.501},
"sys":{"pod":"d"},
"dt_txt":"2014-07-23 09:00:00"
}
}
}
Type-Tag: [Type Tag]
- [Parameter1 Name] ([Parameter1 Type]): [Description]
- [Possible Value]: [Value Description]
- [Parameter2 Name]: ([Parameter2 Type]): [Description]
[Example for message]