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 .