Skip to content
Node.js library for accessing TheTVDB API
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
test Write tests of getEpisodesSummaryBySeriesId method Jun 10, 2018
.eslintignore
.eslintrc Update eslint config Jun 24, 2017
.gitignore update wercker Jul 3, 2015
.jsdoc.json
.travis.yml Remove test for node 9 Apr 27, 2019
CODE_OF_CONDUCT.md
LICENSE Update copright year Jan 14, 2017
README.md
index.d.ts Update index.d.ts Apr 27, 2019
index.js Eslint resolve no-trailing-spaces errors Jun 10, 2018
package.json chore(package): update nock to version 11.1.0 Sep 4, 2019
yarn.lock Bump eslint-utils from 1.3.1 to 1.4.2 Aug 27, 2019

README.md

node-tvdb

Build Status npm Downloads

Node.js library for accessing TheTVDB JSON API. Originally based on joaocampinhos/thetvdb-api to give nicer output and additional features.

Pull requests are always very welcome.

Features

  • Handle errors from API as JavaScript errors
  • Only returns relevant data (no need to call response.Data.Series etc.)
  • Set language at initialisation or on each function call
  • Return values through promises (dropped callback support)
  • Uses the new JSON API from TheTVDB
  • Tests with Mocha and Travis CI

Installation

Install with npm:

npm install --save node-tvdb

And run tests with Mocha:

TVDB_KEY=[YOUR API KEY HERE] npm test

Mocha is installed as a development dependency; you do not need to install it globally to run the tests.

Example Usage

To start using this library you first need an API key. You can request one here. Then just follow this simple example that fetches all the shows containing "The Simpsons" in the name.

const TVDB = require('node-tvdb');
const tvdb = new TVDB('ABC123');

tvdb.getSeriesByName('The Simpsons')
    .then(response => { /* process data */ })
    .catch(error => { /* handle error */ });

Full API Docs

Generated API docs with code examples can be found at: edwellbrook.github.io/node-tvdb.

For details on response data, please see TheTVDB API docs.

License

The MIT License (MIT)

You can’t perform that action at this time.