Coder Social home page Coder Social logo

movier's Introduction

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

movier's People

Contributors

zoha avatar dependabot[bot] avatar transitive-bullshit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.