Skip to content

Commit 953d082

Browse files
One more step close to fix issue
1 parent 5d22a06 commit 953d082

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote
2+
3+
data class CurrentWeather(
4+
val is_day: Int,
5+
val temperature: Double,
6+
val time: String,
7+
val weathercode: Int,
8+
val winddirection: Double,
9+
val windspeed: Double
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote
2+
3+
data class Hourly(
4+
val relativehumidity_2m: List<Int>,
5+
val temperature_2m: List<Double>,
6+
val time: List<String>,
7+
val windspeed_10m: List<Double>
8+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote
2+
3+
data class HourlyUnits(
4+
val relativehumidity_2m: String,
5+
val temperature_2m: String,
6+
val time: String,
7+
val windspeed_10m: String
8+
)

app/src/main/java/com/example/jetpack_compose_all_in_one/android_architectures/clean_code_with_mvi_mvvm/data/remote/WeatherApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ interface WeatherApi {
1010
suspend fun getWeather(
1111
@Query("latitude") latitude: Double,
1212
@Query("longitude") longitude: Double,
13-
): WeatherDto
13+
): WeatherResponse
1414
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote
2+
3+
data class WeatherResponse(
4+
val current_weather: CurrentWeather,
5+
val elevation: Double,
6+
val generationtime_ms: Double,
7+
val hourly: Hourly,
8+
val hourly_units: HourlyUnits,
9+
val latitude: Double,
10+
val longitude: Double,
11+
val timezone: String,
12+
val timezone_abbreviation: String,
13+
val utc_offset_seconds: Int
14+
)

0 commit comments

Comments
 (0)