Skip to content

olingerc/thetvdb-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Thetvdb-api

Node.js library for accessing TheTVDB Api.

Index

Installation

Install with the Node.JS package manager npm:

npm install thetvdb-api

or

Install via git clone:

git clone https://github.com/joaocampinhos/thetvdb-api.git
cd thetvdb-api
npm install

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.

var tvDB    = require("thetvdb-api"),
    key     = "abc123";

tvDB(key).getSeries("the Simpsons", function(err, res) {
  if (!err) console.log(res);
});

API

Since this api is a little bit different that the usual REST api's I tried to change things a bit and simplified some of the names. Not all API endpoints are available but you can see them all here: http://www.thetvdb.com/wiki/index.php/Programmers_API#File_Structure

Here are the ones provided in the library so far:

// Get all the available languages
tvDB(key).getLanguages(function(err,res){ });

// Get the current language
tvDB(key).getLanguage();

// Set a different language
tvDB(key).setLanguages(lang);

// Get the current server time
tvDB(key).getTime(function(err,res){ });

// Get the series that matches the name
tvDB(key).getSeries(name, function(err,res){ });

// Get the series basic information that matches the id
tvDB(key).getSeriesById(id, function(err,res){ });

// Get the series full information that matches the id
tvDB(key).getSeriesAllById(id, function(err,res){ });

// Get all the actors of a given series
tvDB(key).getActors(id, function(err,res){ });

// Get all the banners of a given series
tvDB(key).getBanners(id, function(err,res){ });

// Get updated shows since the last time
tvDB(key).getUpdates(time, function(err,res){ });

License

The MIT License (MIT)

Copyright (c) 2013 João Campinhos [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%