@tdanks2000/tmdb-wrapper 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/@types/endpoints/configuration.d.ts +1 -0
- package/dist/@types/endpoints/configuration.d.ts.map +1 -1
- 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/@types/models/baseEndpoint.d.ts +1 -1
- package/dist/@types/models/baseEndpoint.js +1 -1
- package/dist/endpoints/account.d.ts +12 -1
- package/dist/endpoints/account.d.ts.map +1 -1
- package/dist/endpoints/account.js +12 -1
- package/dist/endpoints/certification.d.ts +16 -1
- package/dist/endpoints/certification.d.ts.map +1 -1
- package/dist/endpoints/certification.js +16 -1
- package/dist/endpoints/changes.d.ts +23 -1
- package/dist/endpoints/changes.d.ts.map +1 -1
- package/dist/endpoints/changes.js +26 -4
- package/dist/endpoints/collections.d.ts +26 -1
- package/dist/endpoints/collections.d.ts.map +1 -1
- package/dist/endpoints/collections.js +26 -1
- package/dist/endpoints/companies.d.ts +23 -1
- package/dist/endpoints/companies.d.ts.map +1 -1
- package/dist/endpoints/companies.js +23 -1
- package/dist/endpoints/configuration.d.ts +12 -1
- package/dist/endpoints/configuration.d.ts.map +1 -1
- package/dist/endpoints/configuration.js +12 -1
- package/dist/endpoints/credits.d.ts +13 -1
- package/dist/endpoints/credits.d.ts.map +1 -1
- package/dist/endpoints/credits.js +13 -1
- package/dist/endpoints/discover.d.ts +18 -55
- package/dist/endpoints/discover.d.ts.map +1 -1
- package/dist/endpoints/discover.js +18 -1
- package/dist/endpoints/find.d.ts +14 -1
- package/dist/endpoints/find.d.ts.map +1 -1
- package/dist/endpoints/find.js +14 -1
- package/dist/endpoints/genre.d.ts +18 -7
- package/dist/endpoints/genre.d.ts.map +1 -1
- package/dist/endpoints/genre.js +18 -1
- package/dist/endpoints/keywords.d.ts +19 -1
- package/dist/endpoints/keywords.d.ts.map +1 -1
- package/dist/endpoints/keywords.js +22 -4
- package/dist/endpoints/movies.d.ts +115 -9
- package/dist/endpoints/movies.d.ts.map +1 -1
- package/dist/endpoints/movies.js +115 -3
- package/dist/endpoints/networks.d.ts +23 -1
- package/dist/endpoints/networks.d.ts.map +1 -1
- package/dist/endpoints/networks.js +23 -1
- package/dist/endpoints/people.d.ts +69 -1
- package/dist/endpoints/people.d.ts.map +1 -1
- package/dist/endpoints/people.js +69 -1
- package/dist/endpoints/review.d.ts +13 -1
- package/dist/endpoints/review.d.ts.map +1 -1
- package/dist/endpoints/review.js +13 -1
- package/dist/endpoints/search.d.ts +43 -24
- package/dist/endpoints/search.d.ts.map +1 -1
- package/dist/endpoints/search.js +43 -1
- package/dist/endpoints/trending.d.ts +17 -2
- package/dist/endpoints/trending.d.ts.map +1 -1
- package/dist/endpoints/trending.js +16 -1
- package/dist/endpoints/tvEpisodes.d.ts +48 -11
- package/dist/endpoints/tvEpisodes.d.ts.map +1 -1
- package/dist/endpoints/tvEpisodes.js +50 -1
- package/dist/endpoints/tvSeasons.d.ts +56 -11
- package/dist/endpoints/tvSeasons.d.ts.map +1 -1
- package/dist/endpoints/tvSeasons.js +58 -1
- package/dist/endpoints/tvShows.d.ts +135 -4
- package/dist/endpoints/tvShows.d.ts.map +1 -1
- package/dist/endpoints/tvShows.js +134 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -3
- package/src/@types/endpoints/configuration.ts +1 -0
- 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 +17 -2
- package/src/endpoints/tvEpisodes.ts +50 -13
- package/src/endpoints/tvSeasons.ts +58 -13
- package/src/endpoints/tvShows.ts +138 -3
|
@@ -1,9 +1,31 @@
|
|
|
1
|
-
import { AlternativeNames, BaseEndpoint, CompanyDetails, CompanyImages } from '
|
|
1
|
+
import { AlternativeNames, BaseEndpoint, CompanyDetails, CompanyImages } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing company details and related information.
|
|
4
|
+
*/
|
|
2
5
|
export declare class CompaniesEndpoint extends BaseEndpoint {
|
|
3
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new CompaniesEndpoint 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 company asynchronously.
|
|
14
|
+
* @param {number} id - The ID of the company.
|
|
15
|
+
* @returns {Promise<CompanyDetails>} A Promise that resolves with the detailed information of the company.
|
|
16
|
+
*/
|
|
5
17
|
details(id: number): Promise<CompanyDetails>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves alternative names of a specific company asynchronously.
|
|
20
|
+
* @param {number} id - The ID of the company.
|
|
21
|
+
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the company.
|
|
22
|
+
*/
|
|
6
23
|
alternativeNames(id: number): Promise<AlternativeNames>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves images associated with a specific company asynchronously.
|
|
26
|
+
* @param {number} id - The ID of the company.
|
|
27
|
+
* @returns {Promise<CompanyImages>} A Promise that resolves with the images of the company.
|
|
28
|
+
*/
|
|
7
29
|
images(id: number): Promise<CompanyImages>;
|
|
8
30
|
}
|
|
9
31
|
//# sourceMappingURL=companies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../src/endpoints/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzF,qBAAa,iBAAkB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../src/endpoints/companies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzF;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAKrC,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"}
|
|
@@ -10,22 +10,44 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompaniesEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for accessing company details and related information.
|
|
16
|
+
*/
|
|
14
17
|
class CompaniesEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new CompaniesEndpoint 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 company asynchronously.
|
|
28
|
+
* @param {number} id - The ID of the company.
|
|
29
|
+
* @returns {Promise<CompanyDetails>} A Promise that resolves with the detailed information of the company.
|
|
30
|
+
*/
|
|
19
31
|
details(id) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
33
|
return yield this.api.get(`/company/${id}`);
|
|
22
34
|
});
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves alternative names of a specific company asynchronously.
|
|
38
|
+
* @param {number} id - The ID of the company.
|
|
39
|
+
* @returns {Promise<AlternativeNames>} A Promise that resolves with the alternative names of the company.
|
|
40
|
+
*/
|
|
24
41
|
alternativeNames(id) {
|
|
25
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
43
|
return yield this.api.get(`/company/${id}/alternative_names`);
|
|
27
44
|
});
|
|
28
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves images associated with a specific company asynchronously.
|
|
48
|
+
* @param {number} id - The ID of the company.
|
|
49
|
+
* @returns {Promise<CompanyImages>} A Promise that resolves with the images of the company.
|
|
50
|
+
*/
|
|
29
51
|
images(id) {
|
|
30
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
53
|
return yield this.api.get(`/company/${id}/images`);
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { BaseEndpoint, Configuration } from '
|
|
1
|
+
import { BaseEndpoint, Configuration } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for retrieving current system configuration.
|
|
4
|
+
*/
|
|
2
5
|
export declare class ConfigurationEndpoint extends BaseEndpoint {
|
|
3
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new ConfigurationEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
4
11
|
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves the current system configuration asynchronously.
|
|
14
|
+
* @returns {Promise<Configuration>} A Promise that resolves with the current system configuration.
|
|
15
|
+
*/
|
|
5
16
|
getCurrent(): Promise<Configuration>;
|
|
6
17
|
}
|
|
7
18
|
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/endpoints/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD,qBAAa,qBAAsB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/endpoints/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IAKzC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,aAAa,CAAC;CAG3C"}
|
|
@@ -10,12 +10,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ConfigurationEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for retrieving current system configuration.
|
|
16
|
+
*/
|
|
14
17
|
class ConfigurationEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new ConfigurationEndpoint 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 the current system configuration asynchronously.
|
|
28
|
+
* @returns {Promise<Configuration>} A Promise that resolves with the current system configuration.
|
|
29
|
+
*/
|
|
19
30
|
getCurrent() {
|
|
20
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
32
|
return yield this.api.get(`/configuration`);
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { BaseEndpoint, CreditResponse } from '
|
|
1
|
+
import { BaseEndpoint, CreditResponse } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for retrieving credit details.
|
|
4
|
+
*/
|
|
2
5
|
export declare class CreditsEndpoint extends BaseEndpoint {
|
|
3
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new CreditsEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
4
11
|
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves credit details by ID asynchronously.
|
|
14
|
+
* @param {string} id - The ID of the credit.
|
|
15
|
+
* @returns {Promise<CreditResponse>} A Promise that resolves with the credit details.
|
|
16
|
+
*/
|
|
5
17
|
getById(id: string): Promise<CreditResponse>;
|
|
6
18
|
}
|
|
7
19
|
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/endpoints/credits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAExD,qBAAa,eAAgB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/endpoints/credits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAExD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAKnC,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;CAGnD"}
|
|
@@ -10,12 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CreditsEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for retrieving credit details.
|
|
16
|
+
*/
|
|
14
17
|
class CreditsEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new CreditsEndpoint 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 credit details by ID asynchronously.
|
|
28
|
+
* @param {string} id - The ID of the credit.
|
|
29
|
+
* @returns {Promise<CreditResponse>} A Promise that resolves with the credit details.
|
|
30
|
+
*/
|
|
19
31
|
getById(id) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
33
|
return yield this.api.get(`/credit/${id}`);
|
|
@@ -1,61 +1,24 @@
|
|
|
1
|
-
import { BaseEndpoint, MovieDiscoverResult,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
page?: number;
|
|
6
|
-
'vote_average.gte'?: number;
|
|
7
|
-
'vote_count.gte'?: number;
|
|
8
|
-
'vote_count.lte'?: number;
|
|
9
|
-
'vote_average.lte'?: number;
|
|
10
|
-
with_watch_providers?: string;
|
|
11
|
-
watch_region?: string;
|
|
12
|
-
without_companies?: string;
|
|
13
|
-
with_watch_monetization_types?: 'flatrate' | 'free' | 'ads' | 'rent' | 'buy';
|
|
14
|
-
'with_runtime.gte'?: number;
|
|
15
|
-
'with_runtime.lte'?: number;
|
|
16
|
-
with_genres?: string;
|
|
17
|
-
without_genres?: string;
|
|
18
|
-
with_original_language?: string;
|
|
19
|
-
without_keywords?: string;
|
|
20
|
-
with_keywords?: string;
|
|
21
|
-
with_companies?: string;
|
|
22
|
-
}
|
|
23
|
-
interface MovieQueryOptions extends DiscoverQueryOptions {
|
|
24
|
-
region?: string;
|
|
25
|
-
certification_country?: string;
|
|
26
|
-
certification?: string;
|
|
27
|
-
'certification.lte'?: string;
|
|
28
|
-
'certification.gte'?: string;
|
|
29
|
-
include_adult?: boolean;
|
|
30
|
-
include_video?: boolean;
|
|
31
|
-
primary_release_year?: number;
|
|
32
|
-
'primary_release_date.gte'?: string;
|
|
33
|
-
'primary_release_date.lte'?: string;
|
|
34
|
-
'release_date.gte'?: string;
|
|
35
|
-
'release_date.lte'?: string;
|
|
36
|
-
with_release_type?: string;
|
|
37
|
-
year?: number;
|
|
38
|
-
with_cast?: string;
|
|
39
|
-
with_crew?: string;
|
|
40
|
-
with_people?: string;
|
|
41
|
-
}
|
|
42
|
-
interface TvShowQueryOptions extends DiscoverQueryOptions {
|
|
43
|
-
'air_date.gte'?: string;
|
|
44
|
-
'air_date.lte'?: string;
|
|
45
|
-
'first_air_date.gte'?: string;
|
|
46
|
-
'first_air_date.lte'?: string;
|
|
47
|
-
first_air_date_year?: number;
|
|
48
|
-
timezone?: string;
|
|
49
|
-
with_networks?: string;
|
|
50
|
-
include_null_first_air_dates?: boolean;
|
|
51
|
-
screened_theatrically?: boolean;
|
|
52
|
-
with_status?: string;
|
|
53
|
-
with_type?: string;
|
|
54
|
-
}
|
|
1
|
+
import { BaseEndpoint, MovieDiscoverResult, MovieQueryOptions, TvShowDiscoverResult, TvShowQueryOptions } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for discovering movies and TV shows based on various criteria.
|
|
4
|
+
*/
|
|
55
5
|
export declare class DiscoverEndpoint extends BaseEndpoint {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new DiscoverEndpoint instance.
|
|
8
|
+
* @param {string} access_token - The access token used for authentication.
|
|
9
|
+
*/
|
|
56
10
|
constructor(access_token: string);
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves a list of movies based on the provided query options asynchronously.
|
|
13
|
+
* @param {MovieQueryOptions} [options] - Optional parameters for refining the movie discovery.
|
|
14
|
+
* @returns {Promise<MovieDiscoverResult>} A Promise that resolves with the movie discovery results.
|
|
15
|
+
*/
|
|
57
16
|
movie(options?: MovieQueryOptions): Promise<MovieDiscoverResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a list of TV shows based on the provided query options asynchronously.
|
|
19
|
+
* @param {TvShowQueryOptions} [options] - Optional parameters for refining the TV show discovery.
|
|
20
|
+
* @returns {Promise<TvShowDiscoverResult>} A Promise that resolves with the TV show discovery results.
|
|
21
|
+
*/
|
|
58
22
|
tvShow(options?: TvShowQueryOptions): Promise<TvShowDiscoverResult>;
|
|
59
23
|
}
|
|
60
|
-
export {};
|
|
61
24
|
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/endpoints/discover.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/endpoints/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAIlB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;OAIG;IACG,KAAK,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAItE;;;;OAIG;IACG,MAAM,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAG1E"}
|
|
@@ -10,17 +10,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DiscoverEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_DISCOVER = '/discover';
|
|
15
|
+
/**
|
|
16
|
+
* Represents an endpoint for discovering movies and TV shows based on various criteria.
|
|
17
|
+
*/
|
|
15
18
|
class DiscoverEndpoint extends _types_1.BaseEndpoint {
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new DiscoverEndpoint 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 a list of movies based on the provided query options asynchronously.
|
|
28
|
+
* @param {MovieQueryOptions} [options] - Optional parameters for refining the movie discovery.
|
|
29
|
+
* @returns {Promise<MovieDiscoverResult>} A Promise that resolves with the movie discovery results.
|
|
30
|
+
*/
|
|
19
31
|
movie(options) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
33
|
return yield this.api.get(`${BASE_DISCOVER}/movie`, options);
|
|
22
34
|
});
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a list of TV shows based on the provided query options asynchronously.
|
|
38
|
+
* @param {TvShowQueryOptions} [options] - Optional parameters for refining the TV show discovery.
|
|
39
|
+
* @returns {Promise<TvShowDiscoverResult>} A Promise that resolves with the TV show discovery results.
|
|
40
|
+
*/
|
|
24
41
|
tvShow(options) {
|
|
25
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
43
|
return yield this.api.get(`${BASE_DISCOVER}/tv`, options);
|
package/dist/endpoints/find.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { BaseEndpoint, ExternalIdOptions, FindResult } from '
|
|
1
|
+
import { BaseEndpoint, ExternalIdOptions, FindResult } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for finding media by external ID.
|
|
4
|
+
*/
|
|
2
5
|
export declare class FindEndpoint extends BaseEndpoint {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new FindEndpoint instance.
|
|
8
|
+
* @param {string} access_token - The access token used for authentication.
|
|
9
|
+
*/
|
|
3
10
|
constructor(access_token: string);
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves media by external ID asynchronously.
|
|
13
|
+
* @param {string} externalId - The external ID of the media.
|
|
14
|
+
* @param {ExternalIdOptions} options - Options for finding media by external ID.
|
|
15
|
+
* @returns {Promise<FindResult>} A Promise that resolves with the result of the find operation.
|
|
16
|
+
*/
|
|
4
17
|
byId(externalId: string, options: ExternalIdOptions): Promise<FindResult>;
|
|
5
18
|
}
|
|
6
19
|
//# sourceMappingURL=find.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/endpoints/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvE,qBAAa,YAAa,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/endpoints/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvE;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC5C;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;OAKG;IACG,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC;CAGhF"}
|
package/dist/endpoints/find.js
CHANGED
|
@@ -10,11 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.FindEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for finding media by external ID.
|
|
16
|
+
*/
|
|
14
17
|
class FindEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new FindEndpoint 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 media by external ID asynchronously.
|
|
27
|
+
* @param {string} externalId - The external ID of the media.
|
|
28
|
+
* @param {ExternalIdOptions} options - Options for finding media by external ID.
|
|
29
|
+
* @returns {Promise<FindResult>} A Promise that resolves with the result of the find operation.
|
|
30
|
+
*/
|
|
18
31
|
byId(externalId, options) {
|
|
19
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
33
|
return yield this.api.get(`/find/${externalId}`, options);
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
import { BaseEndpoint, LanguageOption } from '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
1
|
+
import { BaseEndpoint, Genres, LanguageOption } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for retrieving genre information for movies and TV shows.
|
|
4
|
+
*/
|
|
8
5
|
export declare class GenreEndpoint extends BaseEndpoint {
|
|
9
6
|
protected readonly access_token: string;
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a new GenreEndpoint instance.
|
|
9
|
+
* @param {string} access_token - The access token used for authentication.
|
|
10
|
+
*/
|
|
10
11
|
constructor(access_token: string);
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves genre information for movies asynchronously.
|
|
14
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
15
|
+
* @returns {Promise<Genres>} A Promise that resolves with the genre information for movies.
|
|
16
|
+
*/
|
|
11
17
|
movies(options?: LanguageOption): Promise<Genres>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves genre information for TV shows asynchronously.
|
|
20
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
21
|
+
* @returns {Promise<Genres>} A Promise that resolves with the genre information for TV shows.
|
|
22
|
+
*/
|
|
12
23
|
tv(options?: LanguageOption): Promise<Genres>;
|
|
13
24
|
}
|
|
14
25
|
//# sourceMappingURL=genre.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genre.d.ts","sourceRoot":"","sources":["../../src/endpoints/genre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"genre.d.ts","sourceRoot":"","sources":["../../src/endpoints/genre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAKjC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM;IAJnD;;;OAGG;gBAC4B,YAAY,EAAE,MAAM;IAInD;;;;OAIG;IACG,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAIvD;;;;OAIG;IACG,EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAGpD"}
|
package/dist/endpoints/genre.js
CHANGED
|
@@ -10,17 +10,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GenreEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
/**
|
|
15
|
+
* Represents an endpoint for retrieving genre information for movies and TV shows.
|
|
16
|
+
*/
|
|
14
17
|
class GenreEndpoint extends _types_1.BaseEndpoint {
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a new GenreEndpoint 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 genre information for movies asynchronously.
|
|
28
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
29
|
+
* @returns {Promise<Genres>} A Promise that resolves with the genre information for movies.
|
|
30
|
+
*/
|
|
19
31
|
movies(options) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
33
|
return yield this.api.get('/genre/movie/list', options);
|
|
22
34
|
});
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves genre information for TV shows asynchronously.
|
|
38
|
+
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
39
|
+
* @returns {Promise<Genres>} A Promise that resolves with the genre information for TV shows.
|
|
40
|
+
*/
|
|
24
41
|
tv(options) {
|
|
25
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
43
|
return yield this.api.get('/genre/tv/list', options);
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { BaseEndpoint, BelongingMovies, Keyword, KeywordsOptions } from '
|
|
1
|
+
import { BaseEndpoint, BelongingMovies, Keyword, KeywordsOptions } from '../@types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an endpoint for accessing keyword details and related movies.
|
|
4
|
+
*/
|
|
2
5
|
export declare class KeywordsEndpoint extends BaseEndpoint {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a new KeywordsEndpoint 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 keyword asynchronously.
|
|
13
|
+
* @param {number} keywordId - The ID of the keyword.
|
|
14
|
+
* @returns {Promise<Keyword>} A Promise that resolves with the details of the keyword.
|
|
15
|
+
*/
|
|
4
16
|
details(keywordId: number): Promise<Keyword>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves movies belonging to a specific keyword asynchronously.
|
|
19
|
+
* @param {number} keywordId - The ID of the keyword.
|
|
20
|
+
* @param {KeywordsOptions} [options] - Optional parameters for refining the search.
|
|
21
|
+
* @returns {Promise<BelongingMovies>} A Promise that resolves with the movies belonging to the keyword.
|
|
22
|
+
*/
|
|
5
23
|
belongingMovies(keywordId: number, options?: KeywordsOptions): Promise<BelongingMovies>;
|
|
6
24
|
}
|
|
7
25
|
//# sourceMappingURL=keywords.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAInF,qBAAa,gBAAiB,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"keywords.d.ts","sourceRoot":"","sources":["../../src/endpoints/keywords.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAInF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;OAIG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIlD;;;;;OAKG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;CAG9F"}
|
|
@@ -10,20 +10,38 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.KeywordsEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
14
|
-
const
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
|
+
const BASE_KEYWORD = '/keyword';
|
|
15
|
+
/**
|
|
16
|
+
* Represents an endpoint for accessing keyword details and related movies.
|
|
17
|
+
*/
|
|
15
18
|
class KeywordsEndpoint extends _types_1.BaseEndpoint {
|
|
19
|
+
/**
|
|
20
|
+
* Constructs a new KeywordsEndpoint 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 keyword asynchronously.
|
|
28
|
+
* @param {number} keywordId - The ID of the keyword.
|
|
29
|
+
* @returns {Promise<Keyword>} A Promise that resolves with the details of the keyword.
|
|
30
|
+
*/
|
|
19
31
|
details(keywordId) {
|
|
20
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
return yield this.api.get(`${
|
|
33
|
+
return yield this.api.get(`${BASE_KEYWORD}/${keywordId}`);
|
|
22
34
|
});
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves movies belonging to a specific keyword asynchronously.
|
|
38
|
+
* @param {number} keywordId - The ID of the keyword.
|
|
39
|
+
* @param {KeywordsOptions} [options] - Optional parameters for refining the search.
|
|
40
|
+
* @returns {Promise<BelongingMovies>} A Promise that resolves with the movies belonging to the keyword.
|
|
41
|
+
*/
|
|
24
42
|
belongingMovies(keywordId, options) {
|
|
25
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
return yield this.api.get(`${
|
|
44
|
+
return yield this.api.get(`${BASE_KEYWORD}/${keywordId}/movies`, options);
|
|
27
45
|
});
|
|
28
46
|
}
|
|
29
47
|
}
|