0.0.5 • Published 2 years ago

tmdb-sdk v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

The Movie Database API - Software Development Kit

This SDK was developed to help all people that need to use TMDB API.

How to install?

You could download this from npm:

$ npm install tmdb-sdk

or using yarn if you prefere:

$ yarn add tmdb-sdk

If your project uses TypeScript you could donwload the types from @types/tmdb-sdk

How to use?

TMDB SDK usage is very simple. You just need to import it to your project and call TMDB class passing your API Key. If you don't know how to get TMDB API Key, consult the documentation here.

const { TMDB } = require('tmdb-sdk')

const tmdb = new TMDB('your_api_key')

Available methods

Disclaimer: you don't need to pass API Key parameter to any method below.

movie.details()

This method calls Movie Get Details endpoint. The params is the same present in documentation.

const res = async () => tmdb.movie.details({ movieId: 123 })
res().then((res) => {
    console.log(res)
})

movie.recommendation()

This method calls Movie Get Recommendations endpoint. The params is the same present in documentation.

const res = async () => tmdb.movie.recommendations({ movieId: 123 })
res().then((res) => {
    console.log(res)
})

search.movie()

This method calls Search Movie endpoint. The params is the same present in documentation.

const res = async () => tmdb.search.movie({ q: 'Pocahontas' })
res().then((res) => {
    console.log(res)
})
0.0.5

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago