I did a bit of digging (and tested it in real life).
In the free tier now, we effectively have access to:
- Live weather
- Next 5 days in 3-hour increments
So the things we’ll lose compared to the current development are:
→ No more hour-by-hour, only 3-hour increments
→ Forecasts for 5 days only
For forecasts for the following days, we’ll also have to do a little workaround, because until now we had a « per day » prediction, and now we only have « 3-hourly » forecasts.
But that’s not the same thing! When we see « 26°/27° » in my screenshot, does the number on the left correspond to the day’s lowest temperature and the one on the right to the highest? If so, we need to compute that by iterating over the day’s 8 predictions.
Management of existing users
All users who created their token before this change still have access to the old API.
2 options:
- We code a special mechanism for them to keep the existing code so that users whose key works with the One Call can still use the full API. Need to see how to determine the « old » tokens from the new ones.
- We switch everyone to the new API, which causes a regression in terms of features for existing users.
Option 1 is preferable, but requires more work.
For detecting « old vs new », several approaches:
- Use the creation date of the variable in the DB
- Test both API calls; if one works and the other doesn’t, we can store somewhere (DB or RAM) whether the user is new or old
Hourly (hour-by-hour) via Gladys Plus?
If there’s demand, I could pay for the One Call API via Gladys Plus and offer it to Gladys Plus users. Then again, I’m not sure it’s worth it just to have hour-by-hour on your dashboard, especially since we all have free weather apps on our phones…
