weatherapi, among other things, provides a REST API for historical weather data. You need to look into the historical data of five days for a given city from a given date and calculate the average wind speed in meters per second, the average humidity and the average temperature in kelvins for each of these days.
Your application should provide and HTTP GET endpoint named stats
, that should accept two parameters: the date in the format YYYY-MM-DD
and the city name. The communication should be done via JSON.
For the HTTP server, you should use Akka HTTP. For the json parsing, you should use play-json. sbt should be used to build the application and scalatest to test it.