public function getMetadata($locationId)
    {
        if (strlen($locationId) !== 6 || !Regex::match("/[0-9]{6}/", $locationId)->hasMatch()) {
            throw new \InvalidArgumentException('locationId must be a id out of 6 numbers');
        }

        $url = "/etc/designs/meteoswiss/ajax/location/$locationId.json";

        $result = collect($this->makeRequest($url, true));

        return [
            'location_id' => $result['location_id'],
            'city_name' => $result['city_name'],
            'postal_code' => substr($result['location_id'], 0, 4),
            'station_id' => $result['station_id'],
            'webcam_id' => $result['webcam_id'],
        ];
    }
public function getMetadata($locationId)
    {
        if (strlen($locationId) !== 6 || !Regex::match("/[0-9]{6}/", $locationId)->hasMatch()) {
            throw new \InvalidArgumentException('locationId must be a id out of 6 numbers');
        }

        $url = "/etc/designs/meteoswiss/ajax/location/$locationId.json";

        $result = collect($this->makeRequest($url, true));

        return [
            'location_id' => $result['location_id'],
            'city_name' => $result['city_name'],
            'postal_code' => substr($result['location_id'], 0, 4),
            'station_id' => $result['station_id'],
            'webcam_id' => $result['webcam_id'],
        ];
    }
public function getMetadata ( $ locationId ) { if ( strlen ( $ locationId ) !== 6 || ! Regex :: match ( "/[0-9]{6}/" , $ locationId ) -> hasMatch ( ) ) { throw new \ InvalidArgumentException ( 'locationId must be a id out of 6 numbers' ) ; } $ url = "/etc/designs/meteoswiss/ajax/location/$locationId.json" ; $ result = collect ( $ this -> makeRequest ( $ url , true ) ) ; return [ 'location_id' => $ result [ 'location_id' ] , 'city_name' => $ result [ 'city_name' ] , 'postal_code' => substr ( $ result [ 'location_id' ] , 0 , 4 ) , 'station_id' => $ result [ 'station_id' ] , 'webcam_id' => $ result [ 'webcam_id' ] , ] ; }
Returns metadata for a location.

@param $locationId
@return array
Returns metadata for a location .