Trakt.tv OnDeck
Extends https://github.com/vankasteelj/trakt.tv node module, in order to get the equivalent of "on deck to watch"
NOTICE: requires trakt.tv module! Load this plugin directly through trakt.tv
module.
- Install:
npm install trakt.tv trakt.tv-ondeck
- Load the plugin:
const Trakt = ;let trakt = client_id: '' client_secret: '' plugins: ondeck: ;
- Log in with trakt.tv, then call "ondeck":
let onDeckToWatch = {};traktondeck;
Note: you can bypass the builtin trakt.sync.watched({type:'shows'})
by passing the resulting array as an argument, i.e. trakt.ondeck.getAll(watchedArray)
- To avoid calling getAll() everytime, you can use updateOne() after an episode was seen:
// let's say we just watched Arrow 01x01 - Pilot that was on the 'on deck' propositionstraktondeck;
note: 'arrow' is the slug, you can also use an ID like imdb if you want. onDeckToWatch is the exact object you recieved from getAll()
License MIT, (c) vankasteelj