From 3ab7d9f8c4846bbe7a5f442813ca7e9ddbe30c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Wed, 8 May 2024 14:16:45 +0200 Subject: [PATCH 1/4] Add link property to Section.Representation. --- .../dataProvider/integrationlayer/data/remote/Link.kt | 9 +++++++++ .../integrationlayer/data/remote/Representation.kt | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt new file mode 100644 index 0000000..8de258f --- /dev/null +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt @@ -0,0 +1,9 @@ +package ch.srg.dataProvider.integrationlayer.data.remote + +import kotlinx.serialization.Serializable + +@Serializable +data class Link( + val targetType: String, + val target: String, +) diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Representation.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Representation.kt index 9b2f513..4514531 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Representation.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Representation.kt @@ -37,6 +37,9 @@ data class Representation( val imageFocalPoint: FocalPoint? get() = properties?.imageFocalPoint + val link: Link? + get() = properties?.link + @Serializable data class Properties( val title: String? = null, @@ -45,6 +48,7 @@ data class Representation( val hasDetailPage: Boolean? = null, val pickRandomElement: Boolean? = null, val imageUrl: ImageUrl? = null, - val imageFocalPoint: FocalPoint? = null + val imageFocalPoint: FocalPoint? = null, + val link: Link? = null, ) } From 83124598df584a1747ebf32c862c2be5388fd072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Wed, 8 May 2024 17:18:44 +0200 Subject: [PATCH 2/4] `target` is nullable. --- .../ch/srg/dataProvider/integrationlayer/data/remote/Link.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt index 8de258f..c037aeb 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt @@ -5,5 +5,5 @@ import kotlinx.serialization.Serializable @Serializable data class Link( val targetType: String, - val target: String, + val target: String?, ) From 5d89a6243236422f85000bc3bb9ed04028912a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Wed, 8 May 2024 17:20:58 +0200 Subject: [PATCH 3/4] Pull up version to 0.9.1 --- buildSrc/src/main/kotlin/Config.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index 7345ec5..bc58a5c 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -5,7 +5,7 @@ object Config { const val major = 0 const val minor = 9 - const val patch = 0 + const val patch = 1 const val versionName = "$major.$minor.$patch" const val maven_group = "ch.srg.data.provider" From 08f515ee1e4060c3cf86680b99721c2a656f0216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Thu, 9 May 2024 09:23:11 +0200 Subject: [PATCH 4/4] Make Link.target null by default. --- .../ch/srg/dataProvider/integrationlayer/data/remote/Link.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt index c037aeb..98dd67a 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Link.kt @@ -5,5 +5,5 @@ import kotlinx.serialization.Serializable @Serializable data class Link( val targetType: String, - val target: String?, + val target: String? = null, )