3.0.4 • Published 3 years ago

name-to-imdb v3.0.4

Weekly downloads
117
License
MIT
Repository
github
Last release
3 years ago

name-to-imdb

Map names of movies/series to IMDB IDs

npm install name-to-imdb

Usage: nameToImdb(args, callback)

args - string of the name or object with name/year/type - { name: "The Devil Bat", year: 1940, type: "movie" }

args.providers - an array of providers to search in; possible options are metadata and imdbFind; default is ["metadata", "imdbFind"]

Examples

imdbFind provider

var nameToImdb = require("name-to-imdb");
nameToImdb("south park", function(err, res, inf) { 
  console.log(res); // "tt0121955"
  // inf contains info on where we matched that name - e.g. metadata, or on imdb
  // and the meta object with all the available data
  console.log(inf);
})
// console.log(inf.meta)
{
  id: 'tt0121955',
  name: 'South Park',
  year: 1997,
  type: 'TV series',
  yearRange: '1997-',
  image: {
    src: 'https://m.media-amazon.com/images/M/MV5BOGE2YWUzMDItNTg2Ny00NTUzLTlmZGYtNWMyNzVjMjQ3MThkXkEyXkFqcGdeQXVyNTA4NzY1MzY@._V1_.jpg',
    width: 680,
    height: 1000
  },
  starring: 'Trey Parker, Matt Stone',
  similarity: 1
}

metadata provider

var nameToImdb = require("name-to-imdb");
nameToImdb({ name: "south park", type: 'series', providers: ['metadata'] }, function (err, res, inf) {
  console.log(res); // "tt0121955"
  // inf contains info on where we matched that name - e.g. metadata, or on imdb
  // and the meta object with all the available data
  console.log(inf); // inf: { match, meta }
})
// console.log(inf.meta)
{
  id: 'tt0121955',
  name: 'South Park',
  year: 1997,
  type: 'series',
  yearRange: undefined, // imdbFind only
  image: undefined,     // imdbFind only
  starring: undefined,  // imdbFind only
  similarity: undefined // imdbFind only
}

Note: while using "metadata" provider, you must specify the media type and the name must be in english

3.0.4

3 years ago

3.0.3

4 years ago

3.0.2

5 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.6.0

9 years ago

1.5.0

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.3.0

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago