llimllib / limbo

A simple, clean, easy to modify Slack chatbot
MIT License
402 stars 160 forks source link

Remove DarkSky dependency in Weather Plugin #181

Closed eSoares closed 4 years ago

eSoares commented 4 years ago

In recent news Dark Sky was acquired by Apple and they will stop accepting new signups to use the API. Current API users will work until end 2021. (Source of information: https://blog.darksky.net/dark-sky-has-a-new-home/)

Currently the weather plugin uses Dark Sky API. I suggest to move away form it, since new users would be impossible to use the register, get an API key and use the plugin.

llimllib commented 4 years ago

Weather APIs are a pain in the butt! I tried a bunch out when I was implementing weather, but most have terrible search functions, super restricted data, or both.

I'd much prefer to use one without an API key, but would prefer a decent search + api key to no key and a poor search function. Particularly I'd like the search function to return good results for US zip codes, which was a problem last time I checked.

Open to suggestions!

eSoares commented 4 years ago

I have used in the past OpenWeather API, from their pricing page the limits look acceptable for the plugin.

An alternative without any API key needed is wttr.in. More info: https://github.com/chubin/wttr.in

llimllib commented 4 years ago

OpenWeather was what I used initially. I switched to yahoo 3 years ago because the search function was a lot better: https://github.com/llimllib/limbo/commit/0a27f0ffe439f3c8891eceed34893d1158e53229#diff-f291ee819880fbed672999e9412f3c28

Then when yahoo discontinued, I switched to mapbox & dark sky: https://github.com/llimllib/limbo/commit/f0980f20f733b670debcae454b167da32c57a044#diff-f291ee819880fbed672999e9412f3c28

I think I switched away from openweather both because they required an API key while yahoo didn't at the time, and because its search function was not very good. It may have gotten better, I don't know

llimllib commented 4 years ago

all this nonsense kind of makes me want to return to just scraping a web page