0.5.0 • Published 9 years ago
trakt-utils v0.5.0
trakt-utils
Opinionated utils for trakt.tv api
Install
$ npm install trakt-utils --saveUsage
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 URLsection, copy the pin.getTimeline(interval)getReport(interval)startScrobble(media, progress)pauseScrobble(media, progress)addToHistory(media)getWatched(type)-typecan be eithershowsormoviesgetMovie(id)getShow(id)getShowSeasons(id)getShowSeason(id, season)getCompleteShows(hashFunction, getCache, setCache, onUpdate)
Every method returns a promise
License
MIT © ewnd9