Module: TVmaze

Methods

(static) episodeByDate(id, date) → {Promise.<Array.<Object>>}

Retrieve all episodes of the show that have aired on a specific date.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
date String ISO 8601 formatted date.
Source:
Returns:
Type
Promise.<Array.<Object>>
Example
TVmaze.episodeByDate(431, "1994-09-22").then(function(result) {
  console.log(result);
});

(static) episodeByNumber(id, season, episode) → {Promise.<Object>}

Retrieve one specific episode of the show given the season and episode number.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
season Number Season number.
episode Number Episode number.
Source:
Returns:
Information about the episode.
Type
Promise.<Object>
Example
TVmaze.episodeByNumber(171, 6, 22).then(function(result) {
  console.log(result);
});

(static) fullSchedule() → {Promise.<Array.<Object>>}

Retrieve a list of all future episodes known to TVmaze, regardless of their country.
Source:
Returns:
List of all future episodes.
Type
Promise.<Array.<Object>>
Example
TVmaze.fullSchedule().then(function(result) {
  console.log(result);
});

(static) peopleSearch(query) → {Promise.<Array.<Object>>}

Retrieve a list of people.
Parameters:
Name Type Description
query String The search query.
Source:
Returns:
List of people.
Type
Promise.<Array.<Object>>
Example
TVmaze.peopleSearch("andrew lincoln").then(function(result) {
  console.log(result);
});

(static) personCastCredits(id, embed) → {Promise.<Array.<Object>>}

Retrieve all (show-level) cast credits for a person.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
embed Boolean | null If true, embeds full information for the shows and characters.
Source:
Returns:
All (show-level) cast credits.
Type
Promise.<Array.<Object>>
Examples
TVmaze.personCastCredits(10260).then(function(result) {
  console.log(result);
});

Embed show and character information

TVmaze.personCastCredits(10260, true).then(function(result) {
  console.log(result);
});

(static) personCrewCredits(id, embed) → {Promise.<Array.<Object>>}

Retrive all (show-level) crew credits for a person.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
embed Boolean | null If true, embeds full information for the shows.
Source:
Returns:
All (show-level) crew credits.
Type
Promise.<Array.<Object>>
Examples
TVmaze.personCrewCredits(284).then(function(result) {
  console.log(result);
});

Embed show information

TVmaze.personCrewCredits(284, true).then(function(result) {
  console.log(result);
});

(static) personInfo(id, embed) → {Promise.<Object>}

Retrieve all primary information for a given person.
Parameters:
Name Type Description
id Number TVmaze ID of the person.
embed Boolean | null If true, embeds cast credits for the person.
Source:
Returns:
All primary information for a given person.
Type
Promise.<Object>
Examples
TVmaze.personInfo(3358).then(function(result) {
  console.log(result);
});

Embed cast credits

TVmaze.personInfo(3358, true).then(function(result) {
  console.log(result);
});

(static) schedule(countryCode, date) → {Promise.<Array.<Object>>}

Retrieve a complete list of episodes that air in a given country on a given day.
Parameters:
Name Type Description
countryCode String | null ISO 3166-1 code of the country. If set to null, it returns the schedule for the US.
date String | null ISO 8601 formatted date. If set to null, it returns the schedule for the current day.
Source:
Returns:
Type
Promise.<Array.<Object>>
Examples

countryCode and date

TVmaze.schedule("GB", "2015-11-28").then(function(result) {
  console.log(result);
});

Only countryCode

TVmaze.schedule("FR").then(function(result) {
  console.log(result);
});

Only date

TVmaze.schedule(null, "2015-11-27").then(function(result) {
  console.log(result);
});

(static) showAKAs(id) → {Promise.<Array.<Object>>}

Retrieve a list of aliases for the show.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
Source:
Returns:
List of aliases for the show.
Type
Promise.<Array.<Object>>
Example
TVmaze.showAKAs(73).then(function(result) {
  console.log(result);
});

(static) showCast(id) → {Promise.<Array.<Object>>}

Retrieve a list of main cast for the show.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
Source:
Returns:
List of main cast for the show.
Type
Promise.<Array.<Object>>
Example
TVmaze.showCast(1369).then(function(result) {
  console.log(result);
});

(static) showEpisodeList(id, specials) → {Promise.<Array.<Object>>}

Retrieve a complete list of episodes for the given show.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
specials Boolean | null If true, the list will include specials.
Source:
Returns:
Complete list of episodes for the given show.
Type
Promise.<Array.<Object>>
Examples
TVmaze.showEpisodeList(335).then(function(result) {
  console.log(result);
});

Include special episodes

TVmaze.showEpisodeList(335, true).then(function(result) {
  console.log(result);
});

(static) showIndex(pageNumber) → {Promise.<Array.<Object>>}

Retrieve a list of all shows in the TVmaze database, with all primary information included. This endpoint is paginated with a maximum of 250 results per page. Pagination is based on show ID.
Parameters:
Name Type Description
pageNumber Number The page number.
Source:
Returns:
List of shows in the TVmaze database.
Type
Promise.<Array.<Object>>
Example
TVmaze.showIndex(5).then(function(result) {
  console.log(result);
});

(static) showLookup(id, source) → {Promise.<Object>}

Retrieve information about the show from TVRage or TheTVDB.
Parameters:
Name Type Description
id Number The show's TVRage or TheTVDB ID.
source String Either tvrage or thetvdb.
Source:
Returns:
Information about the show.
Type
Promise.<Object>
Example
TVmaze.showLookup(257655, "thetvdb").then(function(result) {
  console.log(result);
});

(static) shows(id) → {Promise.<Object>}

Retrieve all primary information for a given show.
Parameters:
Name Type Description
id Number TVmaze ID of the show.
Source:
Returns:
Primary information for a given show.
Type
Promise.<Object>
Example
TVmaze.shows(82).then(function(result) {
  console.log(result);
});

(static) showSearch(query) → {Promise.<Array.<Object>>}

Retrieve search results.
Parameters:
Name Type Description
query String The search query.
Source:
Returns:
Search results.
Type
Promise.<Array.<Object>>
Example
TVmaze.showSearch("breaking bad").then(function(result) {
  console.log(result);
});

(static) showUpdates() → {Promise.<Object>}

Retrieve a list of all shows in the TVmaze database and the timestamp when they were last updated.
Source:
Returns:
A list of all shows in the TVmaze database and the timestamp when they were updated.
Type
Promise.<Object>
Example
TVmaze.showUpdates().then(function(result) {
  console.log(result);
});

(static) singleSearch(query) → {Promise.<Object>}

Retrieve a single search result.
Parameters:
Name Type Description
query String The search query.
Source:
Returns:
Single search result.
Type
Promise.<Object>
Example
TVmaze.singleSearch("orange is the new black").then(function(result) {
  console.log(result);
});