@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
package/dist/endpoints/people.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class PeopleAPI extends TMDBAPIBase {
|
|
4
|
-
personPath(person_id) {
|
|
5
|
-
return `${ENDPOINTS.PEOPLE.DETAILS}/${person_id}`;
|
|
6
|
-
}
|
|
7
|
-
personSubPath(person_id, route) {
|
|
8
|
-
return `${this.personPath(person_id)}${route}`;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Details
|
|
12
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}
|
|
13
|
-
*
|
|
14
|
-
* Get the primary person details by TMDB person id.
|
|
15
|
-
* @param person_id The TMDB person id.
|
|
16
|
-
* @param append_to_response Additional person subresources to append.
|
|
17
|
-
* @param language Language for localized results.
|
|
18
|
-
* @reference https://developer.themoviedb.org/reference/person-details
|
|
19
|
-
*/
|
|
20
|
-
async details(params) {
|
|
21
|
-
const { language = this.defaultOptions.language, person_id, ...rest } = params;
|
|
22
|
-
return this.client.request(this.personPath(person_id), { language, ...rest });
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Changes
|
|
26
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/changes
|
|
27
|
-
*
|
|
28
|
-
* Get the change history for a person.
|
|
29
|
-
* @reference https://developer.themoviedb.org/reference/person-changes
|
|
30
|
-
*/
|
|
31
|
-
async changes(params) {
|
|
32
|
-
const { person_id, ...rest } = params;
|
|
33
|
-
return this.client.request(this.personSubPath(person_id, ENDPOINTS.PEOPLE.CHANGES), rest);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Combined Credits
|
|
37
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/combined_credits
|
|
38
|
-
*
|
|
39
|
-
* Get movie and TV credits in a single response.
|
|
40
|
-
* @reference https://developer.themoviedb.org/reference/person-combined-credits
|
|
41
|
-
*/
|
|
42
|
-
async combined_credits(params) {
|
|
43
|
-
const { language = this.defaultOptions.language, person_id, ...rest } = params;
|
|
44
|
-
return this.client.request(this.personSubPath(person_id, ENDPOINTS.PEOPLE.COMBINED_CREDITS), {
|
|
45
|
-
language,
|
|
46
|
-
...rest,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* External IDs
|
|
51
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/external_ids
|
|
52
|
-
*
|
|
53
|
-
* Get external platform identifiers for a person.
|
|
54
|
-
* @reference https://developer.themoviedb.org/reference/person-external-ids
|
|
55
|
-
*/
|
|
56
|
-
async external_ids(params) {
|
|
57
|
-
return this.client.request(this.personSubPath(params.person_id, ENDPOINTS.PEOPLE.EXTERNAL_IDS));
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Images
|
|
61
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/images
|
|
62
|
-
*
|
|
63
|
-
* Get profile images for a person.
|
|
64
|
-
* @reference https://developer.themoviedb.org/reference/person-images
|
|
65
|
-
*/
|
|
66
|
-
async images(params) {
|
|
67
|
-
return this.client.request(this.personSubPath(params.person_id, ENDPOINTS.PEOPLE.IMAGES));
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Latest
|
|
71
|
-
* GET - https://api.themoviedb.org/3/person/latest
|
|
72
|
-
*
|
|
73
|
-
* Get the newest person id added to TMDB.
|
|
74
|
-
* @reference https://developer.themoviedb.org/reference/person-latest-id
|
|
75
|
-
*/
|
|
76
|
-
async latest() {
|
|
77
|
-
return this.client.request(`${ENDPOINTS.PEOPLE.DETAILS}${ENDPOINTS.PEOPLE.LATEST}`);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Movie Credits
|
|
81
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/movie_credits
|
|
82
|
-
*
|
|
83
|
-
* Get a person's movie cast and crew credits.
|
|
84
|
-
* @reference https://developer.themoviedb.org/reference/person-movie-credits
|
|
85
|
-
*/
|
|
86
|
-
async movie_credits(params) {
|
|
87
|
-
const { language = this.defaultOptions.language, person_id, ...rest } = params;
|
|
88
|
-
return this.client.request(this.personSubPath(person_id, ENDPOINTS.PEOPLE.MOVIE_CREDITS), {
|
|
89
|
-
language,
|
|
90
|
-
...rest,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Tagged Images
|
|
95
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/tagged_images
|
|
96
|
-
*
|
|
97
|
-
* Get images where the person has been tagged.
|
|
98
|
-
* @reference https://developer.themoviedb.org/reference/person-tagged-images
|
|
99
|
-
*/
|
|
100
|
-
async tagged_images(params) {
|
|
101
|
-
const { person_id, ...rest } = params;
|
|
102
|
-
return this.client.request(this.personSubPath(person_id, ENDPOINTS.PEOPLE.TAGGED_IMAGES), rest);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Translations
|
|
106
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/translations
|
|
107
|
-
*
|
|
108
|
-
* Get the translations available for a person biography and name.
|
|
109
|
-
* @reference https://developer.themoviedb.org/reference/person-translations
|
|
110
|
-
*/
|
|
111
|
-
async translations(params) {
|
|
112
|
-
return this.client.request(this.personSubPath(params.person_id, ENDPOINTS.PEOPLE.TRANSLATIONS));
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* TV Credits
|
|
116
|
-
* GET - https://api.themoviedb.org/3/person/{person_id}/tv_credits
|
|
117
|
-
*
|
|
118
|
-
* Get a person's TV cast and crew credits.
|
|
119
|
-
* @reference https://developer.themoviedb.org/reference/person-tv-credits
|
|
120
|
-
*/
|
|
121
|
-
async tv_credits(params) {
|
|
122
|
-
const { language = this.defaultOptions.language, person_id, ...rest } = params;
|
|
123
|
-
return this.client.request(this.personSubPath(person_id, ENDPOINTS.PEOPLE.TV_CREDITS), {
|
|
124
|
-
language,
|
|
125
|
-
...rest,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PaginatedResponse } from "../types";
|
|
2
|
-
import type { PersonResultItem } from "../types/search";
|
|
3
|
-
import type { PeopleListParams } from "../types/people-lists";
|
|
4
|
-
import { TMDBAPIBase } from "./base";
|
|
5
|
-
export declare class PeopleListsAPI extends TMDBAPIBase {
|
|
6
|
-
/**
|
|
7
|
-
* Popular
|
|
8
|
-
* GET - https://api.themoviedb.org/3/person/popular
|
|
9
|
-
*
|
|
10
|
-
* Get a list of people ordered by popularity.
|
|
11
|
-
* @param language Language for localised results (Defaults to en-US or TMDB default)
|
|
12
|
-
* @param page Page number (Defaults to 1)
|
|
13
|
-
* @reference https://developer.themoviedb.org/reference/person-popular-list
|
|
14
|
-
*/
|
|
15
|
-
popular(params?: PeopleListParams): Promise<PaginatedResponse<PersonResultItem>>;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class PeopleListsAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Popular
|
|
6
|
-
* GET - https://api.themoviedb.org/3/person/popular
|
|
7
|
-
*
|
|
8
|
-
* Get a list of people ordered by popularity.
|
|
9
|
-
* @param language Language for localised results (Defaults to en-US or TMDB default)
|
|
10
|
-
* @param page Page number (Defaults to 1)
|
|
11
|
-
* @reference https://developer.themoviedb.org/reference/person-popular-list
|
|
12
|
-
*/
|
|
13
|
-
async popular(params = {}) {
|
|
14
|
-
return this.client.request(ENDPOINTS.PEOPLE_LISTS.POPULAR, this.withLanguage(params) ?? params);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ReviewDetails, ReviewDetailsParams } from "../types/reviews";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class ReviewsAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Details
|
|
6
|
-
* GET - https://api.themoviedb.org/3/review/{review_id}
|
|
7
|
-
*
|
|
8
|
-
* Retrieve the details of a single review by its TMDB review ID.
|
|
9
|
-
* @param review_id The TMDB review identifier.
|
|
10
|
-
* @returns A promise that resolves to the full review details.
|
|
11
|
-
* @reference https://developer.themoviedb.org/reference/review-details
|
|
12
|
-
*/
|
|
13
|
-
details(params: ReviewDetailsParams): Promise<ReviewDetails>;
|
|
14
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class ReviewsAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Details
|
|
6
|
-
* GET - https://api.themoviedb.org/3/review/{review_id}
|
|
7
|
-
*
|
|
8
|
-
* Retrieve the details of a single review by its TMDB review ID.
|
|
9
|
-
* @param review_id The TMDB review identifier.
|
|
10
|
-
* @returns A promise that resolves to the full review details.
|
|
11
|
-
* @reference https://developer.themoviedb.org/reference/review-details
|
|
12
|
-
*/
|
|
13
|
-
async details(params) {
|
|
14
|
-
return this.client.request(`${ENDPOINTS.REVIEWS.DETAILS}/${params.review_id}`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { CollectionResultItem, CompanyResultItem, KeywordResultItem, MovieResultItem, MultiSearchResultItem, PaginatedResponse, PersonResultItem, SearchCollectionsParams, SearchCompanyParams, SearchKeywordsParams, SearchMoviesParams, SearchMultiParams, SearchPersonParams, SearchTVSeriesParams, TVSeriesResultItem } from "../types";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class SearchAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Search Collection
|
|
6
|
-
* GET - https://api.themoviedb.org/3/search/collection
|
|
7
|
-
*
|
|
8
|
-
* Search for collections by their original, translated and alternative names.
|
|
9
|
-
* @param query Search query (required)
|
|
10
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
11
|
-
* @param language Language (Defaults to en-US)
|
|
12
|
-
* @param page Page (Defaults to 1)
|
|
13
|
-
* @param region Region
|
|
14
|
-
* @reference https://developer.themoviedb.org/reference/search-collection
|
|
15
|
-
*/
|
|
16
|
-
collections(params: SearchCollectionsParams): Promise<PaginatedResponse<CollectionResultItem>>;
|
|
17
|
-
/**
|
|
18
|
-
* Search Movies
|
|
19
|
-
* GET - https://api.themoviedb.org/3/search/movie
|
|
20
|
-
*
|
|
21
|
-
* Search for movies by their original, translated and alternative titles.
|
|
22
|
-
* @param query Search query (required)
|
|
23
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
24
|
-
* @param language Language (Defaults to en-US)
|
|
25
|
-
* @param primary_release_year: string
|
|
26
|
-
* @param page Page (Defaults to 1)
|
|
27
|
-
* @param region Region
|
|
28
|
-
* @param year Year
|
|
29
|
-
* @reference https://developer.themoviedb.org/reference/search-movie
|
|
30
|
-
*/
|
|
31
|
-
movies(params: SearchMoviesParams): Promise<PaginatedResponse<MovieResultItem>>;
|
|
32
|
-
/**
|
|
33
|
-
* Search Company
|
|
34
|
-
* GET - https://api.themoviedb.org/3/search/company
|
|
35
|
-
*
|
|
36
|
-
* Search for companies by their original and alternative names.
|
|
37
|
-
* @param query Search query (required)
|
|
38
|
-
* @param page Page (Defaults to 1)
|
|
39
|
-
* @reference https://developer.themoviedb.org/reference/search-company
|
|
40
|
-
*/
|
|
41
|
-
company(params: SearchCompanyParams): Promise<PaginatedResponse<CompanyResultItem>>;
|
|
42
|
-
/**
|
|
43
|
-
* Search Keyword
|
|
44
|
-
* GET - https://api.themoviedb.org/3/search/keyword
|
|
45
|
-
*
|
|
46
|
-
* Search for keywords by their name.
|
|
47
|
-
* @param query Search query (required)
|
|
48
|
-
* @param page Page (Defaults to 1)
|
|
49
|
-
* @reference https://developer.themoviedb.org/reference/search-keyword
|
|
50
|
-
*/
|
|
51
|
-
keyword(params: SearchKeywordsParams): Promise<PaginatedResponse<KeywordResultItem>>;
|
|
52
|
-
/**
|
|
53
|
-
* Search Person
|
|
54
|
-
* GET - https://api.themoviedb.org/3/search/person
|
|
55
|
-
*
|
|
56
|
-
* Search for people by their name and also known as names.
|
|
57
|
-
* @param query Search query (required)
|
|
58
|
-
* @param page Page (Defaults to 1)
|
|
59
|
-
* @reference https://developer.themoviedb.org/reference/search-person
|
|
60
|
-
*/
|
|
61
|
-
person(params: SearchPersonParams): Promise<PaginatedResponse<PersonResultItem>>;
|
|
62
|
-
/**
|
|
63
|
-
* Search TV Series
|
|
64
|
-
* GET - https://api.themoviedb.org/3/search/tv
|
|
65
|
-
*
|
|
66
|
-
* Search for TV shows by their original, translated and also known as names.
|
|
67
|
-
* @param query Search query (required)
|
|
68
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
69
|
-
* @param language Language (Defaults to en-US)
|
|
70
|
-
* @param page Page (Defaults to 1)
|
|
71
|
-
* @param first_air_date_year Filter by first air date year
|
|
72
|
-
* @param year Filter by any air date year (including episodes)
|
|
73
|
-
* @reference https://developer.themoviedb.org/reference/search-tv
|
|
74
|
-
*/
|
|
75
|
-
tv_series(params: SearchTVSeriesParams): Promise<PaginatedResponse<TVSeriesResultItem>>;
|
|
76
|
-
/**
|
|
77
|
-
* Search Multi
|
|
78
|
-
* GET - https://api.themoviedb.org/3/search/multi
|
|
79
|
-
*
|
|
80
|
-
* Search for movies, TV shows, and people in a single request.
|
|
81
|
-
* @param query Search query (required)
|
|
82
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
83
|
-
* @param language Language (Defaults to en-US)
|
|
84
|
-
* @param page Page (Defaults to 1)
|
|
85
|
-
* @reference https://developer.themoviedb.org/reference/search-multi
|
|
86
|
-
*/
|
|
87
|
-
multi(params: SearchMultiParams): Promise<PaginatedResponse<MultiSearchResultItem>>;
|
|
88
|
-
}
|
package/dist/endpoints/search.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class SearchAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Search Collection
|
|
6
|
-
* GET - https://api.themoviedb.org/3/search/collection
|
|
7
|
-
*
|
|
8
|
-
* Search for collections by their original, translated and alternative names.
|
|
9
|
-
* @param query Search query (required)
|
|
10
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
11
|
-
* @param language Language (Defaults to en-US)
|
|
12
|
-
* @param page Page (Defaults to 1)
|
|
13
|
-
* @param region Region
|
|
14
|
-
* @reference https://developer.themoviedb.org/reference/search-collection
|
|
15
|
-
*/
|
|
16
|
-
async collections(params) {
|
|
17
|
-
return this.client.request(ENDPOINTS.SEARCH.COLLECTION, this.applyDefaults(params));
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Search Movies
|
|
21
|
-
* GET - https://api.themoviedb.org/3/search/movie
|
|
22
|
-
*
|
|
23
|
-
* Search for movies by their original, translated and alternative titles.
|
|
24
|
-
* @param query Search query (required)
|
|
25
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
26
|
-
* @param language Language (Defaults to en-US)
|
|
27
|
-
* @param primary_release_year: string
|
|
28
|
-
* @param page Page (Defaults to 1)
|
|
29
|
-
* @param region Region
|
|
30
|
-
* @param year Year
|
|
31
|
-
* @reference https://developer.themoviedb.org/reference/search-movie
|
|
32
|
-
*/
|
|
33
|
-
async movies(params) {
|
|
34
|
-
return this.client.request(ENDPOINTS.SEARCH.MOVIE, this.applyDefaults(params));
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Search Company
|
|
38
|
-
* GET - https://api.themoviedb.org/3/search/company
|
|
39
|
-
*
|
|
40
|
-
* Search for companies by their original and alternative names.
|
|
41
|
-
* @param query Search query (required)
|
|
42
|
-
* @param page Page (Defaults to 1)
|
|
43
|
-
* @reference https://developer.themoviedb.org/reference/search-company
|
|
44
|
-
*/
|
|
45
|
-
async company(params) {
|
|
46
|
-
return this.client.request(ENDPOINTS.SEARCH.COMPANY, this.applyDefaults(params));
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Search Keyword
|
|
50
|
-
* GET - https://api.themoviedb.org/3/search/keyword
|
|
51
|
-
*
|
|
52
|
-
* Search for keywords by their name.
|
|
53
|
-
* @param query Search query (required)
|
|
54
|
-
* @param page Page (Defaults to 1)
|
|
55
|
-
* @reference https://developer.themoviedb.org/reference/search-keyword
|
|
56
|
-
*/
|
|
57
|
-
async keyword(params) {
|
|
58
|
-
return this.client.request(ENDPOINTS.SEARCH.KEYWORD, this.applyDefaults(params));
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Search Person
|
|
62
|
-
* GET - https://api.themoviedb.org/3/search/person
|
|
63
|
-
*
|
|
64
|
-
* Search for people by their name and also known as names.
|
|
65
|
-
* @param query Search query (required)
|
|
66
|
-
* @param page Page (Defaults to 1)
|
|
67
|
-
* @reference https://developer.themoviedb.org/reference/search-person
|
|
68
|
-
*/
|
|
69
|
-
async person(params) {
|
|
70
|
-
return this.client.request(ENDPOINTS.SEARCH.PERSON, this.applyDefaults(params));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Search TV Series
|
|
74
|
-
* GET - https://api.themoviedb.org/3/search/tv
|
|
75
|
-
*
|
|
76
|
-
* Search for TV shows by their original, translated and also known as names.
|
|
77
|
-
* @param query Search query (required)
|
|
78
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
79
|
-
* @param language Language (Defaults to en-US)
|
|
80
|
-
* @param page Page (Defaults to 1)
|
|
81
|
-
* @param first_air_date_year Filter by first air date year
|
|
82
|
-
* @param year Filter by any air date year (including episodes)
|
|
83
|
-
* @reference https://developer.themoviedb.org/reference/search-tv
|
|
84
|
-
*/
|
|
85
|
-
async tv_series(params) {
|
|
86
|
-
return this.client.request(ENDPOINTS.SEARCH.TV, this.applyDefaults(params));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Search Multi
|
|
90
|
-
* GET - https://api.themoviedb.org/3/search/multi
|
|
91
|
-
*
|
|
92
|
-
* Search for movies, TV shows, and people in a single request.
|
|
93
|
-
* @param query Search query (required)
|
|
94
|
-
* @param include_adult Include Adult (Defaults to false)
|
|
95
|
-
* @param language Language (Defaults to en-US)
|
|
96
|
-
* @param page Page (Defaults to 1)
|
|
97
|
-
* @reference https://developer.themoviedb.org/reference/search-multi
|
|
98
|
-
*/
|
|
99
|
-
async multi(params) {
|
|
100
|
-
return this.client.request(ENDPOINTS.SEARCH.MULTI, this.applyDefaults(params));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { PaginatedResponse, TrendingAllResult, TrendingMovieResult, TrendingParams, TrendingPersonResult, TrendingTVResult } from "../types";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class TrendingAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Trending All
|
|
6
|
-
* GET - https://api.themoviedb.org/3/trending/all/{time_window}
|
|
7
|
-
*
|
|
8
|
-
* Get the trending movies, TV shows and people on TMDB.
|
|
9
|
-
* @reference https://developer.themoviedb.org/reference/trending-all
|
|
10
|
-
*/
|
|
11
|
-
all(params: TrendingParams): Promise<PaginatedResponse<TrendingAllResult>>;
|
|
12
|
-
/**
|
|
13
|
-
* Trending Movies
|
|
14
|
-
* GET - https://api.themoviedb.org/3/trending/movie/{time_window}
|
|
15
|
-
*
|
|
16
|
-
* Get the trending movies on TMDB.
|
|
17
|
-
* @reference https://developer.themoviedb.org/reference/trending-movies
|
|
18
|
-
*/
|
|
19
|
-
movies(params: TrendingParams): Promise<PaginatedResponse<TrendingMovieResult>>;
|
|
20
|
-
/**
|
|
21
|
-
* Trending TV
|
|
22
|
-
* GET - https://api.themoviedb.org/3/trending/tv/{time_window}
|
|
23
|
-
*
|
|
24
|
-
* Get the trending TV shows on TMDB.
|
|
25
|
-
* @reference https://developer.themoviedb.org/reference/trending-tv
|
|
26
|
-
*/
|
|
27
|
-
tv(params: TrendingParams): Promise<PaginatedResponse<TrendingTVResult>>;
|
|
28
|
-
/**
|
|
29
|
-
* Trending People
|
|
30
|
-
* GET - https://api.themoviedb.org/3/trending/person/{time_window}
|
|
31
|
-
*
|
|
32
|
-
* Get the trending people on TMDB.
|
|
33
|
-
* @reference https://developer.themoviedb.org/reference/trending-people
|
|
34
|
-
*/
|
|
35
|
-
people(params: TrendingParams): Promise<PaginatedResponse<TrendingPersonResult>>;
|
|
36
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class TrendingAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Trending All
|
|
6
|
-
* GET - https://api.themoviedb.org/3/trending/all/{time_window}
|
|
7
|
-
*
|
|
8
|
-
* Get the trending movies, TV shows and people on TMDB.
|
|
9
|
-
* @reference https://developer.themoviedb.org/reference/trending-all
|
|
10
|
-
*/
|
|
11
|
-
async all(params) {
|
|
12
|
-
const { time_window, language = this.defaultOptions.language } = params;
|
|
13
|
-
return this.client.request(`${ENDPOINTS.TRENDING.ALL}/${time_window}`, { language });
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Trending Movies
|
|
17
|
-
* GET - https://api.themoviedb.org/3/trending/movie/{time_window}
|
|
18
|
-
*
|
|
19
|
-
* Get the trending movies on TMDB.
|
|
20
|
-
* @reference https://developer.themoviedb.org/reference/trending-movies
|
|
21
|
-
*/
|
|
22
|
-
async movies(params) {
|
|
23
|
-
const { time_window, language = this.defaultOptions.language } = params;
|
|
24
|
-
return this.client.request(`${ENDPOINTS.TRENDING.MOVIE}/${time_window}`, { language });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Trending TV
|
|
28
|
-
* GET - https://api.themoviedb.org/3/trending/tv/{time_window}
|
|
29
|
-
*
|
|
30
|
-
* Get the trending TV shows on TMDB.
|
|
31
|
-
* @reference https://developer.themoviedb.org/reference/trending-tv
|
|
32
|
-
*/
|
|
33
|
-
async tv(params) {
|
|
34
|
-
const { time_window, language = this.defaultOptions.language } = params;
|
|
35
|
-
return this.client.request(`${ENDPOINTS.TRENDING.TV}/${time_window}`, { language });
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Trending People
|
|
39
|
-
* GET - https://api.themoviedb.org/3/trending/person/{time_window}
|
|
40
|
-
*
|
|
41
|
-
* Get the trending people on TMDB.
|
|
42
|
-
* @reference https://developer.themoviedb.org/reference/trending-people
|
|
43
|
-
*/
|
|
44
|
-
async people(params) {
|
|
45
|
-
const { time_window, language = this.defaultOptions.language } = params;
|
|
46
|
-
return this.client.request(`${ENDPOINTS.TRENDING.PERSON}/${time_window}`, { language });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TVEpisodeGroupDetails, TVEpisodeGroupParams } from "../types/tv-episode-groups";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class TVEpisodeGroupsAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Details
|
|
6
|
-
* GET - https://api.themoviedb.org/3/tv/episode_group/{episode_group_id}
|
|
7
|
-
*
|
|
8
|
-
* Get the details of a TV episode group by ID.
|
|
9
|
-
* @param episode_group_id The ID of the episode group.
|
|
10
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-group-details
|
|
11
|
-
*/
|
|
12
|
-
details(params: TVEpisodeGroupParams): Promise<TVEpisodeGroupDetails>;
|
|
13
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class TVEpisodeGroupsAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Details
|
|
6
|
-
* GET - https://api.themoviedb.org/3/tv/episode_group/{episode_group_id}
|
|
7
|
-
*
|
|
8
|
-
* Get the details of a TV episode group by ID.
|
|
9
|
-
* @param episode_group_id The ID of the episode group.
|
|
10
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-group-details
|
|
11
|
-
*/
|
|
12
|
-
async details(params) {
|
|
13
|
-
const endpoint = `${ENDPOINTS.TV_EPISODE_GROUPS.DETAILS}/${params.episode_group_id}`;
|
|
14
|
-
return this.client.request(endpoint);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Changes, TVEpisode, TVEpisodeAppendToResponseNamespace, TVEpisodeBaseParams, TVEpisodeCredits, TVEpisodeCreditsParams, TVEpisodeDetailsParams, TVEpisodeDetailsWithAppends, TVEpisodeExternalIDs, TVEpisodeId, TVEpisodeImages, TVEpisodeImagesParams, TVEpisodeTranslations, TVEpisodeVideos } from "../types";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class TVEpisodesAPI extends TMDBAPIBase {
|
|
4
|
-
private episodePath;
|
|
5
|
-
private episodeSubPath;
|
|
6
|
-
/**
|
|
7
|
-
* Details
|
|
8
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}
|
|
9
|
-
*
|
|
10
|
-
* Query the details of a TV episode.
|
|
11
|
-
* @param series_id The ID of the TV series.
|
|
12
|
-
* @param season_number The number of the season within the TV show
|
|
13
|
-
* @param episode_number The number of the episode within the season
|
|
14
|
-
* @param append_to_response A comma-separated list of the fields to include in the response.
|
|
15
|
-
* @param language The language to use for the response.
|
|
16
|
-
* @returns A promise that resolves to the TV episode .
|
|
17
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-details
|
|
18
|
-
*/
|
|
19
|
-
details<T extends readonly TVEpisodeAppendToResponseNamespace[] = []>(params: TVEpisodeDetailsParams & {
|
|
20
|
-
append_to_response?: T[number] | T;
|
|
21
|
-
}): Promise<T extends [] ? TVEpisode : TVEpisodeDetailsWithAppends<T>>;
|
|
22
|
-
/**
|
|
23
|
-
* Changes
|
|
24
|
-
* GET - https://api.themoviedb.org/3/tv/episode/{episode_id}/changes
|
|
25
|
-
*
|
|
26
|
-
* Get the changes for a TV episode. By default only the last 24 hours are returned.
|
|
27
|
-
* ACCORDING TO TMDB DOCS:
|
|
28
|
-
* You can query up to 14 days in a single query by using the start_date and end_date query parameters.
|
|
29
|
-
* BUT NO start_date or end_date query params are specified in the documentation
|
|
30
|
-
*
|
|
31
|
-
* NOTE: TV show changes are a little different than movie changes in that there are some edits
|
|
32
|
-
* on seasons and episodes that will create a top level change entry at the show level.
|
|
33
|
-
* These can be found under the season and episode keys.
|
|
34
|
-
* These keys will contain a series_id and episode_id.
|
|
35
|
-
* You can use the season changes and episode changes methods to look these up individually.
|
|
36
|
-
*
|
|
37
|
-
* @param episode_id The ID of the TV episode.
|
|
38
|
-
* @returns A promise that resolves to the TV episode changes history.
|
|
39
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-changes-by-id
|
|
40
|
-
*/
|
|
41
|
-
changes(params: TVEpisodeId): Promise<Changes>;
|
|
42
|
-
/**
|
|
43
|
-
* Credits
|
|
44
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/credits
|
|
45
|
-
*
|
|
46
|
-
* Get the credits for a TV episode.
|
|
47
|
-
* @param series_id The ID of the TV series.
|
|
48
|
-
* @param season_number The number of the season within the TV show
|
|
49
|
-
* @param episode_number The number of the episode within the season
|
|
50
|
-
* @param language The language to use for the response.
|
|
51
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-credits
|
|
52
|
-
*/
|
|
53
|
-
credits(params: TVEpisodeCreditsParams): Promise<TVEpisodeCredits>;
|
|
54
|
-
/**
|
|
55
|
-
* External IDs
|
|
56
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/external_ids
|
|
57
|
-
*
|
|
58
|
-
* Get a list of external IDs that have been added to a TV episode.
|
|
59
|
-
* @param series_id The ID of the TV series.
|
|
60
|
-
* @param season_number The number of the season within the TV show
|
|
61
|
-
* @param episode_number The number of the episode within the season
|
|
62
|
-
* @returns A promise that resolves to the TV episode external ids.
|
|
63
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-external-ids
|
|
64
|
-
*/
|
|
65
|
-
external_ids(params: TVEpisodeBaseParams): Promise<TVEpisodeExternalIDs>;
|
|
66
|
-
/**
|
|
67
|
-
* Images
|
|
68
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/images
|
|
69
|
-
*
|
|
70
|
-
* Fetches still images related to a specific tv episode
|
|
71
|
-
* The images are returned in various sizes and formats.
|
|
72
|
-
*
|
|
73
|
-
* 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.
|
|
74
|
-
*
|
|
75
|
-
* @param series_id The ID of the TV series.
|
|
76
|
-
* @param season_number The number of the season within the TV show
|
|
77
|
-
* @param episode_number The number of the episode within the season
|
|
78
|
-
* @param language - (Optional) The language code to filter the images by language.
|
|
79
|
-
* @param include_image_language - (Optional) A comma-separated list of language codes to include images for.
|
|
80
|
-
* @returns A promise that resolves to a `TVEpisodeImages` object containing the tv episode's images.
|
|
81
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-images
|
|
82
|
-
*/
|
|
83
|
-
images(params: TVEpisodeImagesParams): Promise<TVEpisodeImages>;
|
|
84
|
-
/**
|
|
85
|
-
* Translations
|
|
86
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/translations
|
|
87
|
-
*
|
|
88
|
-
* Get the translations that have been added to a TV episode.
|
|
89
|
-
* Take a read through our language documentation for more information about languages on TMDB.
|
|
90
|
-
* https://developer.themoviedb.org/docs/languages
|
|
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
|
-
* @returns A promise that resolves to the translations of the tv episode.
|
|
95
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-translations
|
|
96
|
-
*/
|
|
97
|
-
translations(params: TVEpisodeBaseParams): Promise<TVEpisodeTranslations>;
|
|
98
|
-
/**
|
|
99
|
-
* Videos
|
|
100
|
-
* GET - https://api.themoviedb.org/3/tv/{series_id}/season/{season_number}/episode/{episode_number}/videos
|
|
101
|
-
*
|
|
102
|
-
* Get the videos that belong to a TV episode.
|
|
103
|
-
* @param series_id The ID of the TV series.
|
|
104
|
-
* @param season_number The number of the season within the TV show
|
|
105
|
-
* @param episode_number The number of the episode within the season
|
|
106
|
-
* @returns A promise that resolves to the videos for the tv episode.
|
|
107
|
-
* @reference https://developer.themoviedb.org/reference/tv-episode-videos
|
|
108
|
-
*/
|
|
109
|
-
videos(params: TVEpisodeBaseParams): Promise<TVEpisodeVideos>;
|
|
110
|
-
}
|