diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/ImageUrl.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/ImageUrl.kt index 2cca03e..8d7228b 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/ImageUrl.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/ImageUrl.kt @@ -7,24 +7,20 @@ package ch.srg.dataProvider.integrationlayer.data import ch.srg.dataProvider.integrationlayer.data.serializer.ImageUrlSerializer -import java.io.Serializable +import kotlinx.serialization.Serializable /** * Image url * * @property rawUrl Internal image url, to retrieve the url use [ImageUrl.decorated]. */ -@Suppress("SerialVersionUIDInSerializableClass") -@kotlinx.serialization.Serializable(with = ImageUrlSerializer::class) -// TODO Why is this class 'java.io.Serializable'? +@Serializable(with = ImageUrlSerializer::class) data class ImageUrl( /** - * Only for internal use! Please use a Decorator! - * * @return the undecorated url */ val rawUrl: String -) : Serializable { +) { /** * Decorated diff --git a/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/parameters/IlDate.kt b/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/parameters/IlDate.kt index a8fa60d..5b406ee 100644 --- a/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/parameters/IlDate.kt +++ b/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/parameters/IlDate.kt @@ -1,5 +1,7 @@ package ch.srg.dataProvider.integrationlayer.request.parameters +import kotlinx.datetime.Clock +import kotlinx.datetime.Instant import java.text.SimpleDateFormat import java.util.Calendar import java.util.Date @@ -16,6 +18,8 @@ import java.util.TimeZone class IlDate(date: Date = Date()) : IlParam(formatDate(date)) { constructor(calendar: Calendar) : this(calendar.time) + constructor(instant: Instant = Clock.System.now()) : this(Date(instant.toEpochMilliseconds())) + /** * months = [0-11] * days = [0-30]