|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
|
|
|
|
|
package com.google.samples.apps.nowinandroid.core.network.model
|
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.NewsResource
|
|
|
|
|
import kotlinx.datetime.Instant
|
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
@ -23,6 +24,7 @@ import kotlinx.serialization.Serializable
|
|
|
|
|
/**
|
|
|
|
|
* Network representation of [NewsResource] when fetched from /newsresources
|
|
|
|
|
*/
|
|
|
|
|
@SuppressLint("UnsafeOptInUsageError")
|
|
|
|
|
@Serializable
|
|
|
|
|
data class NetworkNewsResource(
|
|
|
|
|
val id: String,
|
|
|
|
@ -32,5 +34,5 @@ data class NetworkNewsResource(
|
|
|
|
|
val headerImageUrl: String,
|
|
|
|
|
val publishDate: Instant,
|
|
|
|
|
val type: String,
|
|
|
|
|
val topics: List<String> = listOf(),
|
|
|
|
|
val topics: List<String> = emptyList(),
|
|
|
|
|
)
|
|
|
|
|