File tree Expand file tree Collapse file tree
lib/src/main/kotlin/com/openmeteo/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com.openmeteo.api.common.units
2+
3+ enum class TimeUnit {
4+ s,
5+ h,
6+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.openmeteo.api.forecast.response
33import com.openmeteo.api.common.units.PrecipitationUnit
44import com.openmeteo.api.common.units.TemperatureUnit
55import com.openmeteo.api.common.time.TimeFormat
6+ import com.openmeteo.api.common.units.TimeUnit
67import com.openmeteo.api.common.units.WindSpeedUnit
78import kotlinx.serialization.Serializable
89
@@ -17,7 +18,7 @@ class DailyUnits(
1718 val rain_sum : PrecipitationUnit ? = null ,
1819 val showers_sum : PrecipitationUnit ? = null ,
1920 val snowfall_sum : PrecipitationUnit ? = null ,
20- val precipitation_hours : String ? = null ,
21+ val precipitation_hours : TimeUnit ? = null ,
2122 val weathercode : String? = null ,
2223 val sunrise : TimeFormat ? = null ,
2324 val sunset : TimeFormat ? = null ,
Original file line number Diff line number Diff line change 11package com.openmeteo.api.marine.response
22
33import com.openmeteo.api.common.time.TimeFormat
4+ import com.openmeteo.api.common.units.TimeUnit
45import kotlinx.serialization.Serializable
56
67@Serializable
@@ -12,9 +13,9 @@ class DailyUnits(
1213 val wave_direction_max : String? = null ,
1314 val wind_wave_direction_max : String? = null ,
1415 val swell_wave_direction_max : String? = null ,
15- val wave_period_max : String ? = null ,
16- val wind_wave_period_max : String ? = null ,
17- val swell_wave_period_max : String ? = null ,
18- val wind_wave_peak_period_max : String ? = null ,
19- val swell_wave_peak_period_max : String ? = null ,
16+ val wave_period_max : TimeUnit ? = null ,
17+ val wind_wave_period_max : TimeUnit ? = null ,
18+ val swell_wave_period_max : TimeUnit ? = null ,
19+ val wind_wave_peak_period_max : TimeUnit ? = null ,
20+ val swell_wave_peak_period_max : TimeUnit ? = null ,
2021)
Original file line number Diff line number Diff line change 11package com.openmeteo.api.marine.response
22
33import com.openmeteo.api.common.time.TimeFormat
4+ import com.openmeteo.api.common.units.TimeUnit
45import kotlinx.serialization.Serializable
56
67@Serializable
@@ -12,9 +13,9 @@ class HourlyUnits(
1213 val wave_direction : String? = null ,
1314 val wind_wave_direction : String? = null ,
1415 val swell_wave_direction : String? = null ,
15- val wave_period : String ? = null ,
16- val wind_wave_period : String ? = null ,
17- val swell_wave_period : String ? = null ,
18- val wind_wave_peak_period : String ? = null ,
19- val swell_wave_peak_period : String ? = null ,
16+ val wave_period : TimeUnit ? = null ,
17+ val wind_wave_period : TimeUnit ? = null ,
18+ val swell_wave_period : TimeUnit ? = null ,
19+ val wind_wave_peak_period : TimeUnit ? = null ,
20+ val swell_wave_peak_period : TimeUnit ? = null ,
2021)
You can’t perform that action at this time.
0 commit comments