Package web.sportflow.weather
Class WeatherController
java.lang.Object
web.sportflow.weather.WeatherController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCityFromCoordinates(Double lat, Double lon) getCurrentWeather(String address) getWeatherAtDate(String date, String address) getWeatherStatsAtDate(String date, String address, Double duration) Get weather statistics for a specific date and duration.
-
Constructor Details
-
WeatherController
-
-
Method Details
-
getWeatherStatsAtDate
@GetMapping("/stats") public WeatherStatsDTO getWeatherStatsAtDate(@RequestParam String date, @RequestParam String address, @RequestParam Double duration) Get weather statistics for a specific date and duration.- Parameters:
date- The date and time to get the weather stats for (format: YYYY-MM-DDTHH).address- The address to get the weather stats for.duration- The duration (in minutes) to get the weather stats for.- Returns:
- WeatherStatsDTO containing the weather statistics.
-
getCurrentWeather
-
getWeatherAtDate
@GetMapping("/at/{date}") public WeatherDTO getWeatherAtDate(@PathVariable String date, @RequestParam String address) -
getCityFromCoordinates
-