File tree Expand file tree Collapse file tree 3 files changed +28
-5
lines changed
main/java/com/uwetrottmann/tmdb2/services
test/java/com/uwetrottmann/tmdb2/services Expand file tree Collapse file tree 3 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 22
33## Next version
44
5- * Add TV season translations method by @laurentblue in https://github.com/UweTrottmann/tmdb-java/pull/108
6- * Add Watch Providers service with methods for movies and TV shows.
5+ * Add ` TvSeasonsService.translations ` by @laurentblue in https://github.com/UweTrottmann/tmdb-java/pull/108
6+ * Add ` TvSeasonsService.watchProviders ` to get watch providers for a specific season
7+ * Add ` Tmdb.watchProvidersService ` to get all available watch providers for movies and TV shows in a region
78
89## 2.12.0 - 2025-08-08
910
Original file line number Diff line number Diff line change 1313import com .uwetrottmann .tmdb2 .entities .TvSeason ;
1414import com .uwetrottmann .tmdb2 .entities .TvSeasonExternalIds ;
1515import com .uwetrottmann .tmdb2 .entities .Videos ;
16+ import com .uwetrottmann .tmdb2 .entities .WatchProviders ;
17+ import java .util .Map ;
1618import retrofit2 .Call ;
1719import retrofit2 .http .GET ;
1820import retrofit2 .http .Path ;
1921import retrofit2 .http .Query ;
2022import retrofit2 .http .QueryMap ;
2123
22- import java .util .Map ;
23-
2424public interface TvSeasonsService {
2525
2626 /**
@@ -173,5 +173,12 @@ Call<Videos> videos(
173173 @ Query ("language" ) String language
174174 );
175175
176-
176+ /**
177+ * See <a href="https://developer.themoviedb.org/reference/tv-season-watch-providers">Watch Providers</a>.
178+ */
179+ @ GET ("tv/{tv_id}/season/{season_number}/watch/providers" )
180+ Call <WatchProviders > watchProviders (
181+ @ Path ("tv_id" ) int tvShowId ,
182+ @ Path ("season_number" ) int tvShowSeasonNumber
183+ );
177184}
Original file line number Diff line number Diff line change 1212import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertImages ;
1313import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertTranslations ;
1414import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertVideos ;
15+ import static com .uwetrottmann .tmdb2 .assertions .GenericAssertions .assertWatchProviders ;
1516import static com .uwetrottmann .tmdb2 .assertions .TvAssertions .assertTvSeason ;
1617import static com .uwetrottmann .tmdb2 .assertions .TvAssertions .assertTvSeasonDataIntegrity ;
1718import static org .assertj .core .api .Assertions .assertThat ;
2728import com .uwetrottmann .tmdb2 .entities .TvSeason ;
2829import com .uwetrottmann .tmdb2 .entities .TvSeasonExternalIds ;
2930import com .uwetrottmann .tmdb2 .entities .Videos ;
31+ import com .uwetrottmann .tmdb2 .entities .WatchProviders ;
3032import com .uwetrottmann .tmdb2 .enumerations .AppendToResponseItem ;
3133import java .io .IOException ;
3234import org .junit .Test ;
@@ -151,4 +153,17 @@ public void test_videos() throws IOException {
151153 assertVideos (videos );
152154 }
153155
156+ @ Test
157+ public void watchProviders () throws IOException {
158+ WatchProviders providers = getUnauthenticatedInstance ()
159+ .tvSeasonsService ()
160+ .watchProviders (testTvShow .id , testTvSeason .season_number )
161+ .execute ()
162+ .body ();
163+
164+ assertThat (providers ).isNotNull ();
165+ assertThat (providers .id ).isEqualTo (testTvSeason .id );
166+ assertWatchProviders (providers );
167+ }
168+
154169}
You can’t perform that action at this time.
0 commit comments