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 Details

    • OpenWeatherMapRequester

      public OpenWeatherMapRequester()
  • Method Details

    • request

      public WeatherForecastData request(String cityId)
      Description copied from interface: WeatherServiceRequester
      Request weather forecast data of the specified city. If the requesting fails, then a WebApplicationException is thrown.
      Specified by:
      request in interface WeatherServiceRequester
      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.