billykwooten / openweather-exporter

Prometheus exporter utilizing Openweather API (https://openweathermap.org/api) to gather weather metrics.
Apache License 2.0
57 stars 23 forks source link

Option to fallback to previous API versions #46

Closed hundredfire closed 7 months ago

hundredfire commented 11 months ago

Since ver 0.0.12, api 3.0 subscription is required. Therefore, API calls fail with error 401 since update. Checking on openweathermap's website, the only way to subscribe for this api version still requires users to provide bank card infos, even if you plan to stay in the limits of their free calls allowances. I'm sure many users would feel uncomfortable giving their banking infos to owm, like me. Would it be possible to add a flag in the container to continue using api 2.0/2.5 instead (with limited capabilities if needed?)

Thank you for your work

idhirandar commented 11 months ago

or now its time to move to another free API server like WeatherAPI.com, Forecast, Meteostat, Weather Embed, @billykwooten

billykwooten commented 7 months ago

Hey guys, currently I have no interest to move to another solution as this one works fine for now.

However, if you'd like to continue using the old 2.5 API, I would just stick with v0.0.11 of this container HERE. I don't see a need to code a fallback option when that v0.0.11 only supports 2.5 in the first place and with it's pending deprication i'm not sure the effort warrants the time.

lomereiter commented 6 months ago

For the record, the 2.5 API will be gone in June 2024: https://openweathermap.org/one-call-transfer

If you are worried about potential charges, you can set the daily limit on OWM side: image