package eirb.pg203; import eirb.pg203.exceptions.WeatherFetchingException; import java.io.IOException; import java.util.ArrayList; /** * Interface to discuss with a weather API */ public interface WeatherDataAPI { /** * Fetch the temperature for a specific day in a city * @param day Since D+0 * @param city Localisation * @return Temperature of the day from the city * @throws WeatherFetchingException when request failed */ WeatherData getTemperature(int day, String city) throws WeatherFetchingException; /** * Get WeatherData for a specific day * @param day Since D+0 * @param hour Since H+0 * @param city Localisation * @return Temperature of the day for a hour from the city * @throws WeatherFetchingException when request failed */ WeatherData getTemperature(int day, int hour, String city) throws WeatherFetchingException; /** * Fetch the temperature for multiple day since today * @param days number of days to fetch * @param city name of te city * @return List of WeatherData * @throws WeatherFetchingException when request failed */ ArrayList getTemperatures(int days, String city) throws WeatherFetchingException; /*** * Name of the API * @return Name of the API */ String getAPIName(); }