@lorenzopant/tmdb 1.17.0 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/index.d.ts +5087 -4
  2. package/dist/index.js +3721 -5
  3. package/package.json +12 -5
  4. package/dist/client.d.ts +0 -17
  5. package/dist/client.js +0 -114
  6. package/dist/endpoints/base.d.ts +0 -22
  7. package/dist/endpoints/base.js +0 -32
  8. package/dist/endpoints/certifications.d.ts +0 -20
  9. package/dist/endpoints/certifications.js +0 -24
  10. package/dist/endpoints/changes.d.ts +0 -40
  11. package/dist/endpoints/changes.js +0 -46
  12. package/dist/endpoints/collections.d.ts +0 -39
  13. package/dist/endpoints/collections.js +0 -52
  14. package/dist/endpoints/companies.d.ts +0 -37
  15. package/dist/endpoints/companies.js +0 -49
  16. package/dist/endpoints/configuration.d.ts +0 -72
  17. package/dist/endpoints/configuration.js +0 -83
  18. package/dist/endpoints/credits.d.ts +0 -16
  19. package/dist/endpoints/credits.js +0 -22
  20. package/dist/endpoints/discover.d.ts +0 -36
  21. package/dist/endpoints/discover.js +0 -61
  22. package/dist/endpoints/find.d.ts +0 -16
  23. package/dist/endpoints/find.js +0 -21
  24. package/dist/endpoints/genres.d.ts +0 -25
  25. package/dist/endpoints/genres.js +0 -28
  26. package/dist/endpoints/keywords.d.ts +0 -29
  27. package/dist/endpoints/keywords.js +0 -38
  28. package/dist/endpoints/movie_lists.d.ts +0 -53
  29. package/dist/endpoints/movie_lists.js +0 -65
  30. package/dist/endpoints/movies.d.ts +0 -202
  31. package/dist/endpoints/movies.js +0 -255
  32. package/dist/endpoints/networks.d.ts +0 -36
  33. package/dist/endpoints/networks.js +0 -46
  34. package/dist/endpoints/people.d.ts +0 -91
  35. package/dist/endpoints/people.js +0 -128
  36. package/dist/endpoints/people_lists.d.ts +0 -16
  37. package/dist/endpoints/people_lists.js +0 -16
  38. package/dist/endpoints/reviews.d.ts +0 -14
  39. package/dist/endpoints/reviews.js +0 -16
  40. package/dist/endpoints/search.d.ts +0 -88
  41. package/dist/endpoints/search.js +0 -102
  42. package/dist/endpoints/trending.d.ts +0 -36
  43. package/dist/endpoints/trending.js +0 -48
  44. package/dist/endpoints/tv_episode_groups.d.ts +0 -13
  45. package/dist/endpoints/tv_episode_groups.js +0 -16
  46. package/dist/endpoints/tv_episodes.d.ts +0 -110
  47. package/dist/endpoints/tv_episodes.js +0 -136
  48. package/dist/endpoints/tv_seasons.d.ts +0 -128
  49. package/dist/endpoints/tv_seasons.js +0 -164
  50. package/dist/endpoints/tv_series.d.ts +0 -244
  51. package/dist/endpoints/tv_series.js +0 -311
  52. package/dist/endpoints/tv_series_lists.d.ts +0 -51
  53. package/dist/endpoints/tv_series_lists.js +0 -63
  54. package/dist/endpoints/watch_providers.d.ts +0 -34
  55. package/dist/endpoints/watch_providers.js +0 -46
  56. package/dist/errors/messages.d.ts +0 -15
  57. package/dist/errors/messages.js +0 -47
  58. package/dist/errors/tmdb.d.ts +0 -45
  59. package/dist/errors/tmdb.js +0 -39
  60. package/dist/images/images.d.ts +0 -12
  61. package/dist/images/images.js +0 -26
  62. package/dist/routes.d.ts +0 -157
  63. package/dist/routes.js +0 -157
  64. package/dist/tmdb.d.ts +0 -61
  65. package/dist/tmdb.js +0 -94
  66. package/dist/types/collections.d.ts +0 -72
  67. package/dist/types/collections.js +0 -1
  68. package/dist/types/common/certifications.d.ts +0 -19
  69. package/dist/types/common/certifications.js +0 -1
  70. package/dist/types/common/changes.d.ts +0 -44
  71. package/dist/types/common/changes.js +0 -1
  72. package/dist/types/common/images.d.ts +0 -64
  73. package/dist/types/common/images.js +0 -1
  74. package/dist/types/common/index.d.ts +0 -6
  75. package/dist/types/common/index.js +0 -6
  76. package/dist/types/common/media.d.ts +0 -305
  77. package/dist/types/common/media.js +0 -1
  78. package/dist/types/common/pagination.d.ts +0 -6
  79. package/dist/types/common/pagination.js +0 -1
  80. package/dist/types/common/params.d.ts +0 -27
  81. package/dist/types/common/params.js +0 -1
  82. package/dist/types/companies.d.ts +0 -53
  83. package/dist/types/companies.js +0 -1
  84. package/dist/types/config/configuration.d.ts +0 -56
  85. package/dist/types/config/configuration.js +0 -1
  86. package/dist/types/config/countries.d.ts +0 -3
  87. package/dist/types/config/countries.js +0 -1257
  88. package/dist/types/config/images.d.ts +0 -49
  89. package/dist/types/config/images.js +0 -13
  90. package/dist/types/config/index.d.ts +0 -6
  91. package/dist/types/config/index.js +0 -6
  92. package/dist/types/config/languages.d.ts +0 -11
  93. package/dist/types/config/languages.js +0 -1
  94. package/dist/types/config/options.d.ts +0 -36
  95. package/dist/types/config/options.js +0 -1
  96. package/dist/types/config/timezones.d.ts +0 -751
  97. package/dist/types/config/timezones.js +0 -1149
  98. package/dist/types/credits.d.ts +0 -148
  99. package/dist/types/credits.js +0 -1
  100. package/dist/types/discover.d.ts +0 -130
  101. package/dist/types/discover.js +0 -27
  102. package/dist/types/enums.d.ts +0 -8
  103. package/dist/types/enums.js +0 -9
  104. package/dist/types/find.d.ts +0 -103
  105. package/dist/types/find.js +0 -1
  106. package/dist/types/index.d.ts +0 -21
  107. package/dist/types/index.js +0 -21
  108. package/dist/types/keywords.d.ts +0 -19
  109. package/dist/types/keywords.js +0 -1
  110. package/dist/types/movies.d.ts +0 -304
  111. package/dist/types/movies.js +0 -1
  112. package/dist/types/networks.d.ts +0 -45
  113. package/dist/types/networks.js +0 -1
  114. package/dist/types/people-lists.d.ts +0 -5
  115. package/dist/types/people-lists.js +0 -1
  116. package/dist/types/people.d.ts +0 -214
  117. package/dist/types/people.js +0 -1
  118. package/dist/types/reviews.d.ts +0 -22
  119. package/dist/types/reviews.js +0 -1
  120. package/dist/types/search.d.ts +0 -198
  121. package/dist/types/search.js +0 -1
  122. package/dist/types/trending.d.ts +0 -55
  123. package/dist/types/trending.js +0 -1
  124. package/dist/types/tv-episode-groups.d.ts +0 -63
  125. package/dist/types/tv-episode-groups.js +0 -13
  126. package/dist/types/tv-episodes.d.ts +0 -98
  127. package/dist/types/tv-episodes.js +0 -1
  128. package/dist/types/tv-seasons.d.ts +0 -133
  129. package/dist/types/tv-seasons.js +0 -1
  130. package/dist/types/tv-series.d.ts +0 -445
  131. package/dist/types/tv-series.js +0 -1
  132. package/dist/types/utility.d.ts +0 -16
  133. package/dist/types/utility.js +0 -10
  134. package/dist/types/watch-providers.d.ts +0 -34
  135. package/dist/types/watch-providers.js +0 -1
  136. package/dist/utils/index.d.ts +0 -2
  137. package/dist/utils/index.js +0 -2
  138. package/dist/utils/jwt.d.ts +0 -1
  139. package/dist/utils/jwt.js +0 -61
  140. package/dist/utils/logger.d.ts +0 -18
  141. package/dist/utils/logger.js +0 -40
