@@ 311-319 (lines=9) @@ | ||
308 | * |
|
309 | * @api |
|
310 | */ |
|
311 | public function getForecastUVIndex($lat, $lon, $cnt = 8) |
|
312 | { |
|
313 | $answer = $this->getRawUVIndexData('forecast', $lat, $lon, $cnt); |
|
314 | $data = $this->parseJson($answer); |
|
315 | ||
316 | return array_map(function ($entry) { |
|
317 | return new UVIndex($entry); |
|
318 | }, $data); |
|
319 | } |
|
320 | ||
321 | /** |
|
322 | * Returns the historic uv index at the specified location. |
|
@@ 336-344 (lines=9) @@ | ||
333 | * |
|
334 | * @api |
|
335 | */ |
|
336 | public function getHistoricUVIndex($lat, $lon, $start, $end) |
|
337 | { |
|
338 | $answer = $this->getRawUVIndexData('historic', $lat, $lon, null, $start, $end); |
|
339 | $data = $this->parseJson($answer); |
|
340 | ||
341 | return array_map(function ($entry) { |
|
342 | return new UVIndex($entry); |
|
343 | }, $data); |
|
344 | } |
|
345 | ||
346 | /** |
|
347 | * Returns air pollution data |