0.0.7 • Published 5 years ago
themoviedb-node v0.0.7
themoviedb-node
Node.js Library to access the JSON-Api of TheMovieDb
.
Features
- Full types support through the Typescript base
- Promise based
- Error answers are represented by custom js errors
Installation
Using npm:
npm install themoviedb-node
Using yarn:
yarn add themoviedb-node
Usage:
import complete Api:
import TheMovieDb from 'themoviedb-node'
const tmdb = TheMovieDb('API_KEY')
# get TV details
tmdb.tv().getDetails(1)
.then((tv) => {/* process data */})
.catch(error => {/* handle error */})
import only a specific api:
import { TmdbTvAdapter } from 'themoviedb-node'
const tv = TmdbTvAdapter('API_KEY')
# get TV details
tv.getDetails(1)
.then((tv) => {/* process data */})
.catch(error => {/* handle error */})