@@ -1,136 +0,0 @@
1
- import { ENDPOINTS } from "../routes";
2
- import { TMDBAPIBase } from "./base";
3
- export class TVEpisodesAPI extends TMDBAPIBase {
4
- episodePath(params) {
5
- return `${ENDPOINTS.TV_SERIES.DETAILS}/${params.series_id}${ENDPOINTS.TV_SEASONS.DETAILS}/${params.season_number}${ENDPOINTS.TV_EPISODES.DETAILS}/${params.episode_number}`;
6
- }
7
- episodeSubPath(params, route) {
8
- return `${this.episodePath(params)}${route}`;
9
- }
10
- /**
11
- * Details
12
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}
13
- *
14
- * Query the details of a TV episode.
15
- * @param series_id The ID of the TV series.
16
- * @param season_number The number of the season within the TV show
17
- * @param episode_number The number of the episode within the season
18
- * @param append_to_response A comma-separated list of the fields to include in the response.
19
- * @param language The language to use for the response.
20
- * @returns A promise that resolves to the TV episode .
21
- * @reference https://developer.themoviedb.org/reference/tv-episode-details
22
- */
23
- async details(params) {
24
- const { language = this.defaultOptions.language, append_to_response, ...rest } = params;
25
- const endpoint = this.episodePath(rest);
26
- return this.client.request(endpoint, { language, append_to_response });
27
- }
28
- /**
29
- * Changes
30
- * GET - https://api.themoviedb.org/3/tv/episode/{episode_id}/changes
31
- *
32
- * Get the changes for a TV episode. By default only the last 24 hours are returned.
33
- * ACCORDING TO TMDB DOCS:
34
- * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
35
- * BUT NO start_date or end_date query params are specified in the documentation
36
- *
37
- * NOTE: TV show changes are a little different than movie changes in that there are some edits
38
- * on seasons and episodes that will create a top level change entry at the show level.
39
- * These can be found under the season and episode keys.
40
- * These keys will contain a series_id and episode_id.
41
- * You can use the season changes and episode changes methods to look these up individually.
42
- *
43
- * @param episode_id The ID of the TV episode.
44
- * @returns A promise that resolves to the TV episode changes history.
45
- * @reference https://developer.themoviedb.org/reference/tv-episode-changes-by-id
46
- */
47
- async changes(params) {
48
- const endpoint = `${ENDPOINTS.TV_SERIES.DETAILS}/${ENDPOINTS.TV_EPISODES.DETAILS}/${params.episode_id}/${ENDPOINTS.TV_EPISODES.CHANGES}`;
49
- return this.client.request(endpoint, { ...params });
50
- }
51
- /**
52
- * Credits
53
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/credits
54
- *
55
- * Get the credits for a TV episode.
56
- * @param series_id The ID of the TV series.
57
- * @param season_number The number of the season within the TV show
58
- * @param episode_number The number of the episode within the season
59
- * @param language The language to use for the response.
60
- * @reference https://developer.themoviedb.org/reference/tv-episode-credits
61
- */
62
- async credits(params) {
63
- const { language = this.defaultOptions.language, ...rest } = params;
64
- const endpoint = this.episodeSubPath(rest, ENDPOINTS.TV_EPISODES.CREDITS);
65
- return this.client.request(endpoint, { language });
66
- }
67
- /**
68
- * External IDs
69
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/external_ids
70
- *
71
- * Get a list of external IDs that have been added to a TV episode.
72
- * @param series_id The ID of the TV series.
73
- * @param season_number The number of the season within the TV show
74
- * @param episode_number The number of the episode within the season
75
- * @returns A promise that resolves to the TV episode external ids.
76
- * @reference https://developer.themoviedb.org/reference/tv-episode-external-ids
77
- */
78
- async external_ids(params) {
79
- const endpoint = this.episodeSubPath(params, ENDPOINTS.TV_EPISODES.EXTERNAL_IDS);
80
- return this.client.request(endpoint);
81
- }
82
- /**
83
- * Images
84
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/images
85
- *
86
- * Fetches still images related to a specific tv episode
87
- * The images are returned in various sizes and formats.
88
- *
89
- * NOTE: If you have a language specified, it will act as a filter on the returned items. You can use the include_image_language param to query additional languages.
90
- *
91
- * @param series_id The ID of the TV series.
92
- * @param season_number The number of the season within the TV show
93
- * @param episode_number The number of the episode within the season
94
- * @param language - (Optional) The language code to filter the images by language.
95
- * @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
96
- * @returns A promise that resolves to a `TVEpisodeImages` object containing the tv episode's images.
97
- * @reference https://developer.themoviedb.org/reference/tv-episode-images
98
- */
99
- async images(params) {
100
- const { language = this.defaultOptions.language, include_image_language, ...rest } = params;
101
- const endpoint = this.episodeSubPath(rest, ENDPOINTS.TV_EPISODES.IMAGES);
102
- return this.client.request(endpoint, { language, include_image_language });
103
- }
104
- /**
105
- * Translations
106
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/translations
107
- *
108
- * Get the translations that have been added to a TV episode.
109
- * Take a read through our language documentation for more information about languages on TMDB.
110
- * https://developer.themoviedb.org/docs/languages
111
- * @param series_id The ID of the TV series.
112
- * @param season_number The number of the season within the TV show
113
- * @param episode_number The number of the episode within the season
114
- * @returns A promise that resolves to the translations of the tv episode.
115
- * @reference https://developer.themoviedb.org/reference/tv-episode-translations
116
- */
117
- async translations(params) {
118
- const endpoint = this.episodeSubPath(params, ENDPOINTS.TV_EPISODES.TRANSLATIONS);
119
- return this.client.request(endpoint);
120
- }
121
- /**
122
- * Videos
123
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/videos
124
- *
125
- * Get the videos that belong to a TV episode.
126
- * @param series_id The ID of the TV series.
127
- * @param season_number The number of the season within the TV show
128
- * @param episode_number The number of the episode within the season
129
- * @returns A promise that resolves to the videos for the tv episode.
130
- * @reference https://developer.themoviedb.org/reference/tv-episode-videos
131
- */
132
- async videos(params) {
133
- const endpoint = this.episodeSubPath(params, ENDPOINTS.TV_EPISODES.VIDEOS);
134
- return this.client.request(endpoint);
135
- }
136
- }
@@ -1,128 +0,0 @@
1
- import { Changes, MediaWatchProviders, TVSeasonAggregateCredits, TVSeasonAggregateCreditsParams, TVSeasonAppendToResponseNamespace, TVSeasonBaseParams, TVSeasonChangesParams, TVSeasonCredits, TVSeasonCreditsParams, TVSeasonDetailsParams, TVSeasonDetailsWithAppends, TVSeasonExternalIDs, TVSeasonImages, TVSeasonImagesParams, TVSeasonTranslations, TVSeasonVideos, TVSeasonVideosParams, TVSeasonWatchProvidersParams, TVSeason } from "../types";
2
- import { TMDBAPIBase } from "./base";
3
- export declare class TVSeasonsAPI extends TMDBAPIBase {
4
- private seasonPath;
5
- private seasonSubPath;
6
- /**
7
- * Details
8
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}
9
- *
10
- * Query the details of a TV season.
11
- * @param series_id The ID of the TV series.
12
- * @param season_number The season number within the TV show.
13
- * @param append_to_response A comma-separated list of the fields to include in the response.
14
- * @param language The language to use for the response.
15
- * @returns A promise that resolves to the TV season details.
16
- * @reference https://developer.themoviedb.org/reference/tv-season-details
17
- */
18
- details<T extends readonly TVSeasonAppendToResponseNamespace[] = []>(params: Omit<TVSeasonDetailsParams, "append_to_response"> & {
19
- append_to_response?: T;
20
- }): Promise<T extends [] ? TVSeason : TVSeasonDetailsWithAppends<T>>;
21
- /**
22
- * Aggregate Credits
23
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/aggregate_credits
24
- *
25
- * Get the aggregate credits for a TV season.
26
- * This returns the full cast and crew across all episodes of the season.
27
- * @param series_id The ID of the TV series.
28
- * @param season_number The season number within the TV show.
29
- * @param language The language to use for the response.
30
- * @returns A promise that resolves to the TV season aggregate credits.
31
- * @reference https://developer.themoviedb.org/reference/tv-season-aggregate-credits
32
- */
33
- aggregate_credits(params: TVSeasonAggregateCreditsParams): Promise<TVSeasonAggregateCredits>;
34
- /**
35
- * Changes
36
- * GET - https://api.themoviedb.org/3/tv/season/{season_id}/changes
37
- *
38
- * Get the changes for a TV season by season ID. By default only the last 24 hours are returned.
39
- * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
40
- * @param season_id The ID of the TV season.
41
- * @param start_date Filter changes by start date (ISO 8601 format, e.g. "2024-01-01").
42
- * @param end_date Filter changes by end date (ISO 8601 format, e.g. "2024-01-14").
43
- * @param page The page of results to return.
44
- * @returns A promise that resolves to the TV season changes history.
45
- * @reference https://developer.themoviedb.org/reference/tv-season-changes-by-id
46
- */
47
- changes(params: TVSeasonChangesParams): Promise<Changes>;
48
- /**
49
- * Credits
50
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/credits
51
- *
52
- * Get the credits for a TV season.
53
- * @param series_id The ID of the TV series.
54
- * @param season_number The season number within the TV show.
55
- * @param language The language to use for the response.
56
- * @returns A promise that resolves to the TV season credits.
57
- * @reference https://developer.themoviedb.org/reference/tv-season-credits
58
- */
59
- credits(params: TVSeasonCreditsParams): Promise<TVSeasonCredits>;
60
- /**
61
- * External IDs
62
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/external_ids
63
- *
64
- * Get a list of external IDs that have been added to a TV season.
65
- * @param series_id The ID of the TV series.
66
- * @param season_number The season number within the TV show.
67
- * @returns A promise that resolves to the TV season external IDs.
68
- * @reference https://developer.themoviedb.org/reference/tv-season-external-ids
69
- */
70
- external_ids(params: TVSeasonBaseParams): Promise<TVSeasonExternalIDs>;
71
- /**
72
- * Images
73
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/images
74
- *
75
- * Get the images that belong to a TV season. Returns season posters.
76
- *
77
- * NOTE: If you have a language specified, it will act as a filter on the returned items.
78
- * You can use the include_image_language param to query additional languages.
79
- *
80
- * @param series_id The ID of the TV series.
81
- * @param season_number The season number within the TV show.
82
- * @param language The language code to filter images by language.
83
- * @param include_image_language A comma-separated list of language codes to include images for.
84
- * @returns A promise that resolves to the TV season images.
85
- * @reference https://developer.themoviedb.org/reference/tv-season-images
86
- */
87
- images(params: TVSeasonImagesParams): Promise<TVSeasonImages>;
88
- /**
89
- * Translations
90
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/translations
91
- *
92
- * Get the translations that have been added to a TV season.
93
- * Take a read through our language documentation for more information about languages on TMDB.
94
- * https://developer.themoviedb.org/docs/languages
95
- * @param series_id The ID of the TV series.
96
- * @param season_number The season number within the TV show.
97
- * @returns A promise that resolves to the TV season translations.
98
- * @reference https://developer.themoviedb.org/reference/tv-season-translations
99
- */
100
- translations(params: TVSeasonBaseParams): Promise<TVSeasonTranslations>;
101
- /**
102
- * Videos
103
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/videos
104
- *
105
- * Get the videos that belong to a TV season.
106
- * @param series_id The ID of the TV series.
107
- * @param season_number The season number within the TV show.
108
- * @param language The language to use for the response.
109
- * @param include_video_language A comma-separated list of language codes to include videos for.
110
- * @returns A promise that resolves to the TV season videos.
111
- * @reference https://developer.themoviedb.org/reference/tv-season-videos
112
- */
113
- videos(params: TVSeasonVideosParams): Promise<TVSeasonVideos>;
114
- /**
115
- * Watch Providers
116
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/watch/providers
117
- *
118
- * Get the watch providers for a specific TV season.
119
- * Powered by our partnership with JustWatch, you can query which streaming services
120
- * have the season available.
121
- * @param series_id The ID of the TV series.
122
- * @param season_number The season number within the TV show.
123
- * @param language The language to use for the response.
124
- * @returns A promise that resolves to the TV season watch providers.
125
- * @reference https://developer.themoviedb.org/reference/tv-season-watch-providers
126
- */
127
- watch_providers(params: TVSeasonWatchProvidersParams): Promise<MediaWatchProviders>;
128
- }
@@ -1,164 +0,0 @@
1
- import { ENDPOINTS } from "../routes";
2
- import { TMDBAPIBase } from "./base";
3
- export class TVSeasonsAPI extends TMDBAPIBase {
4
- seasonPath(params) {
5
- return `${ENDPOINTS.TV_SERIES.DETAILS}/${params.series_id}${ENDPOINTS.TV_SEASONS.DETAILS}/${params.season_number}`;
6
- }
7
- seasonSubPath(params, route) {
8
- return `${this.seasonPath(params)}${route}`;
9
- }
10
- /**
11
- * Details
12
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}
13
- *
14
- * Query the details of a TV season.
15
- * @param series_id The ID of the TV series.
16
- * @param season_number The season number within the TV show.
17
- * @param append_to_response A comma-separated list of the fields to include in the response.
18
- * @param language The language to use for the response.
19
- * @returns A promise that resolves to the TV season details.
20
- * @reference https://developer.themoviedb.org/reference/tv-season-details
21
- */
22
- async details(params) {
23
- const { language = this.defaultOptions.language, append_to_response, ...rest } = params;
24
- const endpoint = this.seasonPath(rest);
25
- return this.client.request(endpoint, { language, append_to_response });
26
- }
27
- /**
28
- * Aggregate Credits
29
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/aggregate_credits
30
- *
31
- * Get the aggregate credits for a TV season.
32
- * This returns the full cast and crew across all episodes of the season.
33
- * @param series_id The ID of the TV series.
34
- * @param season_number The season number within the TV show.
35
- * @param language The language to use for the response.
36
- * @returns A promise that resolves to the TV season aggregate credits.
37
- * @reference https://developer.themoviedb.org/reference/tv-season-aggregate-credits
38
- */
39
- async aggregate_credits(params) {
40
- const { language = this.defaultOptions.language, ...rest } = params;
41
- const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.AGGREGATE_CREDITS);
42
- return this.client.request(endpoint, { language });
43
- }
44
- /**
45
- * Changes
46
- * GET - https://api.themoviedb.org/3/tv/season/{season_id}/changes
47
- *
48
- * Get the changes for a TV season by season ID. By default only the last 24 hours are returned.
49
- * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
50
- * @param season_id The ID of the TV season.
51
- * @param start_date Filter changes by start date (ISO 8601 format, e.g. "2024-01-01").
52
- * @param end_date Filter changes by end date (ISO 8601 format, e.g. "2024-01-14").
53
- * @param page The page of results to return.
54
- * @returns A promise that resolves to the TV season changes history.
55
- * @reference https://developer.themoviedb.org/reference/tv-season-changes-by-id
56
- */
57
- async changes(params) {
58
- const { season_id, ...rest } = params;
59
- const endpoint = `${ENDPOINTS.TV_SERIES.DETAILS}${ENDPOINTS.TV_SEASONS.DETAILS}/${season_id}${ENDPOINTS.TV_SEASONS.CHANGES}`;
60
- return this.client.request(endpoint, { ...rest });
61
- }
62
- /**
63
- * Credits
64
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/credits
65
- *
66
- * Get the credits for a TV season.
67
- * @param series_id The ID of the TV series.
68
- * @param season_number The season number within the TV show.
69
- * @param language The language to use for the response.
70
- * @returns A promise that resolves to the TV season credits.
71
- * @reference https://developer.themoviedb.org/reference/tv-season-credits
72
- */
73
- async credits(params) {
74
- const { language = this.defaultOptions.language, ...rest } = params;
75
- const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.CREDITS);
76
- return this.client.request(endpoint, { language });
77
- }
78
- /**
79
- * External IDs
80
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/external_ids
81
- *
82
- * Get a list of external IDs that have been added to a TV season.
83
- * @param series_id The ID of the TV series.
84
- * @param season_number The season number within the TV show.
85
- * @returns A promise that resolves to the TV season external IDs.
86
- * @reference https://developer.themoviedb.org/reference/tv-season-external-ids
87
- */
88
- async external_ids(params) {
89
- const endpoint = this.seasonSubPath(params, ENDPOINTS.TV_SEASONS.EXTERNAL_IDS);
90
- return this.client.request(endpoint);
91
- }
92
- /**
93
- * Images
94
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/images
95
- *
96
- * Get the images that belong to a TV season. Returns season posters.
97
- *
98
- * NOTE: If you have a language specified, it will act as a filter on the returned items.
99
- * You can use the include_image_language param to query additional languages.
100
- *
101
- * @param series_id The ID of the TV series.
102
- * @param season_number The season number within the TV show.
103
- * @param language The language code to filter images by language.
104
- * @param include_image_language A comma-separated list of language codes to include images for.
105
- * @returns A promise that resolves to the TV season images.
106
- * @reference https://developer.themoviedb.org/reference/tv-season-images
107
- */
108
- async images(params) {
109
- const { language = this.defaultOptions.language, include_image_language, ...rest } = params;
110
- const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.IMAGES);
111
- return this.client.request(endpoint, { language, include_image_language });
112
- }
113
- /**
114
- * Translations
115
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/translations
116
- *
117
- * Get the translations that have been added to a TV season.
118
- * Take a read through our language documentation for more information about languages on TMDB.
119
- * https://developer.themoviedb.org/docs/languages
120
- * @param series_id The ID of the TV series.
121
- * @param season_number The season number within the TV show.
122
- * @returns A promise that resolves to the TV season translations.
123
- * @reference https://developer.themoviedb.org/reference/tv-season-translations
124
- */
125
- async translations(params) {
126
- const endpoint = this.seasonSubPath(params, ENDPOINTS.TV_SEASONS.TRANSLATIONS);
127
- return this.client.request(endpoint);
128
- }
129
- /**
130
- * Videos
131
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/videos
132
- *
133
- * Get the videos that belong to a TV season.
134
- * @param series_id The ID of the TV series.
135
- * @param season_number The season number within the TV show.
136
- * @param language The language to use for the response.
137
- * @param include_video_language A comma-separated list of language codes to include videos for.
138
- * @returns A promise that resolves to the TV season videos.
139
- * @reference https://developer.themoviedb.org/reference/tv-season-videos
140
- */
141
- async videos(params) {
142
- const { language = this.defaultOptions.language, include_video_language, ...rest } = params;
143
- const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.VIDEOS);
144
- return this.client.request(endpoint, { language, include_video_language });
145
- }
146
- /**
147
- * Watch Providers
148
- * GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/watch/providers
149
- *
150
- * Get the watch providers for a specific TV season.
151
- * Powered by our partnership with JustWatch, you can query which streaming services
152
- * have the season available.
153
- * @param series_id The ID of the TV series.
154
- * @param season_number The season number within the TV show.
155
- * @param language The language to use for the response.
156
- * @returns A promise that resolves to the TV season watch providers.
157
- * @reference https://developer.themoviedb.org/reference/tv-season-watch-providers
158
- */
159
- async watch_providers(params) {
160
- const { language = this.defaultOptions.language, ...rest } = params;
161
- const endpoint = this.seasonSubPath(rest, ENDPOINTS.TV_SEASONS.WATCH_PROVIDERS);
162
- return this.client.request(endpoint, { language });
163
- }
164
- }