Class OpenWeatherMapRequester
java.lang.Object
org.silverpeas.looks.aurora.service.weather.OpenWeatherMapRequester
- All Implemented Interfaces:
WeatherServiceRequester
@Default
@Service
@Named("OpenWeatherMap")
public class OpenWeatherMapRequester
extends Object
implements WeatherServiceRequester
Requester of the OpenWeatherMap API service.
- Author:
- mmoquillon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequest weather forecast data of the specified city.
-
Constructor Details
-
OpenWeatherMapRequester
public OpenWeatherMapRequester()
-
-
Method Details
-
request
Description copied from interface:WeatherServiceRequesterRequest weather forecast data of the specified city. If the requesting fails, then aWebApplicationExceptionis thrown.- Specified by:
requestin interfaceWeatherServiceRequester- Parameters:
cityId- a unique identifier of a city. Such identifiers are specific to the weather service.- Returns:
- a JSON or an XML representation of the weather forecast data.
-