From 9e0ef05efe00ffd98ff6c7314a67e8a05505dcc4 Mon Sep 17 00:00:00 2001 From: Dick Wolff Date: Wed, 13 Jan 2021 21:27:19 +0100 Subject: [PATCH] Removed URL and made fixed. --- docs/configuration.md | 2 +- docs/customservices.md | 3 +-- src/components/services/OpenWeather.vue | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 174da4f..c88069e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -118,7 +118,7 @@ services: # background: red # optional color for card to set color directly without custom stylesheet ``` -View the [Custom Services](customservices.md) file for details about all available custom services (like PiHole). +View [Custom Services](customservices.md) for details about all available custom services (like PiHole) and how to configure them. If you choose to fetch message information from an endpoint, the output format should be: diff --git a/docs/customservices.md b/docs/customservices.md index 7c1818e..a0b143e 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -1,6 +1,6 @@ # Custom Services -Here is an overview of all custom services that are avaiable within Homer. +Here is an overview of all custom services that are available within Homer. ## PiHole @@ -26,7 +26,6 @@ The following configuration is available for the OpenWeatherMap service ``` items: - name: "Weather" - url: "https://api.openweathermap.org/data/2.5/weather" location: "Amsterdam" # your location. apiKey: "<---insert-api-key-here--->" # insert your own API key here. Request one from https://openweathermap.org/api. units: "metric" # units to display temperature. Can be one of: metric, imperial, kelvin. Defaults to kelvin. diff --git a/src/components/services/OpenWeather.vue b/src/components/services/OpenWeather.vue index b1e5c57..c535a89 100644 --- a/src/components/services/OpenWeather.vue +++ b/src/components/services/OpenWeather.vue @@ -89,7 +89,7 @@ export default { }, methods: { fetchStatus: async function () { - const url = `${this.item.url}?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`; + const url = `https://api.openweathermap.org/data/2.5/weather?q=${this.item.location}&appid=${this.item.apiKey}&units=${this.item.units}`; this.api = await fetch(url) .then((response) => response.json()) .catch((e) => console.log(e));