1.2.1 • Published 10 years ago

tvshowtime-api v1.2.1

Weekly downloads
31
License
-
Repository
github
Last release
10 years ago

TVShowTime - API

Simple module used to access the TVShowTime API

Install

npm install tvshowtime-api

Use

var api = require('tvshowtime-api')
var tv = new api('YOUR_TOKEN')

Get your token

GOTO http://tvsapi.lunik.xyz

Methods

getUser(callback)

Get the user info.

getToWatch(options, callback)

Get the user to-watch list.

Options:

NameTypeDescription
pageintegerPage number. Default: 0
limitintegerElements per page. Default: 10
langstringLanguage of the content (en, fr, es, it, pt). Default: user lang
getAgenda(options, callback)

Get the user agenda.

Options:

NameTypeDescription
pageintegerPage number. Default: 0
limitintegerElements per page. Default: 10
include_watchedbooleanInclude watched episodes in results.
getLibrary(options, callback)

Get the user library.

Options:

NameTypeDescription
pageintegerPage number. Default: 0
limitintegerElements per page. Default: 10
explore(options, callback)

Discover trending shows.

Options:

NameTypeDescription
pageintegerPage number. Default: 0
limitintegerElements per page. Default: 10
getShow(options, callback)

Get show data.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
show_name *stringThe name of the show.
include_episodesbooleanInclude all episodes in results.
exactbooleanExact match for show name. Default: 0
follow(options, callback)

Check if a show is followed.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
isfollowed(options, callback)

Check if a show is followed.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
unfollow(options, callback)

Unfollow a show.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
archive(options, callback)

Archive a show.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
isArchived(options, callback)

Check if a show is archived.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
unArchive(options, callback)

Unarchive a show.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
setShowProgress(options, callback)

Set the progress for a show.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
seasonintegerThe season number.
episodeintegerThe episode number.
  • If season is set, mark the whole season seen.
  • If season and episode are set, mark all episodes seen until season and episode number (included).
  • If nothing is set, mark the whole show as seen.
deleteShowProgress(options, callback)

Delete the progress for a show.

Options:

NameTypeDescription
show_id *integerThe TVDB ID of the show.
seasonintegerThe season number.
episodeintegerThe episode number.
getEpisode(options, callback)

Get episode data.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
setWatchedEpisode(options, callback)

Mark an episode as watched.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
publish_on_tickerbooleanPublish on Facebook.
publish_on_twitterbooleanPublish on Twitter.
auto_followbooleanAuto-follow the show if not already followed. Default: 1
isWatchedEpisode(options, callback)

Check if an episode was watched.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
unwatchEpisode(options, callback)

Unmark an episode as watched.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
getProgess(options, callback)

Get the progress for an episode.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
setProgess(options, callback)

Set the progress for an episode.

Options:

NameTypeDescription
filename *stringThe filename of the episode. e.g. "game.of.thrones.s04e10.720p.hdtv.x264-killers.mkv"
episode_id *integerThe TVDB ID of the episode.
imdb_id *stringThe IMDB ID of the episode.
show_id*integerThe TVDB ID of the show.
season_number *integerSeason number of the episode.
number *integerEpisode number of the episode.
setEmotion(options, callback)

Set the emotion for an episode.

NameTypeDescription
episode_id *integerThe TVDB ID of the episode.
emotion_id *integerThe emotion the user felt.

emotion_id: 1 Good - 2 Fun - 3 Wow - 4 Sad - 6 Soso - 7 Bad

deleteEmotion(options, callback)

Delete the emotion for an episode.

NameTypeDescription
episode_id *integerThe TVDB ID of the episode.
1.2.1

10 years ago

1.2.0

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago