meteo-core/src/main/java/no/api/meteo/service/sunrise/SunriseService.java
public MeteoData<Sunrise> fetchContent(double longitude, double latitude, LocalDate from, LocalDate to)
            throws MeteoException {
        MeteoResponse response = getMeteoClient().fetchContent(
                createServiceUriBuilder()
                        .addParameter(PARAM_LATITUDE, latitude)
                        .addParameter(PARAM_LONGITUDE, longitude)
                        .addParameter(PARAM_FROM, zonedDateTimeToYyyyMMdd(from))
                        .addParameter(PARAM_TO, zonedDateTimeToYyyyMMdd(to)).build()
        );
        return new MeteoData<>(parser.parse(response.getData()), response);
    }
public MeteoData<Sunrise> fetchContent(double longitude, double latitude, LocalDate from, LocalDate to)
            throws MeteoException {
        MeteoResponse response = getMeteoClient().fetchContent(
                createServiceUriBuilder()
                        .addParameter(PARAM_LATITUDE, latitude)
                        .addParameter(PARAM_LONGITUDE, longitude)
                        .addParameter(PARAM_FROM, zonedDateTimeToYyyyMMdd(from))
                        .addParameter(PARAM_TO, zonedDateTimeToYyyyMMdd(to)).build()
        );
        return new MeteoData<>(parser.parse(response.getData()), response);
    }
public MeteoData < Sunrise > fetchContent ( double longitude , double latitude , LocalDate from , LocalDate to ) throws MeteoException { MeteoResponse response = getMeteoClient ( ) . fetchContent ( createServiceUriBuilder ( ) . addParameter ( PARAM_LATITUDE , latitude ) . addParameter ( PARAM_LONGITUDE , longitude ) . addParameter ( PARAM_FROM , zonedDateTimeToYyyyMMdd ( from ) ) . addParameter ( PARAM_TO , zonedDateTimeToYyyyMMdd ( to ) ) . build ( ) ) ; return new MeteoData <> ( parser . parse ( response . getData ( ) ) , response ) ; }
Fetch a Sunrise from the MET API based on a given longitude, latitude and date range.

@param longitude
The longitude of the location where the Sunrise should be fetched from.
@param latitude
The latitude of the location where the Sunrise should be fetched from.
@param from
The date to fetch the Sunrise object from.
@param to
The date to fetch the Sunrise object to.

@return A MeteoData object containing response information and sunrise result converted into a Sunrise object.

@throws MeteoException
If a problem occurred while fetching or parsing the MET data.
Fetch a Sunrise from the MET API based on a given longitude latitude and date range .