@tdanks2000/tmdb-wrapper 1.1.2 → 1.3.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/index.cjs +1598 -0
- package/dist/index.d.cts +2812 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2812 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1563 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +70 -61
- package/dist/@types/endpoints/account.js +0 -2
- package/dist/@types/endpoints/certification.js +0 -2
- package/dist/@types/endpoints/changes.js +0 -2
- package/dist/@types/endpoints/collection.js +0 -2
- package/dist/@types/endpoints/companies.js +0 -2
- package/dist/@types/endpoints/configuration.js +0 -101
- package/dist/@types/endpoints/credits.js +0 -2
- package/dist/@types/endpoints/discover.js +0 -2
- package/dist/@types/endpoints/find.js +0 -2
- package/dist/@types/endpoints/genre.js +0 -2
- package/dist/@types/endpoints/index.js +0 -38
- package/dist/@types/endpoints/keywords.js +0 -2
- package/dist/@types/endpoints/movies.js +0 -12
- package/dist/@types/endpoints/networks.js +0 -2
- package/dist/@types/endpoints/options.js +0 -2
- package/dist/@types/endpoints/people.js +0 -2
- package/dist/@types/endpoints/review.js +0 -2
- package/dist/@types/endpoints/search.js +0 -2
- package/dist/@types/endpoints/trending.js +0 -2
- package/dist/@types/endpoints/tvEpisode.js +0 -2
- package/dist/@types/endpoints/tvSeasons.js +0 -2
- package/dist/@types/endpoints/tvShows.js +0 -2
- package/dist/@types/endpoints/watchProviders.js +0 -2
- package/dist/@types/index.js +0 -19
- package/dist/@types/models/baseEndpoint.js +0 -11
- package/dist/@types/models/index.js +0 -17
- package/dist/@types/types.js +0 -2
- package/dist/endpoints/account.js +0 -25
- package/dist/endpoints/certification.js +0 -32
- package/dist/endpoints/changes.js +0 -42
- package/dist/endpoints/collections.js +0 -50
- package/dist/endpoints/companies.js +0 -42
- package/dist/endpoints/configuration.js +0 -25
- package/dist/endpoints/credits.js +0 -26
- package/dist/endpoints/discover.js +0 -35
- package/dist/endpoints/find.js +0 -27
- package/dist/endpoints/genre.js +0 -34
- package/dist/endpoints/index.js +0 -37
- package/dist/endpoints/keywords.js +0 -36
- package/dist/endpoints/movies.js +0 -198
- package/dist/endpoints/networks.js +0 -42
- package/dist/endpoints/people.js +0 -119
- package/dist/endpoints/review.js +0 -26
- package/dist/endpoints/search.js +0 -75
- package/dist/endpoints/trending.js +0 -29
- package/dist/endpoints/tvEpisodes.js +0 -98
- package/dist/endpoints/tvSeasons.js +0 -109
- package/dist/endpoints/tvShows.js +0 -230
- package/dist/endpoints/watchProviders.js +0 -46
- package/dist/index.js +0 -46
- package/dist/utils/api.js +0 -61
- package/dist/utils/getimagePath.js +0 -50
- package/dist/utils/index.js +0 -18
package/dist/@types/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./endpoints"), exports);
|
|
18
|
-
__exportStar(require("./models"), exports);
|
|
19
|
-
__exportStar(require("./types"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseEndpoint = void 0;
|
|
4
|
-
const utils_1 = require("../../utils");
|
|
5
|
-
class BaseEndpoint {
|
|
6
|
-
constructor(auth) {
|
|
7
|
-
this.auth = auth;
|
|
8
|
-
this.api = new utils_1.API(auth);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.BaseEndpoint = BaseEndpoint;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./baseEndpoint"), exports);
|
package/dist/@types/types.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccountEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving account details.
|
|
7
|
-
*/
|
|
8
|
-
class AccountEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new AccountEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves account details asynchronously.
|
|
19
|
-
* @returns {Promise<AccountDetails>} A Promise that resolves with the account details.
|
|
20
|
-
*/
|
|
21
|
-
async details() {
|
|
22
|
-
return await this.api.get("/account");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.AccountEndpoint = AccountEndpoint;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CertificationEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving certifications for movies and TV shows.
|
|
7
|
-
*/
|
|
8
|
-
class CertificationEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new CertificationEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves certifications for movies asynchronously.
|
|
19
|
-
* @returns {Promise<Certifications>} A Promise that resolves with the certifications for movies.
|
|
20
|
-
*/
|
|
21
|
-
async movies() {
|
|
22
|
-
return await this.api.get("/certification/movie/list");
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves certifications for TV shows asynchronously.
|
|
26
|
-
* @returns {Promise<Certifications>} A Promise that resolves with the certifications for TV shows.
|
|
27
|
-
*/
|
|
28
|
-
async tv() {
|
|
29
|
-
return await this.api.get("/certification/tv/list");
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.CertificationEndpoint = CertificationEndpoint;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChangeEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving changes in movies, TV shows, and persons.
|
|
7
|
-
*/
|
|
8
|
-
class ChangeEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new ChangeEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves changes in movies asynchronously.
|
|
19
|
-
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
20
|
-
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes in movies.
|
|
21
|
-
*/
|
|
22
|
-
async movies(options) {
|
|
23
|
-
return await this.api.get("/movie/changes", options);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves changes in TV shows asynchronously.
|
|
27
|
-
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
28
|
-
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes in TV shows.
|
|
29
|
-
*/
|
|
30
|
-
async tv(options) {
|
|
31
|
-
return await this.api.get("/tv/changes", options);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves changes related to persons asynchronously.
|
|
35
|
-
* @param {ChangeOption} [options] - Optional parameters for filtering the changes.
|
|
36
|
-
* @returns {Promise<MediaChanges>} A Promise that resolves with the changes related to persons.
|
|
37
|
-
*/
|
|
38
|
-
async person(options) {
|
|
39
|
-
return await this.api.get("/person/change", options);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ChangeEndpoint = ChangeEndpoint;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CollectionsEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
const BASE_COLLECTION = "/collection";
|
|
6
|
-
/**
|
|
7
|
-
* Represents an endpoint for accessing collections and their details.
|
|
8
|
-
*/
|
|
9
|
-
class CollectionsEndpoint extends _types_1.BaseEndpoint {
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new CollectionsEndpoint instance.
|
|
12
|
-
* @param {string} access_token - The access token used for authentication.
|
|
13
|
-
*/
|
|
14
|
-
constructor(access_token) {
|
|
15
|
-
super(access_token);
|
|
16
|
-
this.access_token = access_token;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves details of a specific collection asynchronously.
|
|
20
|
-
* @param {number} id - The ID of the collection.
|
|
21
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
22
|
-
* @returns {Promise<DetailedCollection>} A Promise that resolves with the detailed information of the collection.
|
|
23
|
-
*/
|
|
24
|
-
async details(id, options) {
|
|
25
|
-
return await this.api.get(`${BASE_COLLECTION}/${id}`, options);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves images associated with a specific collection asynchronously.
|
|
29
|
-
* @param {number} id - The ID of the collection.
|
|
30
|
-
* @param {CollectionImageOptions} [options] - Optional parameters for specifying image options.
|
|
31
|
-
* @returns {Promise<ImageCollection>} A Promise that resolves with the collection images.
|
|
32
|
-
*/
|
|
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);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Retrieves translations for a specific collection asynchronously.
|
|
42
|
-
* @param {number} id - The ID of the collection.
|
|
43
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
44
|
-
* @returns {Promise<Translations>} A Promise that resolves with the translations of the collection.
|
|
45
|
-
*/
|
|
46
|
-
async translations(id, options) {
|
|
47
|
-
return await this.api.get(`${BASE_COLLECTION}/${id}/translations`, options);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.CollectionsEndpoint = CollectionsEndpoint;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompaniesEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for accessing company details and related information.
|
|
7
|
-
*/
|
|
8
|
-
class CompaniesEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new CompaniesEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves details of a specific company asynchronously.
|
|
19
|
-
* @param {number} id - The ID of the company.
|
|
20
|
-
* @returns {Promise<CompanyDetails>} A Promise that resolves with the detailed information of the company.
|
|
21
|
-
*/
|
|
22
|
-
async details(id) {
|
|
23
|
-
return await this.api.get(`/company/${id}`);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves alternative names of a specific company asynchronously.
|
|
27
|
-
* @param {number} id - The ID of the company.
|
|
28
|
-
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the company.
|
|
29
|
-
*/
|
|
30
|
-
async alternativeNames(id) {
|
|
31
|
-
return await this.api.get(`/company/${id}/alternative_names`);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Retrieves images associated with a specific company asynchronously.
|
|
35
|
-
* @param {number} id - The ID of the company.
|
|
36
|
-
* @returns {Promise<CompanyImages>} A Promise that resolves with the images of the company.
|
|
37
|
-
*/
|
|
38
|
-
async images(id) {
|
|
39
|
-
return await this.api.get(`/company/${id}/images`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.CompaniesEndpoint = CompaniesEndpoint;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigurationEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving current system configuration.
|
|
7
|
-
*/
|
|
8
|
-
class ConfigurationEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new ConfigurationEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves the current system configuration asynchronously.
|
|
19
|
-
* @returns {Promise<Configuration>} A Promise that resolves with the current system configuration.
|
|
20
|
-
*/
|
|
21
|
-
async getCurrent() {
|
|
22
|
-
return await this.api.get(`/configuration`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ConfigurationEndpoint = ConfigurationEndpoint;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreditsEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving credit details.
|
|
7
|
-
*/
|
|
8
|
-
class CreditsEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new CreditsEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves credit details by ID asynchronously.
|
|
19
|
-
* @param {string} id - The ID of the credit.
|
|
20
|
-
* @returns {Promise<CreditResponse>} A Promise that resolves with the credit details.
|
|
21
|
-
*/
|
|
22
|
-
async getById(id) {
|
|
23
|
-
return await this.api.get(`/credit/${id}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.CreditsEndpoint = CreditsEndpoint;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiscoverEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
const BASE_DISCOVER = "/discover";
|
|
6
|
-
/**
|
|
7
|
-
* Represents an endpoint for discovering movies and TV shows based on various criteria.
|
|
8
|
-
*/
|
|
9
|
-
class DiscoverEndpoint extends _types_1.BaseEndpoint {
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new DiscoverEndpoint instance.
|
|
12
|
-
* @param {string} access_token - The access token used for authentication.
|
|
13
|
-
*/
|
|
14
|
-
constructor(access_token) {
|
|
15
|
-
super(access_token);
|
|
16
|
-
this.access_token = access_token;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves a list of movies based on the provided query options asynchronously.
|
|
20
|
-
* @param {MovieQueryOptions} [options] - Optional parameters for refining the movie discovery.
|
|
21
|
-
* @returns {Promise<MovieDiscoverResult>} A Promise that resolves with the movie discovery results.
|
|
22
|
-
*/
|
|
23
|
-
async movie(options) {
|
|
24
|
-
return await this.api.get(`${BASE_DISCOVER}/movie`, options);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves a list of TV shows based on the provided query options asynchronously.
|
|
28
|
-
* @param {TvShowQueryOptions} [options] - Optional parameters for refining the TV show discovery.
|
|
29
|
-
* @returns {Promise<TvShowDiscoverResult>} A Promise that resolves with the TV show discovery results.
|
|
30
|
-
*/
|
|
31
|
-
async tvShow(options) {
|
|
32
|
-
return await this.api.get(`${BASE_DISCOVER}/tv`, options);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.DiscoverEndpoint = DiscoverEndpoint;
|
package/dist/endpoints/find.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FindEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for finding media by external ID.
|
|
7
|
-
*/
|
|
8
|
-
class FindEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new FindEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves media by external ID asynchronously.
|
|
19
|
-
* @param {string} externalId - The external ID of the media.
|
|
20
|
-
* @param {ExternalIdOptions} options - Options for finding media by external ID.
|
|
21
|
-
* @returns {Promise<FindResult>} A Promise that resolves with the result of the find operation.
|
|
22
|
-
*/
|
|
23
|
-
async byId(externalId, options) {
|
|
24
|
-
return await this.api.get(`/find/${externalId}`, options);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.FindEndpoint = FindEndpoint;
|
package/dist/endpoints/genre.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenreEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
/**
|
|
6
|
-
* Represents an endpoint for retrieving genre information for movies and TV shows.
|
|
7
|
-
*/
|
|
8
|
-
class GenreEndpoint extends _types_1.BaseEndpoint {
|
|
9
|
-
/**
|
|
10
|
-
* Constructs a new GenreEndpoint instance.
|
|
11
|
-
* @param {string} access_token - The access token used for authentication.
|
|
12
|
-
*/
|
|
13
|
-
constructor(access_token) {
|
|
14
|
-
super(access_token);
|
|
15
|
-
this.access_token = access_token;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves genre information for movies asynchronously.
|
|
19
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
20
|
-
* @returns {Promise<Genres>} A Promise that resolves with the genre information for movies.
|
|
21
|
-
*/
|
|
22
|
-
async movies(options) {
|
|
23
|
-
return await this.api.get("/genre/movie/list", options);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves genre information for TV shows asynchronously.
|
|
27
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
28
|
-
* @returns {Promise<Genres>} A Promise that resolves with the genre information for TV shows.
|
|
29
|
-
*/
|
|
30
|
-
async tv(options) {
|
|
31
|
-
return await this.api.get("/genre/tv/list", options);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.GenreEndpoint = GenreEndpoint;
|
package/dist/endpoints/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./account"), exports);
|
|
18
|
-
__exportStar(require("./certification"), exports);
|
|
19
|
-
__exportStar(require("./changes"), exports);
|
|
20
|
-
__exportStar(require("./collections"), exports);
|
|
21
|
-
__exportStar(require("./companies"), exports);
|
|
22
|
-
__exportStar(require("./configuration"), exports);
|
|
23
|
-
__exportStar(require("./credits"), exports);
|
|
24
|
-
__exportStar(require("./discover"), exports);
|
|
25
|
-
__exportStar(require("./find"), exports);
|
|
26
|
-
__exportStar(require("./genre"), exports);
|
|
27
|
-
__exportStar(require("./keywords"), exports);
|
|
28
|
-
__exportStar(require("./movies"), exports);
|
|
29
|
-
__exportStar(require("./networks"), exports);
|
|
30
|
-
__exportStar(require("./people"), exports);
|
|
31
|
-
__exportStar(require("./review"), exports);
|
|
32
|
-
__exportStar(require("./search"), exports);
|
|
33
|
-
__exportStar(require("./trending"), exports);
|
|
34
|
-
__exportStar(require("./tvEpisodes"), exports);
|
|
35
|
-
__exportStar(require("./tvSeasons"), exports);
|
|
36
|
-
__exportStar(require("./tvShows"), exports);
|
|
37
|
-
__exportStar(require("./watchProviders"), exports);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeywordsEndpoint = void 0;
|
|
4
|
-
const _types_1 = require("../@types");
|
|
5
|
-
const BASE_KEYWORD = "/keyword";
|
|
6
|
-
/**
|
|
7
|
-
* Represents an endpoint for accessing keyword details and related movies.
|
|
8
|
-
*/
|
|
9
|
-
class KeywordsEndpoint extends _types_1.BaseEndpoint {
|
|
10
|
-
/**
|
|
11
|
-
* Constructs a new KeywordsEndpoint instance.
|
|
12
|
-
* @param {string} access_token - The access token used for authentication.
|
|
13
|
-
*/
|
|
14
|
-
constructor(access_token) {
|
|
15
|
-
super(access_token);
|
|
16
|
-
this.access_token = access_token;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves details of a specific keyword asynchronously.
|
|
20
|
-
* @param {number} keywordId - The ID of the keyword.
|
|
21
|
-
* @returns {Promise<Keyword>} A Promise that resolves with the details of the keyword.
|
|
22
|
-
*/
|
|
23
|
-
async details(keywordId) {
|
|
24
|
-
return await this.api.get(`${BASE_KEYWORD}/${keywordId}`);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves movies belonging to a specific keyword asynchronously.
|
|
28
|
-
* @param {number} keywordId - The ID of the keyword.
|
|
29
|
-
* @param {KeywordsOptions} [options] - Optional parameters for refining the search.
|
|
30
|
-
* @returns {Promise<BelongingMovies>} A Promise that resolves with the movies belonging to the keyword.
|
|
31
|
-
*/
|
|
32
|
-
async belongingMovies(keywordId, options) {
|
|
33
|
-
return await this.api.get(`${BASE_KEYWORD}/${keywordId}/movies`, options);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.KeywordsEndpoint = KeywordsEndpoint;
|