getRawDailyForecastData() public method

Directly returns the xml/json/html string returned by OpenWeatherMap for the daily forecast.
public getRawDailyForecastData ( array | integer | string $query, string $units = 'imperial', string $lang = 'en', string $appid = '', string $mode = 'xml', integer $cnt = 16 ) : string
$query array | integer | string The place to get weather information for. For possible values see ::getWeather.
$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.
$mode string The format of the data fetched. Possible values are 'json', 'html' and 'xml' (default)
$cnt integer How many days of forecast shall be returned? Maximum (and default): 16
return string Returns false on failure and the fetched data in the format you specified on success. Warning: If an error occurs, OpenWeatherMap ALWAYS returns json data.
コード例 #1
0
 /**
  * Directly returns the xml/json/html string returned by OpenWeatherMap for the daily forecast.
  *
  * @param array|int|string $query The place to get weather information for. For possible values see below.
  * @param int              $cnt   How many days of forecast shall be returned? Maximum (and default): 14
  * @param string           $units Can be either 'metric' or 'imperial' (default). This affects almost all units returned.
  * @param string           $lang  The language to use for descriptions, default is 'en'. For possible values see below.
  * @param string           $mode  The format of the data fetched. Possible values are 'json', 'html' and 'xml' (default)
  *
  * @return string
  */
 public function getRawDailyForecastData($query, $cnt = 14, $units = null, $lang = null, $mode = null)
 {
     return $this->service->getRawDailyForecastData($query, empty($units) ? $this->units : $units, empty($lang) ? $this->lang : $lang, $this->api_key, empty($mode) ? $this->mode : $mode, $cnt);
 }