1.2.0 • Published 1 month ago

tmdb-js-web v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

tmdb-js-web

tmdb-js-web is a fully-typed TypeScript wrapper for the TMDB API. It is designed for use in browser-based JavaScript applications and supports both v3 and v4 of the TMDB API. Browser support

For Node.js, use the tmdb-js-node package.

Installation

npm install tmdb-js-web

Getting started

The library supports the v3 and v4 version of the TMDB API. To use the library, you first need to obtain an API key from the TMDB website. You can then create an instance of the TMDBAPI class and pass your API key to it:

import { TMDBWebApi } from "tmdb-js-web";
const api = new TMDBWebAPI("your_api_key");

If you would like to also use the v4 API:

import { TMDBWebApi } from "tmdb-js-web";
const api = new TMDBWebAPI("your_api_key", "<your_access_token>");

You can then call any of the methods available on the api instance, which correspond to the various API endpoints. For example, multisearch:

import { TMDBWebAPI } from "tmdb-js-web";

const api = new TMDBWebAPI("your_api_key");

api.v3.search
  .searchMulti({
    query: "Star wars",
  })
  .then((data) => {
    console.log(data);
  });

Or using async/await:

const response = await api.v3.search.searchMulti({
    query: "Star wars"
})
console.log(response);

API endpoints

The package supports all endpoints:

V3

  • Account
  • Authentication
  • Certifications
  • Changes
  • Collections
  • Companies
  • Configuration
  • Credits
  • Discover
  • Find
  • Genres
  • Guest sessions
  • Keywords
  • Lists
  • Movies
  • Networks
  • Trending
  • People
  • Reviews
  • Search
  • TV
  • TV Seasons
  • TV Episodes
  • TV Episode Groups
  • Watch Providers

V4

  • Account
  • Auth
  • List
1.2.0

1 month ago

1.1.10

2 months ago

1.1.9

3 months ago

1.1.8

5 months ago

1.1.7

5 months ago

1.1.6

5 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago