cmfcmf / OpenWeatherMap-PHP-API

A PHP API to parse weather data and weather history from OpenWeatherMap.org.
https://cmfcmf.github.io/OpenWeatherMap-PHP-API
MIT License
327 stars 123 forks source link

Upgrade to One Call API 3.0 #192

Open phantomchicken opened 3 months ago

phantomchicken commented 3 months ago

Hello,

OpenWeatherMap recently announced it will complete its migration from One Call API 2.5 to One Call API 3.0 by the end of June 2024 as specified here ("access to One Call API 2.5 will be finally closed in June 2024").

Would it be possible to upgrade the module to support One Call API 3.0? There is not really much to change, just the URL structure - "3.0" instead of "2.5".

E.g.

https://api.openweathermap.org/data/3.0/onecall?lat={lat}&lon={lon}&exclude={part}&appid=[{API key}](https://home.openweathermap.org/api_keys)

instead of

https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&exclude={part}&appid=[{API key}](https://home.openweathermap.org/api_keys)

Kind regards