A JavaScript library for EASILY fetching info from TheMovieDB API with support for torrent file names.

Overview

TheMovieDB-API-Wrapper.js

A easy to use, pure vanilla JavaScript API wrapper for TheMovieDB
Show your support!

A JavaScript library for easily fetching ALL info about movies / tv including (genres & actors) & more via TheMovieDB API. With support for finding media info for torrent names via Torrent Name Parser.

Example usage


How to use TheMovieDB-API-Wrapper.js:

⚠️ Error Handling: Any errors that occur will be returned inside a JSON key named tmdb_api_error


How to search up Movie info:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

A movie / film query name could look like the following example(s)

Captain America
Captain America (2014)
Captain America The Winter Soldier (2014) 1080p BrRip x264 - YIFY

for more accurate results, a year should be provided in the query.

Usage

When searching up a movie / film - any found media info & actor info will be returned in seperated lists inside of a array.

Paramaters (Query [REQUIRED], Type [REQUIRED], Max Actors)

 /// API WRAPPER USAGE EXAMPLE	
 
 import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
	
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")

// Auto detecting name & year # from Torrent Name
fetch_tmdb_info("Captain America The Winter Soldier (2014) 1080p BrRip x264 - YIFY", "movie",  2).then(function(search_results) {
    console.log(search_results)
  });
  
	
/// Both arrays (Media Info & Actors Info)
fetch_tmdb_info("Captain America The Winter Soldier", "movie",  2).then(function(search_results) {
    console.log(search_results)
  });
  
/// Media Info Only
fetch_tmdb_info("8 Mile (2002)", "movie",  2).then(function(search_results) {
    console.log(search_results)[0]
  });  
  
/// Actor / Cast Info Only
fetch_tmdb_info("8 Mile", "movie",  2).then(function(search_results) {
    console.log(search_results)[1]
  });    

Options

Parameters Meaning Default Required
query The movie you would to search info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode. undefined Yes
max_actors The maximum number of actor / cast members to return data for 5 No













How to search up TV Show info:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

When searching up a TV show - any found media info & actor info will be returned in seperated lists inside of a array.

A TV show query name could look like the following example(s)

Two and a Half Men
Two and a Half Men (2003)
Two.and.a.Half.Men.S05E02.720p.HDTV.x264-KILLERS[rartv]

for more accurate results, a year should be provided in the query.

Paramaters (Query [REQUIRED], Type [REQUIRED], Max Actors)

  /// API WRAPPER USAGE EXAMPLE		
  
  import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")	
	
// Auto detecting name & year # from Torrent Name
fetch_tmdb_info("Two.and.a.Half.Men.S05E02.720p.HDTV.x264-KILLERS[rartv]", "movie",  2).then(function(search_results) {
    console.log(search_results)
  });
  
	
/// Both arrays (Media Info & Actors Info)
fetch_tmdb_info("Two and a Half Men", "tv",  2).then(function(search_results) {
    console.log(search_results)
  });
  
/// Media Info Only
fetch_tmdb_info("Two and a Half Men (2003)", "tv",  2).then(function(search_results) {
    console.log(search_results)[0]
  });  
  
/// Actor / Cast Info Only
fetch_tmdb_info("Two and a Half Men 2003", "tv",  2).then(function(search_results) {
    console.log(search_results)[1]
  });    

Options

Parameters Meaning Default Required
query The TV show you would to search info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode. undefined Yes
max_actors The maximum number of actor / cast members to return data for 5 No













How to search Movie Collection info:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

Paramaters (Query [REQUIRED], Type [REQUIRED])

  /// API WRAPPER USAGE EXAMPLE		
  import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")		
fetch_tmdb_info("Fast And Furious", "collection",  2).then(function(search_results) {
  console.log(search_results)
  });

Options

Parameters Meaning Default Required
query The movie collection you would to search info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode. undefined Yes













How to search Episode info:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

A episode info query could look like the following example(s)

Two and a Half Men
Two and a Half Men (2003)
Two.and.a.Half.Men.S05E02.720p.HDTV.x264-KILLERS[rartv]

