All Projects → lacymorrow → movie-trailer

lacymorrow / movie-trailer

Licence: MIT license
🎥 Fetch movie trailers: "Crash" ➔ http://path/to/trailer

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to movie-trailer

auto-movie-tagger
A Python script that auto tags and adds poster to mkv or mp4 movie files.
Stars: ✭ 49 (+157.89%)
Mutual labels:  movie, tmdb
MovieCards
React App that uses TMDb API to display movie data. Try it out! ->
Stars: ✭ 38 (+100%)
Mutual labels:  movie, tmdb
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (+157.89%)
Mutual labels:  movie, tmdb
Api
PHP 7.3+ API Wrapper for The Movie Database
Stars: ✭ 317 (+1568.42%)
Mutual labels:  movie, tmdb
TMDb
A simple Android client for The Movie DB in Material Design
Stars: ✭ 65 (+242.11%)
Mutual labels:  movie, tmdb
Flox
Self Hosted Movie, Series and Anime Watch List
Stars: ✭ 901 (+4642.11%)
Mutual labels:  movie, tmdb
tmdb-api
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.
Stars: ✭ 31 (+63.16%)
Mutual labels:  movie, tmdb
Movie
🎥 Movie web implemented by React/Redux and TMDB API
Stars: ✭ 31 (+63.16%)
Mutual labels:  movie, tmdb
inventum
Android client for TMDb
Stars: ✭ 22 (+15.79%)
Mutual labels:  movie, tmdb
async-chainable
An extension to Async adding better handling of mixed Series / Parallel tasks via object chaining
Stars: ✭ 25 (+31.58%)
Mutual labels:  callback
react-movie
🎬 Modern fast movie database web app with React using The Movie DB API.
Stars: ✭ 45 (+136.84%)
Mutual labels:  movie
proposal-function-helpers
A withdrawn proposal for standardizing some useful, popular helper functions into JavaScript’s Function object.
Stars: ✭ 41 (+115.79%)
Mutual labels:  callback
PopMovies
Aplicativo em Android para organização dos seus filmes favoritos.
Stars: ✭ 41 (+115.79%)
Mutual labels:  tmdb
tv-randshow
App to choose a random TV show episode - Made with #Flutter
Stars: ✭ 90 (+373.68%)
Mutual labels:  tmdb
Trakt-Userscripts
Userscripts to improve and add features to Trakt.tv
Stars: ✭ 39 (+105.26%)
Mutual labels:  tmdb
Flutter-Movies-Application
A movies application made with Flutter / Dart.
Stars: ✭ 16 (-15.79%)
Mutual labels:  movie
datamosh
✨💾 Edit images via buffers. 💯✨
Stars: ✭ 23 (+21.05%)
Mutual labels:  callback
laravel-tmdb
Interact with TMDB data in your Laravel application.
Stars: ✭ 25 (+31.58%)
Mutual labels:  tmdb
keras-stochastic-weight-averaging
Keras callback function for stochastic weight averaging
Stars: ✭ 53 (+178.95%)
Mutual labels:  callback
vue-movie
基于vue2.0构建的在线电影网【film】,webpack+vue+vuex+keepAlive+muse-ui+cordova 全家桶,打包成APP
Stars: ✭ 185 (+873.68%)
Mutual labels:  movie

movie-trailer npm version Build Status Try movie-trailer on RunKit

Fetch movie trailer url(s): "Oceans Eleven" ➔ https://www.youtube.com/watch?v=...

movie-trailer

Try it on RunKit (Output)

Features

  • Fetch Youtube trailers for any movie
  • Return one or many trailer URLs
  • Use anywhere, browser or Node - UMD (Browser Support)
  • Async/await, Promise and Callback APIs

Install

Using NPM:

npm install --save movie-trailer

In the browser:

<!-- movieTrailer window global -->
<script type="text/javascript" src="https://unpkg.com/movie-trailer"></script>

(via Unpkg, or via JSDelivr)

Usage

const movieTrailer = require( 'movie-trailer' ) // or import movieTrailer from 'movie-trailer'

await movieTrailer( 'Up' )
//=> https://www.youtube.com/watch?v=...
Return an array of video IDs
movieTrailer( 'Oceans Eleven', {id: true, multi: true} )
  .then( response => console.log( response ) )
  
//=> [ 'XXXXXXXXX', 'XXXXXXXXX', ... ]
Both
movieTrailer( 'Oceans Eleven', {year: '1960', multi: true} )
  .then( response => console.log( response ) )

//=> [ https://www.youtube.com/watch?v=XXXXXXXXX, ... ]
Legacy-style search using release date year
movieTrailer( 'Oceans Eleven', 1960 )
  .then( response => console.log( response ) )

//=> http://path/to/trailer

API

movieTrailer(movie [, options ] [, callback])

  • movie

    Required

    Type: string

    Movie to search for. If searching with a tmdbId, pass null.

  • options

    Type: object

    • apiKey

      Type: string

      (optional) Use your own TMDB api key. You can get a free key here: https://developers.themoviedb.org/ .

      Use -a or --api_key on the CLI

    • id (false)

      Type: boolean

      (optional) Return only Youtube video IDs.

      Use -i or --id on the CLI

    • multi (false)

      Type: boolean

      (optional) Return an array of urls vs a single url.

      Use -m or --multi on the CLI

       movieTrailer( 'Oceans Eleven', { multi: true } )
    • tmdbId

      Type: string || number

      (optional) Search using a TMDB content ID instead of a search term

      Use -t or --tmdb_id on the CLI

       movieTrailer( null, { tmdbId: 161 } )  // Content ID for "Ocean's Eleven"
    • year

      Type: string || number

      (optional) Movie release year.

      Use -y or --year on the CLI

  • callback(error, response)

    Callback function.

     movieTrailer( 'Oceans Eleven', ( error, response ) => {
         console.log( response ); 
         //=> http://path/to/trailer
     } )

From the command line

$ npx movie-trailer --help

Usage
	$ npx movie-trailer movie 	

Options
	--api_key   -k   (optional) Your own TMDB API key: http://developers.themoviedb.org
	--id        -i   Return just the Youtube video ID.
	--language, -l   Specify a language code (eg: 'de_DE').
	--multi,    -m   Returns an array of URLs instead of a single URL.
	--tmdb_id   -t   Specify an explicit TMDB ID.
	--year,     -y   Specify a release year to search.

Example
	$ npx movie-trailer 'Oceans Eleven' -y 1960 -m
	//=> http://path/to/trailer

Related

License

This package uses data from TMDB. You may consult TMDB terms of service for usage rights.

MIT © Lacy Morrow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].