0.9.1 ā€¢ Published 1 year ago

better-trakt v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Better Trakt

GitHub license npm

A Trakt.tv client with native Typescript support and quality of life features

Features

  • šŸ–µ Browser & Node.js support
  • šŸ”’ No auth lock-in
  • šŸ‘„ Able to handle > 1 user ^1
  • šŸŒ² Tree Shakable
  • šŸŒ Trakt specific http errors
  • šŸ—ļø Built with TypeScript

^1: This really shouldn't need be a "feature," but all the other SDKs can only handle 1 user at a time so it is.

Install

# npm
npm install better-trakt

# Yarn
yarn add better-trakt

# pnpm
pnpm add better-trakt

Usage

import { Trakt } from 'better-trakt';

const client = new Trakt({
  clientId: 'client id',
  clientSecret: 'client secret',
});

// get every movie a user has watched
const watchedMovies = await client.users.watchedMovies({ userId: '1234', accessToken: 'abcd123' });

// get the summary for the show with the trakt id of "1"
const show1 = await client.shows.summary('1');

More examples in the examples folder.

Compatibility

āœ…: Full Support | šŸš§: Partial Support | āŒ: No Support

Runtimes

RuntimeSupported
Node.jsāœ…
Browserāœ…^2

^2: See Axios's supported browsers, might also require a transpiler like babel, esbuild, etc.

Trakt Api

(All namespaces are planned, this is just what's currently supported.)

NamespaceSupported
Authentication - OAuthāŒ
Authentication - DevicesāŒ
CalendarsāŒ
CheckināŒ
Certificationsāœ…
CommentsāŒ
Countriesāœ…
Genresāœ…
Languagesāœ…
Listsāœ…
Moviesāœ…
Networksāœ…
PeopleāŒ
RecommendationsāŒ
ScrobbleāŒ
SearchāŒ
Showsāœ…
SeasonsāŒ
EpisodesāŒ
SyncāŒ
UsersšŸš§

Docs

Docs for the latest release can be found at https://getaugur.github.io/better-trakt/. For a more complete understanding of the api in general please visit https://trakt.docs.apiary.io/.

Getting Images

As described in the offical docs, you need to use 3rd party APIs. Listed below are some libraries we recommend using, all of which have typescript support:

āš ļø Alpha Notice

Until beter-trakt reaches 1.0, there may be breaking changes in new minor versions.

0.9.0

2 years ago

0.9.1

1 year ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago