An open API service indexing awesome lists of open source software.

https://github.com/blakejoy/tmdb-ts

Typescript client wrapper for TheMovieDB (TMDB) v3
https://github.com/blakejoy/tmdb-ts

tmdb tmdb-api tmdb-movie tmdb-rest-api typescript

Last synced: 2 months ago
JSON representation

Typescript client wrapper for TheMovieDB (TMDB) v3

Awesome Lists containing this project

README

        

# tmdb-ts

Typescript library wrapper of [TMDB API](https://developers.themoviedb.org/) v3 .

[![Version npm](https://img.shields.io/npm/v/tmdb-ts.svg?style=flat-square)](https://www.npmjs.com/package/tmdb-ts)[![npm Downloads](https://img.shields.io/npm/dm/tmdb-ts.svg?style=flat-square)](https://npmcharts.com/compare/tmdb-ts?minimal=true)

This uses new jwt authentication token for requests so there is no need to append api key to the url.
Once you have registered for access to the api you can use your access token as follows:

Installation:
``
npm install --save tmdb-ts
``

Version 1.0 removed the default import so make sure you update accordingly!

```js
import { TMDB } from 'tmdb-ts';

const tmdb = new TMDB('accessToken');

try {
const movies = await tmdb.search.movies({ query: 'American Pie' });
console.log(movies);
} catch(err) {
// handle error
}
```