Class OneCallWeatherResponseMapper

java.lang.Object
com.github.prominence.openweathermap.api.mapper.OneCallWeatherResponseMapper

public class OneCallWeatherResponseMapper extends Object
Object mapper for OneCall API response.
  • Constructor Details

    • OneCallWeatherResponseMapper

      public OneCallWeatherResponseMapper(UnitSystem unitSystem)
      Instantiates a new forecast response mapper.
      Parameters:
      unitSystem - the unit system
  • Method Details

    • mapToCurrent

      public CurrentWeatherData mapToCurrent(String json)
      Maps current weather data response into java object.
      Parameters:
      json - the json string
      Returns:
      the current data object
    • mapToHistorical

      public HistoricalWeatherData mapToHistorical(String json)
      Maps current weather data response into java object.
      Parameters:
      json - the json string
      Returns:
      the current data object