tvdb.js
Node.js wrapper for thetvdb.com API. It is promise-based and uses the ES6 syntax (you must at least use the stable version of Node.js).
- Promise-based
- Abstracts all the unnecessary data structure returned from thetvdb.com API
- Lowercase attributes
- Returns the season & episode numbers as integers
- Multi-language support
Installation
npm install tvdbjs
Initialization
const tv = 'API_KEY'
Retrieve a show
Retrieve a show using its ID:
tv
Retrieve a show using its name:
tv
You can specify an optional language parameter (english by default), for example:
tv
Retrieve a show episodes
The query below returns the show as well as all the episodes:
tv // Failed to fetch the serie
You can also use the await
keyword (this is an ES6 feature):
try const show = await tv console console console // Make use of the native find Javascript function to filter the episodes const episode = showepisodes console // The Robotic Manipulation // Access the episode's season and number console console catch err console
Licence
MIT