@tdanks2000/tmdb-wrapper 1.0.1 → 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/models/baseEndpoint.d.ts +1 -1
- package/dist/@types/models/baseEndpoint.js +1 -1
- package/dist/endpoints/account.d.ts +1 -1
- package/dist/endpoints/account.js +1 -1
- package/dist/endpoints/certification.d.ts +1 -1
- package/dist/endpoints/certification.js +1 -1
- package/dist/endpoints/changes.d.ts +1 -1
- package/dist/endpoints/changes.js +1 -1
- package/dist/endpoints/collections.d.ts +1 -1
- package/dist/endpoints/collections.js +1 -1
- package/dist/endpoints/companies.d.ts +1 -1
- package/dist/endpoints/companies.js +1 -1
- package/dist/endpoints/configuration.d.ts +1 -1
- package/dist/endpoints/configuration.js +1 -1
- package/dist/endpoints/credits.d.ts +1 -1
- package/dist/endpoints/credits.js +1 -1
- package/dist/endpoints/discover.d.ts +1 -1
- package/dist/endpoints/discover.js +1 -1
- package/dist/endpoints/find.d.ts +1 -1
- package/dist/endpoints/find.js +1 -1
- package/dist/endpoints/genre.d.ts +1 -1
- package/dist/endpoints/genre.js +1 -1
- package/dist/endpoints/keywords.d.ts +1 -1
- package/dist/endpoints/keywords.js +1 -1
- package/dist/endpoints/movies.d.ts +1 -1
- package/dist/endpoints/movies.js +1 -1
- package/dist/endpoints/networks.d.ts +1 -1
- package/dist/endpoints/networks.js +1 -1
- package/dist/endpoints/people.d.ts +1 -1
- package/dist/endpoints/people.js +1 -1
- package/dist/endpoints/review.d.ts +1 -1
- package/dist/endpoints/review.js +1 -1
- package/dist/endpoints/search.d.ts +1 -1
- package/dist/endpoints/search.js +1 -1
- package/dist/endpoints/trending.d.ts +3 -3
- package/dist/endpoints/trending.d.ts.map +1 -1
- package/dist/endpoints/trending.js +2 -2
- package/dist/endpoints/tvEpisodes.d.ts +1 -1
- package/dist/endpoints/tvEpisodes.js +1 -1
- package/dist/endpoints/tvSeasons.d.ts +1 -1
- package/dist/endpoints/tvSeasons.js +1 -1
- package/dist/endpoints/tvShows.d.ts +1 -1
- package/dist/endpoints/tvShows.js +1 -1
- 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/endpoints/trending.ts +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
TMDB Api Wrapper
|
|
3
3
|
</h1>
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@tdanks2000/tmdb-wrapper">
|
|
7
|
+
<img alt="NPM Version" src="https://img.shields.io/npm/v/%40tdanks2000%2Ftmdb-wrapper">
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://github.com/tdanks2000/tmdb-wrapper/blob/master/LICENSE">
|
|
10
|
+
<img src="https://img.shields.io/npm/l/@tdanks2000/tmdb-wrapper" alt="GitHub">
|
|
11
|
+
</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<br />
|
|
15
|
+
|
|
5
16
|
The TMDB Api Wrapper simplifies the process of making API requests to The Movie Database (TMDb), a comprehensive database for movies and TV shows. It encapsulates functionality related to various API endpoints, such as account, certifications, changes, collections, configuration, credits, discover, find, genres, keywords, movies, people, reviews, search, trending, TV episodes, TV seasons, and TV shows. With this wrapper, developers can quickly integrate TMDB functionality into their TypeScript projects.
|
|
6
17
|
|
|
7
18
|
## Table of Contents
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/@types/endpoints/configuration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,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,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,oBAAoB,yBAAyB;IAC7C,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/@types/endpoints/configuration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,0BAAkB,aAAa;IAC7B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,a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oBAAoB,yBAAyB;IAC7C,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseEndpoint = void 0;
|
|
4
|
-
const utils_1 = require("
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
5
|
class BaseEndpoint {
|
|
6
6
|
constructor(access_token) {
|
|
7
7
|
this.access_token = access_token;
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AccountEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving account details.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CertificationEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving certifications for movies and TV shows.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ChangeEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving changes in movies, TV shows, and persons.
|
|
16
16
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEndpoint, CollectionImageOptions, DetailedCollection, ImageCollection, LanguageOption, Translations } from '
|
|
1
|
+
import { BaseEndpoint, CollectionImageOptions, DetailedCollection, ImageCollection, LanguageOption, Translations } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing collections and their details.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CollectionsEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_COLLECTION = '/collection';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for accessing collections and their details.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlternativeNames, BaseEndpoint, CompanyDetails, CompanyImages } from '
|
|
1
|
+
import { AlternativeNames, BaseEndpoint, CompanyDetails, CompanyImages } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing company details and related information.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ 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
14
|
/**
|
|
15
15
|
* Represents an endpoint for accessing company details and related information.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ 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
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving current system configuration.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ 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
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving credit details.
|
|
16
16
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEndpoint, MovieDiscoverResult, MovieQueryOptions, TvShowDiscoverResult, TvShowQueryOptions } from '
|
|
1
|
+
import { BaseEndpoint, MovieDiscoverResult, MovieQueryOptions, TvShowDiscoverResult, TvShowQueryOptions } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for discovering movies and TV shows based on various criteria.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ 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
15
|
/**
|
|
16
16
|
* Represents an endpoint for discovering movies and TV shows based on various criteria.
|
package/dist/endpoints/find.d.ts
CHANGED
package/dist/endpoints/find.js
CHANGED
|
@@ -10,7 +10,7 @@ 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
14
|
/**
|
|
15
15
|
* Represents an endpoint for finding media by external ID.
|
|
16
16
|
*/
|
package/dist/endpoints/genre.js
CHANGED
|
@@ -10,7 +10,7 @@ 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
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving genre information for movies and TV shows.
|
|
16
16
|
*/
|
|
@@ -10,7 +10,7 @@ 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("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_KEYWORD = '/keyword';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for accessing keyword details and related movies.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlternativeTitles, AppendToResponse, AppendToResponseMovieKey, BaseEndpoint, ChangeOption, Changes, Credits, ExternalIds, Images, Keywords, LanguageOption, LatestMovie, MovieChangeValue, MovieDetails, MovieLists, MoviesImageSearchOptions, MoviesPlayingNow, PageOption, PopularMovies, Recommendations, RegionOption, ReleaseDates, Reviews, SimilarMovies, TopRatedMovies, Translations, UpcomingMovies, Videos, WatchProviders } from '
|
|
1
|
+
import { AlternativeTitles, AppendToResponse, AppendToResponseMovieKey, BaseEndpoint, ChangeOption, Changes, Credits, ExternalIds, Images, Keywords, LanguageOption, LatestMovie, MovieChangeValue, MovieDetails, MovieLists, MoviesImageSearchOptions, MoviesPlayingNow, PageOption, PopularMovies, Recommendations, RegionOption, ReleaseDates, Reviews, SimilarMovies, TopRatedMovies, Translations, UpcomingMovies, Videos, WatchProviders } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing movie-related information.
|
|
4
4
|
*/
|
package/dist/endpoints/movies.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MoviesEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_MOVIE = '/movie';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for accessing movie-related information.
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.NetworksEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for accessing network details.
|
|
16
16
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppendToResponse, AppendToResponsePersonKey, BaseEndpoint, ChangeOption, Changes, ExternalIds, LanguageOption, PageOption, PeopleImages, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTranslations, PersonTvShowCredit, PopularPersons, TaggedImages } from '
|
|
1
|
+
import { AppendToResponse, AppendToResponsePersonKey, BaseEndpoint, ChangeOption, Changes, ExternalIds, LanguageOption, PageOption, PeopleImages, PersonChangeValue, PersonCombinedCredits, PersonDetails, PersonMovieCredit, PersonTranslations, PersonTvShowCredit, PopularPersons, TaggedImages } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing information about people.
|
|
4
4
|
*/
|
package/dist/endpoints/people.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PeopleEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_PERSON = '/person';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for accessing information about people.
|
package/dist/endpoints/review.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ReviewEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for accessing review details.
|
|
16
16
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEndpoint, Collection, Company, Movie, MovieSearchOptions, MultiSearchOptions, MultiSearchResult, PeopleSearchOptions, Person, Search, SearchOptions, TV, TvSearchOptions } from '
|
|
1
|
+
import { BaseEndpoint, Collection, Company, Movie, MovieSearchOptions, MultiSearchOptions, MultiSearchResult, PeopleSearchOptions, Person, Search, SearchOptions, TV, TvSearchOptions } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for performing various search operations.
|
|
4
4
|
*/
|
package/dist/endpoints/search.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SearchEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_SEARCH = '/search';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for performing various search operations.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEndpoint, LanguageOption, TimeWindow, TrendingMediaType, TrendingResults } from '
|
|
1
|
+
import { BaseEndpoint, LanguageOption, PageOption, TimeWindow, TrendingMediaType, TrendingResults } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for retrieving trending content.
|
|
4
4
|
*/
|
|
@@ -12,10 +12,10 @@ export declare class TrendingEndpoint extends BaseEndpoint {
|
|
|
12
12
|
* Retrieves trending content asynchronously based on media type and time window.
|
|
13
13
|
* @param {TrendingMediaType} mediaType - The type of media (e.g., 'all', 'movie', 'tv').
|
|
14
14
|
* @param {TimeWindow} timeWindow - The time window for trending content (e.g., 'day', 'week').
|
|
15
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
15
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying the language and pagination.
|
|
16
16
|
* @returns {Promise<TrendingResults<T>>} A Promise that resolves with the trending results.
|
|
17
17
|
* @template T - The type of media being searched for (e.g., 'movie', 'tv').
|
|
18
18
|
*/
|
|
19
|
-
trending<T extends TrendingMediaType>(mediaType: T, timeWindow: TimeWindow, options?: LanguageOption): Promise<TrendingResults<T>>;
|
|
19
|
+
trending<T extends TrendingMediaType>(mediaType: T, timeWindow: TimeWindow, options?: LanguageOption & PageOption): Promise<TrendingResults<T>>;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=trending.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trending.d.ts","sourceRoot":"","sources":["../../src/endpoints/trending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"trending.d.ts","sourceRoot":"","sources":["../../src/endpoints/trending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEpH;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;;OAGG;gBACS,YAAY,EAAE,MAAM;IAIhC;;;;;;;OAOG;IACG,QAAQ,CAAC,CAAC,SAAS,iBAAiB,EACxC,SAAS,EAAE,CAAC,EACZ,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,GACpC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAG/B"}
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TrendingEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
/**
|
|
15
15
|
* Represents an endpoint for retrieving trending content.
|
|
16
16
|
*/
|
|
@@ -26,7 +26,7 @@ class TrendingEndpoint extends _types_1.BaseEndpoint {
|
|
|
26
26
|
* Retrieves trending content asynchronously based on media type and time window.
|
|
27
27
|
* @param {TrendingMediaType} mediaType - The type of media (e.g., 'all', 'movie', 'tv').
|
|
28
28
|
* @param {TimeWindow} timeWindow - The time window for trending content (e.g., 'day', 'week').
|
|
29
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
29
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying the language and pagination.
|
|
30
30
|
* @returns {Promise<TrendingResults<T>>} A Promise that resolves with the trending results.
|
|
31
31
|
* @template T - The type of media being searched for (e.g., 'movie', 'tv').
|
|
32
32
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppendToResponse, AppendToResponseTvEpisodeKey, BaseEndpoint, ChangeOption, Changes, Episode, EpisodeSelection, ExternalIds, Images, LanguageOption, TvEpisodeCredit, TvEpisodeImageSearchOptions, TvEpisodeTranslations, TvEpisodeVideoSearchOptions, Videos } from '
|
|
1
|
+
import { AppendToResponse, AppendToResponseTvEpisodeKey, BaseEndpoint, ChangeOption, Changes, Episode, EpisodeSelection, ExternalIds, Images, LanguageOption, TvEpisodeCredit, TvEpisodeImageSearchOptions, TvEpisodeTranslations, TvEpisodeVideoSearchOptions, Videos } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing TV episode-related information.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TvEpisodesEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_EPISODE = (episodeSelection) => {
|
|
15
15
|
return `/tv/${episodeSelection.tvShowID}/season/${episodeSelection.seasonNumber}/episode/${episodeSelection.episodeNumber}`;
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AggregateCredits, AppendToResponse, AppendToResponseTvSeasonKey, BaseEndpoint, ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, SeasonDetails, SeasonSelection, Translations, TvSeasonChangeValue, TvSeasonImageSearchOptions, TvSeasonVideoSearchOptions, Videos } from '
|
|
1
|
+
import { AggregateCredits, AppendToResponse, AppendToResponseTvSeasonKey, BaseEndpoint, ChangeOption, Changes, Credits, ExternalIds, Images, LanguageOption, SeasonDetails, SeasonSelection, Translations, TvSeasonChangeValue, TvSeasonImageSearchOptions, TvSeasonVideoSearchOptions, Videos } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing TV season-related information.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TvSeasonsEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_SEASON = (seasonSelection) => {
|
|
15
15
|
return `/tv/${seasonSelection.tvShowID}/season/${seasonSelection.seasonNumber}`;
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AggregateCredits, AlternativeTitles, AppendToResponse, AppendToResponseTvKey, BaseEndpoint, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, Latesttv, OnTheAir, PageOption, Populartv, Recommendations, Reviews, ScreenedTheatrically, SeasonDetails, Similartv, TimezoneOption, TopRatedtv, Translations, TvShowChangeValue, TvShowDetails, TvShowImageOptions, TvShowVideoOptions, Videos, WatchProviders, tvAiringToday } from '
|
|
1
|
+
import { AggregateCredits, AlternativeTitles, AppendToResponse, AppendToResponseTvKey, BaseEndpoint, ChangeOption, Changes, ContentRatings, Credits, EpisodeGroups, ExternalIds, Images, Keywords, LanguageOption, Latesttv, OnTheAir, PageOption, Populartv, Recommendations, Reviews, ScreenedTheatrically, SeasonDetails, Similartv, TimezoneOption, TopRatedtv, Translations, TvShowChangeValue, TvShowDetails, TvShowImageOptions, TvShowVideoOptions, Videos, WatchProviders, tvAiringToday } from '../@types';
|
|
2
2
|
/**
|
|
3
3
|
* Represents an endpoint for accessing TV show-related information.
|
|
4
4
|
*/
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TvShowsEndpoint = void 0;
|
|
13
|
-
const _types_1 = require("
|
|
13
|
+
const _types_1 = require("../@types");
|
|
14
14
|
const BASE_TV = '/tv';
|
|
15
15
|
/**
|
|
16
16
|
* Represents an endpoint for accessing TV show-related information.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CollectionsEndpoint, ConfigurationEndpoint, CreditsEndpoint, DiscoverEndpoint, FindEndpoint, GenreEndpoint, KeywordsEndpoint, MoviesEndpoint, PeopleEndpoint, ReviewEndpoint, SearchEndpoint, TrendingEndpoint, TvEpisodesEndpoint, TvSeasonsEndpoint, TvShowsEndpoint } from '
|
|
1
|
+
import { AccountEndpoint, CertificationEndpoint, ChangeEndpoint, CollectionsEndpoint, ConfigurationEndpoint, CreditsEndpoint, DiscoverEndpoint, FindEndpoint, GenreEndpoint, KeywordsEndpoint, MoviesEndpoint, PeopleEndpoint, ReviewEndpoint, SearchEndpoint, TrendingEndpoint, TvEpisodesEndpoint, TvSeasonsEndpoint, TvShowsEndpoint } from './endpoints';
|
|
2
2
|
declare class TMDB {
|
|
3
3
|
constructor(access_token: string);
|
|
4
4
|
account: AccountEndpoint;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.TMDB = void 0;
|
|
18
|
-
const endpoints_1 = require("
|
|
18
|
+
const endpoints_1 = require("./endpoints");
|
|
19
19
|
class TMDB {
|
|
20
20
|
constructor(access_token) {
|
|
21
21
|
this.account = new endpoints_1.AccountEndpoint(access_token);
|
package/package.json
CHANGED
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"private": false,
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "
|
|
30
|
+
"build": "pnpm tsc && pnpm tsc-alias",
|
|
31
31
|
"release": "yarn version && npm publish",
|
|
32
|
-
"preversion": "
|
|
32
|
+
"preversion": "pnpm run build"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^20.11.20",
|
|
36
36
|
"ts-node": "^10.9.2",
|
|
37
|
+
"tsc-alias": "^1.8.8",
|
|
37
38
|
"typescript": "^5.3.3"
|
|
38
39
|
},
|
|
39
|
-
"version": "1.0.
|
|
40
|
+
"version": "1.0.2"
|
|
40
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseEndpoint, LanguageOption, TimeWindow, TrendingMediaType, TrendingResults } from '@/@types';
|
|
1
|
+
import { BaseEndpoint, LanguageOption, PageOption, TimeWindow, TrendingMediaType, TrendingResults } from '@/@types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents an endpoint for retrieving trending content.
|
|
@@ -16,14 +16,14 @@ export class TrendingEndpoint extends BaseEndpoint {
|
|
|
16
16
|
* Retrieves trending content asynchronously based on media type and time window.
|
|
17
17
|
* @param {TrendingMediaType} mediaType - The type of media (e.g., 'all', 'movie', 'tv').
|
|
18
18
|
* @param {TimeWindow} timeWindow - The time window for trending content (e.g., 'day', 'week').
|
|
19
|
-
* @param {LanguageOption} [options] - Optional parameters for specifying the language.
|
|
19
|
+
* @param {LanguageOption & PageOption} [options] - Optional parameters for specifying the language and pagination.
|
|
20
20
|
* @returns {Promise<TrendingResults<T>>} A Promise that resolves with the trending results.
|
|
21
21
|
* @template T - The type of media being searched for (e.g., 'movie', 'tv').
|
|
22
22
|
*/
|
|
23
23
|
async trending<T extends TrendingMediaType>(
|
|
24
24
|
mediaType: T,
|
|
25
25
|
timeWindow: TimeWindow,
|
|
26
|
-
options?: LanguageOption,
|
|
26
|
+
options?: LanguageOption & PageOption,
|
|
27
27
|
): Promise<TrendingResults<T>> {
|
|
28
28
|
return await this.api.get<TrendingResults<T>>(`/trending/${mediaType}/${timeWindow}`, options);
|
|
29
29
|
}
|