@odyssoft/tmdb
Version:
Unofficial TMDB v3 api wrapper, built using TypeScript and node.js
62 lines (61 loc) • 2.64 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TVSeason = void 0;
const request_1 = __importDefault(require("../request"));
const TVSeason = (apiKey, tv_id) => ({
/**
* Get the TV season details by id.
* @param {number} season
* @param {object} options
* @returns Promise<TVSeasonDetails>
*/
GetDetails: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}`, options),
/**
* Get the aggregate credits for TV season.
* This call differs from the main credits call in that it does not only return the season credits, but rather is a view of all the cast & crew for all of the episodes belonging to a season.
* @param {number} season
* @param {options} options
* @returns Promise<TVSeasonAggregateCredits>
*/
GetAggregateCredits: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/aggregate_credits`, options),
/**
* Get the credits for TV season.
* @param {number} season
* @param {options} options
* @returns Promise<TVSeasonCredits>
*/
GetCredits: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/credits`, options),
/**
* Get the external ids for a TV season. We currently support the following external sources.
* @param {number} season
* @param {options} options
* @returns Promise<TVExternalIds>
*/
GetExternalIds: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/external_ids`, options),
/**
* Get the images that belong to a TV season.
* @param {number} season
* @param {options} options
* @returns Promise<TVSeasonImages>
*/
GetImages: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/images`, options),
/**
*
* @param {number} season
* @param {options} options
* @returns Promise<TVSeasonTranslations>
*/
GetTranslations: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/translations`, options),
/**
* Get the videos that have been added to a TV season.
* @param {number} season
* @param {options} options
* @returns Promise<TVSeasonVideo>
*/
GetVideos: (season, options) => (0, request_1.default)(apiKey, `/tv/${tv_id}/season/${season}/videos`, options),
});
exports.TVSeason = TVSeason;
exports.default = exports.TVSeason;