@lorenzopant/tmdb 1.17.1 → 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 -51
  5. package/dist/client.js +0 -166
  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 -46
  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,244 +0,0 @@
1
- import { MediaWatchProviders } from "../types";
2
- import { TMDBAPIBase } from "./base";
3
- import { TVAggregateCredits, TVAggregateCreditsParams, TVAlternativeTitles, TVAppendToResponseNamespace, TVBaseParam, TVChangeParams, TVContentRatings, TVCredits, TVCreditsParams, TVDetailsParams, TVDetailsWithAppends, TVEpisodeGroups, TVExternalIDs, TVImages, TVImagesParams, TVKeywords, TVRecommendations, TVRecommendationsParams, TVReviews, TVReviewsParams, TVScreenedTheatrically, TVSeriesChanges, TVSeriesDetails, TVSeriesLists, TVSeriesListsParams, TVSimilar, TVSimilarParams, TVTranslations, TVVideos } from "../types/tv-series";
4
- export declare class TVSeriesAPI extends TMDBAPIBase {
5
- private seriesPath;
6
- private seriesSubPath;
7
- /**
8
- * Details
9
- * GET - https://api.themoviedb.org/3/tv/{series_id}
10
- *
11
- * Get the top level details of a TV series by ID.
12
- * @param series_id The ID of the TV series.
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 series details.
16
- * @reference https://developer.themoviedb.org/reference/tv-series-details
17
- */
18
- details<T extends readonly TVAppendToResponseNamespace[] = []>(params: TVDetailsParams & {
19
- append_to_response?: T[number] | T;
20
- }): Promise<T extends [] ? TVSeriesDetails : TVDetailsWithAppends<T>>;
21
- /**
22
- * Aggregate Credits
23
- * GET - https://api.themoviedb.org/3/tv/{series_id}/aggregate_credits
24
- *
25
- * Get the aggregate credits (cast and crew) that have been added to a TV show.
26
- *
27
- * NOTE: This call differs from the main credits call in that it does not return the newest season.
28
- * Instead, it is a view of all the entire cast & crew for all episodes belonging to a TV show.
29
- * @param series_id The ID of the TV series.
30
- * @param language The language to use for the response.
31
- * @returns A promise that resolves to the TV series aggregate credits.
32
- * @reference https://developer.themoviedb.org/reference/tv-series-aggregate-credits
33
- */
34
- aggregate_credits(params: TVAggregateCreditsParams): Promise<TVAggregateCredits>;
35
- /**
36
- * Alternative Titles
37
- * GET - https://api.themoviedb.org/3/tv/{series_id}/alternative_tiles
38
- *
39
- * Get the alternative titles that have been added to a TV show.
40
- * @param series_id The ID of the TV series.
41
- * @returns A promise that resolves to the TV series alternative tiles.
42
- * @reference https://developer.themoviedb.org/reference/tv-series-alternative-titles
43
- */
44
- alternative_titles(params: TVBaseParam): Promise<TVAlternativeTitles>;
45
- /**
46
- * Changes
47
- * GET - https://api.themoviedb.org/3/tv/{series_id}/changes
48
- *
49
- * Get the changes for a TV show. By default only the last 24 hours are returned.
50
- * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
51
- *
52
- * NOTE: TV show changes are a little different than movie changes in that there are some edits
53
- * on seasons and episodes that will create a top level change entry at the show level.
54
- * These can be found under the season and episode keys.
55
- * These keys will contain a series_id and episode_id.
56
- * You can use the season changes and episode changes methods to look these up individually.
57
- *
58
- * @param series_id The ID of the TV series.
59
- * @returns A promise that resolves to the TV series changes history.
60
- * @reference https://developer.themoviedb.org/reference/tv-series-changes
61
- */
62
- changes(params: TVChangeParams): Promise<TVSeriesChanges>;
63
- /**
64
- * Content Ratings
65
- * GET - https://api.themoviedb.org/3/tv/{series_id}/content_ratings
66
- *
67
- * Get the content ratings that have been added to a TV show.
68
- * @param series_id The ID of the TV series.
69
- * @returns A promise that resolves to the TV series content ratings.
70
- * @reference https://developer.themoviedb.org/reference/tv-series-content-ratings
71
- */
72
- content_ratings(params: TVBaseParam): Promise<TVContentRatings>;
73
- /**
74
- * Credits
75
- * GET - https://api.themoviedb.org/3/tv/{series_id}/credits
76
- *
77
- * Get the latest season credits of a TV show.
78
- *
79
- * This is the original TV credits method which returns the latest season credit data.
80
- * If you would like to request the aggregate view (which is what you see on our website)
81
- * you should use the /aggregate_credits method.
82
- * @param series_id The ID of the TV series.
83
- * @param language The Language for the credits
84
- * @returns A promise that resolves to the TV series credits.
85
- * @reference https://developer.themoviedb.org/reference/tv-series-credits
86
- */
87
- credits(params: TVCreditsParams): Promise<TVCredits>;
88
- /**
89
- * Episode Groups
90
- * GET - https://api.themoviedb.org/3/tv/{series_id}/episode_groups
91
- *
92
- * Get the episode groups that have been added to a TV show.
93
- * With a group ID you can call the get TV episode group details method.
94
- * @param series_id The ID of the TV series.
95
- * @returns A promise that resolves to the TV series episode groups.
96
- * @reference https://developer.themoviedb.org/reference/tv-series-episode-groups
97
- */
98
- episode_groups(params: TVBaseParam): Promise<TVEpisodeGroups>;
99
- /**
100
- * External IDs
101
- * GET - https://api.themoviedb.org/3/tv/{series_id}/external_ids
102
- *
103
- * Get a list of external IDs that have been added to a TV show.
104
- * @param series_id The ID of the TV series.
105
- * @returns A promise that resolves to the TV series external ids.
106
- * @reference https://developer.themoviedb.org/reference/tv-series-external-ids
107
- */
108
- external_ids(params: TVBaseParam): Promise<TVExternalIDs>;
109
- /**
110
- * Images
111
- * GET - https://api.themoviedb.org/3/tv/{series_id}/images
112
- *
113
- * Fetches images related to a specific tv show, such as posters and backdrops.
114
- * The images are returned in various sizes and formats.
115
- *
116
- * 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.
117
- *
118
- * @param series_id - The unique identifier of the tv show.
119
- * @param language - (Optional) The language code to filter the images by language.
120
- * @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
121
- * @returns A promise that resolves to a `TVImages` object containing the tv show's images.
122
- * @reference https://developer.themoviedb.org/reference/tv-series-images
123
- */
124
- images(params: TVImagesParams): Promise<TVImages>;
125
- /**
126
- * Keywords
127
- * GET - https://api.themoviedb.org/3/tv/{series_id}/keywords
128
- *
129
- * Get a list of keywords that have been added to a TV show.
130
- * @param series_id The ID of the TV series.
131
- * @returns A promise that resolves to the TV series keywords.
132
- * @reference https://developer.themoviedb.org/reference/tv-series-keywords
133
- */
134
- keywords(params: TVBaseParam): Promise<TVKeywords>;
135
- /**
136
- * Latest
137
- * GET - https://api.themoviedb.org/3/tv/latest
138
- *
139
- * Get the newest tv show.
140
- * This is a live response and will continuosly change.
141
- * @returns A promise that resolves to the lastest TV series.
142
- * @reference https://developer.themoviedb.org/reference/tv-series-latest-id
143
- */
144
- latest(): Promise<TVSeriesDetails>;
145
- /**
146
- * Lists
147
- * GET - https://api.themoviedb.org/3/tv/{series_id}/lists
148
- *
149
- * Get the lists that a TV series has been added to.
150
- * @param series_id The ID of the TV series.
151
- * @param language The Language for the lists
152
- * @param page Page number - Defaults to 1
153
- * @returns A promise that resolves to the TV series lists.
154
- * @reference https://developer.themoviedb.org/reference/lists-copy (TODO: Check this url for updates, it's like this on TMDB docs (??))
155
- */
156
- lists(params: TVSeriesListsParams): Promise<TVSeriesLists>;
157
- /**
158
- * Recomendations
159
- * GET - https://api.themoviedb.org/3/tv/{series_id}/recommendations
160
- *
161
- * Get the recommendations shows for a TV series.
162
- * @param series_id The ID of the TV series.
163
- * @param language The Language for the lists
164
- * @param page Page number - Defaults to 1
165
- * @returns A promise that resolves to TV series recommended shows.
166
- * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
167
- */
168
- recommendations(params: TVRecommendationsParams): Promise<TVRecommendations>;
169
- /**
170
- * Reviews
171
- * GET - https://api.themoviedb.org/3/tv/{series_id}/reviews
172
- *
173
- * Get the reviews that have been added to a TV show.
174
- * @param series_id The ID of the TV series.
175
- * @param language The Language for the lists
176
- * @param page Page number - Defaults to 1
177
- * @returns A promise that resolves to TV series recommended shows.
178
- * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
179
- */
180
- reviews(params: TVReviewsParams): Promise<TVReviews>;
181
- /**
182
- * Sreened Theatrically
183
- * GET - https://api.themoviedb.org/3/tv/{series_id}/screened_theatrically
184
- *
185
- * Get the seasons and episodes that have screened theatrically.
186
- * @param series_id The ID of the TV series.
187
- * @returns A promise that resolves to the TV episodes that have been screened thatrically.
188
- * @reference https://developer.themoviedb.org/reference/tv-series-screened-theatrically
189
- */
190
- screened_theatrically(params: TVBaseParam): Promise<TVScreenedTheatrically>;
191
- /**
192
- * Similar
193
- * GET - https://api.themoviedb.org/3/tv/{series_id}/similar
194
- *
195
- * Get the similar shows for a TV series.
196
- * @param series_id The ID of the TV series.
197
- * @param language The Language for the lists
198
- * @param page Page number - Defaults to 1
199
- * @returns A promise that resolves to TV series similar shows.
200
- * @reference https://developer.themoviedb.org/reference/tv-series-similar
201
- */
202
- similar(params: TVSimilarParams): Promise<TVSimilar>;
203
- /**
204
- * Translations
205
- * GET - https://api.themoviedb.org/3/movie/{series_id}/translations
206
- *
207
- * Get the translations that have been added to a tv show.
208
- * Take a read through our language documentation for more information about languages on TMDB.
209
- * https://developer.themoviedb.org/docs/languages
210
- * @param series_id The ID of the TV Series
211
- * @returns A promise that resolves to the translations of the tv show.
212
- * @reference https://developer.themoviedb.org/reference/tv-series-translations
213
- */
214
- translations(params: TVBaseParam): Promise<TVTranslations>;
215
- /**
216
- * Videos
217
- * GET - https://api.themoviedb.org/3/movie/{series_id}/videos
218
- *
219
- * Get the videos that belong to a TV show.
220
- * @param series_id The ID of the TV Series
221
- * @returns A promise that resolves to the videos for the tv show.
222
- * @reference https://developer.themoviedb.org/reference/tv-series-videos
223
- */
224
- videos(params: TVBaseParam): Promise<TVVideos>;
225
- /**
226
- * Watch Providers
227
- * GET - https://api.themoviedb.org/3/movie/{series_id}/watch/providers
228
- *
229
- * Get the list of streaming providers we have for a TV show.
230
- *
231
- * Powered by our partnership with JustWatch, you can query this method to get a list of the streaming/rental/purchase availabilities per country by provider.
232
- * This is not going to return full deep links, but rather, it's just enough information to display what's available where.
233
- * You can link to the provided TMDB URL to help support TMDB and provide the actual deep links to the content.
234
- *
235
- * WARNING: JustWatch Attribution Required
236
- * In order to use this data you must attribute the source of the data as JustWatch.
237
- * If we find any usage not complying with these terms we will revoke access to the API.
238
- *
239
- * @param series_id The ID of the TV Series
240
- * @returns A promise that resolves to the watch providers for the tv show.
241
- * @reference https://developer.themoviedb.org/reference/tv-series-watch-providers
242
- */
243
- watch_providers(params: TVBaseParam): Promise<MediaWatchProviders>;
244
- }
@@ -1,311 +0,0 @@
1
- import { ENDPOINTS } from "../routes";
2
- import { TMDBAPIBase } from "./base";
3
- export class TVSeriesAPI extends TMDBAPIBase {
4
- seriesPath(series_id) {
5
- return `${ENDPOINTS.TV_SERIES.DETAILS}/${series_id}`;
6
- }
7
- seriesSubPath(series_id, route) {
8
- return `${this.seriesPath(series_id)}${route}`;
9
- }
10
- /**
11
- * Details
12
- * GET - https://api.themoviedb.org/3/tv/{series_id}
13
- *
14
- * Get the top level details of a TV series by ID.
15
- * @param series_id The ID of the TV series.
16
- * @param append_to_response A comma-separated list of the fields to include in the response.
17
- * @param language The language to use for the response.
18
- * @returns A promise that resolves to the TV series details.
19
- * @reference https://developer.themoviedb.org/reference/tv-series-details
20
- */
21
- async details(params) {
22
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
23
- const endpoint = this.seriesPath(series_id);
24
- return this.client.request(endpoint, { language, ...rest });
25
- }
26
- /**
27
- * Aggregate Credits
28
- * GET - https://api.themoviedb.org/3/tv/{series_id}/aggregate_credits
29
- *
30
- * Get the aggregate credits (cast and crew) that have been added to a TV show.
31
- *
32
- * NOTE: This call differs from the main credits call in that it does not return the newest season.
33
- * Instead, it is a view of all the entire cast & crew for all episodes belonging to a TV show.
34
- * @param series_id The ID of the TV series.
35
- * @param language The language to use for the response.
36
- * @returns A promise that resolves to the TV series aggregate credits.
37
- * @reference https://developer.themoviedb.org/reference/tv-series-aggregate-credits
38
- */
39
- async aggregate_credits(params) {
40
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
41
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.AGGREGATE_CREDITS);
42
- return this.client.request(endpoint, { language, ...rest });
43
- }
44
- /**
45
- * Alternative Titles
46
- * GET - https://api.themoviedb.org/3/tv/{series_id}/alternative_tiles
47
- *
48
- * Get the alternative titles that have been added to a TV show.
49
- * @param series_id The ID of the TV series.
50
- * @returns A promise that resolves to the TV series alternative tiles.
51
- * @reference https://developer.themoviedb.org/reference/tv-series-alternative-titles
52
- */
53
- async alternative_titles(params) {
54
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.ALTERNATIVE_TITLES);
55
- return this.client.request(endpoint);
56
- }
57
- /**
58
- * Changes
59
- * GET - https://api.themoviedb.org/3/tv/{series_id}/changes
60
- *
61
- * Get the changes for a TV show. By default only the last 24 hours are returned.
62
- * You can query up to 14 days in a single query by using the start_date and end_date query parameters.
63
- *
64
- * NOTE: TV show changes are a little different than movie changes in that there are some edits
65
- * on seasons and episodes that will create a top level change entry at the show level.
66
- * These can be found under the season and episode keys.
67
- * These keys will contain a series_id and episode_id.
68
- * You can use the season changes and episode changes methods to look these up individually.
69
- *
70
- * @param series_id The ID of the TV series.
71
- * @returns A promise that resolves to the TV series changes history.
72
- * @reference https://developer.themoviedb.org/reference/tv-series-changes
73
- */
74
- async changes(params) {
75
- const { series_id, ...rest } = params;
76
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.CHANGES);
77
- return this.client.request(endpoint, { ...rest });
78
- }
79
- /**
80
- * Content Ratings
81
- * GET - https://api.themoviedb.org/3/tv/{series_id}/content_ratings
82
- *
83
- * Get the content ratings that have been added to a TV show.
84
- * @param series_id The ID of the TV series.
85
- * @returns A promise that resolves to the TV series content ratings.
86
- * @reference https://developer.themoviedb.org/reference/tv-series-content-ratings
87
- */
88
- async content_ratings(params) {
89
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.CONTENT_RATINGS);
90
- return this.client.request(endpoint);
91
- }
92
- /**
93
- * Credits
94
- * GET - https://api.themoviedb.org/3/tv/{series_id}/credits
95
- *
96
- * Get the latest season credits of a TV show.
97
- *
98
- * This is the original TV credits method which returns the latest season credit data.
99
- * If you would like to request the aggregate view (which is what you see on our website)
100
- * you should use the /aggregate_credits method.
101
- * @param series_id The ID of the TV series.
102
- * @param language The Language for the credits
103
- * @returns A promise that resolves to the TV series credits.
104
- * @reference https://developer.themoviedb.org/reference/tv-series-credits
105
- */
106
- async credits(params) {
107
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
108
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.CREDITS);
109
- return this.client.request(endpoint, { language, ...rest });
110
- }
111
- /**
112
- * Episode Groups
113
- * GET - https://api.themoviedb.org/3/tv/{series_id}/episode_groups
114
- *
115
- * Get the episode groups that have been added to a TV show.
116
- * With a group ID you can call the get TV episode group details method.
117
- * @param series_id The ID of the TV series.
118
- * @returns A promise that resolves to the TV series episode groups.
119
- * @reference https://developer.themoviedb.org/reference/tv-series-episode-groups
120
- */
121
- async episode_groups(params) {
122
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.EPISODE_GROUPS);
123
- return this.client.request(endpoint);
124
- }
125
- /**
126
- * External IDs
127
- * GET - https://api.themoviedb.org/3/tv/{series_id}/external_ids
128
- *
129
- * Get a list of external IDs that have been added to a TV show.
130
- * @param series_id The ID of the TV series.
131
- * @returns A promise that resolves to the TV series external ids.
132
- * @reference https://developer.themoviedb.org/reference/tv-series-external-ids
133
- */
134
- async external_ids(params) {
135
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.EXTERNAL_IDS);
136
- return this.client.request(endpoint);
137
- }
138
- /**
139
- * Images
140
- * GET - https://api.themoviedb.org/3/tv/{series_id}/images
141
- *
142
- * Fetches images related to a specific tv show, such as posters and backdrops.
143
- * The images are returned in various sizes and formats.
144
- *
145
- * 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.
146
- *
147
- * @param series_id - The unique identifier of the tv show.
148
- * @param language - (Optional) The language code to filter the images by language.
149
- * @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
150
- * @returns A promise that resolves to a `TVImages` object containing the tv show's images.
151
- * @reference https://developer.themoviedb.org/reference/tv-series-images
152
- */
153
- async images(params) {
154
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
155
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.IMAGES);
156
- return this.client.request(endpoint, { language, ...rest });
157
- }
158
- /**
159
- * Keywords
160
- * GET - https://api.themoviedb.org/3/tv/{series_id}/keywords
161
- *
162
- * Get a list of keywords that have been added to a TV show.
163
- * @param series_id The ID of the TV series.
164
- * @returns A promise that resolves to the TV series keywords.
165
- * @reference https://developer.themoviedb.org/reference/tv-series-keywords
166
- */
167
- async keywords(params) {
168
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.KEYWORDS);
169
- return this.client.request(endpoint);
170
- }
171
- /**
172
- * Latest
173
- * GET - https://api.themoviedb.org/3/tv/latest
174
- *
175
- * Get the newest tv show.
176
- * This is a live response and will continuosly change.
177
- * @returns A promise that resolves to the lastest TV series.
178
- * @reference https://developer.themoviedb.org/reference/tv-series-latest-id
179
- */
180
- async latest() {
181
- const endpoint = `${ENDPOINTS.TV_SERIES.DETAILS}${ENDPOINTS.TV_SERIES.LATEST}`;
182
- return this.client.request(endpoint);
183
- }
184
- /**
185
- * Lists
186
- * GET - https://api.themoviedb.org/3/tv/{series_id}/lists
187
- *
188
- * Get the lists that a TV series has been added to.
189
- * @param series_id The ID of the TV series.
190
- * @param language The Language for the lists
191
- * @param page Page number - Defaults to 1
192
- * @returns A promise that resolves to the TV series lists.
193
- * @reference https://developer.themoviedb.org/reference/lists-copy (TODO: Check this url for updates, it's like this on TMDB docs (??))
194
- */
195
- async lists(params) {
196
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
197
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.LISTS);
198
- return this.client.request(endpoint, { language, ...rest });
199
- }
200
- /**
201
- * Recomendations
202
- * GET - https://api.themoviedb.org/3/tv/{series_id}/recommendations
203
- *
204
- * Get the recommendations shows for a TV series.
205
- * @param series_id The ID of the TV series.
206
- * @param language The Language for the lists
207
- * @param page Page number - Defaults to 1
208
- * @returns A promise that resolves to TV series recommended shows.
209
- * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
210
- */
211
- async recommendations(params) {
212
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
213
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.RECOMMENDATIONS);
214
- return this.client.request(endpoint, { language, ...rest });
215
- }
216
- /**
217
- * Reviews
218
- * GET - https://api.themoviedb.org/3/tv/{series_id}/reviews
219
- *
220
- * Get the reviews that have been added to a TV show.
221
- * @param series_id The ID of the TV series.
222
- * @param language The Language for the lists
223
- * @param page Page number - Defaults to 1
224
- * @returns A promise that resolves to TV series recommended shows.
225
- * @reference https://developer.themoviedb.org/reference/tv-series-recommendations
226
- */
227
- async reviews(params) {
228
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
229
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.REVIEWS);
230
- return this.client.request(endpoint, { language, ...rest });
231
- }
232
- /**
233
- * Sreened Theatrically
234
- * GET - https://api.themoviedb.org/3/tv/{series_id}/screened_theatrically
235
- *
236
- * Get the seasons and episodes that have screened theatrically.
237
- * @param series_id The ID of the TV series.
238
- * @returns A promise that resolves to the TV episodes that have been screened thatrically.
239
- * @reference https://developer.themoviedb.org/reference/tv-series-screened-theatrically
240
- */
241
- async screened_theatrically(params) {
242
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.SCREENED_THEATRICALLY);
243
- return this.client.request(endpoint);
244
- }
245
- /**
246
- * Similar
247
- * GET - https://api.themoviedb.org/3/tv/{series_id}/similar
248
- *
249
- * Get the similar shows for a TV series.
250
- * @param series_id The ID of the TV series.
251
- * @param language The Language for the lists
252
- * @param page Page number - Defaults to 1
253
- * @returns A promise that resolves to TV series similar shows.
254
- * @reference https://developer.themoviedb.org/reference/tv-series-similar
255
- */
256
- async similar(params) {
257
- const { language = this.defaultOptions.language, series_id, ...rest } = params;
258
- const endpoint = this.seriesSubPath(series_id, ENDPOINTS.TV_SERIES.SIMILAR);
259
- return this.client.request(endpoint, { language, ...rest });
260
- }
261
- /**
262
- * Translations
263
- * GET - https://api.themoviedb.org/3/movie/{series_id}/translations
264
- *
265
- * Get the translations that have been added to a tv show.
266
- * Take a read through our language documentation for more information about languages on TMDB.
267
- * https://developer.themoviedb.org/docs/languages
268
- * @param series_id The ID of the TV Series
269
- * @returns A promise that resolves to the translations of the tv show.
270
- * @reference https://developer.themoviedb.org/reference/tv-series-translations
271
- */
272
- async translations(params) {
273
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.TRANSLATIONS);
274
- return this.client.request(endpoint);
275
- }
276
- /**
277
- * Videos
278
- * GET - https://api.themoviedb.org/3/movie/{series_id}/videos
279
- *
280
- * Get the videos that belong to a TV show.
281
- * @param series_id The ID of the TV Series
282
- * @returns A promise that resolves to the videos for the tv show.
283
- * @reference https://developer.themoviedb.org/reference/tv-series-videos
284
- */
285
- async videos(params) {
286
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.VIDEOS);
287
- return this.client.request(endpoint);
288
- }
289
- /**
290
- * Watch Providers
291
- * GET - https://api.themoviedb.org/3/movie/{series_id}/watch/providers
292
- *
293
- * Get the list of streaming providers we have for a TV show.
294
- *
295
- * Powered by our partnership with JustWatch, you can query this method to get a list of the streaming/rental/purchase availabilities per country by provider.
296
- * This is not going to return full deep links, but rather, it's just enough information to display what's available where.
297
- * You can link to the provided TMDB URL to help support TMDB and provide the actual deep links to the content.
298
- *
299
- * WARNING: JustWatch Attribution Required
300
- * In order to use this data you must attribute the source of the data as JustWatch.
301
- * If we find any usage not complying with these terms we will revoke access to the API.
302
- *
303
- * @param series_id The ID of the TV Series
304
- * @returns A promise that resolves to the watch providers for the tv show.
305
- * @reference https://developer.themoviedb.org/reference/tv-series-watch-providers
306
- */
307
- async watch_providers(params) {
308
- const endpoint = this.seriesSubPath(params.series_id, ENDPOINTS.TV_SERIES.WATCH_PROVIDERS);
309
- return this.client.request(endpoint);
310
- }
311
- }
@@ -1,51 +0,0 @@
1
- import { PaginatedResponse, TVSeriesResultItem } from "../types";
2
- import { TVSeriesListParams } from "../types/tv-series";
3
- import { TMDBAPIBase } from "./base";
4
- export declare class TVSeriesListsAPI extends TMDBAPIBase {
5
- private withDefaults;
6
- /**
7
- * Fetch TVSeries List Wrapper
8
- * @param endpoint Endpoint to call
9
- * @param params Params for the request
10
- * @returns PaginatedResponse of TVSeriesResultItem
11
- */
12
- private fetch_tv_series_list;
13
- /**
14
- * Airing Today
15
- * GET - https://api.themoviedb.org/3/tv/airing_today
16
- *
17
- * Get a list of TV shows airing today.
18
- * @param language Language (Defaults to en-US or TMDB default)
19
- * @param page Page (Defaults to 1)
20
- * @param timezone Timezone for the "today"
21
- */
22
- airing_today(params?: TVSeriesListParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
23
- /**
24
- * On The Air
25
- * GET - https://api.themoviedb.org/3/tv/on_the_air
26
- *
27
- * Get a list of TV shows that air in the next 7 days.
28
- * @param language Language (Defaults to en-US or TMDB default)
29
- * @param page Page (Defaults to 1)
30
- * @param timezone Timezone for the "today"
31
- */
32
- on_the_air(params?: TVSeriesListParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
33
- /**
34
- * Popular
35
- * GET - https://api.themoviedb.org/3/tv/popular
36
- *
37
- * Get a list of TV shows ordered by popularity.
38
- * @param language Language (Defaults to en-US or TMDB default)
39
- * @param page Page (Defaults to 1)
40
- */
41
- popular(params?: TVSeriesListParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
42
- /**
43
- * Top Rated
44
- * GET - https://api.themoviedb.org/3/tv/top_rated
45
- *
46
- * Get a list of movies ordered by rating.
47
- * @param language Language (Defaults to en-US or TMDB default)
48
- * @param page Page (Defaults to 1)
49
- */
50
- top_rated(params?: TVSeriesListParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
51
- }
@@ -1,63 +0,0 @@
1
- import { ENDPOINTS } from "../routes";
2
- import { TMDBAPIBase } from "./base";
3
- export class TVSeriesListsAPI extends TMDBAPIBase {
4
- withDefaults(params) {
5
- const { language = this.defaultOptions.language, timezone = this.defaultOptions.timezone, ...rest } = params;
6
- return { language, timezone, ...rest };
7
- }
8
- /**
9
- * Fetch TVSeries List Wrapper
10
- * @param endpoint Endpoint to call
11
- * @param params Params for the request
12
- * @returns PaginatedResponse of TVSeriesResultItem
13
- */
14
- fetch_tv_series_list(endpoint, params = {}) {
15
- return this.client.request(ENDPOINTS.TV_SERIES.DETAILS + endpoint, this.withDefaults(params));
16
- }
17
- /**
18
- * Airing Today
19
- * GET - https://api.themoviedb.org/3/tv/airing_today
20
- *
21
- * Get a list of TV shows airing today.
22
- * @param language Language (Defaults to en-US or TMDB default)
23
- * @param page Page (Defaults to 1)
24
- * @param timezone Timezone for the "today"
25
- */
26
- async airing_today(params = {}) {
27
- return this.fetch_tv_series_list(ENDPOINTS.TV_SERIES.AIRING_TODAY, params);
28
- }
29
- /**
30
- * On The Air
31
- * GET - https://api.themoviedb.org/3/tv/on_the_air
32
- *
33
- * Get a list of TV shows that air in the next 7 days.
34
- * @param language Language (Defaults to en-US or TMDB default)
35
- * @param page Page (Defaults to 1)
36
- * @param timezone Timezone for the "today"
37
- */
38
- async on_the_air(params = {}) {
39
- return this.fetch_tv_series_list(ENDPOINTS.TV_SERIES.ON_THE_AIR, params);
40
- }
41
- /**
42
- * Popular
43
- * GET - https://api.themoviedb.org/3/tv/popular
44
- *
45
- * Get a list of TV shows ordered by popularity.
46
- * @param language Language (Defaults to en-US or TMDB default)
47
- * @param page Page (Defaults to 1)
48
- */
49
- async popular(params = {}) {
50
- return this.fetch_tv_series_list(ENDPOINTS.TV_SERIES.POPULAR, params);
51
- }
52
- /**
53
- * Top Rated
54
- * GET - https://api.themoviedb.org/3/tv/top_rated
55
- *
56
- * Get a list of movies ordered by rating.
57
- * @param language Language (Defaults to en-US or TMDB default)
58
- * @param page Page (Defaults to 1)
59
- */
60
- async top_rated(params = {}) {
61
- return this.fetch_tv_series_list(ENDPOINTS.TV_SERIES.TOP_RATED, params);
62
- }
63
- }