@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.
- package/dist/index.d.ts +5087 -4
- package/dist/index.js +3721 -5
- package/package.json +12 -5
- package/dist/client.d.ts +0 -51
- package/dist/client.js +0 -166
- package/dist/endpoints/base.d.ts +0 -22
- package/dist/endpoints/base.js +0 -32
- package/dist/endpoints/certifications.d.ts +0 -20
- package/dist/endpoints/certifications.js +0 -24
- package/dist/endpoints/changes.d.ts +0 -40
- package/dist/endpoints/changes.js +0 -46
- package/dist/endpoints/collections.d.ts +0 -39
- package/dist/endpoints/collections.js +0 -52
- package/dist/endpoints/companies.d.ts +0 -37
- package/dist/endpoints/companies.js +0 -49
- package/dist/endpoints/configuration.d.ts +0 -72
- package/dist/endpoints/configuration.js +0 -83
- package/dist/endpoints/credits.d.ts +0 -16
- package/dist/endpoints/credits.js +0 -22
- package/dist/endpoints/discover.d.ts +0 -36
- package/dist/endpoints/discover.js +0 -61
- package/dist/endpoints/find.d.ts +0 -16
- package/dist/endpoints/find.js +0 -21
- package/dist/endpoints/genres.d.ts +0 -25
- package/dist/endpoints/genres.js +0 -28
- package/dist/endpoints/keywords.d.ts +0 -29
- package/dist/endpoints/keywords.js +0 -38
- package/dist/endpoints/movie_lists.d.ts +0 -53
- package/dist/endpoints/movie_lists.js +0 -65
- package/dist/endpoints/movies.d.ts +0 -202
- package/dist/endpoints/movies.js +0 -255
- package/dist/endpoints/networks.d.ts +0 -36
- package/dist/endpoints/networks.js +0 -46
- package/dist/endpoints/people.d.ts +0 -91
- package/dist/endpoints/people.js +0 -128
- package/dist/endpoints/people_lists.d.ts +0 -16
- package/dist/endpoints/people_lists.js +0 -16
- package/dist/endpoints/reviews.d.ts +0 -14
- package/dist/endpoints/reviews.js +0 -16
- package/dist/endpoints/search.d.ts +0 -88
- package/dist/endpoints/search.js +0 -102
- package/dist/endpoints/trending.d.ts +0 -36
- package/dist/endpoints/trending.js +0 -48
- package/dist/endpoints/tv_episode_groups.d.ts +0 -13
- package/dist/endpoints/tv_episode_groups.js +0 -16
- package/dist/endpoints/tv_episodes.d.ts +0 -110
- package/dist/endpoints/tv_episodes.js +0 -136
- package/dist/endpoints/tv_seasons.d.ts +0 -128
- package/dist/endpoints/tv_seasons.js +0 -164
- package/dist/endpoints/tv_series.d.ts +0 -244
- package/dist/endpoints/tv_series.js +0 -311
- package/dist/endpoints/tv_series_lists.d.ts +0 -51
- package/dist/endpoints/tv_series_lists.js +0 -63
- package/dist/endpoints/watch_providers.d.ts +0 -34
- package/dist/endpoints/watch_providers.js +0 -46
- package/dist/errors/messages.d.ts +0 -15
- package/dist/errors/messages.js +0 -47
- package/dist/errors/tmdb.d.ts +0 -45
- package/dist/errors/tmdb.js +0 -39
- package/dist/images/images.d.ts +0 -12
- package/dist/images/images.js +0 -26
- package/dist/routes.d.ts +0 -157
- package/dist/routes.js +0 -157
- package/dist/tmdb.d.ts +0 -61
- package/dist/tmdb.js +0 -94
- package/dist/types/collections.d.ts +0 -72
- package/dist/types/collections.js +0 -1
- package/dist/types/common/certifications.d.ts +0 -19
- package/dist/types/common/certifications.js +0 -1
- package/dist/types/common/changes.d.ts +0 -44
- package/dist/types/common/changes.js +0 -1
- package/dist/types/common/images.d.ts +0 -64
- package/dist/types/common/images.js +0 -1
- package/dist/types/common/index.d.ts +0 -6
- package/dist/types/common/index.js +0 -6
- package/dist/types/common/media.d.ts +0 -305
- package/dist/types/common/media.js +0 -1
- package/dist/types/common/pagination.d.ts +0 -6
- package/dist/types/common/pagination.js +0 -1
- package/dist/types/common/params.d.ts +0 -27
- package/dist/types/common/params.js +0 -1
- package/dist/types/companies.d.ts +0 -53
- package/dist/types/companies.js +0 -1
- package/dist/types/config/configuration.d.ts +0 -56
- package/dist/types/config/configuration.js +0 -1
- package/dist/types/config/countries.d.ts +0 -3
- package/dist/types/config/countries.js +0 -1257
- package/dist/types/config/images.d.ts +0 -49
- package/dist/types/config/images.js +0 -13
- package/dist/types/config/index.d.ts +0 -6
- package/dist/types/config/index.js +0 -6
- package/dist/types/config/languages.d.ts +0 -11
- package/dist/types/config/languages.js +0 -1
- package/dist/types/config/options.d.ts +0 -46
- package/dist/types/config/options.js +0 -1
- package/dist/types/config/timezones.d.ts +0 -751
- package/dist/types/config/timezones.js +0 -1149
- package/dist/types/credits.d.ts +0 -148
- package/dist/types/credits.js +0 -1
- package/dist/types/discover.d.ts +0 -130
- package/dist/types/discover.js +0 -27
- package/dist/types/enums.d.ts +0 -8
- package/dist/types/enums.js +0 -9
- package/dist/types/find.d.ts +0 -103
- package/dist/types/find.js +0 -1
- package/dist/types/index.d.ts +0 -21
- package/dist/types/index.js +0 -21
- package/dist/types/keywords.d.ts +0 -19
- package/dist/types/keywords.js +0 -1
- package/dist/types/movies.d.ts +0 -304
- package/dist/types/movies.js +0 -1
- package/dist/types/networks.d.ts +0 -45
- package/dist/types/networks.js +0 -1
- package/dist/types/people-lists.d.ts +0 -5
- package/dist/types/people-lists.js +0 -1
- package/dist/types/people.d.ts +0 -214
- package/dist/types/people.js +0 -1
- package/dist/types/reviews.d.ts +0 -22
- package/dist/types/reviews.js +0 -1
- package/dist/types/search.d.ts +0 -198
- package/dist/types/search.js +0 -1
- package/dist/types/trending.d.ts +0 -55
- package/dist/types/trending.js +0 -1
- package/dist/types/tv-episode-groups.d.ts +0 -63
- package/dist/types/tv-episode-groups.js +0 -13
- package/dist/types/tv-episodes.d.ts +0 -98
- package/dist/types/tv-episodes.js +0 -1
- package/dist/types/tv-seasons.d.ts +0 -133
- package/dist/types/tv-seasons.js +0 -1
- package/dist/types/tv-series.d.ts +0 -445
- package/dist/types/tv-series.js +0 -1
- package/dist/types/utility.d.ts +0 -16
- package/dist/types/utility.js +0 -10
- package/dist/types/watch-providers.d.ts +0 -34
- package/dist/types/watch-providers.js +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -2
- package/dist/utils/jwt.d.ts +0 -1
- package/dist/utils/jwt.js +0 -61
- package/dist/utils/logger.d.ts +0 -18
- package/dist/utils/logger.js +0 -40
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { MediaWatchProviders, MovieAlternativeTitlesParams, MovieChangesParams, MovieCreditsParams, MovieDetailsParams, MovieExternalIDsParams, MovieImagesParams, MovieKeywordsParams, MovieRecommendationsParams, MovieReleaseDatesParams, MovieReviewsParams, MovieSimilarParams, MovieTranslationsParams, MovieVideosParams, MovieWatchProvidersParams } from "../types";
|
|
2
|
-
import { MovieAlternativeTitles, MovieAppendToResponseNamespace, MovieChanges, MovieCredits, MovieDetails, MovieDetailsWithAppends, MovieExternalIDs, MovieImages, MovieKeywords, MovieRecommendations, MovieReleaseDates, MovieReviews, MovieSimilar, MovieTranslations, MovieVideos } from "../types/movies";
|
|
3
|
-
import { TMDBAPIBase } from "./base";
|
|
4
|
-
export declare class MoviesAPI extends TMDBAPIBase {
|
|
5
|
-
private moviePath;
|
|
6
|
-
private movieSubPath;
|
|
7
|
-
/**
|
|
8
|
-
* Details
|
|
9
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}
|
|
10
|
-
*
|
|
11
|
-
* Get the top level details of a movie by ID.
|
|
12
|
-
* @param movie_id The ID of the movie.
|
|
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 movie details.
|
|
16
|
-
* @reference https://developer.themoviedb.org/reference/movie-details
|
|
17
|
-
*/
|
|
18
|
-
details<T extends readonly MovieAppendToResponseNamespace[] = []>(params: MovieDetailsParams & {
|
|
19
|
-
append_to_response?: T[number] | T;
|
|
20
|
-
}): Promise<T extends [] ? MovieDetails : MovieDetailsWithAppends<T>>;
|
|
21
|
-
/**
|
|
22
|
-
* Alternative Titles
|
|
23
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/alternative_titles
|
|
24
|
-
*
|
|
25
|
-
* Get the alternative titles for a movie (ex. Russian name, Indian names etc..).
|
|
26
|
-
* @param movie_id The ID of the movie.
|
|
27
|
-
* @param country The ISO 3166-1 code of the country to get alternative titles for.
|
|
28
|
-
* @returns A promise that resolves to the movie alternative titles.
|
|
29
|
-
* @reference https://developer.themoviedb.org/reference/movie-alternative-titles
|
|
30
|
-
*/
|
|
31
|
-
alternative_titles(params: MovieAlternativeTitlesParams): Promise<MovieAlternativeTitles>;
|
|
32
|
-
/**
|
|
33
|
-
* Credits
|
|
34
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/credits
|
|
35
|
-
*
|
|
36
|
-
* Get the cast and crew members details for a movie.
|
|
37
|
-
* @param movie_id The ID of the movie.
|
|
38
|
-
* @param language The ISO 639-1 code of the language to use for the response. Default is "en-US".
|
|
39
|
-
* @returns A promise that resolves to the movie credits.
|
|
40
|
-
* @reference https://developer.themoviedb.org/reference/movie-credits
|
|
41
|
-
*/
|
|
42
|
-
credits(params: MovieCreditsParams): Promise<MovieCredits>;
|
|
43
|
-
/**
|
|
44
|
-
* External IDs
|
|
45
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/external_ids
|
|
46
|
-
*
|
|
47
|
-
* Get the external IDs for a movie (ex. IMDB, Facebook, Instagram etc..).
|
|
48
|
-
* Supported external IDs are: IMDB, Facebook, Instagram, Twitter, and Wikidata.
|
|
49
|
-
*
|
|
50
|
-
* @param movie_id The ID of the movie.
|
|
51
|
-
* @returns A promise that resolves to the movie external IDs.
|
|
52
|
-
* @reference https://developer.themoviedb.org/reference/movie-external-ids
|
|
53
|
-
*/
|
|
54
|
-
external_ids(params: MovieExternalIDsParams): Promise<MovieExternalIDs>;
|
|
55
|
-
/**
|
|
56
|
-
* Keywords
|
|
57
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/keywords
|
|
58
|
-
*
|
|
59
|
-
* Get the keywords that have been added to a movie.
|
|
60
|
-
* This is a list of keywords that have been added to the movie.
|
|
61
|
-
* @param movie_id The ID of the movie.
|
|
62
|
-
* @returns A promise that resolves to the movie keywords.
|
|
63
|
-
* @reference https://developer.themoviedb.org/reference/movie-keywords
|
|
64
|
-
*/
|
|
65
|
-
keywords(params: MovieKeywordsParams): Promise<MovieKeywords>;
|
|
66
|
-
/**
|
|
67
|
-
* Changes
|
|
68
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/changes
|
|
69
|
-
*
|
|
70
|
-
* Get the changes for a movie. This is a list of all the changes that have been made to a movie.
|
|
71
|
-
* By default, only the last 24 hours are returned.
|
|
72
|
-
* You can query up to 14 days in a single query by using the start_date and end_date query parameters.
|
|
73
|
-
* @param movie_id The ID of the movie.
|
|
74
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
75
|
-
* @param start_date Optional start date for the changes. Format: YYYY-MM-DD.
|
|
76
|
-
* @param end_date Optional end date for the changes. Format: YYYY-MM-DD.
|
|
77
|
-
* @returns A promise that resolves to the changes made to the movie.
|
|
78
|
-
* @reference https://developer.themoviedb.org/reference/movie-changes
|
|
79
|
-
*/
|
|
80
|
-
changes(params: MovieChangesParams): Promise<MovieChanges>;
|
|
81
|
-
/**
|
|
82
|
-
* Images
|
|
83
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/images
|
|
84
|
-
*
|
|
85
|
-
* Fetches images related to a specific movie, such as posters and backdrops.
|
|
86
|
-
* The images are returned in various sizes and formats.
|
|
87
|
-
*
|
|
88
|
-
* 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.
|
|
89
|
-
*
|
|
90
|
-
* @param movie_id - The unique identifier of the movie.
|
|
91
|
-
* @param language - (Optional) The language code to filter the images by language.
|
|
92
|
-
* @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
|
|
93
|
-
* @returns A promise that resolves to a `MovieImages` object containing the movie's images.
|
|
94
|
-
* @reference https://developer.themoviedb.org/reference/movie-images
|
|
95
|
-
*/
|
|
96
|
-
images(params: MovieImagesParams): Promise<MovieImages>;
|
|
97
|
-
/**
|
|
98
|
-
* Latest
|
|
99
|
-
* GET - https://api.themoviedb.org/3/movie/latest
|
|
100
|
-
*
|
|
101
|
-
* Get the newest movie ID.
|
|
102
|
-
* This is the most recent movie that has been added to TMDB. This is a live response will continuously change as new movies are added.
|
|
103
|
-
* @returns A promise that resolves to the latest movie details.
|
|
104
|
-
* @reference https://developer.themoviedb.org/reference/movie-latest-id
|
|
105
|
-
*/
|
|
106
|
-
latest(): Promise<MovieDetails>;
|
|
107
|
-
/**
|
|
108
|
-
* Recommendations
|
|
109
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/recommendations
|
|
110
|
-
*
|
|
111
|
-
* Get a list of recommended movies for a specific movie.
|
|
112
|
-
* This is based on the movie's popularity and user ratings.
|
|
113
|
-
* @param movie_id The ID of the movie.
|
|
114
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
115
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
116
|
-
* @returns A promise that resolves to a paginated response of similar movies.
|
|
117
|
-
* @reference https://developer.themoviedb.org/reference/movie-recommendations
|
|
118
|
-
*/
|
|
119
|
-
recommendations(params: MovieRecommendationsParams): Promise<MovieRecommendations>;
|
|
120
|
-
/**
|
|
121
|
-
* Release Dates
|
|
122
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/release_dates
|
|
123
|
-
*
|
|
124
|
-
* Get the release dates and certifications for a movie. For different countries and release types.
|
|
125
|
-
* The release types and statuses used on TMDB are the following:
|
|
126
|
-
* - 1: Premiere
|
|
127
|
-
* - 2: Theatrical (Limited)
|
|
128
|
-
* - 3: Theatrical
|
|
129
|
-
* - 4: Digital
|
|
130
|
-
* - 5: Physical
|
|
131
|
-
* - 6: TV
|
|
132
|
-
* @param movie_id The ID of the movie.
|
|
133
|
-
* @returns A promise that resolves to the release dates for the movie.
|
|
134
|
-
* @reference https://developer.themoviedb.org/reference/movie-release-dates
|
|
135
|
-
*/
|
|
136
|
-
release_dates(params: MovieReleaseDatesParams): Promise<MovieReleaseDates>;
|
|
137
|
-
/**
|
|
138
|
-
* Reviews
|
|
139
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/reviews
|
|
140
|
-
*
|
|
141
|
-
* Get the user reviews for a movie.
|
|
142
|
-
* @param movie_id The ID of the movie.
|
|
143
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
144
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
145
|
-
* @returns A promise that resolves to a paginated response of movies reviews.
|
|
146
|
-
* @reference https://developer.themoviedb.org/reference/movie-reviews
|
|
147
|
-
*/
|
|
148
|
-
reviews(params: MovieReviewsParams): Promise<MovieReviews>;
|
|
149
|
-
/**
|
|
150
|
-
* Similar
|
|
151
|
-
* GET -https://api.themoviedb.org/3/movie/{movie_id}/similar
|
|
152
|
-
*
|
|
153
|
-
* Get the similar movies based on genres and keywords.
|
|
154
|
-
* This method only looks for other items based on genres and plot keywords.
|
|
155
|
-
* As such, the results found here are not always going to be 💯. Use it with that in mind.
|
|
156
|
-
* @param movie_id The ID of the movie
|
|
157
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
158
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
159
|
-
* @returns A promise that resolves to a paginated response of similar movies.
|
|
160
|
-
* @reference https://developer.themoviedb.org/reference/movie-similar
|
|
161
|
-
*/
|
|
162
|
-
similar(params: MovieSimilarParams): Promise<MovieSimilar>;
|
|
163
|
-
/**
|
|
164
|
-
* Translations
|
|
165
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/translations
|
|
166
|
-
*
|
|
167
|
-
* Get the translations for a movie.
|
|
168
|
-
* Take a read through our language documentation for more information about languages on TMDB.
|
|
169
|
-
* https://developer.themoviedb.org/docs/languages
|
|
170
|
-
* @param movie_id The ID of the movie
|
|
171
|
-
* @returns A promise that resolves to the translations of the movie.
|
|
172
|
-
* @reference https://developer.themoviedb.org/reference/movie-translations
|
|
173
|
-
*/
|
|
174
|
-
translations(params: MovieTranslationsParams): Promise<MovieTranslations>;
|
|
175
|
-
/**
|
|
176
|
-
* Videos
|
|
177
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/videos
|
|
178
|
-
*
|
|
179
|
-
* Get the available videos for a movie.
|
|
180
|
-
* @param movie_id The ID of the movie
|
|
181
|
-
* @returns A promise that resolves to a list of videos for the movie.
|
|
182
|
-
* @reference https://developer.themoviedb.org/reference/movie-videos
|
|
183
|
-
*/
|
|
184
|
-
videos(params: MovieVideosParams): Promise<MovieVideos>;
|
|
185
|
-
/**
|
|
186
|
-
* Watch Providers
|
|
187
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/watch/providers
|
|
188
|
-
*
|
|
189
|
-
* Get the list of streaming providers we have for a movie.
|
|
190
|
-
* 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.
|
|
191
|
-
* This is not going to return full deep links, but rather, it's just enough information to display what's available where.
|
|
192
|
-
* You can link to the provided TMDB URL to help support TMDB and provide the actual deep links to the content.
|
|
193
|
-
*
|
|
194
|
-
* JustWatch ATTRIBUTION REQUIRED
|
|
195
|
-
* In order to use this data you must attribute the source of the data as JustWatch.
|
|
196
|
-
* If we find any usage not complying with these terms we will revoke access to the API.
|
|
197
|
-
* @param movie_id The ID of the movie
|
|
198
|
-
* @returns A promise that resolves to a list of videos for the movie.
|
|
199
|
-
* @reference https://developer.themoviedb.org/reference/movie-videos
|
|
200
|
-
*/
|
|
201
|
-
watch_providers(params: MovieWatchProvidersParams): Promise<MediaWatchProviders>;
|
|
202
|
-
}
|
package/dist/endpoints/movies.js
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class MoviesAPI extends TMDBAPIBase {
|
|
4
|
-
moviePath(movie_id) {
|
|
5
|
-
return `${ENDPOINTS.MOVIES.DETAILS}/${movie_id}`;
|
|
6
|
-
}
|
|
7
|
-
movieSubPath(movie_id, route) {
|
|
8
|
-
return `${this.moviePath(movie_id)}${route}`;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Details
|
|
12
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}
|
|
13
|
-
*
|
|
14
|
-
* Get the top level details of a movie by ID.
|
|
15
|
-
* @param movie_id The ID of the movie.
|
|
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 movie details.
|
|
19
|
-
* @reference https://developer.themoviedb.org/reference/movie-details
|
|
20
|
-
*/
|
|
21
|
-
async details(params) {
|
|
22
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
23
|
-
const endpoint = this.moviePath(params.movie_id);
|
|
24
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Alternative Titles
|
|
28
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/alternative_titles
|
|
29
|
-
*
|
|
30
|
-
* Get the alternative titles for a movie (ex. Russian name, Indian names etc..).
|
|
31
|
-
* @param movie_id The ID of the movie.
|
|
32
|
-
* @param country The ISO 3166-1 code of the country to get alternative titles for.
|
|
33
|
-
* @returns A promise that resolves to the movie alternative titles.
|
|
34
|
-
* @reference https://developer.themoviedb.org/reference/movie-alternative-titles
|
|
35
|
-
*/
|
|
36
|
-
async alternative_titles(params) {
|
|
37
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.ALTERNATIVE_TITLES);
|
|
38
|
-
return this.client.request(endpoint, params);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Credits
|
|
42
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/credits
|
|
43
|
-
*
|
|
44
|
-
* Get the cast and crew members details for a movie.
|
|
45
|
-
* @param movie_id The ID of the movie.
|
|
46
|
-
* @param language The ISO 639-1 code of the language to use for the response. Default is "en-US".
|
|
47
|
-
* @returns A promise that resolves to the movie credits.
|
|
48
|
-
* @reference https://developer.themoviedb.org/reference/movie-credits
|
|
49
|
-
*/
|
|
50
|
-
async credits(params) {
|
|
51
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.CREDITS);
|
|
52
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
53
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* External IDs
|
|
57
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/external_ids
|
|
58
|
-
*
|
|
59
|
-
* Get the external IDs for a movie (ex. IMDB, Facebook, Instagram etc..).
|
|
60
|
-
* Supported external IDs are: IMDB, Facebook, Instagram, Twitter, and Wikidata.
|
|
61
|
-
*
|
|
62
|
-
* @param movie_id The ID of the movie.
|
|
63
|
-
* @returns A promise that resolves to the movie external IDs.
|
|
64
|
-
* @reference https://developer.themoviedb.org/reference/movie-external-ids
|
|
65
|
-
*/
|
|
66
|
-
async external_ids(params) {
|
|
67
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.EXTERNAL_IDS);
|
|
68
|
-
return this.client.request(endpoint);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Keywords
|
|
72
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/keywords
|
|
73
|
-
*
|
|
74
|
-
* Get the keywords that have been added to a movie.
|
|
75
|
-
* This is a list of keywords that have been added to the movie.
|
|
76
|
-
* @param movie_id The ID of the movie.
|
|
77
|
-
* @returns A promise that resolves to the movie keywords.
|
|
78
|
-
* @reference https://developer.themoviedb.org/reference/movie-keywords
|
|
79
|
-
*/
|
|
80
|
-
async keywords(params) {
|
|
81
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.KEYWORDS);
|
|
82
|
-
return this.client.request(endpoint);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Changes
|
|
86
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/changes
|
|
87
|
-
*
|
|
88
|
-
* Get the changes for a movie. This is a list of all the changes that have been made to a movie.
|
|
89
|
-
* By default, only the last 24 hours are returned.
|
|
90
|
-
* You can query up to 14 days in a single query by using the start_date and end_date query parameters.
|
|
91
|
-
* @param movie_id The ID of the movie.
|
|
92
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
93
|
-
* @param start_date Optional start date for the changes. Format: YYYY-MM-DD.
|
|
94
|
-
* @param end_date Optional end date for the changes. Format: YYYY-MM-DD.
|
|
95
|
-
* @returns A promise that resolves to the changes made to the movie.
|
|
96
|
-
* @reference https://developer.themoviedb.org/reference/movie-changes
|
|
97
|
-
*/
|
|
98
|
-
async changes(params) {
|
|
99
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.CHANGES);
|
|
100
|
-
return this.client.request(endpoint, params);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Images
|
|
104
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/images
|
|
105
|
-
*
|
|
106
|
-
* Fetches images related to a specific movie, such as posters and backdrops.
|
|
107
|
-
* The images are returned in various sizes and formats.
|
|
108
|
-
*
|
|
109
|
-
* 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.
|
|
110
|
-
*
|
|
111
|
-
* @param movie_id - The unique identifier of the movie.
|
|
112
|
-
* @param language - (Optional) The language code to filter the images by language.
|
|
113
|
-
* @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
|
|
114
|
-
* @returns A promise that resolves to a `MovieImages` object containing the movie's images.
|
|
115
|
-
* @reference https://developer.themoviedb.org/reference/movie-images
|
|
116
|
-
*/
|
|
117
|
-
async images(params) {
|
|
118
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
119
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.IMAGES);
|
|
120
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Latest
|
|
124
|
-
* GET - https://api.themoviedb.org/3/movie/latest
|
|
125
|
-
*
|
|
126
|
-
* Get the newest movie ID.
|
|
127
|
-
* This is the most recent movie that has been added to TMDB. This is a live response will continuously change as new movies are added.
|
|
128
|
-
* @returns A promise that resolves to the latest movie details.
|
|
129
|
-
* @reference https://developer.themoviedb.org/reference/movie-latest-id
|
|
130
|
-
*/
|
|
131
|
-
async latest() {
|
|
132
|
-
const endpoint = `${ENDPOINTS.MOVIES.DETAILS}${ENDPOINTS.MOVIES.LATEST}`;
|
|
133
|
-
return this.client.request(endpoint);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Recommendations
|
|
137
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/recommendations
|
|
138
|
-
*
|
|
139
|
-
* Get a list of recommended movies for a specific movie.
|
|
140
|
-
* This is based on the movie's popularity and user ratings.
|
|
141
|
-
* @param movie_id The ID of the movie.
|
|
142
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
143
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
144
|
-
* @returns A promise that resolves to a paginated response of similar movies.
|
|
145
|
-
* @reference https://developer.themoviedb.org/reference/movie-recommendations
|
|
146
|
-
*/
|
|
147
|
-
async recommendations(params) {
|
|
148
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
149
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.RECOMMENDATIONS);
|
|
150
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Release Dates
|
|
154
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/release_dates
|
|
155
|
-
*
|
|
156
|
-
* Get the release dates and certifications for a movie. For different countries and release types.
|
|
157
|
-
* The release types and statuses used on TMDB are the following:
|
|
158
|
-
* - 1: Premiere
|
|
159
|
-
* - 2: Theatrical (Limited)
|
|
160
|
-
* - 3: Theatrical
|
|
161
|
-
* - 4: Digital
|
|
162
|
-
* - 5: Physical
|
|
163
|
-
* - 6: TV
|
|
164
|
-
* @param movie_id The ID of the movie.
|
|
165
|
-
* @returns A promise that resolves to the release dates for the movie.
|
|
166
|
-
* @reference https://developer.themoviedb.org/reference/movie-release-dates
|
|
167
|
-
*/
|
|
168
|
-
async release_dates(params) {
|
|
169
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.RELEASE_DATES);
|
|
170
|
-
return this.client.request(endpoint);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Reviews
|
|
174
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/reviews
|
|
175
|
-
*
|
|
176
|
-
* Get the user reviews for a movie.
|
|
177
|
-
* @param movie_id The ID of the movie.
|
|
178
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
179
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
180
|
-
* @returns A promise that resolves to a paginated response of movies reviews.
|
|
181
|
-
* @reference https://developer.themoviedb.org/reference/movie-reviews
|
|
182
|
-
*/
|
|
183
|
-
async reviews(params) {
|
|
184
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
185
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.REVIEWS);
|
|
186
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Similar
|
|
190
|
-
* GET -https://api.themoviedb.org/3/movie/{movie_id}/similar
|
|
191
|
-
*
|
|
192
|
-
* Get the similar movies based on genres and keywords.
|
|
193
|
-
* This method only looks for other items based on genres and plot keywords.
|
|
194
|
-
* As such, the results found here are not always going to be 💯. Use it with that in mind.
|
|
195
|
-
* @param movie_id The ID of the movie
|
|
196
|
-
* @param page Page number of the results to return. Defaults to 1.
|
|
197
|
-
* @param language Language code to filter the results. Default is "en-US".
|
|
198
|
-
* @returns A promise that resolves to a paginated response of similar movies.
|
|
199
|
-
* @reference https://developer.themoviedb.org/reference/movie-similar
|
|
200
|
-
*/
|
|
201
|
-
async similar(params) {
|
|
202
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
203
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.SIMILAR);
|
|
204
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Translations
|
|
208
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/translations
|
|
209
|
-
*
|
|
210
|
-
* Get the translations for a movie.
|
|
211
|
-
* Take a read through our language documentation for more information about languages on TMDB.
|
|
212
|
-
* https://developer.themoviedb.org/docs/languages
|
|
213
|
-
* @param movie_id The ID of the movie
|
|
214
|
-
* @returns A promise that resolves to the translations of the movie.
|
|
215
|
-
* @reference https://developer.themoviedb.org/reference/movie-translations
|
|
216
|
-
*/
|
|
217
|
-
async translations(params) {
|
|
218
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.TRANSLATIONS);
|
|
219
|
-
return this.client.request(endpoint);
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Videos
|
|
223
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/videos
|
|
224
|
-
*
|
|
225
|
-
* Get the available videos for a movie.
|
|
226
|
-
* @param movie_id The ID of the movie
|
|
227
|
-
* @returns A promise that resolves to a list of videos for the movie.
|
|
228
|
-
* @reference https://developer.themoviedb.org/reference/movie-videos
|
|
229
|
-
*/
|
|
230
|
-
async videos(params) {
|
|
231
|
-
const { language = this.defaultOptions.language, ...rest } = params;
|
|
232
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.VIDEOS);
|
|
233
|
-
return this.client.request(endpoint, { language, ...rest });
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Watch Providers
|
|
237
|
-
* GET - https://api.themoviedb.org/3/movie/{movie_id}/watch/providers
|
|
238
|
-
*
|
|
239
|
-
* Get the list of streaming providers we have for a movie.
|
|
240
|
-
* 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.
|
|
241
|
-
* This is not going to return full deep links, but rather, it's just enough information to display what's available where.
|
|
242
|
-
* You can link to the provided TMDB URL to help support TMDB and provide the actual deep links to the content.
|
|
243
|
-
*
|
|
244
|
-
* JustWatch ATTRIBUTION REQUIRED
|
|
245
|
-
* In order to use this data you must attribute the source of the data as JustWatch.
|
|
246
|
-
* If we find any usage not complying with these terms we will revoke access to the API.
|
|
247
|
-
* @param movie_id The ID of the movie
|
|
248
|
-
* @returns A promise that resolves to a list of videos for the movie.
|
|
249
|
-
* @reference https://developer.themoviedb.org/reference/movie-videos
|
|
250
|
-
*/
|
|
251
|
-
async watch_providers(params) {
|
|
252
|
-
const endpoint = this.movieSubPath(params.movie_id, ENDPOINTS.MOVIES.WATCH_PROVIDERS);
|
|
253
|
-
return this.client.request(endpoint);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AlternativeNamesResult } from "../types";
|
|
2
|
-
import { Network, NetworkBaseParams, NetworkImages } from "../types/networks";
|
|
3
|
-
import { TMDBAPIBase } from "./base";
|
|
4
|
-
export declare class NetworksAPI extends TMDBAPIBase {
|
|
5
|
-
private networkPath;
|
|
6
|
-
/**
|
|
7
|
-
* Details
|
|
8
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}
|
|
9
|
-
*
|
|
10
|
-
* Get the network details by ID.
|
|
11
|
-
*
|
|
12
|
-
* @param network_id Unique identifier for the network
|
|
13
|
-
* @reference https://developer.themoviedb.org/reference/network-details
|
|
14
|
-
*/
|
|
15
|
-
details(params: NetworkBaseParams): Promise<Network>;
|
|
16
|
-
/**
|
|
17
|
-
* Alternative names
|
|
18
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}/alternative_names
|
|
19
|
-
*
|
|
20
|
-
* Get the list of alternative names for a network.
|
|
21
|
-
*
|
|
22
|
-
* @param network_id Unique identifier for the network
|
|
23
|
-
* @reference https://developer.themoviedb.org/reference/network-alternative-names
|
|
24
|
-
*/
|
|
25
|
-
alternative_names(params: NetworkBaseParams): Promise<AlternativeNamesResult>;
|
|
26
|
-
/**
|
|
27
|
-
* Images
|
|
28
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}/images
|
|
29
|
-
*
|
|
30
|
-
* Get the logos for a network by ID.
|
|
31
|
-
*
|
|
32
|
-
* @param network_id Unique identifier for the network
|
|
33
|
-
* @reference https://developer.themoviedb.org/reference/network-images
|
|
34
|
-
*/
|
|
35
|
-
images(params: NetworkBaseParams): Promise<NetworkImages>;
|
|
36
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class NetworksAPI extends TMDBAPIBase {
|
|
4
|
-
networkPath(network_id) {
|
|
5
|
-
return `${ENDPOINTS.NETWORKS.DETAILS}/${network_id}`;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Details
|
|
9
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}
|
|
10
|
-
*
|
|
11
|
-
* Get the network details by ID.
|
|
12
|
-
*
|
|
13
|
-
* @param network_id Unique identifier for the network
|
|
14
|
-
* @reference https://developer.themoviedb.org/reference/network-details
|
|
15
|
-
*/
|
|
16
|
-
async details(params) {
|
|
17
|
-
const endpoint = this.networkPath(params.network_id);
|
|
18
|
-
return this.client.request(endpoint, params);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Alternative names
|
|
22
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}/alternative_names
|
|
23
|
-
*
|
|
24
|
-
* Get the list of alternative names for a network.
|
|
25
|
-
*
|
|
26
|
-
* @param network_id Unique identifier for the network
|
|
27
|
-
* @reference https://developer.themoviedb.org/reference/network-alternative-names
|
|
28
|
-
*/
|
|
29
|
-
async alternative_names(params) {
|
|
30
|
-
const endpoint = `${this.networkPath(params.network_id)}${ENDPOINTS.NETWORKS.ALTERNATIVE_NAMES}`;
|
|
31
|
-
return this.client.request(endpoint, params);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Images
|
|
35
|
-
* GET - https://api.themoviedb.org/3/network/{network_id}/images
|
|
36
|
-
*
|
|
37
|
-
* Get the logos for a network by ID.
|
|
38
|
-
*
|
|
39
|
-
* @param network_id Unique identifier for the network
|
|
40
|
-
* @reference https://developer.themoviedb.org/reference/network-images
|
|
41
|
-
*/
|
|
42
|
-
async images(params) {
|
|
43
|
-
const endpoint = `${this.networkPath(params.network_id)}${ENDPOINTS.NETWORKS.IMAGES}`;
|
|
44
|
-
return this.client.request(endpoint);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { TMDBAPIBase } from "./base";
|
|
2
|
-
import type { PersonAppendToResponseNamespace, PersonChanges, PersonChangesParams, PersonCombinedCredits, PersonCreditsParams, PersonDetails, PersonDetailsParams, PersonDetailsWithAppends, PersonExternalIDs, PersonExternalIDsParams, PersonImages, PersonImagesParams, PersonMovieCredits, PersonTaggedImages, PersonTaggedImagesParams, PersonTranslations, PersonTranslationsParams, PersonTVCredits } from "../types/people";
|
|
3
|
-
export declare class PeopleAPI extends TMDBAPIBase {
|
|
4
|
-
private personPath;
|
|
5
|
-
private personSubPath;
|
|
6
|
-
/**
|
|
7
|
-
* Details
|
|
8
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}
|
|
9
|
-
*
|
|
10
|
-
* Get the primary person details by TMDB person id.
|
|
11
|
-
* @param person_id The TMDB person id.
|
|
12
|
-
* @param append_to_response Additional person subresources to append.
|
|
13
|
-
* @param language Language for localized results.
|
|
14
|
-
* @reference https://developer.themoviedb.org/reference/person-details
|
|
15
|
-
*/
|
|
16
|
-
details<T extends readonly PersonAppendToResponseNamespace[] = []>(params: PersonDetailsParams & {
|
|
17
|
-
append_to_response?: T[number] | T;
|
|
18
|
-
}): Promise<T extends [] ? PersonDetails : PersonDetailsWithAppends<T>>;
|
|
19
|
-
/**
|
|
20
|
-
* Changes
|
|
21
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/changes
|
|
22
|
-
*
|
|
23
|
-
* Get the change history for a person.
|
|
24
|
-
* @reference https://developer.themoviedb.org/reference/person-changes
|
|
25
|
-
*/
|
|
26
|
-
changes(params: PersonChangesParams): Promise<PersonChanges>;
|
|
27
|
-
/**
|
|
28
|
-
* Combined Credits
|
|
29
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/combined_credits
|
|
30
|
-
*
|
|
31
|
-
* Get movie and TV credits in a single response.
|
|
32
|
-
* @reference https://developer.themoviedb.org/reference/person-combined-credits
|
|
33
|
-
*/
|
|
34
|
-
combined_credits(params: PersonCreditsParams): Promise<PersonCombinedCredits>;
|
|
35
|
-
/**
|
|
36
|
-
* External IDs
|
|
37
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/external_ids
|
|
38
|
-
*
|
|
39
|
-
* Get external platform identifiers for a person.
|
|
40
|
-
* @reference https://developer.themoviedb.org/reference/person-external-ids
|
|
41
|
-
*/
|
|
42
|
-
external_ids(params: PersonExternalIDsParams): Promise<PersonExternalIDs>;
|
|
43
|
-
/**
|
|
44
|
-
* Images
|
|
45
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/images
|
|
46
|
-
*
|
|
47
|
-
* Get profile images for a person.
|
|
48
|
-
* @reference https://developer.themoviedb.org/reference/person-images
|
|
49
|
-
*/
|
|
50
|
-
images(params: PersonImagesParams): Promise<PersonImages>;
|
|
51
|
-
/**
|
|
52
|
-
* Latest
|
|
53
|
-
* GET - https://api.themoviedb.org/3/person/latest
|
|
54
|
-
*
|
|
55
|
-
* Get the newest person id added to TMDB.
|
|
56
|
-
* @reference https://developer.themoviedb.org/reference/person-latest-id
|
|
57
|
-
*/
|
|
58
|
-
latest(): Promise<PersonDetails>;
|
|
59
|
-
/**
|
|
60
|
-
* Movie Credits
|
|
61
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/movie_credits
|
|
62
|
-
*
|
|
63
|
-
* Get a person's movie cast and crew credits.
|
|
64
|
-
* @reference https://developer.themoviedb.org/reference/person-movie-credits
|
|
65
|
-
*/
|
|
66
|
-
movie_credits(params: PersonCreditsParams): Promise<PersonMovieCredits>;
|
|
67
|
-
/**
|
|
68
|
-
* Tagged Images
|
|
69
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/tagged_images
|
|
70
|
-
*
|
|
71
|
-
* Get images where the person has been tagged.
|
|
72
|
-
* @reference https://developer.themoviedb.org/reference/person-tagged-images
|
|
73
|
-
*/
|
|
74
|
-
tagged_images(params: PersonTaggedImagesParams): Promise<PersonTaggedImages>;
|
|
75
|
-
/**
|
|
76
|
-
* Translations
|
|
77
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/translations
|
|
78
|
-
*
|
|
79
|
-
* Get the translations available for a person biography and name.
|
|
80
|
-
* @reference https://developer.themoviedb.org/reference/person-translations
|
|
81
|
-
*/
|
|
82
|
-
translations(params: PersonTranslationsParams): Promise<PersonTranslations>;
|
|
83
|
-
/**
|
|
84
|
-
* TV Credits
|
|
85
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/tv_credits
|
|
86
|
-
*
|
|
87
|
-
* Get a person's TV cast and crew credits.
|
|
88
|
-
* @reference https://developer.themoviedb.org/reference/person-tv-credits
|
|
89
|
-
*/
|
|
90
|
-
tv_credits(params: PersonCreditsParams): Promise<PersonTVCredits>;
|
|
91
|
-
}
|