From 89bc7e9527ee938f16e827a7f486874da92ee205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dumas?= Date: Wed, 29 Nov 2023 10:58:51 +0100 Subject: [PATCH] Add call `IlService.getPageForShow()` (#29) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `IlService.getPageForShow()`: `@GET("2.0/{bu}/page/{product}/showPage/{showUrn}")` - Add `RepresentationType`: `TrendingShowsByTopic` and `AvailableEpisodes`. - Fix `ListResult` to be overridable again. - Pull up version to `0.7.6` --------- Co-authored-by: Joaquim Stähli --- buildSrc/src/main/kotlin/Config.kt | 2 +- .../integrationlayer/data/remote/ListResult.kt | 2 +- .../integrationlayer/data/remote/RepresentationType.kt | 2 ++ .../dataProvider/integrationlayer/request/IlService.kt | 8 ++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index 2964694..686fca2 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 = 7 - const val patch = 2 + const val patch = 6 const val versionName = "$major.$minor.$patch" const val maven_group = "ch.srg.data.provider" diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/ListResult.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/ListResult.kt index 287155d..c791f78 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/ListResult.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/ListResult.kt @@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable * License information is available from the LICENSE file. */ abstract class ListResult : Iterable { - internal abstract val data: List? + protected abstract val data: List? abstract val next: String? val list: List diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/RepresentationType.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/RepresentationType.kt index 83d956e..ebcbd7c 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/RepresentationType.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/RepresentationType.kt @@ -24,4 +24,6 @@ object RepresentationType { const val ExpiringSoon = "ExpiringSoon" const val MyProgram = "MyProgram" const val ShowAccess = "ShowAccess" + const val TrendingShowsByTopic = "TrendingShowsByTopic" + const val AvailableEpisodes = "AvailableEpisodes" } diff --git a/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/IlService.kt b/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/IlService.kt index 25ea3cd..ec0e697 100644 --- a/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/IlService.kt +++ b/dataprovider-retrofit/src/main/java/ch/srg/dataProvider/integrationlayer/request/IlService.kt @@ -440,6 +440,14 @@ interface IlService { @Query("isPublished") isPublished: Boolean? = null ): Page + @GET("2.0/{bu}/page/{product}/showPage/{showUrn}") + suspend fun getPageForShow( + @Path("bu") bu: Bu, + @Path("product") product: String, + @Path("showUrn") showUrn: String, + @Query("isPublished") isPublished: Boolean? = null + ): Page + @GET("2.0/{bu}/section/{sectionId}") suspend fun getSection( @Path("bu") bu: Bu,