tmdb-tv
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

tmdb-tv

TMDB (The Movie Database) API wrapper for TV Shows only.

Install

$ npm install tmdb-tv

Import

let TMDB = require('tmdb-tv')("YOUR_TMDB_API_KEY");

Example

var results = await TMDB.Search("Lucifer");
//  results returns an array of shows.
console.log(results);

var Show = TMDB.Show(results[0].id);
var show = await Show.GetDetails();
console.log(show);
show.seasons.forEach(async(season_no) => {
    var Season = Show.Season(season_no);
    var season = await Season.GetDetails();
    console.log(season);
    season.episodes.forEach(async(episode_no) => {
        var Episode = Season.Episode(episode_no);
        var episode = await Episode.GetDetails();
        console.log(episode);
    });
});

Basic usage of each method can be found in the test document "test/app.js"

Useful Information

For examples on what each object is returned, check out tmdb api documentation here: (https://developers.themoviedb.org/3/tv)

Package Sidebar

Install

npm i tmdb-tv

Weekly Downloads

1

Version

1.1.3

License

ISC

Unpacked Size

2.6 MB

Total Files

113

Last publish

Collaborators

  • seannhewitson