getWeatherData

abstract suspend fun getWeatherData(lat: Double, lon: Double, lang: String?): List<Forecast>?

Get weather data for the current location. This is called when the user has set the location to "Current location".

Parameters

lat

the latitude of the current location

lon

the longitude of the current location

lang

the ISO 639 language code of the language that the user has set for the launcher. Should be used for weather conditions and location names if supported by the provider.


abstract suspend fun getWeatherData(location: WeatherLocation, lang: String?): List<Forecast>?

Get weather data for a set location. This is called when the user has set the location to a custom location.

Return

the weather data for the given location Note that returned forecasts should use the name that is set in the location parameter as the location name, in order to avoid confusion when the user has set the location to a custom location.

Parameters

location

the location that the user has set. This is guaranteed to be one of the locations returned by findLocations.

lang

the ISO 639 language code of the language that the user has set for the launcher. Should be used for weather conditions if supported by the provider.