2.1.2 • Published 10 months ago

@leandrowkz/tmdb v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

📦 🎥 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.

Autocomplete TMDB

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()
)
APITMDB DocsAccessStatus
Accounthttps://developers.themoviedb.org/3/accounttmdb.account.*Done
Authenticationhttps://developers.themoviedb.org/3/authenticationtmdb.authentication.*Done
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-sessionstmdb.guestSessions.*Done
Keywordshttps://developers.themoviedb.org/3/keywordstmdb.keywords.*Done
Listshttps://developers.themoviedb.org/3/liststmdb.lists.*Done
Movieshttps://developers.themoviedb.org/3/moviestmdb.movies.*Done
Networkshttps://developers.themoviedb.org/3/networkstmdb.networks.*Done
Trendinghttps://developers.themoviedb.org/3/trendingtmdb.trending.*Done
Peoplehttps://developers.themoviedb.org/3/peopletmdb.people.*Done
Reviewshttps://developers.themoviedb.org/3/reviewstmdb.reviews.*Done
Searchhttps://developers.themoviedb.org/3/searchtmdb.search.*Done
TVhttps://developers.themoviedb.org/3/tvtmdb.tv.*Done
TV Episodeshttps://developers.themoviedb.org/3/tv-episodestmdb.tvEpisodes.*Done
TV Seasonshttps://developers.themoviedb.org/3/tv-seasonstmdb.tvSeasons.*Done
TV Episode Groupshttps://developers.themoviedb.org/3/tv-episode-groupstmdb.tvEpisodeGroups.*Done
Watch Providershttps://developers.themoviedb.org/3/watch-providerstmdb.watchProviders.*Done
2.1.2

10 months ago

1.19.0

1 year ago

1.17.2

1 year ago

1.18.0

1 year ago

1.17.3

1 year ago

2.1.1

12 months ago

2.0.2

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.17.1

1 year ago

1.17.0

1 year ago

1.16.0

1 year ago

1.15.0

1 year ago

1.14.0

1 year ago

1.13.0

1 year ago

1.12.1

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.2

1 year ago

1.9.1

1 year ago

1.9.0

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.4

1 year ago