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. |
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. |
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.
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. |
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. |
Returns:
All (show-level) cast credits.
- Type
- Promise.<Array.<Object>>
Examples
TVmaze.personCastCredits(10260).then(function(result) {
console.log(result);
});
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. |
Returns:
All (show-level) crew credits.
- Type
- Promise.<Array.<Object>>
Examples
TVmaze.personCrewCredits(284).then(function(result) {
console.log(result);
});
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. |
Returns:
All primary information for a given person.
- Type
- Promise.<Object>
Examples
TVmaze.personInfo(3358).then(function(result) {
console.log(result);
});
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. |
Returns:
- Type
- Promise.<Array.<Object>>
Examples
TVmaze.schedule("GB", "2015-11-28").then(function(result) {
console.log(result);
});
TVmaze.schedule("FR").then(function(result) {
console.log(result);
});
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. |
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. |
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. |
Returns:
Complete list of episodes for the
given show.
- Type
- Promise.<Array.<Object>>
Examples
TVmaze.showEpisodeList(335).then(function(result) {
console.log(result);
});
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. |
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>}
Parameters:
Name | Type | Description |
---|---|---|
id |
Number | The show's TVRage or TheTVDB ID. |
source |
String | Either tvrage or thetvdb. |
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. |
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. |
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.
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. |
Returns:
Single search result.
- Type
- Promise.<Object>
Example
TVmaze.singleSearch("orange is the new black").then(function(result) {
console.log(result);
});