Zren / plasma-applet-eventcalendar

https://store.kde.org/p/998901/
469 stars 92 forks source link

[FeatureRequest] Please add weather providers like DarkSky #42

Open ciriousjoker opened 6 years ago

ciriousjoker commented 6 years ago

(title says it all)

hsantanna commented 5 years ago

Here is the API Docs: https://darksky.net/dev/docs

But the use seems to be paid (1000 requests per day are free to use). This probably implies that each user needs to create their own developer key to use in the widget.

njakes commented 4 years ago

How easy is it to swap out the DarkSky API information? I live in an area not covered by OpenWeather but is covered very well by DarkSky. Is it in OpenWeatherMap.js?

Zren commented 4 years ago

Note: DarkSky has been aquired by Apple and is shutting down service in 2021.

https://blog.darksky.net/


While you could modify OpenWeatherMap.js, I assume the code change would be rather complex.

I'd recommend creating a code/DarkSky.js, then modify code/WeatherApi.js to account for if (weatherService == 'DarkSky'). Then change the default weather_service in config/main.xml to <default>DarkSky</default>.

Focus on using a hardcoded api key and city id in DarkSky.js until you get it working. Use plasmawindowed org.kde.plasma.eventcalendar to quickly test.

njakes commented 4 years ago

Thank you so much for that detailed response. I didnt realize they had been bought out. Yr.no works well for me too so perhaps I will look into doing it with them too. I have next to no coding knowledge, we'll see how it goes.