cmfcmf/OpenWeatherMap-PHP-API

How to get forecast by 3 hours for today?

vetash opened this issue · 3 comments

Openweatermap api provide 5days/3hours data but examples are not provided this.
So question is in header of issue.

Hi @vetash, this library automatically uses the 5days/3hours forecast if you request 5 days or less. Example:

$owm = new OpenWeatherMap($myApiKey);
$forecast = $owm->getWeatherForecast('Berlin', 'metric', 'en', '', 5);

Reference: https://github.com/cmfcmf/OpenWeatherMap-PHP-Api/blob/master/Cmfcmf/OpenWeatherMap.php#L204-L207

Please let me know if it works for you 😃

Ah, sorry for long answer i am on my vacantion now. By the way your answer is help, yes. Thank yoy!

Great! Glad I heard back from you 😄