movier
TypeScript icon, indicating that this package has built-in type declarations

3.0.8 • Public • Published

movier npm package image

Zoha - movier stars - movier forks - movier

GitHub tag License issues - movier

Movier

with movier package, you can get movie titles information from IMDB like name, dates, casts, images, and all other details that you will need in your Nodejs app

note: we suggest to don't use this package directly on production, because we are getting information from IMDB pages content, so these requests are a little bit slow and will get a couple of seconds to complete, instead use this package to save the information in your local/DB

Installation

simply install this package using yarn or npm

$ npm install movier --save

or using yarn

$ yarn add movier

Usage

Title information (movies/series)

get title complete details

note that all these methods will return a title details result object

    // find a title and returns the first matched title data
    movier.getTitleDetailsByName("interstellar 2014")
    // get title info by its url
    movier.getTitleDetailsByUrl("https://www.imdb.com/title/tt0816692")
    // get title details by its IMDB id
    movier.getTitleDetailsByIMDBId("tt0816692")
    // find title by returned object from searchTitleByName function
    movier.getTitleDetailsByFoundedTitleDetails(foundedDetails)

all these methods will return an object like the below or will throw an error if the title is not found, you can see a complete example of the result object here

{
    detailsLang : "...", 
    mainSource : {...}, 
    allSources : [...], 
    name : "...", 
    worldWideName : "...",
    otherNames : [...],
    titleYear : ...,
    genres : [...],
    directors : [...],
    writers : [...], 
    mainType : "...",
    plot : "...",
    casts : [...],
    producers : [...],
    mainRate : {...},
    allRates : [...],
    allReleaseDates : [...],
    dates : {...},
    ageCategoryTitle : "...",
    languages : [...],
    countriesOfOrigin : [...],
    posterImage : {...},
    allImages : [...],
    boxOffice : {...},
    productionCompanies : [...],
    taglines : [...],
    runtime : {...},
    keywords : [...],
    awards : [...],
    awardsSummary : {...},
    quotes: [...],
    goofs: [...],
}

Search for titles (movies/series)

you can search for a title by its name using this method

    // search for title
    movier.searchTitleByName("interstellar 2014")

this method returns an array of found items details, that its structure would be like this

[ 
    {
        source: {...},
        name: "...",
        aka: "...",
        titleYear: ...,
        url: "...",
        titleType: "...",
        matchScore: ...,
        thumbnailImageUrl: "..."
   },
   ...
]

get person details (celebs)

    // find a person and returns the first matched data
    movier.getPersonDetailsByName("jennifer lawrence")
    // get person details by url
    movier.getPersonDetailsByUrl("https://www.imdb.com/name/nm2225369")
    // get person details by IMDB id
    movier.getPersonDetailsByIMDBId("nm2225369")
    // get name details by returned object from searchPersonByName function
    movier.getPersonDetailsByFoundedPersonDetails(foundedDetails)

all these methods will return an object like the below or will throw an error if the person is not found, you can see a complete example of the result object here

{
  detailsLang: "...",
  mainSource: {...},
  name: "...",
  birthDate: DATE,
  birthPlace: "...",
  miniBio: [...],
  knownFor: [...],
  filmography: [...],
  personalDetails: [...],
  profileImage: {...},
  allImages: [...]
}

search for people (celebs)

you can search for people by their name using this method

    // search for title
    movier.searchPersonByName("jennifer lawrence")

this method returns an array of found items details, that its structure would be like this

[ 
    {
        source: {...},
        name: "...",
        url: "...",
        matchScore: ...,
        thumbnailImageUrl: "..."
   },
   ...
]

Test

execute tests via yarn test command after installing packages

Support

for supporting this package just buy me a coffee :)

"Buy Me A Coffee"

contributing

please read this for more information

license

this package is published under MIT license

Package Sidebar

Install

npm i movier

Weekly Downloads

113

Version

3.0.8

License

MIT

Unpacked Size

917 kB

Total Files

130

Last publish

Collaborators

  • zoha