Socket
Socket
Sign inDemoInstall

trakt.tv

Package Overview
Dependencies
34
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.2.0 to 8.0.0

14

docs/available_methods.md
# Trakt.tv available methods
This help doc was last generated for trakt.tv@7.2.0 on Mon Jul 15 2019
This help doc was last generated for trakt.tv@8.0.0 on Wed Feb 26 2020

@@ -118,3 +118,3 @@ ## How to read the table ?

| trakt.shows.progress.watched() | required | id | hidden, specials, count_specials, last_activity | *none* | "full" | GET | api.trakt.tv/shows/**id**/progress/watched |
| trakt.shows.people() | *none* | id | *none* | *none* | "full" | GET | api.trakt.tv/shows/**id**/people |
| trakt.shows.people() | *none* | id | *none* | *none* | "full", "guest_stars" | GET | api.trakt.tv/shows/**id**/people |
| trakt.shows.ratings() | *none* | id | *none* | *none* | *none* | GET | api.trakt.tv/shows/**id**/ratings |

@@ -130,2 +130,3 @@ | trakt.shows.related() | *none* | id | *none* | paginated | "full" | GET | api.trakt.tv/shows/**id**/related |

| trakt.seasons.lists() | *none* | id, season | type, sort | paginated | *none* | GET | api.trakt.tv/shows/**id**/seasons/**season**/lists |
| trakt.seasons.people() | *none* | id, season | *none* | *none* | "guest_stars" | GET | api.trakt.tv/shows/**id**/seasons/**season**/people |
| trakt.seasons.ratings() | *none* | id, season | *none* | *none* | *none* | GET | api.trakt.tv/shows/**id**/seasons/**season**/ratings |

@@ -137,2 +138,3 @@ | trakt.seasons.watching() | *none* | id, season | *none* | *none* | "full" | GET | api.trakt.tv/shows/**id**/seasons/**season**/watching |

| trakt.episodes.lists() | *none* | id, season, episode | type, sort | paginated | *none* | GET | api.trakt.tv/shows/**id**/seasons/**season**/episodes/**episode**/lists |
| trakt.episodes.people() | *none* | id, season, episode | *none* | *none* | "guest_stars" | GET | api.trakt.tv/shows/**id**/seasons/**season**/episodes/**episode**/people |
| trakt.episodes.ratings() | *none* | id, season, episode | *none* | *none* | *none* | GET | api.trakt.tv/shows/**id**/seasons/**season**/episodes/**episode**/ratings |

@@ -149,6 +151,6 @@ | trakt.episodes.stats() | *none* | id, season, episode | *none* | *none* | *none* | GET | api.trakt.tv/shows/**id**/seasons/**season**/episodes/**episode**/stats |

| trakt.sync.history.get() | required | *none* | type, id, start_at, end_at | paginated | "full" | GET | api.trakt.tv/sync/history |
| trakt.sync.history.add() | required | *none* | movies, shows, episodes | *none* | *none* | POST | api.trakt.tv/sync/history |
| trakt.sync.history.add() | required | *none* | movies, shows, seasons, episodes | *none* | *none* | POST | api.trakt.tv/sync/history |
| trakt.sync.history.remove() | required | *none* | movies, shows, episodes, ids | *none* | *none* | POST | api.trakt.tv/sync/history/remove |
| trakt.sync.ratings.get() | required | *none* | rating, type | *none* | "full" | GET | api.trakt.tv/sync/ratings |
| trakt.sync.ratings.add() | required | *none* | movies, shows, episodes | *none* | *none* | POST | api.trakt.tv/sync/ratings |
| trakt.sync.ratings.get() | required | *none* | rating, type | *optional* | "full" | GET | api.trakt.tv/sync/ratings |
| trakt.sync.ratings.add() | required | *none* | movies, shows, seasons, episodes | *none* | *none* | POST | api.trakt.tv/sync/ratings |
| trakt.sync.ratings.remove() | required | *none* | movies, shows, episodes | *none* | *none* | POST | api.trakt.tv/sync/ratings/remove |

@@ -188,3 +190,3 @@ | trakt.sync.watchlist.get() | required | *none* | type | *optional* | "full" | GET | api.trakt.tv/sync/watchlist |

