NuWeather: update default backend to OpenWeatherMap

This commit is contained in:
James Lu 2020-05-25 14:01:29 -07:00
parent fcef45ae77
commit f960b66a72
2 changed files with 5 additions and 4 deletions

View File

@ -3,9 +3,9 @@
A weather plugin for Limnoria. It supports multiple weather and geocoding backends:
#### Weather Backends
- [Dark Sky](https://darksky.net) (default, API key required)
- [OpenWeatherMap](https://openweathermap.org/) (API key required)
- [OpenWeatherMap](https://openweathermap.org/) (default, API key required)
- [weatherstack](https://weatherstack.com/), formerly Apixu (current conditions only, API key required)
- [Dark Sky](https://darksky.net) (API key required, but new signups are no longer accepted)
#### Geocoding Backends
- [OpenStreetMap Nominatim](https://nominatim.openstreetmap.org/) (default, no API key required)
@ -16,7 +16,7 @@ A weather plugin for Limnoria. It supports multiple weather and geocoding backen
1) Pick your preferred weather backend: `config help plugins.NuWeather.defaultBackend`
2) Grab an API key. [Dark Sky](https://darksky.net/dev) | [OpenWeatherMap](https://openweathermap.org/appid) | [weatherstack](https://www.apixu.com/)
2) Grab an API key. [OpenWeatherMap](https://openweathermap.org/appid) | [weatherstack](https://weatherstack.com/) | ~~[Dark Sky](https://darksky.net/dev)~~ (new signups no longer accepted)
3) Configure it: `/msg yourbot config plugins.NuWeather.apikeys.BACKENDNAME YOUR-API-KEY`

View File

@ -59,7 +59,8 @@ conf.registerChannelValue(NuWeather.units, 'temperature',
NuWeatherTemperatureDisplayMode('F/C', _("""Determines how temperatures will be displayed.
F/C means show "50F/10C", C means display only Celsius, and so on.""")))
BACKENDS = ('darksky', 'weatherstack', 'openweathermap', 'apixu')
# List of supported backends for weather & geocode. This is reused by plugin.py
BACKENDS = ('openweathermap', 'darksky', 'weatherstack', 'apixu')
GEOCODE_BACKENDS = ('nominatim', 'googlemaps', 'opencage', 'weatherstack')
class NuWeatherBackend(registry.OnlySomeStrings):
validStrings = BACKENDS