- Notifications
You must be signed in to change notification settings - Fork28
Node.js library for accessing TheTVDB API
License
edwellbrook/node-tvdb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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.
- 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
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.
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 */});
Generated API docs with code examples can be found at:edwellbrook.github.io/node-tvdb.
For details on response data, please seeTheTVDB API docs.
The MIT License (MIT)
About
Node.js library for accessing TheTVDB API