Note: Season and Episode numbers will try to be auto-detected from query, tho they can be provided manually as parameters. If no season or episode name is found or provided, an error message will occur.

Paramaters (Query [REQUIRED], Type [REQUIRED], Max Actors, Season, Episode)

 /// API WRAPPER USAGE EXAMPLE		
 import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")	

// Auto detecting season & episode # from Torrent Name
fetch_tmdb_info("Two and a Half Men.S05E02", "episode",  2).then(function(search_results) {
    console.log(search_results)
  });
	
// Regular Name (with season and episodes as paramaters) 
fetch_tmdb_info("Two and a Half Men", "episode",  2, 5, 2).then(function(search_results) {
    console.log(search_results)
  });	
	

Options

Parameters Meaning Default Required
query The TV show you would to search info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode. undefined Yes
max_actors The maximum number of actor / cast members to return data for 5 No
season The season number to search episode info for undefined No
episode The episode number to search episode info for undefined No













How to search Actor info:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

Paramaters (Query [REQUIRED], Type [REQUIRED])

/// API WRAPPER USAGE EXAMPLE	
import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")	
fetch_tmdb_info("Eminem", "actor").then(function(search_results) {
  console.log(search_results)
  });

Options

Parameters Meaning Default Required
query The actor you would to search info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode, Similar, Reviews. undefined Yes













How to search TV / Movie reviews:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

A query name could look like the following example(s)

Two and a Half Men
8 Mile (2003)
Two.and.a.Half.Men.S05E02.720p.HDTV.x264-KILLERS[rartv]

for more accurate results, a year should be provided in the query.

Paramaters (Query [REQUIRED], Type [REQUIRED], Query Type [Required])

  /// API WRAPPER USAGE EXAMPLE		
  import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")		
fetch_tmdb_info("Fast And Furious", "reviews",  "movie").then(function(search_results) {
  console.log(search_results)
  });

Options

Parameters Meaning Default Required
query The movie or TV show you would like to search reviews for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode, Similar, Reviews. undefined Yes
query_type Type of query to search reviews for TV or Movie. undefined Yes













How to search Similar movies / tv shows:

You will require a API key from TheMovieDB and need to set your API key using tmdb_api_key("YOUR API KEY") with your valid API key

Usage

A query name could look like the following example(s)

Two and a Half Men
8 Mile (2003)
Two.and.a.Half.Men.S05E02.720p.HDTV.x264-KILLERS[rartv]

for more accurate results, a year should be provided in the query.

Paramaters (Query [REQUIRED], Type [REQUIRED], Query Type [Required])

  /// API WRAPPER USAGE EXAMPLE		
  import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/src/themoviedb-api-wrapper.js' 
  // Valid API Key	
 tmdb_api_key("YOUR API KEY HERE")		
fetch_tmdb_info("Fast And Furious", "similar",  "movie").then(function(search_results) {
  console.log(search_results)
  });

Options

Parameters Meaning Default Required
query The movie, TV show or collection you would to similar info for undefined Yes
type Type of query to search details for - options:Movie, TV, Actor, Collection, Episode, Similar, Reviews. undefined Yes
query_type Type of query to search similar results for TV or Movie. undefined Yes




















CDN URL

HTML script

<script type="module" src="https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/dist/themoviedb-api-wrapper.min.js" defer></script> 

Import

import {fetch_tmdb_info, tmdb_api_key} from 'https://cdn.jsdelivr.net/gh/MarketingPipeline/TheMovieDB-API-Wrapper.js/dist/themoviedb-api-wrapper.min.js'

Contributing GitHub

Want to improve this project? Create a pull request with detailed changes / improvements! If approved you will be added to the list of contributors of this awesome project!

See also the list of contributors who participate in this project.

License GitHub

This project is licensed under the MIT License - see the LICENSE file for details.

You might also like...

Feel free to create new file, don't hesitate to pull your code, the most important thing is that the file name here must match your nickname so that file does not conflict with other people.

Hacktoberfest Indonesia Apa Itu Hacktoberfest ? Hacktoberfest adalah acara tahunan yang bertujuan untuk mendorong berkontribusi kedalam ekosistem open

