trakt-utils
v0.3.0 trakt tv tv-shows movies
trakt-utils
Opinionated utils for trakt.tv api
Install
$ npm install trakt-utils --save
Usage
import Trakt from 'trakt-utils';
const trakt = new Trakt('<id>', '<secret>', '<optional-token>');
Api
getAccessToken(pin)
- To get a pin you need to openhttps://trakt.tv/oauth/applications
, open your application, open a link fromPIN URL
section, copy the pin.getTimeline(interval)
getReport(interval)
startScrobble(media, progress)
pauseScrobble(media, progress)
addToHistory(media)
getWatched(type)
-type
can be eithershows
ormovies
getMovie(id)
getShow(id)
getShowSeasons(id)
getShowSeason(id, season)
getCompleteShows(hashFunction, getCache, setCache, onUpdate)
Every method returns a promise
License
MIT © ewnd9