WeatherData

@Serializable
data class WeatherData(val daily: Daily, val current: Current, val hourly: Hourly)

Ktor serializable class for the weather data.

Contains the daily, current and hourly weather data and helper methods to get weather information.

Constructors

Link copied to clipboard
constructor(daily: Daily, current: Current, hourly: Hourly)

Properties

Link copied to clipboard

The current weather data.

Link copied to clipboard

The daily weather data.

Link copied to clipboard

The hourly weather data.

Functions

Link copied to clipboard

Get the weather condition icon id.

fun getConditionIconId(weatherCode: Int): Int

Get the weather condition icon id for the given weather code.

Link copied to clipboard

Get the current weather condition.

Link copied to clipboard

Get weathers last updated time.

Link copied to clipboard

Checks if weather data needs to be updated.