config options and documentation

This commit is contained in:
fewieden
2018-12-27 18:52:35 +01:00
parent 0ed2ba0183
commit 1920f8158e
5 changed files with 91 additions and 15 deletions

View File

@@ -46,7 +46,7 @@ WeatherProvider.register("darksky", {
// Create a URL from the config and base URL.
getUrl: function() {
return `https://cors-anywhere.herokuapp.com/https://api.darksky.net/forecast/${this.config.apiKey}/${this.config.lat},${this.config.lon}`;
return `${this.config.apiBase}${this.config.weatherEndpoint}/${this.config.apiKey}/${this.config.lat},${this.config.lon}`;
},
// Implement WeatherDay generator.