Giter VIP home page Giter VIP logo

better-trakt's Introduction

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

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

Runtime Supported
Node.js โœ…
Browser โœ…2

Trakt Api

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

Namespace Supported
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.

Footnotes

  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. โ†ฉ

  2. See Axios's supported browsers, might also require a transpiler like babel, esbuild, etc. โ†ฉ

better-trakt's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar huskydog9988 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

better-trakt's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.