API Design
- Weather Lookup
- HTTP GET: /api/v1/weather?lang=&lati=
- HTTP GET: /api/v1/weather?city=
- HTTP GET: /api/v1/weather?lang=&lati=&timeunit=hours/days&timevalue=1
- HTTP GET: /api/v1/weather?city=&timeunit=hours/days&timevalue=1
Response: ["date":"", "hour":"", "weather":{
"temperature":"",
"humidity":"",
"wind":"",
"precipitation":"",
"city":"",
"description":"",
"weather_type":"SUNNEY/COLUDY/RANING/COLD"
"icon":""
}]
- Subscribe/unsubscribe for notification/notification
- HTTP PATCH: /api/v1/weather/subscribe/{email}/{flag}/{messageType}
Path Parameter:
email: User Email
flag: SUBSCRIBE/UNSUBSCRIBE
messageType: email/sms/push
- Resolve the City Name by GeoLocation
- HTTP GET: /api/v1/geolocation/{long}/{lat}/
Path Parameter:
Longitude
latitude
Response: name of the city/place