@@ 464-475 (lines=12) @@ | ||
461 | * |
|
462 | * @api |
|
463 | */ |
|
464 | public function getRawUviData($query, $appid = '') |
|
465 | { |
|
466 | if (!is_array($query)) { |
|
467 | throw new \InvalidArgumentException('$query must get information is as follows: [latitude, longitude]'); |
|
468 | } elseif (count($query) != 2) { |
|
469 | throw new \InvalidArgumentException('$query must get information is as follows: [latitude, longitude]'); |
|
470 | } else { |
|
471 | $url = $this->buildUviUrl($query, $appid); |
|
472 | } |
|
473 | ||
474 | return $this->cacheOrFetchResult($url); |
|
475 | } |
|
476 | ||
477 | /** |
|
478 | * Directly returns the json string returned by OpenWeatherMap for the UVI history data. |
|
@@ 491-502 (lines=12) @@ | ||
488 | * |
|
489 | * @api |
|
490 | */ |
|
491 | public function getRawUviHistory($query, $appid = '') |
|
492 | { |
|
493 | if (!is_array($query)) { |
|
494 | throw new \InvalidArgumentException('$query must get information is as follows: [latitude, longitude, ISO 8601 date format]'); |
|
495 | } elseif (count($query) != 3) { |
|
496 | throw new \InvalidArgumentException('$query must get information is as follows: [latitude, longitude, ISO 8601 date format]'); |
|
497 | } else { |
|
498 | $url = $this->buildUviUrl($query, $appid); |
|
499 | } |
|
500 | ||
501 | return $this->cacheOrFetchResult($url); |
|
502 | } |
|
503 | ||
504 | /** |
|
505 | * Returns the current uvi at the location you specified. |