Dismiss forecasts that are more than 7 days in the future
This commit is contained in:
@@ -55,7 +55,7 @@ There are three types of locations:
|
||||
- <a href="/reference/plugins/sdk/de.mm20.launcher2.sdk.weather/-weather-location/-managed/index.html" target="_blank">`WeatherLocation.Managed`</a>:
|
||||
a special location that indicates that the plugin should determine the location itself.
|
||||
|
||||
## Featch weather data
|
||||
## Fetch weather data
|
||||
|
||||
Implement both `getWeatherData` methods:
|
||||
|
||||
@@ -81,6 +81,11 @@ of <a href="/reference/plugins/sdk/de.mm20.launcher2.sdk.weather/-forecast/index
|
||||
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.
|
||||
|
||||
> [!NOTE]
|
||||
> You should at most return weather data for the next 7 days. Everything after will be dismissed by
|
||||
> the launcher.
|
||||
|
||||
|
||||
`Forecast` objects need at least a `timestamp` (unix time in millis), a `temperature`,
|
||||
a `condition`, an `icon`, a `location` name, and a `provider` name.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user