@lorenzopant/tmdb 1.17.0 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5087 -4
- package/dist/index.js +3721 -5
- package/package.json +12 -5
- package/dist/client.d.ts +0 -17
- package/dist/client.js +0 -114
- package/dist/endpoints/base.d.ts +0 -22
- package/dist/endpoints/base.js +0 -32
- package/dist/endpoints/certifications.d.ts +0 -20
- package/dist/endpoints/certifications.js +0 -24
- package/dist/endpoints/changes.d.ts +0 -40
- package/dist/endpoints/changes.js +0 -46
- package/dist/endpoints/collections.d.ts +0 -39
- package/dist/endpoints/collections.js +0 -52
- package/dist/endpoints/companies.d.ts +0 -37
- package/dist/endpoints/companies.js +0 -49
- package/dist/endpoints/configuration.d.ts +0 -72
- package/dist/endpoints/configuration.js +0 -83
- package/dist/endpoints/credits.d.ts +0 -16
- package/dist/endpoints/credits.js +0 -22
- package/dist/endpoints/discover.d.ts +0 -36
- package/dist/endpoints/discover.js +0 -61
- package/dist/endpoints/find.d.ts +0 -16
- package/dist/endpoints/find.js +0 -21
- package/dist/endpoints/genres.d.ts +0 -25
- package/dist/endpoints/genres.js +0 -28
- package/dist/endpoints/keywords.d.ts +0 -29
- package/dist/endpoints/keywords.js +0 -38
- package/dist/endpoints/movie_lists.d.ts +0 -53
- package/dist/endpoints/movie_lists.js +0 -65
- package/dist/endpoints/movies.d.ts +0 -202
- package/dist/endpoints/movies.js +0 -255
- package/dist/endpoints/networks.d.ts +0 -36
- package/dist/endpoints/networks.js +0 -46
- package/dist/endpoints/people.d.ts +0 -91
- package/dist/endpoints/people.js +0 -128
- package/dist/endpoints/people_lists.d.ts +0 -16
- package/dist/endpoints/people_lists.js +0 -16
- package/dist/endpoints/reviews.d.ts +0 -14
- package/dist/endpoints/reviews.js +0 -16
- package/dist/endpoints/search.d.ts +0 -88
- package/dist/endpoints/search.js +0 -102
- package/dist/endpoints/trending.d.ts +0 -36
- package/dist/endpoints/trending.js +0 -48
- package/dist/endpoints/tv_episode_groups.d.ts +0 -13
- package/dist/endpoints/tv_episode_groups.js +0 -16
- package/dist/endpoints/tv_episodes.d.ts +0 -110
- package/dist/endpoints/tv_episodes.js +0 -136
- package/dist/endpoints/tv_seasons.d.ts +0 -128
- package/dist/endpoints/tv_seasons.js +0 -164
- package/dist/endpoints/tv_series.d.ts +0 -244
- package/dist/endpoints/tv_series.js +0 -311
- package/dist/endpoints/tv_series_lists.d.ts +0 -51
- package/dist/endpoints/tv_series_lists.js +0 -63
- package/dist/endpoints/watch_providers.d.ts +0 -34
- package/dist/endpoints/watch_providers.js +0 -46
- package/dist/errors/messages.d.ts +0 -15
- package/dist/errors/messages.js +0 -47
- package/dist/errors/tmdb.d.ts +0 -45
- package/dist/errors/tmdb.js +0 -39
- package/dist/images/images.d.ts +0 -12
- package/dist/images/images.js +0 -26
- package/dist/routes.d.ts +0 -157
- package/dist/routes.js +0 -157
- package/dist/tmdb.d.ts +0 -61
- package/dist/tmdb.js +0 -94
- package/dist/types/collections.d.ts +0 -72
- package/dist/types/collections.js +0 -1
- package/dist/types/common/certifications.d.ts +0 -19
- package/dist/types/common/certifications.js +0 -1
- package/dist/types/common/changes.d.ts +0 -44
- package/dist/types/common/changes.js +0 -1
- package/dist/types/common/images.d.ts +0 -64
- package/dist/types/common/images.js +0 -1
- package/dist/types/common/index.d.ts +0 -6
- package/dist/types/common/index.js +0 -6
- package/dist/types/common/media.d.ts +0 -305
- package/dist/types/common/media.js +0 -1
- package/dist/types/common/pagination.d.ts +0 -6
- package/dist/types/common/pagination.js +0 -1
- package/dist/types/common/params.d.ts +0 -27
- package/dist/types/common/params.js +0 -1
- package/dist/types/companies.d.ts +0 -53
- package/dist/types/companies.js +0 -1
- package/dist/types/config/configuration.d.ts +0 -56
- package/dist/types/config/configuration.js +0 -1
- package/dist/types/config/countries.d.ts +0 -3
- package/dist/types/config/countries.js +0 -1257
- package/dist/types/config/images.d.ts +0 -49
- package/dist/types/config/images.js +0 -13
- package/dist/types/config/index.d.ts +0 -6
- package/dist/types/config/index.js +0 -6
- package/dist/types/config/languages.d.ts +0 -11
- package/dist/types/config/languages.js +0 -1
- package/dist/types/config/options.d.ts +0 -36
- package/dist/types/config/options.js +0 -1
- package/dist/types/config/timezones.d.ts +0 -751
- package/dist/types/config/timezones.js +0 -1149
- package/dist/types/credits.d.ts +0 -148
- package/dist/types/credits.js +0 -1
- package/dist/types/discover.d.ts +0 -130
- package/dist/types/discover.js +0 -27
- package/dist/types/enums.d.ts +0 -8
- package/dist/types/enums.js +0 -9
- package/dist/types/find.d.ts +0 -103
- package/dist/types/find.js +0 -1
- package/dist/types/index.d.ts +0 -21
- package/dist/types/index.js +0 -21
- package/dist/types/keywords.d.ts +0 -19
- package/dist/types/keywords.js +0 -1
- package/dist/types/movies.d.ts +0 -304
- package/dist/types/movies.js +0 -1
- package/dist/types/networks.d.ts +0 -45
- package/dist/types/networks.js +0 -1
- package/dist/types/people-lists.d.ts +0 -5
- package/dist/types/people-lists.js +0 -1
- package/dist/types/people.d.ts +0 -214
- package/dist/types/people.js +0 -1
- package/dist/types/reviews.d.ts +0 -22
- package/dist/types/reviews.js +0 -1
- package/dist/types/search.d.ts +0 -198
- package/dist/types/search.js +0 -1
- package/dist/types/trending.d.ts +0 -55
- package/dist/types/trending.js +0 -1
- package/dist/types/tv-episode-groups.d.ts +0 -63
- package/dist/types/tv-episode-groups.js +0 -13
- package/dist/types/tv-episodes.d.ts +0 -98
- package/dist/types/tv-episodes.js +0 -1
- package/dist/types/tv-seasons.d.ts +0 -133
- package/dist/types/tv-seasons.js +0 -1
- package/dist/types/tv-series.d.ts +0 -445
- package/dist/types/tv-series.js +0 -1
- package/dist/types/utility.d.ts +0 -16
- package/dist/types/utility.js +0 -10
- package/dist/types/watch-providers.d.ts +0 -34
- package/dist/types/watch-providers.js +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -2
- package/dist/utils/jwt.d.ts +0 -1
- package/dist/utils/jwt.js +0 -61
- package/dist/utils/logger.d.ts +0 -18
- package/dist/utils/logger.js +0 -40
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { WatchProviderListParams, WatchProviderListResponse, WatchProviderRegionsParams, WatchProviderRegionsResponse } from "../types";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export declare class WatchProvidersAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Movie Providers
|
|
6
|
-
* GET - https://api.themoviedb.org/3/watch/providers/movie
|
|
7
|
-
*
|
|
8
|
-
* Get the list of movie watch providers supported by TMDB.
|
|
9
|
-
*
|
|
10
|
-
* @param language Language used for localized provider names
|
|
11
|
-
* @reference https://developer.themoviedb.org/reference/watch-provider-movie-list
|
|
12
|
-
*/
|
|
13
|
-
movie_providers(params?: WatchProviderListParams): Promise<WatchProviderListResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* TV Providers
|
|
16
|
-
* GET - https://api.themoviedb.org/3/watch/providers/tv
|
|
17
|
-
*
|
|
18
|
-
* Get the list of TV watch providers supported by TMDB.
|
|
19
|
-
*
|
|
20
|
-
* @param language Language used for localized provider names
|
|
21
|
-
* @reference https://developer.themoviedb.org/reference/watch-provider-tv-list
|
|
22
|
-
*/
|
|
23
|
-
tv_providers(params?: WatchProviderListParams): Promise<WatchProviderListResponse>;
|
|
24
|
-
/**
|
|
25
|
-
* Available Regions
|
|
26
|
-
* GET - https://api.themoviedb.org/3/watch/providers/regions
|
|
27
|
-
*
|
|
28
|
-
* Get the list of regions with watch provider support.
|
|
29
|
-
*
|
|
30
|
-
* @param language Language used for localized region names
|
|
31
|
-
* @reference https://developer.themoviedb.org/reference/watch-providers-available-regions
|
|
32
|
-
*/
|
|
33
|
-
available_regions(params?: WatchProviderRegionsParams): Promise<WatchProviderRegionsResponse>;
|
|
34
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ENDPOINTS } from "../routes";
|
|
2
|
-
import { TMDBAPIBase } from "./base";
|
|
3
|
-
export class WatchProvidersAPI extends TMDBAPIBase {
|
|
4
|
-
/**
|
|
5
|
-
* Movie Providers
|
|
6
|
-
* GET - https://api.themoviedb.org/3/watch/providers/movie
|
|
7
|
-
*
|
|
8
|
-
* Get the list of movie watch providers supported by TMDB.
|
|
9
|
-
*
|
|
10
|
-
* @param language Language used for localized provider names
|
|
11
|
-
* @reference https://developer.themoviedb.org/reference/watch-provider-movie-list
|
|
12
|
-
*/
|
|
13
|
-
async movie_providers(params) {
|
|
14
|
-
const language = params?.language ?? this.defaultOptions.language;
|
|
15
|
-
const requestParams = language === undefined ? params : { ...params, language };
|
|
16
|
-
return this.client.request(ENDPOINTS.WATCH_PROVIDERS.MOVIE, requestParams);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* TV Providers
|
|
20
|
-
* GET - https://api.themoviedb.org/3/watch/providers/tv
|
|
21
|
-
*
|
|
22
|
-
* Get the list of TV watch providers supported by TMDB.
|
|
23
|
-
*
|
|
24
|
-
* @param language Language used for localized provider names
|
|
25
|
-
* @reference https://developer.themoviedb.org/reference/watch-provider-tv-list
|
|
26
|
-
*/
|
|
27
|
-
async tv_providers(params) {
|
|
28
|
-
const language = params?.language ?? this.defaultOptions.language;
|
|
29
|
-
const requestParams = language === undefined ? params : { ...params, language };
|
|
30
|
-
return this.client.request(ENDPOINTS.WATCH_PROVIDERS.TV, requestParams);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Available Regions
|
|
34
|
-
* GET - https://api.themoviedb.org/3/watch/providers/regions
|
|
35
|
-
*
|
|
36
|
-
* Get the list of regions with watch provider support.
|
|
37
|
-
*
|
|
38
|
-
* @param language Language used for localized region names
|
|
39
|
-
* @reference https://developer.themoviedb.org/reference/watch-providers-available-regions
|
|
40
|
-
*/
|
|
41
|
-
async available_regions(params) {
|
|
42
|
-
const language = params?.language ?? this.defaultOptions.language;
|
|
43
|
-
const requestParams = language === undefined ? params : { ...params, language };
|
|
44
|
-
return this.client.request(ENDPOINTS.WATCH_PROVIDERS.REGIONS, requestParams);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A collection of error messages used throughout the application.
|
|
3
|
-
* For library-specific errors (-1 status code) only.
|
|
4
|
-
*/
|
|
5
|
-
export declare const Errors: {
|
|
6
|
-
NO_ACCESS_TOKEN: string;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* TMDB Error Codes and messages.
|
|
10
|
-
* @reference https://developer.themoviedb.org/docs/errors
|
|
11
|
-
*/
|
|
12
|
-
export declare const TMDB_ERRORS: Map<number, {
|
|
13
|
-
message: string;
|
|
14
|
-
http_status: number;
|
|
15
|
-
}>;
|
package/dist/errors/messages.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A collection of error messages used throughout the application.
|
|
3
|
-
* For library-specific errors (-1 status code) only.
|
|
4
|
-
*/
|
|
5
|
-
export const Errors = {
|
|
6
|
-
NO_ACCESS_TOKEN: "TMDB requires a valid access token, please provide one.",
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* TMDB Error Codes and messages.
|
|
10
|
-
* @reference https://developer.themoviedb.org/docs/errors
|
|
11
|
-
*/
|
|
12
|
-
export const TMDB_ERRORS = new Map([
|
|
13
|
-
[1, { message: "Success", http_status: 200 }],
|
|
14
|
-
[2, { message: "Invalid service: this service does not exist.", http_status: 501 }],
|
|
15
|
-
[3, { message: "Authentication failed: You do not have permissions to access the service.", http_status: 401 }],
|
|
16
|
-
[4, { message: "Invalid format: This service doesn't exist in that format.", http_status: 405 }],
|
|
17
|
-
[5, { message: "Invalid parameters: Your request parameters are incorrect.", http_status: 422 }],
|
|
18
|
-
[6, { message: "Invalid id: The pre-requisite id is invalid or not found.", http_status: 404 }],
|
|
19
|
-
[7, { message: "Invalid API key: You must be granted a valid key.", http_status: 401 }],
|
|
20
|
-
[8, { message: "Duplicate entry: The data you tried to submit already exists.", http_status: 403 }],
|
|
21
|
-
[9, { message: "Service offline: This service is temporarily offline, try again later.", http_status: 503 }],
|
|
22
|
-
[10, { message: "Suspended API key: Access to your account has been suspended, contact TMDB.", http_status: 401 }],
|
|
23
|
-
[11, { message: "Internal error: Something went wrong, contact TMDB.", http_status: 500 }],
|
|
24
|
-
[12, { message: "The item/record was updated successfully.", http_status: 201 }],
|
|
25
|
-
[13, { message: "The item/record was deleted successfully.", http_status: 200 }],
|
|
26
|
-
[14, { message: "Authentication failed.", http_status: 401 }],
|
|
27
|
-
[15, { message: "Failed", http_status: 500 }],
|
|
28
|
-
[16, { message: "Device denied.", http_status: 401 }],
|
|
29
|
-
[17, { message: "Session denied.", http_status: 401 }],
|
|
30
|
-
[18, { message: "Validation failed.", http_status: 400 }],
|
|
31
|
-
[19, { message: "Invalid accept header.", http_status: 406 }],
|
|
32
|
-
[20, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
33
|
-
[21, { message: "Entry not found: The item you are trying to edit cannot be found.", http_status: 200 }],
|
|
34
|
-
[22, { message: "Invalid page: Pages start at 1 and max at 500. They are expected to be an integer.", http_status: 400 }],
|
|
35
|
-
[23, { message: "Invalid date: Format needs to be YYYY-MM-DD.", http_status: 400 }],
|
|
36
|
-
[24, { message: "Your request to the backend server timed out. Try again.", http_status: 504 }],
|
|
37
|
-
[25, { message: "Your request count (#) is over the allowed limit of (40).", http_status: 429 }],
|
|
38
|
-
[26, { message: "You must provide a username and password.", http_status: 400 }],
|
|
39
|
-
[27, { message: "Too many append to response objects: The maximum number of remote calls is 20.", http_status: 400 }],
|
|
40
|
-
[28, { message: "Invalid timezone: Please consult the documentation for a valid timezone.", http_status: 400 }],
|
|
41
|
-
[29, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
42
|
-
[30, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
43
|
-
[31, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
44
|
-
[32, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
45
|
-
[33, { message: "Invalid date range: Should be a range no longer than 14 days.", http_status: 422 }],
|
|
46
|
-
[34, { message: "The resource you requested could not be found.", http_status: 404 }],
|
|
47
|
-
]);
|
package/dist/errors/tmdb.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents the structure of an error response returned by the TMDB API.
|
|
3
|
-
*
|
|
4
|
-
* @property success - Indicates whether the API request was successful. This will typically be `false` for error responses.
|
|
5
|
-
* @property status_code - The numeric code representing the type of error encountered.
|
|
6
|
-
* @property status_message - A descriptive message providing details about the error.
|
|
7
|
-
*/
|
|
8
|
-
export type TMDBAPIErrorResponse = {
|
|
9
|
-
success: boolean;
|
|
10
|
-
status_code: number;
|
|
11
|
-
status_message: string;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Represents a generic error or an error specific to the TMDB (The Movie Database) API.
|
|
15
|
-
* This error class extends the built-in `Error` class and includes additional
|
|
16
|
-
* properties to provide more context about the error.
|
|
17
|
-
*/
|
|
18
|
-
export declare class TMDBError extends Error {
|
|
19
|
-
/**
|
|
20
|
-
* The status code returned by the TMDB API.
|
|
21
|
-
* If the value is `-1`, it indicates a library-specific error rather than a TMDB API error.
|
|
22
|
-
* @reference https://developer.themoviedb.org/docs/errors - code
|
|
23
|
-
*/
|
|
24
|
-
tmdb_status_code: number;
|
|
25
|
-
/**
|
|
26
|
-
* A descriptive message providing details about the error.
|
|
27
|
-
* If the error is specific to the TMDB API, this message will be derived from the API response
|
|
28
|
-
* @reference https://developer.themoviedb.org/docs/errors - message
|
|
29
|
-
*/
|
|
30
|
-
message: string;
|
|
31
|
-
/**
|
|
32
|
-
* The HTTP status code associated with the error.
|
|
33
|
-
* If the error is specific to the TMDB API, this code will be derived from the API response.
|
|
34
|
-
* @reference https://developer.themoviedb.org/docs/errors - HTTP Status
|
|
35
|
-
*/
|
|
36
|
-
http_status_code: number;
|
|
37
|
-
/**
|
|
38
|
-
* Creates an instance of `TMDBError`.
|
|
39
|
-
*
|
|
40
|
-
* @param message - A descriptive message providing details about the error.
|
|
41
|
-
* @param http_status - The HTTP status code associated with the error.
|
|
42
|
-
* @param tmdb_status_code - (Optional) The status code returned by the TMDB API. Defaults to `-1` for library-specific errors.
|
|
43
|
-
*/
|
|
44
|
-
constructor(message: string, http_status: number, tmdb_status_code?: number);
|
|
45
|
-
}
|
package/dist/errors/tmdb.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a generic error or an error specific to the TMDB (The Movie Database) API.
|
|
3
|
-
* This error class extends the built-in `Error` class and includes additional
|
|
4
|
-
* properties to provide more context about the error.
|
|
5
|
-
*/
|
|
6
|
-
export class TMDBError extends Error {
|
|
7
|
-
/**
|
|
8
|
-
* The status code returned by the TMDB API.
|
|
9
|
-
* If the value is `-1`, it indicates a library-specific error rather than a TMDB API error.
|
|
10
|
-
* @reference https://developer.themoviedb.org/docs/errors - code
|
|
11
|
-
*/
|
|
12
|
-
tmdb_status_code;
|
|
13
|
-
/**
|
|
14
|
-
* A descriptive message providing details about the error.
|
|
15
|
-
* If the error is specific to the TMDB API, this message will be derived from the API response
|
|
16
|
-
* @reference https://developer.themoviedb.org/docs/errors - message
|
|
17
|
-
*/
|
|
18
|
-
message;
|
|
19
|
-
/**
|
|
20
|
-
* The HTTP status code associated with the error.
|
|
21
|
-
* If the error is specific to the TMDB API, this code will be derived from the API response.
|
|
22
|
-
* @reference https://developer.themoviedb.org/docs/errors - HTTP Status
|
|
23
|
-
*/
|
|
24
|
-
http_status_code;
|
|
25
|
-
/**
|
|
26
|
-
* Creates an instance of `TMDBError`.
|
|
27
|
-
*
|
|
28
|
-
* @param message - A descriptive message providing details about the error.
|
|
29
|
-
* @param http_status - The HTTP status code associated with the error.
|
|
30
|
-
* @param tmdb_status_code - (Optional) The status code returned by the TMDB API. Defaults to `-1` for library-specific errors.
|
|
31
|
-
*/
|
|
32
|
-
constructor(message, http_status, tmdb_status_code) {
|
|
33
|
-
super(message);
|
|
34
|
-
this.name = "TMDBError";
|
|
35
|
-
this.tmdb_status_code = tmdb_status_code || -1;
|
|
36
|
-
this.message = message;
|
|
37
|
-
this.http_status_code = http_status;
|
|
38
|
-
}
|
|
39
|
-
}
|
package/dist/images/images.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ImagesConfig } from "../types";
|
|
2
|
-
import { BackdropSize, LogoSize, PosterSize, ProfileSize, StillSize } from "../types/config/images";
|
|
3
|
-
export declare class ImageAPI {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(options?: ImagesConfig);
|
|
6
|
-
private buildUrl;
|
|
7
|
-
backdrop(path: string, size?: BackdropSize): string;
|
|
8
|
-
logo(path: string, size?: LogoSize): string;
|
|
9
|
-
poster(path: string, size?: PosterSize): string;
|
|
10
|
-
profile(path: string, size?: ProfileSize): string;
|
|
11
|
-
still(path: string, size?: StillSize): string;
|
|
12
|
-
}
|
package/dist/images/images.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { IMAGE_BASE_URL, IMAGE_SECURE_BASE_URL } from "../types/config/images";
|
|
2
|
-
export class ImageAPI {
|
|
3
|
-
options;
|
|
4
|
-
constructor(options = {}) {
|
|
5
|
-
this.options = { secure_images_url: true, ...options };
|
|
6
|
-
}
|
|
7
|
-
buildUrl(path, size) {
|
|
8
|
-
const baseUrl = this.options.secure_images_url ? IMAGE_SECURE_BASE_URL : IMAGE_BASE_URL;
|
|
9
|
-
return `${baseUrl}${size}${path}`;
|
|
10
|
-
}
|
|
11
|
-
backdrop(path, size = this.options.default_image_sizes?.backdrops || "w780") {
|
|
12
|
-
return this.buildUrl(path, size);
|
|
13
|
-
}
|
|
14
|
-
logo(path, size = this.options.default_image_sizes?.logos || "w185") {
|
|
15
|
-
return this.buildUrl(path, size);
|
|
16
|
-
}
|
|
17
|
-
poster(path, size = this.options.default_image_sizes?.posters || "w500") {
|
|
18
|
-
return this.buildUrl(path, size);
|
|
19
|
-
}
|
|
20
|
-
profile(path, size = this.options.default_image_sizes?.profiles || "w185") {
|
|
21
|
-
return this.buildUrl(path, size);
|
|
22
|
-
}
|
|
23
|
-
still(path, size = this.options.default_image_sizes?.still || "w300") {
|
|
24
|
-
return this.buildUrl(path, size);
|
|
25
|
-
}
|
|
26
|
-
}
|
package/dist/routes.d.ts
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
export declare const ENDPOINTS: {
|
|
2
|
-
CONFIGURATION: {
|
|
3
|
-
DETAILS: string;
|
|
4
|
-
COUNTRIES: string;
|
|
5
|
-
JOBS: string;
|
|
6
|
-
LANGUAGES: string;
|
|
7
|
-
TIMEZONES: string;
|
|
8
|
-
PRIMARY_TRANSLATIONS: string;
|
|
9
|
-
};
|
|
10
|
-
CERTIFICATIONS: {
|
|
11
|
-
MOVIE_CERTIFICATIONS: string;
|
|
12
|
-
TV_CERTIFICATIONS: string;
|
|
13
|
-
};
|
|
14
|
-
CHANGES: {
|
|
15
|
-
MOVIE_LIST: string;
|
|
16
|
-
PEOPLE_LIST: string;
|
|
17
|
-
TV_LIST: string;
|
|
18
|
-
};
|
|
19
|
-
DISCOVER: {
|
|
20
|
-
MOVIE: string;
|
|
21
|
-
TV: string;
|
|
22
|
-
};
|
|
23
|
-
FIND: string;
|
|
24
|
-
CREDITS: {
|
|
25
|
-
DETAILS: string;
|
|
26
|
-
};
|
|
27
|
-
COMPANIES: {
|
|
28
|
-
DETAILS: string;
|
|
29
|
-
ALTERNATIVE_NAMES: string;
|
|
30
|
-
IMAGES: string;
|
|
31
|
-
};
|
|
32
|
-
COLLECTIONS: {
|
|
33
|
-
DETAILS: string;
|
|
34
|
-
IMAGES: string;
|
|
35
|
-
TRANSLATIONS: string;
|
|
36
|
-
};
|
|
37
|
-
GENRES: {
|
|
38
|
-
MOVIE_LIST: string;
|
|
39
|
-
TV_LIST: string;
|
|
40
|
-
};
|
|
41
|
-
KEYWORDS: {
|
|
42
|
-
DETAILS: string;
|
|
43
|
-
MOVIES: string;
|
|
44
|
-
};
|
|
45
|
-
MOVIES: {
|
|
46
|
-
DETAILS: string;
|
|
47
|
-
ALTERNATIVE_TITLES: string;
|
|
48
|
-
CREDITS: string;
|
|
49
|
-
EXTERNAL_IDS: string;
|
|
50
|
-
KEYWORDS: string;
|
|
51
|
-
CHANGES: string;
|
|
52
|
-
IMAGES: string;
|
|
53
|
-
LATEST: string;
|
|
54
|
-
NOW_PLAYING: string;
|
|
55
|
-
POPULAR: string;
|
|
56
|
-
RECOMMENDATIONS: string;
|
|
57
|
-
RELEASE_DATES: string;
|
|
58
|
-
REVIEWS: string;
|
|
59
|
-
SIMILAR: string;
|
|
60
|
-
TOP_RATED: string;
|
|
61
|
-
TRANSLATIONS: string;
|
|
62
|
-
UPCOMING: string;
|
|
63
|
-
VIDEOS: string;
|
|
64
|
-
WATCH_PROVIDERS: string;
|
|
65
|
-
};
|
|
66
|
-
NETWORKS: {
|
|
67
|
-
DETAILS: string;
|
|
68
|
-
ALTERNATIVE_NAMES: string;
|
|
69
|
-
IMAGES: string;
|
|
70
|
-
};
|
|
71
|
-
PEOPLE: {
|
|
72
|
-
DETAILS: string;
|
|
73
|
-
CHANGES: string;
|
|
74
|
-
COMBINED_CREDITS: string;
|
|
75
|
-
EXTERNAL_IDS: string;
|
|
76
|
-
IMAGES: string;
|
|
77
|
-
LATEST: string;
|
|
78
|
-
MOVIE_CREDITS: string;
|
|
79
|
-
TAGGED_IMAGES: string;
|
|
80
|
-
TRANSLATIONS: string;
|
|
81
|
-
TV_CREDITS: string;
|
|
82
|
-
};
|
|
83
|
-
SEARCH: {
|
|
84
|
-
MOVIE: string;
|
|
85
|
-
COLLECTION: string;
|
|
86
|
-
COMPANY: string;
|
|
87
|
-
KEYWORD: string;
|
|
88
|
-
MULTI: string;
|
|
89
|
-
PERSON: string;
|
|
90
|
-
TV: string;
|
|
91
|
-
};
|
|
92
|
-
TV_SERIES: {
|
|
93
|
-
DETAILS: string;
|
|
94
|
-
AGGREGATE_CREDITS: string;
|
|
95
|
-
AIRING_TODAY: string;
|
|
96
|
-
ALTERNATIVE_TITLES: string;
|
|
97
|
-
CHANGES: string;
|
|
98
|
-
CONTENT_RATINGS: string;
|
|
99
|
-
CREDITS: string;
|
|
100
|
-
EPISODE_GROUPS: string;
|
|
101
|
-
EXTERNAL_IDS: string;
|
|
102
|
-
IMAGES: string;
|
|
103
|
-
KEYWORDS: string;
|
|
104
|
-
LATEST: string;
|
|
105
|
-
LISTS: string;
|
|
106
|
-
ON_THE_AIR: string;
|
|
107
|
-
POPULAR: string;
|
|
108
|
-
RECOMMENDATIONS: string;
|
|
109
|
-
REVIEWS: string;
|
|
110
|
-
SCREENED_THEATRICALLY: string;
|
|
111
|
-
SIMILAR: string;
|
|
112
|
-
TOP_RATED: string;
|
|
113
|
-
TRANSLATIONS: string;
|
|
114
|
-
VIDEOS: string;
|
|
115
|
-
WATCH_PROVIDERS: string;
|
|
116
|
-
};
|
|
117
|
-
TV_SEASONS: {
|
|
118
|
-
DETAILS: string;
|
|
119
|
-
AGGREGATE_CREDITS: string;
|
|
120
|
-
CHANGES: string;
|
|
121
|
-
CREDITS: string;
|
|
122
|
-
EXTERNAL_IDS: string;
|
|
123
|
-
IMAGES: string;
|
|
124
|
-
TRANSLATIONS: string;
|
|
125
|
-
VIDEOS: string;
|
|
126
|
-
WATCH_PROVIDERS: string;
|
|
127
|
-
};
|
|
128
|
-
TV_EPISODES: {
|
|
129
|
-
DETAILS: string;
|
|
130
|
-
CHANGES: string;
|
|
131
|
-
CREDITS: string;
|
|
132
|
-
EXTERNAL_IDS: string;
|
|
133
|
-
IMAGES: string;
|
|
134
|
-
TRANSLATIONS: string;
|
|
135
|
-
VIDEOS: string;
|
|
136
|
-
};
|
|
137
|
-
TV_EPISODE_GROUPS: {
|
|
138
|
-
DETAILS: string;
|
|
139
|
-
};
|
|
140
|
-
WATCH_PROVIDERS: {
|
|
141
|
-
MOVIE: string;
|
|
142
|
-
TV: string;
|
|
143
|
-
REGIONS: string;
|
|
144
|
-
};
|
|
145
|
-
TRENDING: {
|
|
146
|
-
ALL: string;
|
|
147
|
-
MOVIE: string;
|
|
148
|
-
TV: string;
|
|
149
|
-
PERSON: string;
|
|
150
|
-
};
|
|
151
|
-
REVIEWS: {
|
|
152
|
-
DETAILS: string;
|
|
153
|
-
};
|
|
154
|
-
PEOPLE_LISTS: {
|
|
155
|
-
POPULAR: string;
|
|
156
|
-
};
|
|
157
|
-
};
|
package/dist/routes.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
export const ENDPOINTS = {
|
|
2
|
-
CONFIGURATION: {
|
|
3
|
-
DETAILS: "/configuration",
|
|
4
|
-
COUNTRIES: "/configuration/countries",
|
|
5
|
-
JOBS: "/configuration/jobs",
|
|
6
|
-
LANGUAGES: "/configuration/languages",
|
|
7
|
-
TIMEZONES: "/configuration/timezones",
|
|
8
|
-
PRIMARY_TRANSLATIONS: "/configuration/primary_translations",
|
|
9
|
-
},
|
|
10
|
-
CERTIFICATIONS: {
|
|
11
|
-
MOVIE_CERTIFICATIONS: "/certification/movie/list",
|
|
12
|
-
TV_CERTIFICATIONS: "/certification/tv/list",
|
|
13
|
-
},
|
|
14
|
-
CHANGES: {
|
|
15
|
-
MOVIE_LIST: "/movie/changes",
|
|
16
|
-
PEOPLE_LIST: "/person/changes",
|
|
17
|
-
TV_LIST: "/tv/changes",
|
|
18
|
-
},
|
|
19
|
-
DISCOVER: {
|
|
20
|
-
MOVIE: "/discover/movie",
|
|
21
|
-
TV: "/discover/tv",
|
|
22
|
-
},
|
|
23
|
-
FIND: "/find",
|
|
24
|
-
CREDITS: {
|
|
25
|
-
DETAILS: "/credit",
|
|
26
|
-
},
|
|
27
|
-
COMPANIES: {
|
|
28
|
-
DETAILS: "/company",
|
|
29
|
-
ALTERNATIVE_NAMES: "/alternative_names",
|
|
30
|
-
IMAGES: "/images",
|
|
31
|
-
},
|
|
32
|
-
COLLECTIONS: {
|
|
33
|
-
DETAILS: "/collection",
|
|
34
|
-
IMAGES: "/images",
|
|
35
|
-
TRANSLATIONS: "/translations",
|
|
36
|
-
},
|
|
37
|
-
GENRES: {
|
|
38
|
-
MOVIE_LIST: "/genre/movie/list",
|
|
39
|
-
TV_LIST: "/genre/tv/list",
|
|
40
|
-
},
|
|
41
|
-
KEYWORDS: {
|
|
42
|
-
DETAILS: "/keyword",
|
|
43
|
-
MOVIES: "/movies",
|
|
44
|
-
},
|
|
45
|
-
MOVIES: {
|
|
46
|
-
DETAILS: "/movie",
|
|
47
|
-
ALTERNATIVE_TITLES: "/alternative_titles",
|
|
48
|
-
CREDITS: "/credits",
|
|
49
|
-
EXTERNAL_IDS: "/external_ids",
|
|
50
|
-
KEYWORDS: "/keywords",
|
|
51
|
-
CHANGES: "/changes",
|
|
52
|
-
IMAGES: "/images",
|
|
53
|
-
LATEST: "/latest",
|
|
54
|
-
NOW_PLAYING: "/now_playing",
|
|
55
|
-
POPULAR: "/popular",
|
|
56
|
-
RECOMMENDATIONS: "/recommendations",
|
|
57
|
-
RELEASE_DATES: "/release_dates",
|
|
58
|
-
REVIEWS: "/reviews",
|
|
59
|
-
SIMILAR: "/similar",
|
|
60
|
-
TOP_RATED: "/top_rated",
|
|
61
|
-
TRANSLATIONS: "/translations",
|
|
62
|
-
UPCOMING: "/upcoming",
|
|
63
|
-
VIDEOS: "/videos",
|
|
64
|
-
WATCH_PROVIDERS: "/watch/providers",
|
|
65
|
-
},
|
|
66
|
-
NETWORKS: {
|
|
67
|
-
DETAILS: "/network",
|
|
68
|
-
ALTERNATIVE_NAMES: "/alternative_names",
|
|
69
|
-
IMAGES: "/images",
|
|
70
|
-
},
|
|
71
|
-
PEOPLE: {
|
|
72
|
-
DETAILS: "/person",
|
|
73
|
-
CHANGES: "/changes",
|
|
74
|
-
COMBINED_CREDITS: "/combined_credits",
|
|
75
|
-
EXTERNAL_IDS: "/external_ids",
|
|
76
|
-
IMAGES: "/images",
|
|
77
|
-
LATEST: "/latest",
|
|
78
|
-
MOVIE_CREDITS: "/movie_credits",
|
|
79
|
-
TAGGED_IMAGES: "/tagged_images",
|
|
80
|
-
TRANSLATIONS: "/translations",
|
|
81
|
-
TV_CREDITS: "/tv_credits",
|
|
82
|
-
},
|
|
83
|
-
SEARCH: {
|
|
84
|
-
MOVIE: "/search/movie",
|
|
85
|
-
COLLECTION: "/search/collection",
|
|
86
|
-
COMPANY: "/search/company",
|
|
87
|
-
KEYWORD: "/search/keyword",
|
|
88
|
-
MULTI: "/search/multi",
|
|
89
|
-
PERSON: "/search/person",
|
|
90
|
-
TV: "/search/tv",
|
|
91
|
-
},
|
|
92
|
-
TV_SERIES: {
|
|
93
|
-
DETAILS: "/tv",
|
|
94
|
-
AGGREGATE_CREDITS: "/aggregate_credits",
|
|
95
|
-
AIRING_TODAY: "/airing_today",
|
|
96
|
-
ALTERNATIVE_TITLES: "/alternative_titles",
|
|
97
|
-
CHANGES: "/changes",
|
|
98
|
-
CONTENT_RATINGS: "/content_ratings",
|
|
99
|
-
CREDITS: "/credits",
|
|
100
|
-
EPISODE_GROUPS: "/episode_groups",
|
|
101
|
-
EXTERNAL_IDS: "/external_ids",
|
|
102
|
-
IMAGES: "/images",
|
|
103
|
-
KEYWORDS: "/keywords",
|
|
104
|
-
LATEST: "/latest",
|
|
105
|
-
LISTS: "/lists",
|
|
106
|
-
ON_THE_AIR: "/on_the_air",
|
|
107
|
-
POPULAR: "/popular",
|
|
108
|
-
RECOMMENDATIONS: "/recommendations",
|
|
109
|
-
REVIEWS: "/reviews",
|
|
110
|
-
SCREENED_THEATRICALLY: "/screened_theatrically",
|
|
111
|
-
SIMILAR: "/similar",
|
|
112
|
-
TOP_RATED: "/top_rated",
|
|
113
|
-
TRANSLATIONS: "/translations",
|
|
114
|
-
VIDEOS: "/videos",
|
|
115
|
-
WATCH_PROVIDERS: "/watch/providers",
|
|
116
|
-
},
|
|
117
|
-
TV_SEASONS: {
|
|
118
|
-
DETAILS: "/season",
|
|
119
|
-
AGGREGATE_CREDITS: "/aggregate_credits",
|
|
120
|
-
CHANGES: "/changes",
|
|
121
|
-
CREDITS: "/credits",
|
|
122
|
-
EXTERNAL_IDS: "/external_ids",
|
|
123
|
-
IMAGES: "/images",
|
|
124
|
-
TRANSLATIONS: "/translations",
|
|
125
|
-
VIDEOS: "/videos",
|
|
126
|
-
WATCH_PROVIDERS: "/watch/providers",
|
|
127
|
-
},
|
|
128
|
-
TV_EPISODES: {
|
|
129
|
-
DETAILS: "/episode",
|
|
130
|
-
CHANGES: "/changes",
|
|
131
|
-
CREDITS: "/credits",
|
|
132
|
-
EXTERNAL_IDS: "/external_ids",
|
|
133
|
-
IMAGES: "/images",
|
|
134
|
-
TRANSLATIONS: "/translations",
|
|
135
|
-
VIDEOS: "/videos",
|
|
136
|
-
},
|
|
137
|
-
TV_EPISODE_GROUPS: {
|
|
138
|
-
DETAILS: "/tv/episode_group",
|
|
139
|
-
},
|
|
140
|
-
WATCH_PROVIDERS: {
|
|
141
|
-
MOVIE: "/watch/providers/movie",
|
|
142
|
-
TV: "/watch/providers/tv",
|
|
143
|
-
REGIONS: "/watch/providers/regions",
|
|
144
|
-
},
|
|
145
|
-
TRENDING: {
|
|
146
|
-
ALL: "/trending/all",
|
|
147
|
-
MOVIE: "/trending/movie",
|
|
148
|
-
TV: "/trending/tv",
|
|
149
|
-
PERSON: "/trending/person",
|
|
150
|
-
},
|
|
151
|
-
REVIEWS: {
|
|
152
|
-
DETAILS: "/review",
|
|
153
|
-
},
|
|
154
|
-
PEOPLE_LISTS: {
|
|
155
|
-
POPULAR: "/person/popular",
|
|
156
|
-
},
|
|
157
|
-
};
|
package/dist/tmdb.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { CertificationsAPI } from "./endpoints/certifications";
|
|
2
|
-
import { ChangesAPI } from "./endpoints/changes";
|
|
3
|
-
import { CompaniesAPI } from "./endpoints/companies";
|
|
4
|
-
import { CreditsAPI } from "./endpoints/credits";
|
|
5
|
-
import { CollectionsAPI } from "./endpoints/collections";
|
|
6
|
-
import { ConfigurationAPI } from "./endpoints/configuration";
|
|
7
|
-
import { DiscoverAPI } from "./endpoints/discover";
|
|
8
|
-
import { FindAPI } from "./endpoints/find";
|
|
9
|
-
import { GenresAPI } from "./endpoints/genres";
|
|
10
|
-
import { KeywordsAPI } from "./endpoints/keywords";
|
|
11
|
-
import { MovieListsAPI } from "./endpoints/movie_lists";
|
|
12
|
-
import { MoviesAPI } from "./endpoints/movies";
|
|
13
|
-
import { SearchAPI } from "./endpoints/search";
|
|
14
|
-
import { TVSeriesAPI } from "./endpoints/tv_series";
|
|
15
|
-
import { TVSeriesListsAPI } from "./endpoints/tv_series_lists";
|
|
16
|
-
import { WatchProvidersAPI } from "./endpoints/watch_providers";
|
|
17
|
-
import { ImageAPI } from "./images/images";
|
|
18
|
-
import { TMDBOptions } from "./types/config";
|
|
19
|
-
import { NetworksAPI } from "./endpoints/networks";
|
|
20
|
-
import { TVEpisodesAPI } from "./endpoints/tv_episodes";
|
|
21
|
-
import { TVEpisodeGroupsAPI } from "./endpoints/tv_episode_groups";
|
|
22
|
-
import { TVSeasonsAPI } from "./endpoints/tv_seasons";
|
|
23
|
-
import { TrendingAPI } from "./endpoints/trending";
|
|
24
|
-
import { ReviewsAPI } from "./endpoints/reviews";
|
|
25
|
-
import { PeopleListsAPI } from "./endpoints/people_lists";
|
|
26
|
-
import { PeopleAPI } from "./endpoints/people";
|
|
27
|
-
export declare class TMDB {
|
|
28
|
-
private client;
|
|
29
|
-
private options;
|
|
30
|
-
movies: MoviesAPI;
|
|
31
|
-
movie_lists: MovieListsAPI;
|
|
32
|
-
search: SearchAPI;
|
|
33
|
-
images: ImageAPI;
|
|
34
|
-
configuration: ConfigurationAPI;
|
|
35
|
-
genres: GenresAPI;
|
|
36
|
-
keywords: KeywordsAPI;
|
|
37
|
-
tv_lists: TVSeriesListsAPI;
|
|
38
|
-
tv_series: TVSeriesAPI;
|
|
39
|
-
watch_providers: WatchProvidersAPI;
|
|
40
|
-
certifications: CertificationsAPI;
|
|
41
|
-
changes: ChangesAPI;
|
|
42
|
-
companies: CompaniesAPI;
|
|
43
|
-
credits: CreditsAPI;
|
|
44
|
-
collections: CollectionsAPI;
|
|
45
|
-
discover: DiscoverAPI;
|
|
46
|
-
find: FindAPI;
|
|
47
|
-
networks: NetworksAPI;
|
|
48
|
-
tv_episodes: TVEpisodesAPI;
|
|
49
|
-
tv_episode_groups: TVEpisodeGroupsAPI;
|
|
50
|
-
tv_seasons: TVSeasonsAPI;
|
|
51
|
-
trending: TrendingAPI;
|
|
52
|
-
reviews: ReviewsAPI;
|
|
53
|
-
people_lists: PeopleListsAPI;
|
|
54
|
-
people: PeopleAPI;
|
|
55
|
-
/**
|
|
56
|
-
* Creates a new TMDB instance.
|
|
57
|
-
* @param accessToken The TMDB API access token.
|
|
58
|
-
* @param options Optional default options (e.g., language) for all requests.
|
|
59
|
-
*/
|
|
60
|
-
constructor(accessToken: string, options?: TMDBOptions);
|
|
61
|
-
}
|