| @@ 27-37 (lines=11) @@ | ||
| 24 | return $this->denormalizer->denormalize($result, new UltravioletIndexResponse()); |
|
| 25 | } |
|
| 26 | ||
| 27 | public function fetchForecastUltravioletIndex(GeographicCoordinates $coordinates, DaysCount $daysCount): AggregatedUltravioletIndex |
|
| 28 | { |
|
| 29 | $params = $this->factory->buildBag(self::BASE_URL . '/forecast'); |
|
| 30 | $params->setGetParameter($coordinates->getLatitude()); |
|
| 31 | $params->setGetParameter($coordinates->getLongitude()); |
|
| 32 | $params->setGetParameter($daysCount); |
|
| 33 | ||
| 34 | $result = $this->getResult($this->factory->build($params)); |
|
| 35 | ||
| 36 | return $this->denormalizer->denormalize($result, new AggregatedUltravioletIndex()); |
|
| 37 | } |
|
| 38 | ||
| 39 | public function fetchHistoricalUltravioletIndex(GeographicCoordinates $coordinates, Period $period, DaysCount $daysCount): AggregatedUltravioletIndex |
|
| 40 | { |
|
| @@ 92-103 (lines=12) @@ | ||
| 89 | /** |
|
| 90 | * {@inheritdoc} |
|
| 91 | */ |
|
| 92 | public function inCycle(Latitude $latitude, Longitude $longitude, Cluster $cluster, CityCount $cnt) |
|
| 93 | { |
|
| 94 | $params = $this->factory->buildBag(self::URL_CYCLE); |
|
| 95 | $params->setGetParameter($latitude); |
|
| 96 | $params->setGetParameter($longitude); |
|
| 97 | $params->setGetParameter($cluster); |
|
| 98 | $params->setGetParameter($cnt); |
|
| 99 | ||
| 100 | $response = $this->getResult($this->factory->build($params)); |
|
| 101 | ||
| 102 | return $this->denormalizer->denormalize($response, new AggregatedWeather()); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * {@inheritdoc} |
|