Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Node.js library for accessing TheTVDB API

License

NotificationsYou must be signed in to change notification settings

edwellbrook/node-tvdb

Repository files navigation

Build Statusnpm Downloads

Node.js library for accessingTheTVDB JSON API. Originally based onjoaocampinhos/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 withnpm:

npm install --save node-tvdb

And run tests withMocha:

TVDB_KEY=[YOUR API KEY HERE] npmtest

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 onehere. Then just follow this simple example that fetches all the shows containing "The Simpsons" in the name.

constTVDB=require('node-tvdb');consttvdb=newTVDB('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 seeTheTVDB API docs.

License

The MIT License (MIT)


[8]ページ先頭

©2009-2025 Movatter.jp