@tdanks2000/tmdb-wrapper 1.1.0 → 1.1.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/endpoints/account.js +2 -13
- package/dist/endpoints/certification.js +4 -17
- package/dist/endpoints/changes.js +6 -21
- package/dist/endpoints/collections.js +10 -26
- package/dist/endpoints/companies.js +6 -21
- package/dist/endpoints/configuration.js +2 -13
- package/dist/endpoints/credits.js +2 -13
- package/dist/endpoints/discover.js +4 -17
- package/dist/endpoints/find.js +2 -13
- package/dist/endpoints/genre.js +4 -17
- package/dist/endpoints/keywords.js +4 -17
- package/dist/endpoints/movies.js +48 -98
- package/dist/endpoints/networks.js +6 -21
- package/dist/endpoints/people.js +26 -57
- package/dist/endpoints/review.js +2 -13
- package/dist/endpoints/search.js +14 -37
- package/dist/endpoints/trending.js +2 -13
- package/dist/endpoints/tvEpisodes.js +26 -48
- package/dist/endpoints/tvSeasons.js +28 -52
- package/dist/endpoints/tvShows.js +58 -115
- package/dist/endpoints/watchProviders.js +8 -25
- package/dist/utils/api.js +12 -23
- package/package.json +2 -2
- package/dist/@types/endpoints/account.d.ts +0 -16
- package/dist/@types/endpoints/account.d.ts.map +0 -1
- package/dist/@types/endpoints/certification.d.ts +0 -19
- package/dist/@types/endpoints/certification.d.ts.map +0 -1
- package/dist/@types/endpoints/changes.d.ts +0 -26
- package/dist/@types/endpoints/changes.d.ts.map +0 -1
- package/dist/@types/endpoints/collection.d.ts +0 -21
- package/dist/@types/endpoints/collection.d.ts.map +0 -1
- package/dist/@types/endpoints/companies.d.ts +0 -29
- package/dist/@types/endpoints/companies.d.ts.map +0 -1
- package/dist/@types/endpoints/configuration.d.ts +0 -106
- package/dist/@types/endpoints/configuration.d.ts.map +0 -1
- package/dist/@types/endpoints/credits.d.ts +0 -135
- package/dist/@types/endpoints/credits.d.ts.map +0 -1
- package/dist/@types/endpoints/discover.d.ts +0 -68
- package/dist/@types/endpoints/discover.d.ts.map +0 -1
- package/dist/@types/endpoints/find.d.ts +0 -20
- package/dist/@types/endpoints/find.d.ts.map +0 -1
- package/dist/@types/endpoints/genre.d.ts +0 -7
- package/dist/@types/endpoints/genre.d.ts.map +0 -1
- package/dist/@types/endpoints/index.d.ts +0 -23
- package/dist/@types/endpoints/index.d.ts.map +0 -1
- package/dist/@types/endpoints/keywords.d.ts +0 -21
- package/dist/@types/endpoints/keywords.d.ts.map +0 -1
- package/dist/@types/endpoints/movies.d.ts +0 -150
- package/dist/@types/endpoints/movies.d.ts.map +0 -1
- package/dist/@types/endpoints/networks.d.ts +0 -14
- package/dist/@types/endpoints/networks.d.ts.map +0 -1
- package/dist/@types/endpoints/options.d.ts +0 -73
- package/dist/@types/endpoints/options.d.ts.map +0 -1
- package/dist/@types/endpoints/people.d.ts +0 -135
- package/dist/@types/endpoints/people.d.ts.map +0 -1
- package/dist/@types/endpoints/review.d.ts +0 -8
- package/dist/@types/endpoints/review.d.ts.map +0 -1
- package/dist/@types/endpoints/search.d.ts +0 -32
- package/dist/@types/endpoints/search.d.ts.map +0 -1
- package/dist/@types/endpoints/trending.d.ts +0 -12
- package/dist/@types/endpoints/trending.d.ts.map +0 -1
- package/dist/@types/endpoints/tvEpisode.d.ts +0 -65
- package/dist/@types/endpoints/tvEpisode.d.ts.map +0 -1
- package/dist/@types/endpoints/tvSeasons.d.ts +0 -31
- package/dist/@types/endpoints/tvSeasons.d.ts.map +0 -1
- package/dist/@types/endpoints/tvShows.d.ts +0 -260
- package/dist/@types/endpoints/tvShows.d.ts.map +0 -1
- package/dist/@types/endpoints/watchProviders.d.ts +0 -295
- package/dist/@types/endpoints/watchProviders.d.ts.map +0 -1
- package/dist/@types/index.d.ts +0 -4
- package/dist/@types/index.d.ts.map +0 -1
- package/dist/@types/models/baseEndpoint.d.ts +0 -7
- package/dist/@types/models/baseEndpoint.d.ts.map +0 -1
- package/dist/@types/models/index.d.ts +0 -2
- package/dist/@types/models/index.d.ts.map +0 -1
- package/dist/@types/types.d.ts +0 -174
- package/dist/@types/types.d.ts.map +0 -1
- package/dist/endpoints/account.d.ts +0 -17
- package/dist/endpoints/account.d.ts.map +0 -1
- package/dist/endpoints/certification.d.ts +0 -23
- package/dist/endpoints/certification.d.ts.map +0 -1
- package/dist/endpoints/changes.d.ts +0 -31
- package/dist/endpoints/changes.d.ts.map +0 -1
- package/dist/endpoints/collections.d.ts +0 -34
- package/dist/endpoints/collections.d.ts.map +0 -1
- package/dist/endpoints/companies.d.ts +0 -31
- package/dist/endpoints/companies.d.ts.map +0 -1
- package/dist/endpoints/configuration.d.ts +0 -18
- package/dist/endpoints/configuration.d.ts.map +0 -1
- package/dist/endpoints/credits.d.ts +0 -19
- package/dist/endpoints/credits.d.ts.map +0 -1
- package/dist/endpoints/discover.d.ts +0 -24
- package/dist/endpoints/discover.d.ts.map +0 -1
- package/dist/endpoints/find.d.ts +0 -19
- package/dist/endpoints/find.d.ts.map +0 -1
- package/dist/endpoints/genre.d.ts +0 -25
- package/dist/endpoints/genre.d.ts.map +0 -1
- package/dist/endpoints/index.d.ts +0 -22
- package/dist/endpoints/index.d.ts.map +0 -1
- package/dist/endpoints/keywords.d.ts +0 -25
- package/dist/endpoints/keywords.d.ts.map +0 -1
- package/dist/endpoints/movies.d.ts +0 -142
- package/dist/endpoints/movies.d.ts.map +0 -1
- package/dist/endpoints/networks.d.ts +0 -31
- package/dist/endpoints/networks.d.ts.map +0 -1
- package/dist/endpoints/people.d.ts +0 -84
- package/dist/endpoints/people.d.ts.map +0 -1
- package/dist/endpoints/review.d.ts +0 -18
- package/dist/endpoints/review.d.ts.map +0 -1
- package/dist/endpoints/search.d.ts +0 -58
- package/dist/endpoints/search.d.ts.map +0 -1
- package/dist/endpoints/trending.d.ts +0 -21
- package/dist/endpoints/trending.d.ts.map +0 -1
- package/dist/endpoints/tvEpisodes.d.ts +0 -61
- package/dist/endpoints/tvEpisodes.d.ts.map +0 -1
- package/dist/endpoints/tvSeasons.d.ts +0 -70
- package/dist/endpoints/tvSeasons.d.ts.map +0 -1
- package/dist/endpoints/tvShows.d.ts +0 -164
- package/dist/endpoints/tvShows.d.ts.map +0 -1
- package/dist/endpoints/watchProviders.d.ts +0 -33
- package/dist/endpoints/watchProviders.d.ts.map +0 -1
- package/dist/index.d.ts +0 -29
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/api.d.ts +0 -7
- package/dist/utils/api.d.ts.map +0 -1
- package/dist/utils/getimagePath.d.ts +0 -32
- package/dist/utils/getimagePath.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +0 -1
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.AccountEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -26,10 +17,8 @@ class AccountEndpoint extends _types_1.BaseEndpoint {
|
|
|
26
17
|
* Retrieves account details asynchronously.
|
|
27
18
|
* @returns {Promise<AccountDetails>} A Promise that resolves with the account details.
|
|
28
19
|
*/
|
|
29
|
-
details() {
|
|
30
|
-
return
|
|
31
|
-
return yield this.api.get('/account');
|
|
32
|
-
});
|
|
20
|
+
async details() {
|
|
21
|
+
return await this.api.get('/account');
|
|
33
22
|
}
|
|
34
23
|
}
|
|
35
24
|
exports.AccountEndpoint = AccountEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CertificationEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -27,19 +18,15 @@ class CertificationEndpoint extends _types_1.BaseEndpoint {
|
|
|
27
18
|
* Retrieves certifications for movies asynchronously.
|
|
28
19
|
* @returns {Promise<Certifications>} A Promise that resolves with the certifications for movies.
|
|
29
20
|
*/
|
|
30
|
-
movies() {
|
|
31
|
-
return
|
|
32
|
-
return yield this.api.get('/certification/movie/list');
|
|
33
|
-
});
|
|
21
|
+
async movies() {
|
|
22
|
+
return await this.api.get('/certification/movie/list');
|
|
34
23
|
}
|
|
35
24
|
/**
|
|
36
25
|
* Retrieves certifications for TV shows asynchronously.
|
|
37
26
|
* @returns {Promise<Certifications>} A Promise that resolves with the certifications for TV shows.
|
|
38
27
|
*/
|
|
39
|
-
tv() {
|
|
40
|
-
return
|
|
41
|
-
return yield this.api.get('/certification/tv/list');
|
|
42
|
-
});
|
|
28
|
+
async tv() {
|
|
29
|
+
return await this.api.get('/certification/tv/list');
|
|
43
30
|
}
|
|
44
31
|
}
|
|
45
32
|
exports.CertificationEndpoint = CertificationEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ChangeEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,30 +19,24 @@ class ChangeEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
29
20
|
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes in movies.
|
|
30
21
|
*/
|
|
31
|
-
movies(options) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get('/movie/changes', options);
|
|
34
|
-
});
|
|
22
|
+
async movies(options) {
|
|
23
|
+
return await this.api.get('/movie/changes', options);
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* Retrieves changes in TV shows asynchronously.
|
|
38
27
|
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
39
28
|
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes in TV shows.
|
|
40
29
|
*/
|
|
41
|
-
tv(options) {
|
|
42
|
-
return
|
|
43
|
-
return yield this.api.get('/tv/changes', options);
|
|
44
|
-
});
|
|
30
|
+
async tv(options) {
|
|
31
|
+
return await this.api.get('/tv/changes', options);
|
|
45
32
|
}
|
|
46
33
|
/**
|
|
47
34
|
* Retrieves changes related to persons asynchronously.
|
|
48
35
|
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
49
36
|
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes related to persons.
|
|
50
37
|
*/
|
|
51
|
-
person(options) {
|
|
52
|
-
return
|
|
53
|
-
return yield this.api.get('/person/change', options);
|
|
54
|
-
});
|
|
38
|
+
async person(options) {
|
|
39
|
+
return await this.api.get('/person/change', options);
|
|
55
40
|
}
|
|
56
41
|
}
|
|
57
42
|
exports.ChangeEndpoint = ChangeEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CollectionsEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -30,10 +21,8 @@ class CollectionsEndpoint extends _types_1.BaseEndpoint {
|
|
|
30
21
|
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
31
22
|
* @returns {Promise<DetailedCollection>} A Promise that resolves with the detailed information of the collection.
|
|
32
23
|
*/
|
|
33
|
-
details(id, options) {
|
|
34
|
-
return
|
|
35
|
-
return yield this.api.get(`${BASE_COLLECTION}/${id}`, options);
|
|
36
|
-
});
|
|
24
|
+
async details(id, options) {
|
|
25
|
+
return await this.api.get(`${BASE_COLLECTION}/${id}`, options);
|
|
37
26
|
}
|
|
38
27
|
/**
|
|
39
28
|
* Retrieves images associated with a specific collection asynchronously.
|
|
@@ -41,15 +30,12 @@ class CollectionsEndpoint extends _types_1.BaseEndpoint {
|
|
|
41
30
|
* @param {CollectionImageOptions} [options] - Optional parameters for specifying image options.
|
|
42
31
|
* @returns {Promise<ImageCollection>} A Promise that resolves with the collection images.
|
|
43
32
|
*/
|
|
44
|
-
images(id, options) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
return yield this.api.get(`${BASE_COLLECTION}/${id}/images`, computedOptions);
|
|
52
|
-
});
|
|
33
|
+
async images(id, options) {
|
|
34
|
+
const computedOptions = {
|
|
35
|
+
include_image_language: options?.include_image_language?.join(','),
|
|
36
|
+
language: options?.language,
|
|
37
|
+
};
|
|
38
|
+
return await this.api.get(`${BASE_COLLECTION}/${id}/images`, computedOptions);
|
|
53
39
|
}
|
|
54
40
|
/**
|
|
55
41
|
* Retrieves translations for a specific collection asynchronously.
|
|
@@ -57,10 +43,8 @@ class CollectionsEndpoint extends _types_1.BaseEndpoint {
|
|
|
57
43
|
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
58
44
|
* @returns {Promise<Translations>} A Promise that resolves with the translations of the collection.
|
|
59
45
|
*/
|
|
60
|
-
translations(id, options) {
|
|
61
|
-
return
|
|
62
|
-
return yield this.api.get(`${BASE_COLLECTION}/${id}/translations`, options);
|
|
63
|
-
});
|
|
46
|
+
async translations(id, options) {
|
|
47
|
+
return await this.api.get(`${BASE_COLLECTION}/${id}/translations`, options);
|
|
64
48
|
}
|
|
65
49
|
}
|
|
66
50
|
exports.CollectionsEndpoint = CollectionsEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CompaniesEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,30 +19,24 @@ class CompaniesEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {number} id - The ID of the company.
|
|
29
20
|
* @returns {Promise<CompanyDetails>} A Promise that resolves with the detailed information of the company.
|
|
30
21
|
*/
|
|
31
|
-
details(id) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get(`/company/${id}`);
|
|
34
|
-
});
|
|
22
|
+
async details(id) {
|
|
23
|
+
return await this.api.get(`/company/${id}`);
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* Retrieves alternative names of a specific company asynchronously.
|
|
38
27
|
* @param {number} id - The ID of the company.
|
|
39
28
|
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the company.
|
|
40
29
|
*/
|
|
41
|
-
alternativeNames(id) {
|
|
42
|
-
return
|
|
43
|
-
return yield this.api.get(`/company/${id}/alternative_names`);
|
|
44
|
-
});
|
|
30
|
+
async alternativeNames(id) {
|
|
31
|
+
return await this.api.get(`/company/${id}/alternative_names`);
|
|
45
32
|
}
|
|
46
33
|
/**
|
|
47
34
|
* Retrieves images associated with a specific company asynchronously.
|
|
48
35
|
* @param {number} id - The ID of the company.
|
|
49
36
|
* @returns {Promise<CompanyImages>} A Promise that resolves with the images of the company.
|
|
50
37
|
*/
|
|
51
|
-
images(id) {
|
|
52
|
-
return
|
|
53
|
-
return yield this.api.get(`/company/${id}/images`);
|
|
54
|
-
});
|
|
38
|
+
async images(id) {
|
|
39
|
+
return await this.api.get(`/company/${id}/images`);
|
|
55
40
|
}
|
|
56
41
|
}
|
|
57
42
|
exports.CompaniesEndpoint = CompaniesEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.ConfigurationEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -27,10 +18,8 @@ class ConfigurationEndpoint extends _types_1.BaseEndpoint {
|
|
|
27
18
|
* Retrieves the current system configuration asynchronously.
|
|
28
19
|
* @returns {Promise<Configuration>} A Promise that resolves with the current system configuration.
|
|
29
20
|
*/
|
|
30
|
-
getCurrent() {
|
|
31
|
-
return
|
|
32
|
-
return yield this.api.get(`/configuration`);
|
|
33
|
-
});
|
|
21
|
+
async getCurrent() {
|
|
22
|
+
return await this.api.get(`/configuration`);
|
|
34
23
|
}
|
|
35
24
|
}
|
|
36
25
|
exports.ConfigurationEndpoint = ConfigurationEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CreditsEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,10 +19,8 @@ class CreditsEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {string} id - The ID of the credit.
|
|
29
20
|
* @returns {Promise<CreditResponse>} A Promise that resolves with the credit details.
|
|
30
21
|
*/
|
|
31
|
-
getById(id) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get(`/credit/${id}`);
|
|
34
|
-
});
|
|
22
|
+
async getById(id) {
|
|
23
|
+
return await this.api.get(`/credit/${id}`);
|
|
35
24
|
}
|
|
36
25
|
}
|
|
37
26
|
exports.CreditsEndpoint = CreditsEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.DiscoverEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,20 +19,16 @@ class DiscoverEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {MovieQueryOptions} [options] - Optional parameters for refining the movie discovery.
|
|
29
20
|
* @returns {Promise<MovieDiscoverResult>} A Promise that resolves with the movie discovery results.
|
|
30
21
|
*/
|
|
31
|
-
movie(options) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get(`${BASE_DISCOVER}/movie`, options);
|
|
34
|
-
});
|
|
22
|
+
async movie(options) {
|
|
23
|
+
return await this.api.get(`${BASE_DISCOVER}/movie`, options);
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* Retrieves a list of TV shows based on the provided query options asynchronously.
|
|
38
27
|
* @param {TvShowQueryOptions} [options] - Optional parameters for refining the TV show discovery.
|
|
39
28
|
* @returns {Promise<TvShowDiscoverResult>} A Promise that resolves with the TV show discovery results.
|
|
40
29
|
*/
|
|
41
|
-
tvShow(options) {
|
|
42
|
-
return
|
|
43
|
-
return yield this.api.get(`${BASE_DISCOVER}/tv`, options);
|
|
44
|
-
});
|
|
30
|
+
async tvShow(options) {
|
|
31
|
+
return await this.api.get(`${BASE_DISCOVER}/tv`, options);
|
|
45
32
|
}
|
|
46
33
|
}
|
|
47
34
|
exports.DiscoverEndpoint = DiscoverEndpoint;
|
package/dist/endpoints/find.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.FindEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,10 +19,8 @@ class FindEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {ExternalIdOptions} options - Options for finding media by external ID.
|
|
29
20
|
* @returns {Promise<FindResult>} A Promise that resolves with the result of the find operation.
|
|
30
21
|
*/
|
|
31
|
-
byId(externalId, options) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get(`/find/${externalId}`, options);
|
|
34
|
-
});
|
|
22
|
+
async byId(externalId, options) {
|
|
23
|
+
return await this.api.get(`/find/${externalId}`, options);
|
|
35
24
|
}
|
|
36
25
|
}
|
|
37
26
|
exports.FindEndpoint = FindEndpoint;
|
package/dist/endpoints/genre.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.GenreEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,20 +19,16 @@ class GenreEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
29
20
|
* @returns {Promise<Genres>} A Promise that resolves with the genre information for movies.
|
|
30
21
|
*/
|
|
31
|
-
movies(options) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get('/genre/movie/list', options);
|
|
34
|
-
});
|
|
22
|
+
async movies(options) {
|
|
23
|
+
return await this.api.get('/genre/movie/list', options);
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* Retrieves genre information for TV shows asynchronously.
|
|
38
27
|
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
39
28
|
* @returns {Promise<Genres>} A Promise that resolves with the genre information for TV shows.
|
|
40
29
|
*/
|
|
41
|
-
tv(options) {
|
|
42
|
-
return
|
|
43
|
-
return yield this.api.get('/genre/tv/list', options);
|
|
44
|
-
});
|
|
30
|
+
async tv(options) {
|
|
31
|
+
return await this.api.get('/genre/tv/list', options);
|
|
45
32
|
}
|
|
46
33
|
}
|
|
47
34
|
exports.GenreEndpoint = GenreEndpoint;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.KeywordsEndpoint = void 0;
|
|
13
4
|
const _types_1 = require("../@types");
|
|
@@ -28,10 +19,8 @@ class KeywordsEndpoint extends _types_1.BaseEndpoint {
|
|
|
28
19
|
* @param {number} keywordId - The ID of the keyword.
|
|
29
20
|
* @returns {Promise<Keyword>} A Promise that resolves with the details of the keyword.
|
|
30
21
|
*/
|
|
31
|
-
details(keywordId) {
|
|
32
|
-
return
|
|
33
|
-
return yield this.api.get(`${BASE_KEYWORD}/${keywordId}`);
|
|
34
|
-
});
|
|
22
|
+
async details(keywordId) {
|
|
23
|
+
return await this.api.get(`${BASE_KEYWORD}/${keywordId}`);
|
|
35
24
|
}
|
|
36
25
|
/**
|
|
37
26
|
* Retrieves movies belonging to a specific keyword asynchronously.
|
|
@@ -39,10 +28,8 @@ class KeywordsEndpoint extends _types_1.BaseEndpoint {
|
|
|
39
28
|
* @param {KeywordsOptions} [options] - Optional parameters for refining the search.
|
|
40
29
|
* @returns {Promise<BelongingMovies>} A Promise that resolves with the movies belonging to the keyword.
|
|
41
30
|
*/
|
|
42
|
-
belongingMovies(keywordId, options) {
|
|
43
|
-
return
|
|
44
|
-
return yield this.api.get(`${BASE_KEYWORD}/${keywordId}/movies`, options);
|
|
45
|
-
});
|
|
31
|
+
async belongingMovies(keywordId, options) {
|
|
32
|
+
return await this.api.get(`${BASE_KEYWORD}/${keywordId}/movies`, options);
|
|
46
33
|
}
|
|
47
34
|
}
|
|
48
35
|
exports.KeywordsEndpoint = KeywordsEndpoint;
|