@tdanks2000/tmdb-wrapper 1.0.0 → 1.0.1
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/@types/endpoints/discover.d.ts +53 -0
- package/dist/@types/endpoints/discover.d.ts.map +1 -1
- package/dist/@types/endpoints/genre.d.ts +7 -0
- package/dist/@types/endpoints/genre.d.ts.map +1 -0
- package/dist/@types/endpoints/genre.js +2 -0
- package/dist/@types/endpoints/index.d.ts +1 -0
- package/dist/@types/endpoints/index.d.ts.map +1 -1
- package/dist/@types/endpoints/index.js +1 -0
- package/dist/@types/endpoints/movies.d.ts +7 -1
- package/dist/@types/endpoints/movies.d.ts.map +1 -1
- package/dist/@types/endpoints/search.d.ts +24 -1
- package/dist/@types/endpoints/search.d.ts.map +1 -1
- package/dist/@types/endpoints/tvEpisode.d.ts +13 -1
- package/dist/@types/endpoints/tvEpisode.d.ts.map +1 -1
- package/dist/@types/endpoints/tvSeasons.d.ts +13 -1
- package/dist/@types/endpoints/tvSeasons.d.ts.map +1 -1
- package/dist/endpoints/account.d.ts +11 -0
- package/dist/endpoints/account.d.ts.map +1 -1
- package/dist/endpoints/account.js +11 -0
- package/dist/endpoints/certification.d.ts +15 -0
- package/dist/endpoints/certification.d.ts.map +1 -1
- package/dist/endpoints/certification.js +15 -0
- package/dist/endpoints/changes.d.ts +22 -0
- package/dist/endpoints/changes.d.ts.map +1 -1
- package/dist/endpoints/changes.js +25 -3
- package/dist/endpoints/collections.d.ts +25 -0
- package/dist/endpoints/collections.d.ts.map +1 -1
- package/dist/endpoints/collections.js +25 -0
- package/dist/endpoints/companies.d.ts +22 -0
- package/dist/endpoints/companies.d.ts.map +1 -1
- package/dist/endpoints/companies.js +22 -0
- package/dist/endpoints/configuration.d.ts +11 -0
- package/dist/endpoints/configuration.d.ts.map +1 -1
- package/dist/endpoints/configuration.js +11 -0
- package/dist/endpoints/credits.d.ts +12 -0
- package/dist/endpoints/credits.d.ts.map +1 -1
- package/dist/endpoints/credits.js +12 -0
- package/dist/endpoints/discover.d.ts +18 -55
- package/dist/endpoints/discover.d.ts.map +1 -1
- package/dist/endpoints/discover.js +17 -0
- package/dist/endpoints/find.d.ts +13 -0
- package/dist/endpoints/find.d.ts.map +1 -1
- package/dist/endpoints/find.js +13 -0
- package/dist/endpoints/genre.d.ts +18 -7
- package/dist/endpoints/genre.d.ts.map +1 -1
- package/dist/endpoints/genre.js +17 -0
- package/dist/endpoints/keywords.d.ts +18 -0
- package/dist/endpoints/keywords.d.ts.map +1 -1
- package/dist/endpoints/keywords.js +21 -3
- package/dist/endpoints/movies.d.ts +115 -9
- package/dist/endpoints/movies.d.ts.map +1 -1
- package/dist/endpoints/movies.js +114 -2
- package/dist/endpoints/networks.d.ts +22 -0
- package/dist/endpoints/networks.d.ts.map +1 -1
- package/dist/endpoints/networks.js +22 -0
- package/dist/endpoints/people.d.ts +68 -0
- package/dist/endpoints/people.d.ts.map +1 -1
- package/dist/endpoints/people.js +68 -0
- package/dist/endpoints/review.d.ts +12 -0
- package/dist/endpoints/review.d.ts.map +1 -1
- package/dist/endpoints/review.js +12 -0
- package/dist/endpoints/search.d.ts +43 -24
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/search.js +42 -0
- package/dist/endpoints/trending.d.ts +15 -0
- package/dist/endpoints/trending.d.ts.map +1 -1
- package/dist/endpoints/trending.js +15 -0
- package/dist/endpoints/tvEpisodes.d.ts +48 -11
- package/dist/endpoints/tvEpisodes.d.ts.map +1 -1
- package/dist/endpoints/tvEpisodes.js +49 -0
- package/dist/endpoints/tvSeasons.d.ts +56 -11
- package/dist/endpoints/tvSeasons.d.ts.map +1 -1
- package/dist/endpoints/tvSeasons.js +57 -0
- package/dist/endpoints/tvShows.d.ts +134 -3
- package/dist/endpoints/tvShows.d.ts.map +1 -1
- package/dist/endpoints/tvShows.js +133 -2
- package/package.json +1 -1
- package/src/@types/endpoints/discover.ts +56 -0
- package/src/@types/endpoints/genre.ts +3 -0
- package/src/@types/endpoints/index.ts +1 -0
- package/src/@types/endpoints/movies.ts +8 -1
- package/src/@types/endpoints/search.ts +30 -1
- package/src/@types/endpoints/tvEpisode.ts +15 -1
- package/src/@types/endpoints/tvSeasons.ts +15 -1
- package/src/endpoints/account.ts +11 -0
- package/src/endpoints/certification.ts +15 -0
- package/src/endpoints/changes.ts +25 -3
- package/src/endpoints/collections.ts +25 -0
- package/src/endpoints/companies.ts +22 -0
- package/src/endpoints/configuration.ts +11 -0
- package/src/endpoints/credits.ts +12 -0
- package/src/endpoints/discover.ts +24 -57
- package/src/endpoints/find.ts +13 -0
- package/src/endpoints/genre.ts +18 -5
- package/src/endpoints/keywords.ts +21 -3
- package/src/endpoints/movies.ts +114 -8
- package/src/endpoints/networks.ts +22 -0
- package/src/endpoints/people.ts +68 -0
- package/src/endpoints/review.ts +12 -0
- package/src/endpoints/search.ts +47 -32
- package/src/endpoints/trending.ts +15 -0
- package/src/endpoints/tvEpisodes.ts +50 -13
- package/src/endpoints/tvSeasons.ts +58 -13
- package/src/endpoints/tvShows.ts +138 -3
package/dist/endpoints/movies.js
CHANGED
|
@@ -12,11 +12,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MoviesEndpoint = void 0;
|
|
13
13
|
const _types_1 = require("@/@types");
|
|
14
14
|
const BASE_MOVIE = '/movie';
|
|
15
|
+
/**
|
|
16
|
+
* Represents an endpoint for accessing movie-related information.
|
|
17
|
+
*/
|
|
15
18
|
class MoviesEndpoint extends _types_1.BaseEndpoint {
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new MoviesEndpoint instance.
|
|
21
|
+
* @param {string} access_token - The access token used for authentication.
|
|
22
|
+
*/
|
|
16
23
|
constructor(access_token) {
|
|
17
24
|
super(access_token);
|
|
18
25
|
this.access_token = access_token;
|
|
19
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves details of a specific movie asynchronously.
|
|
29
|
+
* @param {number} id - The ID of the movie.
|
|
30
|
+
* @param {AppendToResponseMovieKey[]} [appendToResponse] - Optional keys to append to the response.
|
|
31
|
+
* @param {string} [language] - Optional parameter for specifying the language.
|
|
32
|
+
* @returns {Promise<AppendToResponse<MovieDetails, AppendToResponseMovieKey[], 'movie'>>} A Promise that resolves with the details of the movie.
|
|
33
|
+
*/
|
|
20
34
|
details(id, appendToResponse, language) {
|
|
21
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
36
|
const options = {
|
|
@@ -26,26 +40,54 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
|
|
|
26
40
|
return yield this.api.get(`${BASE_MOVIE}/${id}`, options);
|
|
27
41
|
});
|
|
28
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves alternative titles of a specific movie asynchronously.
|
|
45
|
+
* @param {number} id - The ID of the movie.
|
|
46
|
+
* @returns {Promise<AlternativeTitles>} A Promise that resolves with the alternative titles of the movie.
|
|
47
|
+
*/
|
|
29
48
|
alternativeTitles(id) {
|
|
30
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
50
|
return yield this.api.get(`${BASE_MOVIE}/${id}/alternative_titles`);
|
|
32
51
|
});
|
|
33
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves changes made to a specific movie asynchronously.
|
|
55
|
+
* @param {number} id - The ID of the movie.
|
|
56
|
+
* @param {ChangeOption} [options] - Optional parameters for filtering changes.
|
|
57
|
+
* @returns {Promise<Changes<MovieChangeValue>>} A Promise that resolves with the changes made to the movie.
|
|
58
|
+
*/
|
|
34
59
|
changes(id, options) {
|
|
35
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
61
|
return yield this.api.get(`${BASE_MOVIE}/${id}/changes`, options);
|
|
37
62
|
});
|
|
38
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves credits of a specific movie asynchronously.
|
|
66
|
+
* @param {number} id - The ID of the movie.
|
|
67
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
68
|
+
* @returns {Promise<Credits>} A Promise that resolves with the credits of the movie.
|
|
69
|
+
*/
|
|
39
70
|
credits(id, options) {
|
|
40
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
72
|
return yield this.api.get(`${BASE_MOVIE}/${id}/credits`, options);
|
|
42
73
|
});
|
|
43
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves external IDs of a specific movie asynchronously.
|
|
77
|
+
* @param {number} id - The ID of the movie.
|
|
78
|
+
* @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the movie.
|
|
79
|
+
*/
|
|
44
80
|
externalIds(id) {
|
|
45
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
82
|
return yield this.api.get(`${BASE_MOVIE}/${id}/external_ids`);
|
|
47
83
|
});
|
|
48
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Retrieves images of a specific movie asynchronously.
|
|
87
|
+
* @param {number} id - The ID of the movie.
|
|
88
|
+
* @param {MoviesImageSearchOptions} [options] - Optional parameters for specifying image search options.
|
|
89
|
+
* @returns {Promise<Images>} A Promise that resolves with the images of the movie.
|
|
90
|
+
*/
|
|
49
91
|
images(id, options) {
|
|
50
92
|
var _a;
|
|
51
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -56,75 +98,145 @@ class MoviesEndpoint extends _types_1.BaseEndpoint {
|
|
|
56
98
|
return yield this.api.get(`${BASE_MOVIE}/${id}/images`, computedOptions);
|
|
57
99
|
});
|
|
58
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves keywords of a specific movie asynchronously.
|
|
103
|
+
* @param {number} id - The ID of the movie.
|
|
104
|
+
* @returns {Promise<Keywords>} A Promise that resolves with the keywords of the movie.
|
|
105
|
+
*/
|
|
59
106
|
keywords(id) {
|
|
60
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
108
|
return yield this.api.get(`${BASE_MOVIE}/${id}/keywords`);
|
|
62
109
|
});
|
|
63
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Retrieves lists containing a specific movie asynchronously.
|
|
113
|
+
* @param {number} id - The ID of the movie.
|
|
114
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
115
|
+
* @returns {Promise<MovieLists>} A Promise that resolves with the lists containing the movie.
|
|
116
|
+
*/
|
|
64
117
|
lists(id, options) {
|
|
65
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
119
|
return yield this.api.get(`${BASE_MOVIE}/${id}/lists`, options);
|
|
67
120
|
});
|
|
68
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Retrieves recommendations for a specific movie asynchronously.
|
|
124
|
+
* @param {number} id - The ID of the movie.
|
|
125
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
126
|
+
* @returns {Promise<Recommendations>} A Promise that resolves with the recommendations for the movie.
|
|
127
|
+
*/
|
|
69
128
|
recommendations(id, options) {
|
|
70
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
130
|
return yield this.api.get(`${BASE_MOVIE}/${id}/recommendations`, options);
|
|
72
131
|
});
|
|
73
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves release dates of a specific movie asynchronously.
|
|
135
|
+
* @param {number} id - The ID of the movie.
|
|
136
|
+
* @returns {Promise<ReleaseDates>} A Promise that resolves with the release dates of the movie.
|
|
137
|
+
*/
|
|
74
138
|
releaseDates(id) {
|
|
75
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
140
|
return yield this.api.get(`${BASE_MOVIE}/${id}/release_dates`);
|
|
77
141
|
});
|
|
78
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Retrieves reviews for a specific movie asynchronously.
|
|
145
|
+
* @param {number} id - The ID of the movie.
|
|
146
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
147
|
+
* @returns {Promise<Reviews>} A Promise that resolves with the reviews for the movie.
|
|
148
|
+
*/
|
|
79
149
|
reviews(id, options) {
|
|
80
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
151
|
return yield this.api.get(`${BASE_MOVIE}/${id}/reviews`, options);
|
|
82
152
|
});
|
|
83
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Retrieves similar movies for a specific movie asynchronously.
|
|
156
|
+
* @param {number} id - The ID of the movie.
|
|
157
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
158
|
+
* @returns {Promise<SimilarMovies>} A Promise that resolves with the similar movies for the movie.
|
|
159
|
+
*/
|
|
84
160
|
similar(id, options) {
|
|
85
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
162
|
return yield this.api.get(`${BASE_MOVIE}/${id}/similar`, options);
|
|
87
163
|
});
|
|
88
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Retrieves translations of a specific movie asynchronously.
|
|
167
|
+
* @param {number} id - The ID of the movie.
|
|
168
|
+
* @returns {Promise<Translations>} A Promise that resolves with the translations of the movie.
|
|
169
|
+
*/
|
|
89
170
|
translations(id) {
|
|
90
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
172
|
return yield this.api.get(`${BASE_MOVIE}/${id}/translations`);
|
|
92
173
|
});
|
|
93
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Retrieves videos of a specific movie asynchronously.
|
|
177
|
+
* @param {number} id - The ID of the movie.
|
|
178
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
179
|
+
* @returns {Promise<Videos>} A Promise that resolves with the videos of the movie.
|
|
180
|
+
*/
|
|
94
181
|
videos(id, options) {
|
|
95
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
183
|
return yield this.api.get(`${BASE_MOVIE}/${id}/videos`, options);
|
|
97
184
|
});
|
|
98
185
|
}
|
|
99
186
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @param id
|
|
187
|
+
* Retrieves watch providers of a specific movie asynchronously.
|
|
188
|
+
* @param {number} id - The ID of the movie.
|
|
189
|
+
* @returns {Promise<WatchProviders>} A Promise that resolves with the watch providers of the movie.
|
|
102
190
|
*/
|
|
103
191
|
watchProviders(id) {
|
|
104
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
193
|
return yield this.api.get(`${BASE_MOVIE}/${id}/watch/providers`);
|
|
106
194
|
});
|
|
107
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Retrieves details of the latest movie asynchronously.
|
|
198
|
+
* @returns {Promise<LatestMovie>} A Promise that resolves with the details of the latest movie.
|
|
199
|
+
*/
|
|
108
200
|
latest() {
|
|
109
201
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
202
|
return yield this.api.get(`${BASE_MOVIE}/latest`);
|
|
111
203
|
});
|
|
112
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Retrieves movies playing now asynchronously.
|
|
207
|
+
* @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
|
|
208
|
+
* @returns {Promise<MoviesPlayingNow>} A Promise that resolves with the movies playing now.
|
|
209
|
+
*/
|
|
113
210
|
nowPlaying(options) {
|
|
114
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
212
|
return yield this.api.get(`${BASE_MOVIE}/now_playing`, options);
|
|
116
213
|
});
|
|
117
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Retrieves popular movies asynchronously.
|
|
217
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
218
|
+
* @returns {Promise<PopularMovies>} A Promise that resolves with the popular movies.
|
|
219
|
+
*/
|
|
118
220
|
popular(options) {
|
|
119
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
222
|
return yield this.api.get(`${BASE_MOVIE}/popular`, options);
|
|
121
223
|
});
|
|
122
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Retrieves top rated movies asynchronously.
|
|
227
|
+
* @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
|
|
228
|
+
* @returns {Promise<TopRatedMovies>} A Promise that resolves with the top rated movies.
|
|
229
|
+
*/
|
|
123
230
|
topRated(options) {
|
|
124
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
232
|
return yield this.api.get(`${BASE_MOVIE}/top_rated`, options);
|
|
126
233
|
});
|
|
127
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Retrieves upcoming movies asynchronously.
|
|
237
|
+
* @param {PageOption & LanguageOption & RegionOption} [options] - Optional parameters for specifying language, region, and pagination options.
|
|
238
|
+
* @returns {Promise<UpcomingMovies>} A Promise that resolves with the upcoming movies.
|
|
239
|
+
*/
|
|
128
240
|
upcoming(options) {
|
|
129
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
242
|
return yield this.api.get(`${BASE_MOVIE}/upcoming`, options);
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import { AlternativeNames, BaseEndpoint, NetworkDetails, NetworkImages } from '@/@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing network details.
|
|
4
|
+
*/
|
|
2
5
|
export declare class NetworksEndpoint extends BaseEndpoint {
|
|
3
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new NetworksEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
4
11
|
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves details of a specific network asynchronously.
|
|
14
|
+
* @param {number} id - The ID of the network.
|
|
15
|
+
* @returns {Promise<NetworkDetails>} A Promise that resolves with the details of the network.
|
|
16
|
+
*/
|
|
5
17
|
details(id: number): Promise<NetworkDetails>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves alternative names of a specific network asynchronously.
|
|
20
|
+
* @param {number} id - The ID of the network.
|
|
21
|
+
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the network.
|
|
22
|
+
*/
|
|
6
23
|
alternativeNames(id: number): Promise<AlternativeNames>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves images of a specific network asynchronously.
|
|
26
|
+
* @param {number} id - The ID of the network.
|
|
27
|
+
* @returns {Promise<NetworkImages>} A Promise that resolves with the images of the network.
|
|
28
|
+
*/
|
|
7
29
|
images(id: number): Promise<NetworkImages>;
|
|
8
30
|
}
|
|
9
31
|
//# sourceMappingURL=networks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/endpoints/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzF,qBAAa,gBAAiB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../src/endpoints/networks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAKpC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;;OAIG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlD;;;;OAIG;IACG,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI7D;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGjD"}
|
|
@@ -11,21 +11,43 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.NetworksEndpoint = void 0;
|
|
13
13
|
const _types_1 = require("@/@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for accessing network details.
|
|
16
|
+
*/
|
|
14
17
|
class NetworksEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new NetworksEndpoint instance.
|
|
20
|
+
* @param {string} access_token - The access token used for authentication.
|
|
21
|
+
*/
|
|
15
22
|
constructor(access_token) {
|
|
16
23
|
super(access_token);
|
|
17
24
|
this.access_token = access_token;
|
|
18
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves details of a specific network asynchronously.
|
|
28
|
+
* @param {number} id - The ID of the network.
|
|
29
|
+
* @returns {Promise<NetworkDetails>} A Promise that resolves with the details of the network.
|
|
30
|
+
*/
|
|
19
31
|
details(id) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
33
|
return yield this.api.get(`/network/${id}`);
|
|
22
34
|
});
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves alternative names of a specific network asynchronously.
|
|
38
|
+
* @param {number} id - The ID of the network.
|
|
39
|
+
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the network.
|
|
40
|
+
*/
|
|
24
41
|
alternativeNames(id) {
|
|
25
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
43
|
return yield this.api.get(`/network/${id}/alternative_names`);
|
|
27
44
|
});
|
|
28
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves images of a specific network asynchronously.
|
|
48
|
+
* @param {number} id - The ID of the network.
|
|
49
|
+
* @returns {Promise<NetworkImages>} A Promise that resolves with the images of the network.
|
|
50
|
+
*/
|
|
29
51
|
images(id) {
|
|
30
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
53
|
return yield this.api.get(`/network/${id}/images`);
|
|
@@ -1,16 +1,84 @@
|
|
|
1
1
|
import { AppendToResponse, AppendToResponsePersonKey, BaseEndpoint, ChangeOption, Changes, ExternalIds, LanguageOption, PageOption, PeopleImages, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTranslations, PersonTvShowCredit, PopularPersons, TaggedImages } from '@/@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing information about people.
|
|
4
|
+
*/
|
|
2
5
|
export declare class PeopleEndpoint extends BaseEndpoint {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new PeopleEndpoint instance.
|
|
8
|
+
* @param {string} access_token - The access token used for authentication.
|
|
9
|
+
*/
|
|
3
10
|
constructor(access_token: string);
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves details of a specific person asynchronously.
|
|
13
|
+
* @param {number} id - The ID of the person.
|
|
14
|
+
* @param {AppendToResponsePersonKey[]} [appendToResponse] - Optional keys to append to the response.
|
|
15
|
+
* @param {string} [language] - Optional parameter for specifying the language.
|
|
16
|
+
* @returns {Promise<AppendToResponse<PersonDetails, AppendToResponsePersonKey[], 'person'>>} A Promise that resolves with the details of the person.
|
|
17
|
+
*/
|
|
4
18
|
details<T extends AppendToResponsePersonKey[] | undefined>(id: number, appendToResponse?: T, language?: string): Promise<AppendToResponse<PersonDetails, T, "person">>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves changes made to a specific person asynchronously.
|
|
21
|
+
* @param {number} id - The ID of the person.
|
|
22
|
+
* @param {ChangeOption} [options] - Optional parameters for filtering changes.
|
|
23
|
+
* @returns {Promise<Changes<PersonChangeValue>>} A Promise that resolves with the changes made to the person.
|
|
24
|
+
*/
|
|
5
25
|
changes(id: number, options?: ChangeOption): Promise<Changes<PersonChangeValue>>;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves movie credits of a specific person asynchronously.
|
|
28
|
+
* @param {number} id - The ID of the person.
|
|
29
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
30
|
+
* @returns {Promise<PersonMovieCredit>} A Promise that resolves with the movie credits of the person.
|
|
31
|
+
*/
|
|
6
32
|
movieCredits(id: number, options?: LanguageOption): Promise<PersonMovieCredit>;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves TV show credits of a specific person asynchronously.
|
|
35
|
+
* @param {number} id - The ID of the person.
|
|
36
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
37
|
+
* @returns {Promise<PersonTvShowCredit>} A Promise that resolves with the TV show credits of the person.
|
|
38
|
+
*/
|
|
7
39
|
tvShowCredits(id: number, options?: LanguageOption): Promise<PersonTvShowCredit>;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves combined credits of a specific person asynchronously.
|
|
42
|
+
* @param {number} id - The ID of the person.
|
|
43
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
44
|
+
* @returns {Promise<PersonCombinedCredits>} A Promise that resolves with the combined credits of the person.
|
|
45
|
+
*/
|
|
8
46
|
combinedCredits(id: number, options?: LanguageOption): Promise<PersonCombinedCredits>;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves external IDs of a specific person asynchronously.
|
|
49
|
+
* @param {number} id - The ID of the person.
|
|
50
|
+
* @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the person.
|
|
51
|
+
*/
|
|
9
52
|
externalId(id: number): Promise<ExternalIds>;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves images of a specific person asynchronously.
|
|
55
|
+
* @param {number} id - The ID of the person.
|
|
56
|
+
* @returns {Promise<PeopleImages>} A Promise that resolves with the images of the person.
|
|
57
|
+
*/
|
|
10
58
|
images(id: number): Promise<PeopleImages>;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves tagged images of a specific person asynchronously.
|
|
61
|
+
* @param {number} id - The ID of the person.
|
|
62
|
+
* @param {PageOption} [options] - Optional parameters for specifying pagination options.
|
|
63
|
+
* @returns {Promise<TaggedImages>} A Promise that resolves with the tagged images of the person.
|
|
64
|
+
*/
|
|
11
65
|
taggedImages(id: number, options?: PageOption): Promise<TaggedImages>;
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves translations of a specific person asynchronously.
|
|
68
|
+
* @param {number} id - The ID of the person.
|
|
69
|
+
* @returns {Promise<PersonTranslations>} A Promise that resolves with the translations of the person.
|
|
70
|
+
*/
|
|
12
71
|
translation(id: number): Promise<PersonTranslations>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves details of the latest person asynchronously.
|
|
74
|
+
* @returns {Promise<PersonDetails>} A Promise that resolves with the details of the latest person.
|
|
75
|
+
*/
|
|
13
76
|
latest(): Promise<PersonDetails>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves popular persons asynchronously.
|
|
79
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
80
|
+
* @returns {Promise<PopularPersons>} A Promise that resolves with the popular persons.
|
|
81
|
+
*/
|
|
14
82
|
popular(options?: LanguageOption & PageOption): Promise<PopularPersons>;
|
|
15
83
|
}
|
|
16
84
|
//# sourceMappingURL=people.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/endpoints/people.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAIlB,qBAAa,cAAe,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/endpoints/people.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACb,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;;OAMG;IACG,OAAO,CAAC,CAAC,SAAS,yBAAyB,EAAE,GAAG,SAAS,EAC7D,EAAE,EAAE,MAAM,EACV,gBAAgB,CAAC,EAAE,CAAC,EACpB,QAAQ,CAAC,EAAE,MAAM;IASnB;;;;;OAKG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAItF;;;;;OAKG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIpF;;;;;OAKG;IACG,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAItF;;;;;OAKG;IACG,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI3F;;;;OAIG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAIlD;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/C;;;;;OAKG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;IAI3E;;;;OAIG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI1D;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,aAAa,CAAC;IAItC;;;;OAIG;IACG,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC;CAG9E"}
|
package/dist/endpoints/people.js
CHANGED
|
@@ -12,10 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PeopleEndpoint = void 0;
|
|
13
13
|
const _types_1 = require("@/@types");
|
|
14
14
|
const BASE_PERSON = '/person';
|
|
15
|
+
/**
|
|
16
|
+
* Represents an endpoint for accessing information about people.
|
|
17
|
+
*/
|
|
15
18
|
class PeopleEndpoint extends _types_1.BaseEndpoint {
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new PeopleEndpoint instance.
|
|
21
|
+
* @param {string} access_token - The access token used for authentication.
|
|
22
|
+
*/
|
|
16
23
|
constructor(access_token) {
|
|
17
24
|
super(access_token);
|
|
18
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieves details of a specific person asynchronously.
|
|
28
|
+
* @param {number} id - The ID of the person.
|
|
29
|
+
* @param {AppendToResponsePersonKey[]} [appendToResponse] - Optional keys to append to the response.
|
|
30
|
+
* @param {string} [language] - Optional parameter for specifying the language.
|
|
31
|
+
* @returns {Promise<AppendToResponse<PersonDetails, AppendToResponsePersonKey[], 'person'>>} A Promise that resolves with the details of the person.
|
|
32
|
+
*/
|
|
19
33
|
details(id, appendToResponse, language) {
|
|
20
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
35
|
const options = {
|
|
@@ -25,51 +39,105 @@ class PeopleEndpoint extends _types_1.BaseEndpoint {
|
|
|
25
39
|
return yield this.api.get(`${BASE_PERSON}/${id}`, options);
|
|
26
40
|
});
|
|
27
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves changes made to a specific person asynchronously.
|
|
44
|
+
* @param {number} id - The ID of the person.
|
|
45
|
+
* @param {ChangeOption} [options] - Optional parameters for filtering changes.
|
|
46
|
+
* @returns {Promise<Changes<PersonChangeValue>>} A Promise that resolves with the changes made to the person.
|
|
47
|
+
*/
|
|
28
48
|
changes(id, options) {
|
|
29
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
50
|
return yield this.api.get(`${BASE_PERSON}/${id}/changes`, options);
|
|
31
51
|
});
|
|
32
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves movie credits of a specific person asynchronously.
|
|
55
|
+
* @param {number} id - The ID of the person.
|
|
56
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
57
|
+
* @returns {Promise<PersonMovieCredit>} A Promise that resolves with the movie credits of the person.
|
|
58
|
+
*/
|
|
33
59
|
movieCredits(id, options) {
|
|
34
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
61
|
return yield this.api.get(`${BASE_PERSON}/${id}/movie_credits`, options);
|
|
36
62
|
});
|
|
37
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves TV show credits of a specific person asynchronously.
|
|
66
|
+
* @param {number} id - The ID of the person.
|
|
67
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
68
|
+
* @returns {Promise<PersonTvShowCredit>} A Promise that resolves with the TV show credits of the person.
|
|
69
|
+
*/
|
|
38
70
|
tvShowCredits(id, options) {
|
|
39
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
72
|
return yield this.api.get(`${BASE_PERSON}/${id}/tv_credits`, options);
|
|
41
73
|
});
|
|
42
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieves combined credits of a specific person asynchronously.
|
|
77
|
+
* @param {number} id - The ID of the person.
|
|
78
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
79
|
+
* @returns {Promise<PersonCombinedCredits>} A Promise that resolves with the combined credits of the person.
|
|
80
|
+
*/
|
|
43
81
|
combinedCredits(id, options) {
|
|
44
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
83
|
return yield this.api.get(`${BASE_PERSON}/${id}/combined_credits`, options);
|
|
46
84
|
});
|
|
47
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves external IDs of a specific person asynchronously.
|
|
88
|
+
* @param {number} id - The ID of the person.
|
|
89
|
+
* @returns {Promise<ExternalIds>} A Promise that resolves with the external IDs of the person.
|
|
90
|
+
*/
|
|
48
91
|
externalId(id) {
|
|
49
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
93
|
return yield this.api.get(`${BASE_PERSON}/${id}/external_ids`);
|
|
51
94
|
});
|
|
52
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Retrieves images of a specific person asynchronously.
|
|
98
|
+
* @param {number} id - The ID of the person.
|
|
99
|
+
* @returns {Promise<PeopleImages>} A Promise that resolves with the images of the person.
|
|
100
|
+
*/
|
|
53
101
|
images(id) {
|
|
54
102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
103
|
return yield this.api.get(`${BASE_PERSON}/${id}/images`);
|
|
56
104
|
});
|
|
57
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Retrieves tagged images of a specific person asynchronously.
|
|
108
|
+
* @param {number} id - The ID of the person.
|
|
109
|
+
* @param {PageOption} [options] - Optional parameters for specifying pagination options.
|
|
110
|
+
* @returns {Promise<TaggedImages>} A Promise that resolves with the tagged images of the person.
|
|
111
|
+
*/
|
|
58
112
|
taggedImages(id, options) {
|
|
59
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
114
|
return yield this.api.get(`${BASE_PERSON}/${id}/tagged_images`, options);
|
|
61
115
|
});
|
|
62
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Retrieves translations of a specific person asynchronously.
|
|
119
|
+
* @param {number} id - The ID of the person.
|
|
120
|
+
* @returns {Promise<PersonTranslations>} A Promise that resolves with the translations of the person.
|
|
121
|
+
*/
|
|
63
122
|
translation(id) {
|
|
64
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
124
|
return yield this.api.get(`${BASE_PERSON}/${id}/translations`);
|
|
66
125
|
});
|
|
67
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Retrieves details of the latest person asynchronously.
|
|
129
|
+
* @returns {Promise<PersonDetails>} A Promise that resolves with the details of the latest person.
|
|
130
|
+
*/
|
|
68
131
|
latest() {
|
|
69
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
133
|
return yield this.api.get(`${BASE_PERSON}/latest`);
|
|
71
134
|
});
|
|
72
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Retrieves popular persons asynchronously.
|
|
138
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying language and pagination options.
|
|
139
|
+
* @returns {Promise<PopularPersons>} A Promise that resolves with the popular persons.
|
|
140
|
+
*/
|
|
73
141
|
popular(options) {
|
|
74
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
143
|
return yield this.api.get(`${BASE_PERSON}/popular`, options);
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { BaseEndpoint, ReviewDetails } from '@/@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing review details.
|
|
4
|
+
*/
|
|
2
5
|
export declare class ReviewEndpoint extends BaseEndpoint {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new ReviewEndpoint instance.
|
|
8
|
+
* @param {string} access_token - The access token used for authentication.
|
|
9
|
+
*/
|
|
3
10
|
constructor(access_token: string);
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves details of a specific review asynchronously.
|
|
13
|
+
* @param {string} id - The ID of the review.
|
|
14
|
+
* @returns {Promise<ReviewDetails>} A Promise that resolves with the details of the review.
|
|
15
|
+
*/
|
|
4
16
|
details(id: string): Promise<ReviewDetails>;
|
|
5
17
|
}
|
|
6
18
|
//# sourceMappingURL=review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/endpoints/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,qBAAa,cAAe,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/endpoints/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;OAIG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGlD"}
|
package/dist/endpoints/review.js
CHANGED
|
@@ -11,10 +11,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ReviewEndpoint = void 0;
|
|
13
13
|
const _types_1 = require("@/@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for accessing review details.
|
|
16
|
+
*/
|
|
14
17
|
class ReviewEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new ReviewEndpoint instance.
|
|
20
|
+
* @param {string} access_token - The access token used for authentication.
|
|
21
|
+
*/
|
|
15
22
|
constructor(access_token) {
|
|
16
23
|
super(access_token);
|
|
17
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves details of a specific review asynchronously.
|
|
27
|
+
* @param {string} id - The ID of the review.
|
|
28
|
+
* @returns {Promise<ReviewDetails>} A Promise that resolves with the details of the review.
|
|
29
|
+
*/
|
|
18
30
|
details(id) {
|
|
19
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
32
|
return yield this.api.get(`/review/${id}`);
|
|
@@ -1,39 +1,58 @@
|
|
|
1
|
-
import { BaseEndpoint, Collection, Company,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface MovieSearchOptions extends SearchOptions, LanguageOption, PageOption, RegionOption {
|
|
7
|
-
include_adult?: boolean;
|
|
8
|
-
year?: number;
|
|
9
|
-
primary_release_year?: number;
|
|
10
|
-
}
|
|
11
|
-
export interface CollectionSearchOptions extends SearchOptions, LanguageOption, PageOption, RegionOption {
|
|
12
|
-
include_adult?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface TvSearchOptions extends SearchOptions, LanguageOption, PageOption {
|
|
15
|
-
include_adult?: boolean;
|
|
16
|
-
year?: number;
|
|
17
|
-
first_air_date_year?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface PeopleSearchOptions extends SearchOptions, LanguageOption, PageOption {
|
|
20
|
-
include_adult?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface MultiSearchOptions extends SearchOptions, LanguageOption, PageOption {
|
|
23
|
-
include_adult?: boolean;
|
|
24
|
-
}
|
|
1
|
+
import { BaseEndpoint, Collection, Company, Movie, MovieSearchOptions, MultiSearchOptions, MultiSearchResult, PeopleSearchOptions, Person, Search, SearchOptions, TV, TvSearchOptions } from '@/@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for performing various search operations.
|
|
4
|
+
*/
|
|
25
5
|
export declare class SearchEndpoint extends BaseEndpoint {
|
|
26
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new SearchEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
27
11
|
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Searches for companies asynchronously.
|
|
14
|
+
* @param {SearchOptions} options - The search options.
|
|
15
|
+
* @returns {Promise<Search<Company>>} A Promise that resolves with the search results for companies.
|
|
16
|
+
*/
|
|
28
17
|
companies(options: SearchOptions): Promise<Search<Company>>;
|
|
18
|
+
/**
|
|
19
|
+
* Searches for collections asynchronously.
|
|
20
|
+
* @param {SearchOptions} options - The search options.
|
|
21
|
+
* @returns {Promise<Search<Collection>>} A Promise that resolves with the search results for collections.
|
|
22
|
+
*/
|
|
29
23
|
collections(options: SearchOptions): Promise<Search<Collection>>;
|
|
24
|
+
/**
|
|
25
|
+
* Searches for keywords asynchronously.
|
|
26
|
+
* @param {SearchOptions} options - The search options.
|
|
27
|
+
* @returns {Promise<Search<{ id: string; name: string }>>} A Promise that resolves with the search results for keywords.
|
|
28
|
+
*/
|
|
30
29
|
keywords(options: SearchOptions): Promise<Search<{
|
|
31
30
|
id: string;
|
|
32
31
|
name: string;
|
|
33
32
|
}>>;
|
|
33
|
+
/**
|
|
34
|
+
* Searches for movies asynchronously.
|
|
35
|
+
* @param {MovieSearchOptions} options - The search options.
|
|
36
|
+
* @returns {Promise<Search<Movie>>} A Promise that resolves with the search results for movies.
|
|
37
|
+
*/
|
|
34
38
|
movies(options: MovieSearchOptions): Promise<Search<Movie>>;
|
|
39
|
+
/**
|
|
40
|
+
* Searches for people asynchronously.
|
|
41
|
+
* @param {PeopleSearchOptions} options - The search options.
|
|
42
|
+
* @returns {Promise<Search<Person>>} A Promise that resolves with the search results for people.
|
|
43
|
+
*/
|
|
35
44
|
people(options: PeopleSearchOptions): Promise<Search<Person>>;
|
|
45
|
+
/**
|
|
46
|
+
* Searches for TV shows asynchronously.
|
|
47
|
+
* @param {TvSearchOptions} options - The search options.
|
|
48
|
+
* @returns {Promise<Search<TV>>} A Promise that resolves with the search results for TV shows.
|
|
49
|
+
*/
|
|
36
50
|
tv(options: TvSearchOptions): Promise<Search<TV>>;
|
|
51
|
+
/**
|
|
52
|
+
* Performs a multi-search asynchronously.
|
|
53
|
+
* @param {MultiSearchOptions} options - The search options.
|
|
54
|
+
* @returns {Promise<Search<MultiSearchResult>>} A Promise that resolves with the multi-search results.
|
|
55
|
+
*/
|
|
37
56
|
multi(options: MultiSearchOptions): Promise<Search<MultiSearchResult>>;
|
|
38
57
|
}
|
|
39
58
|
//# sourceMappingURL=search.d.ts.map
|