getPriceHistoryByCountry

fun getPriceHistoryByCountry(countryCode: String, since: Date, granularity: String, forecast: Boolean = false, completion: (Completion<List<PriceHistory>>) -> Unit)

Returns the price history for the specified country.

Parameters

countryCode

Country code in ISO 3166-1 alpha-2 format.

since

Must be less than now and not more than 1 year ago.

granularity

Number&Unit (m,d,w,M,y); Example: 15m.

forecast

Determines if the response includes a price forecast.

completion

Returns a list of PriceHistory objects on success or a Throwable on failure.

fun getPriceHistoryByCountry(countryCode: String, fuelType: String, since: Date, granularity: String, forecast: Boolean = false, completion: (Completion<List<PriceHistoryFuelType>>) -> Unit)

Returns the price history for the specified country and fuel type.

Parameters

countryCode

Country code in ISO 3166-1 alpha-2 format.

fuelType

Fuel type for cars, based on the EU fuel marking.

since

Must be less than now and not more than 1 year ago.

granularity

Number&Unit (m,d,w,M,y); Example: 15m.

forecast

Determines if the response includes a price forecast.

completion

Returns a list of PriceHistoryFuelType objects on success or a Throwable on failure.