Cmfcmf\OpenWeatherMap::getWeatherGroup PHP Method

getWeatherGroup() public method

Returns the current weather for a group of city ids.
public getWeatherGroup ( array $ids, string $units = 'imperial', string $lang = 'en', string $appid = '' ) : Array
$ids array The city ids to get weather information for
$units string Can be either 'metric' or 'imperial' (default). This affects almost all units returned.
$lang string The language to use for descriptions, default is 'en'. For possible values see http://openweathermap.org/current#multi.
$appid string Your app id, default ''. See http://openweathermap.org/appid for more details.
return Array Array of CurrentWeather objects.
    public function getWeatherGroup($ids, $units = 'imperial', $lang = 'en', $appid = '')
    {
        $answer = $this->getRawWeatherGroupData($ids, $units, $lang, $appid);
        $json = $this->parseJson($answer);
        return new CurrentWeatherGroup($json, $units);
    }