Retrieve Weather for City
smcunning opened this issue · comments
Shaunda Cunningham commented
- Endpoint utilizes the MapQuest GeoCoding API and the OpenWeather One Call API
- Request:
GET /api/v1/forecast?location=denver,co
Content-Type: application/json
Accept: application/json
- Response:
{
"data": {
"id": null,
"type": "forecast",
"attributes": {
"current_weather": {
"datetime": "2020-09-30 13:27:03 -0600",
"temperature": 79.4,
etc
},
"daily_weather": [
{
"date": "2020-10-01",
"sunrise": "2020-10-01 06:10:43 -0600",
etc
},
{...} etc
],
"hourly_weather": [
{
"time": "14:00:00",
"wind_speed": "4 mph",
"wind_direction": "from NW",
etc
},
{...} etc
]
}
}
}
- Testing should look for more than just the presence of attribute fields in the response. Testing should also determine which fields should NOT be present. (don’t send unnecessary data)