doc(weatherAPI): add few documentation
This commit is contained in:
parent
25ad77e394
commit
e1eb03c622
@ -13,14 +13,26 @@ public class Temperature {
|
|||||||
this.date = date;
|
this.date = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the name of the city from where the temperature come from
|
||||||
|
* @return city
|
||||||
|
*/
|
||||||
public String getCity() {
|
public String getCity() {
|
||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the date
|
||||||
|
* @return date
|
||||||
|
*/
|
||||||
public Instant getDate() {
|
public Instant getDate() {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the temperature
|
||||||
|
* @return temperature
|
||||||
|
*/
|
||||||
public float getTemp() {
|
public float getTemp() {
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,30 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
public interface WeatherDataAPI {
|
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 IOException when request failed
|
||||||
|
*/
|
||||||
Temperature getTemperature(int day, String city) throws IOException;
|
Temperature getTemperature(int day, String city) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @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 IOException when request failed
|
||||||
|
*/
|
||||||
Temperature getTemperature(int day, int hour, String city) throws IOException;
|
Temperature getTemperature(int day, int hour, String city) throws IOException;
|
||||||
|
|
||||||
ArrayList<Temperature> getTemperatures(int days, String city) throws IOException;
|
ArrayList<Temperature> getTemperatures(int days, String city) throws IOException;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Name of the API
|
||||||
|
* @return Name of the API
|
||||||
|
*/
|
||||||
String getAPIName();
|
String getAPIName();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user