This API will return historical weather data from metaweather for today's date given a Where On Earth ID
This API wraps the metaweather API and caches searches. Existing searches will be returned from the cache instead of hitting the metaweather API again.
A search consists of a WOEID. Today's date will be provided by the server.
The return object will be the weather for today's date up each year up to five years ago where possible. ("Most location have data from early 2013 to 5-10 days in the future." -https://www.metaweather.com/api/)
- See small scale trends in temperature / weather changes
wip
- GET
api/v1/locations/
: Get a list of all local WOEID / description (city name) pairs - GET
api/v1/search/<string>
: Where is the name of a city, return its local OEID, or return it from metaweather - GET
api/v1/weather/<id>
: Where is an OEID, return the historical weather data from cache if avaliable, else from metaweather
- Ruby version 2.7.1
-
create the database: rake db:migrate
-
seed the db: rake db:seed
rake test
v1:
-
fetch historical data from metaweather with a WOEID, and cache the result
-
Cache / retrieve WOEIDs based on a search string
-
able to view all cached locations (WOEIDS + descriptions) and searches (locations + date)
-
return searches from cache when possible
-
tests for all routes and controllers
-
generated Postman docs for api