Updated Information Widgets (markdown)

Ben Phelps 2022-08-27 15:44:44 +03:00
parent f697c7bf21
commit 76b578635f

@ -50,23 +50,30 @@ Which produces something like this,
<img width="413" alt="Screenshot 2022-08-27 at 2 52 20 AM" src="https://user-images.githubusercontent.com/82196/187005111-57a29f5c-96d5-4dab-bedc-eaecf3de5c57.png"> <img width="413" alt="Screenshot 2022-08-27 at 2 52 20 AM" src="https://user-images.githubusercontent.com/82196/187005111-57a29f5c-96d5-4dab-bedc-eaecf3de5c57.png">
## Weather ## WeatherAPI
The weather widget uses the weatherapi.com API, so you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key (free tier is more than enough). The free tier is all thats required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
The widget is configured inside of the `widgets.yaml` file.
```yaml ```yaml
- weather: - weatherapi:
latitude: 49.947279 label: Kyiv # optional
longitude: 24.223126 latitude: 50.449684
units: metric longitude: 30.525026
apiKey: yourweatherapidotcomkey units: metric # or imperial
cache: 5 apiKey: yourweatherapikey
cache: 5 # Time in minutes to cache API responses, to stay within limits
``` ```
`latitude` and `longitude` are for the location you'd like the weather report to be for. ## OpenWeatherMap
`units` can be either `metric` for celsius or `imperial` for fahrenheit. The free tier is all thats required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
`cache` is how long, in minutes, to cache the API response for. This allows you to stay well within the free tier API limits. ```yaml
- openweathermap:
label: Kyiv #optional
latitude: 50.449684
longitude: 30.525026
units: metric # or imperial
apiKey: youropenweathermapkey
cache: 5 # Time in minutes to cache API responses, to stay within limits
```