Socket
Socket
Sign inDemoInstall

themoviedb.js

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    themoviedb.js

Node.js Movie Database API wrapper for Node.js


Version published
Maintainers
1
Created

Readme

Source

themoviedb.js

The Movie Database API wrapper for Node.js.

Important

This product uses the TMDb API but is not endorsed or certified by TMDb.

Endpoints

  • /trending/all/{time_window}
  • /trending/movie/{time_window}
  • /trending/person/{time_window}
  • /trending/tv/{time_window}
  • /movie/popular
  • /person/popular
  • /tv/popular
  • /movie/now_playing
  • /movie/top_rated
  • /tv/top_rated

Docs

Official The Movie Database Documentation.

Prerequisites

  • Node.js

Installation

npm install themoviedb.js

Credentials

1. TMDb

# Account
Create an TMDb (https://www.themoviedb.org/) account.

# API Key
You can apply for an API key by clicking the "API" (https://www.themoviedb.org/settings/api) link from the left hand sidebar within your account settings page. You need to have a legitimate business name, address, phone number and description to apply for an API key.

Example

const Tmdb = require('themoviedb.js');

const tmdb = new Tmdb({ 
  apiKey: 'TMDB_API_KEY',
});

async function example() {
  try {
    const trending = await tmdb.all().getTrending();
    console.log(trending);

    const nowPlayingMovie = await tmdb.movie().getNowPlaying();
    console.log(nowPlayingMovie);

    const popularMovie = await tmdb.movie().getPopular();
    console.log(popularMovie);

    const trendingMovie = await tmdb.movie().getTrending();
    console.log(trendingMovie);

    const topRatedMovie = await tmdb.movie().getTopRated();
    console.log(topRatedMovie);
  } catch (err) {
    console.error(err);
  }
}

Built With

Authors

Acknowledgments

Keywords

FAQs

Last updated on 04 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc