public function getRawUVIndexData($lat, $lon, $dateTime, $timePrecision = 'day')
    {
        if (!$this->apiKey) {
            throw new \RuntimeException('Before using this method, you must set the api key using ->setApiKey()');
        }
        if (!is_float($lat) || !is_float($lon)) {
            throw new \InvalidArgumentException('$lat and $lon must be floating point numbers');
        }
        if (interface_exists('DateTimeInterface') && !$dateTime instanceof \DateTimeInterface || !$dateTime instanceof \DateTime) {
            throw new \InvalidArgumentException('$dateTime must be an instance of \DateTime or \DateTimeInterface');
        }
        $url = $this->buildUVIndexUrl($lat, $lon, $dateTime, $timePrecision);

        return $this->cacheOrFetchResult($url);
    }
public function getRawUVIndexData($lat, $lon, $dateTime, $timePrecision = 'day')
    {
        if (!$this->apiKey) {
            throw new \RuntimeException('Before using this method, you must set the api key using ->setApiKey()');
        }
        if (!is_float($lat) || !is_float($lon)) {
            throw new \InvalidArgumentException('$lat and $lon must be floating point numbers');
        }
        if (interface_exists('DateTimeInterface') && !$dateTime instanceof \DateTimeInterface || !$dateTime instanceof \DateTime) {
            throw new \InvalidArgumentException('$dateTime must be an instance of \DateTime or \DateTimeInterface');
        }
        $url = $this->buildUVIndexUrl($lat, $lon, $dateTime, $timePrecision);

        return $this->cacheOrFetchResult($url);
    }
public function getRawUVIndexData ( $ lat , $ lon , $ dateTime , $ timePrecision = 'day' ) { if ( ! $ this -> apiKey ) { throw new \ RuntimeException ( 'Before using this method, you must set the api key using ->setApiKey()' ) ; } if ( ! is_float ( $ lat ) || ! is_float ( $ lon ) ) { throw new \ InvalidArgumentException ( '$lat and $lon must be floating point numbers' ) ; } if ( interface_exists ( 'DateTimeInterface' ) && ! $ dateTime instanceof \ DateTimeInterface || ! $ dateTime instanceof \ DateTime ) { throw new \ InvalidArgumentException ( '$dateTime must be an instance of \DateTime or \DateTimeInterface' ) ; } $ url = $ this -> buildUVIndexUrl ( $ lat , $ lon , $ dateTime , $ timePrecision ) ; return $ this -> cacheOrFetchResult ( $ url ) ; }
Directly returns the json string returned by OpenWeatherMap for the UV index data.

@param float $lat                   The location's latitude.
@param float $lon                   The location's longitude.
@param \DateTimeInterface $dateTime The date and time to request data for.
@param string $timePrecision        This decides about the timespan OWM will look for the uv index. The tighter
the timespan, the less likely it is to get a result. Can be 'year', 'month',
'day', 'hour', 'minute' or 'second', defaults to 'day'.

@return bool|string Returns the fetched data.

@api
Directly returns the json string returned by OpenWeatherMap for the UV index data .