fix: conflict
This commit is contained in:
parent
34928424ca
commit
83b7ce780a
@ -2,6 +2,9 @@ package eirb.pg203;
|
|||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Representation of a temperature in a city at a specific date
|
||||||
|
*/
|
||||||
public class Temperature {
|
public class Temperature {
|
||||||
private City city;
|
private City city;
|
||||||
private Instant date;
|
private Instant date;
|
||||||
|
@ -12,6 +12,9 @@ import java.net.URL;
|
|||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WeatherAPI implementation
|
||||||
|
*/
|
||||||
public class WeatherAPI implements WeatherDataAPI{
|
public class WeatherAPI implements WeatherDataAPI{
|
||||||
private final String weatherAPIKey;
|
private final String weatherAPIKey;
|
||||||
private static final String forecastBaseURL = "https://api.weatherapi.com/v1/forecast.json";
|
private static final String forecastBaseURL = "https://api.weatherapi.com/v1/forecast.json";
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
package eirb.pg203;
|
package eirb.pg203;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* How to display weather information, make the API calls based on the collection of WheatherDataAPI
|
||||||
|
*/
|
||||||
public interface WeatherDisplay {
|
public interface WeatherDisplay {
|
||||||
|
/**
|
||||||
|
* Display information for number of days
|
||||||
|
* @param days number of days to display
|
||||||
|
* @param city localisation of the temperature to fetch
|
||||||
|
*/
|
||||||
void display(int days, String city);
|
void display(int days, String city);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add API to use when fetch
|
||||||
|
* @param w API to add
|
||||||
|
*/
|
||||||
void addAPI(WeatherDataAPI w);
|
void addAPI(WeatherDataAPI w);
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,4 @@ import java.io.IOException;
|
|||||||
|
|
||||||
public class SampleTest {
|
public class SampleTest {
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testFetchChuckNorrisJoke() throws IOException {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user