trakt.tv-ondeck
Advanced tools
Plugin for adding 'ondeck' to trakt.tv module
Weekly downloads
Readme
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.
npm install trakt.tv trakt.tv-ondeck
const Trakt = require('trakt.tv');
let trakt = new Trakt({
client_id: '',
client_secret: '',
plugins: {
ondeck: require('trakt.tv-ondeck')
}
});
let onDeckToWatch = {};
trakt.ondeck.getAll().then(function (results) {
onDeckToWatch = results;
console.log(onDeckToWatch);
});
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)
// let's say we just watched Arrow 01x01 - Pilot that was on the 'on deck' propositions
trakt.ondeck.updateOne(onDeckToWatch, 'arrow').then(function (updatedResults) {
onDeckToWatch = updatedResults;
console.log(updatedResults);
});
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