Dec 15, 2022

javascript library to convert a list of objects to a nested json output format, depending on the names in the list

formToNestedJson javascript "library" to convert a list of objects to a nested json output format, depending on the names in the list Basic usage Give

Aug 2, 2021

Leaderboard - An app that outputs the names and the score of the players and it uses API's to get all the informations

leaderboard is an app that outputs the names and the score of the players and it uses API's to get all the informations.

Jul 8, 2022

This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which is using API's to get and set data

This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which is using API's to get and set data

Leaderboard-project This web application is a type of a scoreboard showing the names and current scores of the leading competitors in any field which

Feb 11, 2022

An NODE Module For Getting Data From Discord API Called Discord Info

An NODE Module For Getting Data From Discord API Called Discord Info

An NODE Module For Getting Data From Discord API Called Discord Info

Jun 7, 2022

A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview 📝 It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Apr 22, 2022

A crawler that crawls the site's internal links, fetching information of interest to any SEO specialist to perform appropriate analysis on the site.

Overview 📝 It is a module that crawls sites and extracts basic information on any web page of interest to site owners in general, and SEO specialists

Apr 22, 2022

A cli tool for fetching information about countries.

A cli tool for fetching information about countries.

countryfetch A cli tool for fetching information about countries. It uses https://restcountries.com/ API for backend. Dependencies DENO Installation D

Dec 24, 2022

An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!

An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!

Super lightweight (~450 bytes) wrapper to simplify native fetch calls using any HTTP method (existing or imagined). Features Fully typed/TypeScript su

Dec 28, 2022
Releases(v1.0.0)
  • v1.0.0(Oct 14, 2022)

    Version 1.0.0 (Oct, 13, 2022)

    Initial release of TheMovieDB-API-Wrapper.js - a pure vanilla JavaScript library / API wrapper that allows you to easily fetch data from TheMovieDB API.

    More info about this library / API wrapper can be found here

    Source code(tar.gz)
    Source code(zip)
Owner
Marketing Pipeline
We ❤️ Open Source
Marketing Pipeline
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Simple weather app written in HTML, CSS, and JavaScript using the OpenWeather API for fetching weather and geolocation information

Description Simple weather app written in HTML, CSS, and JavaScript using the OpenWeather API for fetching weather and geolocation information. Acknow

Gleb Korzan 4 Feb 23, 2022
A Cloudflare Worker for fetching data from Twitter User API.

cloudflare-worker-twitter This is a Cloudflare Worker for fetching data from Twitter User API. ❔ About this project I created this Worker to hide my A

Arda Soytürk 12 Oct 1, 2022
Wen? Now! A library to simplify your Web3 data fetching.

Wen Connect? Now! Minimalistic library for Web3 user interfaces. Seamless connection flows to Metamask. Stateless sessions that work anywhere (client,

Guillaume Bibeau-laviolette 20 Jul 20, 2022
A Leaderscore app that send data to an API created from Postman and allow users to save names and scores in a table. Built with JavaScript

Leaderboard The leaderboard website displays scores submitted by different players. It also allows you to submit your score. All data is preserved tha

Anicet Murhula 11 May 16, 2022
Query for CSS brower support data, combined from caniuse and MDN, including version support started and global support percentages.

css-browser-support Query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentage

Stephanie Eckles 65 Nov 2, 2022
Persistent key/value data storage for your Browser and/or PWA, promisified, including file support and service worker support, all with IndexedDB. Perfectly suitable for your next (PWA) app.

BrowstorJS ?? ?? ?? Persistent key/value data storage for your Browser and/or PWA, promisified, including file support and service worker support, all

Nullix 8 Aug 5, 2022
A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM deffiniation and appropriate file structure.

Welcome to function-stencil ?? A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM

Ben Smith 21 Jun 20, 2022
Serve file server with single zip file as file system in Deno.

zipland Serve file server with one-single zip file in Deno. Support zip just zip32 with deflated or uncompressed serving plaintext deflate Examples Yo

Yongwook Choi 18 Nov 2, 2022