1.3.3 • Published 2 years ago

@lewkz/tmdb v1.3.3

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

🍿 TMDB Typescript client

This package is a typescript wrapper client for The Movie Database API. It provides an easy way to use and acceess TMDB available apis at version 3.

Autocomplete TMDB

Installation

// Using npm
npm i @lewkz/tmdb

// Using yarn
yarn add @lewkz/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 '@lewkz/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 '@lewkz/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()
)
APITMDB DocsAccessStatus
Accounthttps://developers.themoviedb.org/3/account-WIP
Authenticationhttps://developers.themoviedb.org/3/authentication-WIP
Certificationshttps://developers.themoviedb.org/3/certificationstmdb.certifications.*Done
Changeshttps://developers.themoviedb.org/3/changestmdb.changes.*Done
Collectionshttps://developers.themoviedb.org/3/collectionstmdb.collections.*Done
Companieshttps://developers.themoviedb.org/3/companiestmdb.certifications.*Done
Configurationhttps://developers.themoviedb.org/3/configurationtmdb.configuration.*Done
Creditshttps://developers.themoviedb.org/3/creditstmdb.credits.*Done
Discoverhttps://developers.themoviedb.org/3/discovertmdb.discover.*Done
Findhttps://developers.themoviedb.org/3/findtmdb.find.*Done
Genreshttps://developers.themoviedb.org/3/genrestmdb.genres.*Done
Guest Sessionshttps://developers.themoviedb.org/3/guest-sessions-WIP
Keywordshttps://developers.themoviedb.org/3/keywords-WIP
Listshttps://developers.themoviedb.org/3/lists-WIP
Movieshttps://developers.themoviedb.org/3/moviestmdb.movies.*Done
Networkshttps://developers.themoviedb.org/3/networks-WIP
Trendinghttps://developers.themoviedb.org/3/trending-WIP
Peoplehttps://developers.themoviedb.org/3/people-WIP
Reviewshttps://developers.themoviedb.org/3/reviews-WIP
Searchhttps://developers.themoviedb.org/3/search-WIP
TVhttps://developers.themoviedb.org/3/tv-WIP
TV Episodeshttps://developers.themoviedb.org/3/tv-episodes-WIP
TV Seasonshttps://developers.themoviedb.org/3/tv-seasons-WIP
TV Episode Groupshttps://developers.themoviedb.org/3/tv-episode-groups-WIP
Watch Providershttps://developers.themoviedb.org/3/watch-providers-WIP
1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago