Skip to content

Commit 8908b7c

Browse files
committed
Movies: support rental watch providers
1 parent bd4094e commit 8908b7c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Change Log
44
## Next version
55

66
* Note: TMDB has added additional primary translation languages: `ku-TR`, `so-SO` and `uz-UZ`.
7+
* Add `rent` to `WatchProviders.CountryInfo` that contains rental providers for a movie.
78

89
## 2.11.0
910
_2024-06-07_

src/main/java/com/uwetrottmann/tmdb2/entities/WatchProviders.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class WatchProviders {
1212

1313
public Integer id;
1414
/**
15-
* Mapped by ISO 3166-1 two letter country code, e.g. DE and US.
15+
* Mapped by ISO 3166-1 two-letter country code, like DE and US.
1616
*/
1717
@Nonnull public Map<String, CountryInfo> results = new HashMap<>();
1818

@@ -27,6 +27,10 @@ public static class CountryInfo {
2727
@Nonnull public java.util.List<WatchProvider> free = new ArrayList<>();
2828
@Nonnull public java.util.List<WatchProvider> ads = new ArrayList<>();
2929
@Nonnull public java.util.List<WatchProvider> buy = new ArrayList<>();
30+
/**
31+
* Only for movies.
32+
*/
33+
@Nonnull public java.util.List<WatchProvider> rent = new ArrayList<>();
3034

3135
}
3236

src/test/java/com/uwetrottmann/tmdb2/assertions/GenericAssertions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public static void assertWatchProviderCountryInfo(WatchProviders.CountryInfo inf
5454
assertWatchProviders(info.free);
5555
assertWatchProviders(info.ads);
5656
assertWatchProviders(info.buy);
57+
assertWatchProviders(info.rent);
5758
}
5859

5960
private static void assertWatchProviders(List<WatchProviders.WatchProvider> providers) {

0 commit comments

Comments
 (0)