public async Task <Result <PriceRequestError, Models.Prices> > GetPriceAsync(GasStationId gasStationId) { var response = await new PriceRequest(new List <GasStationId>() { gasStationId }, TankerkoenigBaseUrl, ApiKey).Invoke(); var hasPrices = (response as PriceResponse).Prices.TryGetValue(gasStationId, out var prices); if (hasPrices) { return(prices); } return(null); }
public async Task <DetailedResponse> GetDetailsAsync(GasStationId gasStationId) { var response = await new DetailsRequest(gasStationId, TankerkoenigBaseUrl, ApiKey).Invoke(); return(response as DetailedResponse); }