From 281fe590358723065e0e72ad1ed8d1ef9ac53ee7 Mon Sep 17 00:00:00 2001
From: MM20 <15646950+MM2-0@users.noreply.github.com>
Date: Thu, 8 Feb 2024 00:54:15 +0100
Subject: [PATCH] learn how to write
---
docs/docs/developer-guide/plugins/plugin-types/weather.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/docs/developer-guide/plugins/plugin-types/weather.md b/docs/docs/developer-guide/plugins/plugin-types/weather.md
index ed2f751c..2da11141 100644
--- a/docs/docs/developer-guide/plugins/plugin-types/weather.md
+++ b/docs/docs/developer-guide/plugins/plugin-types/weather.md
@@ -29,8 +29,8 @@ The default implementation uses the Android Geocoder, but this API has the limit
There are two types of locations:
-- `WeatherLocation.LatLon`: use this when your weather service identifies locations by their geo coordinates.
-- `WeatherLocation.Id`: use this when your weather service has an internal ID system to identify locations.
+- `WeatherLocation.LatLon`: use this if your weather service identifies locations by their geo coordinates.
+- `WeatherLocation.Id`: use this if your weather service has an internal ID system to identify locations.
## Featch weather data
@@ -44,11 +44,11 @@ suspend fun getWeatherData(lat: Double, lon: Double, lang: String?): List?
```
-The first method is called when the user has _Auto location_ enabled. Are the last known coordinates of the user.
+The first method is called when the user has _Auto location_ enabled. `lat` and `lon` the last known coordinates of the user.
The second method is called when the user has set their location to a fixed location. `location` is guaranteed to be a value that has been returned by `findLocations` before. If you haven't overriden `findLocations`, this will always be a `WeatherLocation.LatLon`.
-Both methods return a list of `Forecast`s. If an error occurs, you can throw an instruction or return `null`, in this case the launcher will keep the old data and start another attempt at a later time.
+Both methods return a list of `Forecast`s. If an error occurs, you can throw an exception or return `null`, in this case the launcher will keep the old data and start another attempt at a later time.
`Forecast` objects need at least a `timestamp` (unix time in millis), a `temperature`, a `condition`, an `icon`, a `location` name, and a `provider` name.