imvdb

1.0.0 • Public • Published

IMVDb

NPM

What is this?

An NPM package to interact with the IMBDb.com API

Quick Start

Install in your app directory

npm install imvdb

then

const IMVDb = require('imvdb')('API_KEY_HERE');

You can get your own API Key from IMVDb.com. You will need an account.
API calls are limited to 1,000 calls per minute. Keep that in mind.

Search Videos

Basic search. Returns IMBDb information. Use videoData to get youtube links.

IMVDb.searchVideos('Eye of the tiger').then(function( response){
    console.log( response.results );
}, console.error);

Search Entities

An entity is anything with a name in the IMVDb Database (artists, companies, people, etc). You can retreive basic information on an entity as well as information like credits and associated videos.

IMVDb.searchEntities('Michel Gondry').then(function( response){
    console.log( response.results );
}, console.error);

Video Information

For things like youtube links

imvdb.videoData(199998171889).then(function( response ){
    console.log(`Title: ${response.song_title}`)
 
    // Filter youtube sources
    let target = response['sources'].filter(function( item ){
        return item.source === 'youtube';
    }).shift(); // Get first youtube link
 
    console.log(`YouTube: https://www.youtube.com/watch?v=${target['source_data']}`)
})

Entity Information

Additional information about an entity.

imvdb.entityData(634).then(function( response ){
    console.log( response )
})

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i imvdb

    Weekly Downloads

    0

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    7.41 kB

    Total Files

    6

    Last publish

    Collaborators

    • kainsir