| trakt.users.history() | *optional* | username | type, item_id, start_at, end_at | paginated | "full" | GET | api.trakt.tv/users/**username**/history |
| trakt.users.ratings() | *optional* | username | rating, type | *none* | "full" | GET | api.trakt.tv/users/**username**/ratings |
| trakt.users.ratings() | *optional* | username | rating, type | *optional* | "full" | GET | api.trakt.tv/users/**username**/ratings |
| trakt.users.watchlist() | *optional* | username | type | *optional* | "full" | GET | api.trakt.tv/users/**username**/watchlist |

@@ -191,0 +193,0 @@ | trakt.users.watching() | *optional* | username | *none* | *none* | *none* | GET | api.trakt.tv/users/**username**/watching |

@@ -681,3 +681,3 @@ {

"opts": {
"extended": ["full"]
"extended": ["full", "guest_stars"]
},

@@ -765,2 +765,10 @@ "method": "GET",

},
"/seasons/people": {
"opts": {
"extended": ["guest_stars"]
},
"method": "GET",
"url": "/shows/:id/seasons/:season/people",
"optional": []
},
"/seasons/ratings": {

@@ -810,2 +818,10 @@ "opts": {},

},
"/episodes/people": {
"opts": {
"extended": ["guest_stars"]
},
"method": "GET",
"url": "/shows/:id/seasons/:season/episodes/:episode/people",
"optional": []
},
"/episodes/ratings": {

@@ -920,2 +936,3 @@ "opts": {},

"shows": null,
"seasons": null,
"episodes": null

@@ -942,2 +959,3 @@ },

"auth": true,
"pagination": "optional",
"extended": ["full"]

@@ -958,2 +976,3 @@ },

"shows": null,
"seasons": null,
"episodes": null

@@ -1311,2 +1330,3 @@ },

"auth": "optional",
"pagination": "optional",
"extended": ["full"]

@@ -1313,0 +1333,0 @@ },

{
"name": "trakt.tv",
"version": "7.2.0",
"version": "8.0.0",
"description": "Interact with Trakt.tv API in NodeJS",

@@ -22,3 +22,3 @@ "keywords": [

"dependencies": {
"got": "^9.6.0",
"got": "^10.6.0",
"sanitizer": "^0.1.3"

@@ -25,0 +25,0 @@ },

@@ -86,3 +86,3 @@ 'use strict';

this._debug(req);
return got(req.url, req).then(response => {
return got(req).then(response => {
const body = JSON.parse(response.body);

@@ -107,11 +107,12 @@

'User-Agent': this._settings.useragent,
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization' : `Bearer ${this._authentication.access_token}`,
'trakt-api-version': '2',
'trakt-api-key': this._settings.client_id
'Content-Type': 'application/json'
},
body: `token=[${this._authentication.access_token}]`
body: JSON.stringify({
token: this._authentication.access_token,
client_id: this._settings.client_id,
client_secret: this._settings.client_secret
})
};
this._debug(req);
got(req.url, req);
got(req);
}

@@ -132,3 +133,3 @@

this._debug(req);
return got(req.url, req).then(response => this._sanitize(JSON.parse(response.body))).catch(error => {
return got(req).then(response => this._sanitize(JSON.parse(response.body))).catch(error => {
throw (error.response && error.response.statusCode == 401) ? Error(error.response.headers['www-authenticate']) : error;

@@ -151,3 +152,3 @@ });

const name = queryParams[i].split('=')[0];
(params[name] || params[name] === 0) && queryParts.push(`${name}=${params[name]}`);
(params[name] || params[name] === 0) && queryParts.push(`${name}=${encodeURIComponent(params[name])}`);
}

@@ -176,3 +177,3 @@ }

for (let p in params) {
filters.indexOf(p) !== -1 && queryParts.indexOf(`${p}=${params[p]}`) === -1 && queryParts.push(`${p}=${params[p]}`);
filters.indexOf(p) !== -1 && queryParts.indexOf(`${p}=${encodeURIComponent(params[p])}`) === -1 && queryParts.push(`${p}=${encodeURIComponent(params[p])}`);
}

@@ -223,6 +224,10 @@

req.body = JSON.stringify(req.body);
if (method.method === 'GET') {
delete req.body;
} else {
req.body = JSON.stringify(req.body);
}
this._debug(req);
return got(req.url, req).then(response => this._parseResponse(method, params, response));
return got(req).then(response => this._parseResponse(method, params, response));
}

@@ -229,0 +234,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc