@leandrowkz/tmdb v2.1.2
📦 🎥 TMDB TypeScript client
This package is a TS wrapper client for The Movie Database API. It provides an easy way to use and acceess TMDB available apis at version 3.
Installation
// Using npm
npm i @leandrowkz/tmdb
// Using yarn
yarn add @leandrowkz/tmdb
Basic usage
This client is organized in the same namespace structure present on TMDB documentation. You'll need create a register and an API key to interact with TMDB API. After that, just create a new instance from TMDB wrapper client:
import { TMDB } from '@leandrowkz/tmdb'
const tmdb = new TMDB({ apiKey: 'CREATED_ON_TMDB' })
const fightClub = await tmdb.movies.details(550)
console.log(fightClub)
{
"adult": false,
"backdrop_path": "/fCayJrkfRaCRCTh8GqN30f8oyQF.jpg",
"belongs_to_collection": null,
"budget": 63000000,
"genres": [...],
"homepage": "",
"id": 550,
"imdb_id": "tt0137523",
"original_language": "en",
"original_title": "Fight Club",
"overview": "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.",
"popularity": 0.5,
"poster_path": null,
"production_companies": [...],
"production_countries": [...],
"release_date": "1999-10-12",
"revenue": 100853753,
"runtime": 139,
"spoken_languages": [...],
"status": "Released",
"tagline": "How much can you know about yourself if you've never been in a fight?",
"title": "Fight Club",
"video": false,
"vote_average": 7.8,
"vote_count": 3439
}
Available APIs
This client wraps all available apis as namespaces inside of it. All you need is invoke them under a single client and your IDE must autocomplete everything:
import { TMDB } from '@leandrowkz/tmdb'
export const tmdb = new TMDB({ apiKey: 'YOUR_API_KEY' })
console.log(
// https://developers.themoviedb.org/3/certifications/get-movie-certifications
await tmdb.certifications.movie(),
// https://developers.themoviedb.org/3/certifications/get-tv-certifications
await tmdb.certifications.tv()
)
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago