UNPKG

@justwicked/tmdb-api-wrapper

Version:

A lightweight TypeScript wrapper for the TMDB API.

74 lines (73 loc) 2.21 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TmdbClient = void 0; const sections_1 = require("./sections"); const http_connector_1 = __importDefault(require("./http-connector")); const BASE_URL = 'https://api.themoviedb.org/3/'; /* * TmdbClient Wrapper * * */ class TmdbClient { constructor(accessToken, httpOptions) { this.http = new http_connector_1.default(BASE_URL, accessToken, httpOptions); } get certifications() { return new sections_1.CertificationsEndpoints(this.http); } get changes() { return new sections_1.ChangesEndpoints(this.http); } get collections() { return new sections_1.CollectionsEndpoints(this.http); } get companies() { return new sections_1.CompaniesEndpoints(this.http); } get configuration() { return new sections_1.ConfigurationEndpoints(this.http); } get credits() { return new sections_1.CreditsEndpoints(this.http); } get discover() { return new sections_1.DiscoverEndpoints(this.http); } get find() { return new sections_1.FindEndpoints(this.http); } get genres() { return new sections_1.GenresEndpoints(this.http); } get keywords() { return new sections_1.KeywordsEndpoints(this.http); } get movies() { return new sections_1.MoviesEndpoints(this.http); } get networks() { return new sections_1.NetworksEndpoints(this.http); } get people() { return new sections_1.PeopleEndpoints(this.http); } get reviews() { return new sections_1.ReviewsEndpoints(this.http); } get search() { return new sections_1.SearchEndpoints(this.http); } get trending() { return new sections_1.TrendingEndpoints(this.http); } get tvSeries() { return new sections_1.TvSeriesEndpoints(this.http); } get watchProviders() { return new sections_1.WatchProvidersEndpoints(this.http); } } exports.TmdbClient = TmdbClient;