{"id":18665316,"url":"https://github.com/robertklep/node-trakt-api","last_synced_at":"2025-04-11T22:31:02.469Z","repository":{"id":31169044,"uuid":"34729247","full_name":"robertklep/node-trakt-api","owner":"robertklep","description":"Trakt API v2 client for Node.js","archived":false,"fork":false,"pushed_at":"2017-06-28T15:21:16.000Z","size":25,"stargazers_count":22,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T01:53:18.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertklep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-28T12:31:26.000Z","updated_at":"2025-01-08T08:38:35.000Z","dependencies_parsed_at":"2022-09-02T21:21:05.273Z","dependency_job_id":null,"html_url":"https://github.com/robertklep/node-trakt-api","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-trakt-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-trakt-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-trakt-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-trakt-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertklep","download_url":"https://codeload.github.com/robertklep/node-trakt-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489539,"owners_count":21112595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:27:11.280Z","updated_at":"2025-04-11T22:31:02.115Z","avatar_url":"https://github.com/robertklep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Trakt.tv API v2\n\nNode.js client for the [Trakt.tv API](http://docs.trakt.apiary.io/).\n\nWork in progress!\n\n### Installation\n\n```\n$ npm i trakt-api\n```\n\n### Quick example\n\n```javascript\nvar Trakt = require('trakt-api');\nvar trakt = Trakt(API_KEY[, OPTIONS]);\n\n// Promises...\ntrakt.show('manhattan', { extended : 'full' }).then(function(show) {\n  console.log('%j', show);\n}).catch(function(err) {\n  console.warn('oh noes', err);\n});\n\n// ...or regular callbacks\ntrakt.show('manhattan', { extended : 'full' }, function(err, show) {\n  if (err) return console.warn('oh noes', err);\n  console.log('%j', show);\n});\n```\n\n### Constructor\n\n```javascript\nvar trakt = Trakt(API_KEY : String [, OPTIONS : Object]);\n```\n\n* `API_KEY` is the _Client ID_ value listed on your [application's page](https://trakt.tv/oauth/applications). You need to [create a new application](https://trakt.tv/oauth/applications/new) before you can use this API.\n* `OPTIONS` is an optional object that may contain the following properties:\n\n```\nextended : String   // default \"extended\" level (default: 'min')\nlogLevel : String   // log level                (default: 'info')\npoolSize : Number   // HTTP request pool size   (default: 5)\ntimeout  : Number   // HTTP timeout in ms       (default: 30000)\n```\n\n### API methods\n\nMost API methods are generated from `endpoints.json`, although not all are implemented yet (see below). API methods generally have required and optional arguments. Required arguments are enforced and will cause an error to be thrown if not defined.\n\nMost API methods also accept an optional `OPTIONS` object. There's one valid option for now:\n\n* `extended`: use an [extended information level](http://docs.trakt.apiary.io/#introduction/extended-info)\n\nHowever, this option doesn't apply to all API methods. Refer to the Trakt API documentation.\n\n##### Promises versus callbacks\n\nIf you don't like promises, or just prefer old school callbacks, pass a function as last argument. Otherwise, all methods return a promise. See the example above.\n\n### Methods currently implemented\n\nPlease refer to the [API documentation](http://docs.trakt.apiary.io/) for more information on each method.\n\n```javascript\ntrakt.search(QUERY:String[, TYPE:String][, YEAR:Number][, CALLBACK])\n\ntrakt.searchAll(QUERY:String[, YEAR:Number][, CALLBACK])\n\ntrakt.searchShow(QUERY:String[, YEAR:Number][, CALLBACK])\n\ntrakt.searchMovie(QUERY:String[, YEAR:Number][, CALLBACK])\n\ntrakt.searchEpisode(QUERY:String[, YEAR:Number][, CALLBACK])\n\ntrakt.searchPerson(QUERY:String[, YEAR:Number][, CALLBACK])\n\ntrakt.calendarMyShowsNew([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarMyShowsPremieres([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarMyMovies([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarAllShows([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarAllShowsNews([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarAllShowsPremieres([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.calendarAllMovies([START_DATE][, DAYS][, OPTIONS][, CALLBACK])\n\ntrakt.moviePopular([OPTIONS][, CALLBACK])\n\ntrakt.movieTrending([OPTIONS][, CALLBACK])\n\ntrakt.movieUpdates([START_DATE][, OPTIONS][, CALLBACK])\n\ntrakt.movie(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieAliases(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieReleases(ID[, COUNTRY][, OPTIONS][, CALLBACK])\n\ntrakt.movieTranslations(ID[, LANGUAGE][, OPTIONS][, CALLBACK])\n\ntrakt.movieComments(ID[, OPTIONS][, CALLBACK])\n\ntrakt.moviePeople(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieRatings(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieRelated(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieStats(ID[, OPTIONS][, CALLBACK])\n\ntrakt.movieWatching(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showPopular([OPTIONS][, CALLBACK])\n\ntrakt.showTrending([OPTIONS][, CALLBACK])\n\ntrakt.showUpdates([START_DATE][, OPTIONS][, CALLBACK])\n\ntrakt.show(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showAliases(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showTranslations(ID[, LANGUAGE][, OPTIONS][, CALLBACK])\n\ntrakt.showComments(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showProgressCollection(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showProgressWatched(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showPeople(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showRatings(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showRelated(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showStats(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showWatching(ID[, OPTIONS][, CALLBACK])\n\ntrakt.showSeasons(ID[, OPTIONS][, CALLBACK])\n\ntrakt.season(ID, SEASON[, OPTIONS][, CALLBACK])\n\ntrakt.seasonComments(ID, SEASON[, OPTIONS][, CALLBACK])\n\ntrakt.seasonRatings(ID, SEASON[, OPTIONS][, CALLBACK])\n\ntrakt.seasonStats(ID, SEASON[, OPTIONS][, CALLBACK])\n\ntrakt.seasonWatching(ID, SEASON[, OPTIONS][, CALLBACK])\n\ntrakt.episode(ID, SEASON, EPISODE[, OPTIONS][, CALLBACK])\n\ntrakt.episodeComments(ID, SEASON, EPISODE[, OPTIONS][, CALLBACK])\n\ntrakt.episodeRatings(ID, SEASON, EPISODE[, OPTIONS][, CALLBACK])\n\ntrakt.episodeStats(ID, SEASON, EPISODE[, OPTIONS][, CALLBACK])\n\ntrakt.episodeWatching(ID, SEASON, EPISODE[, OPTIONS][, CALLBACK])\n\ntrakt.userHistory(USERNAME[, TYPE][, ID][, CALLBACK])\n\ntrakt.userWatching(USERNAME[, CALLBACK])\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-trakt-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertklep%2Fnode-trakt-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-trakt-api/lists"}