npm.io
0.0.2 • Published 9 years ago

@joegesualdo/youtube-video-info-node

Licence
MIT
Version
0.0.2
Deps
1
Vulns
0
Weekly
0

@joegesualdo/youtube-video-info-node Build Status

Get information for a youtube video.

Install

$ npm install --save @joegesualdo/youtube-video-info-node 

Usage

import YoutubeVideoInfo from 'joegesualdo/youtube-video-info-node';

new YoutubeVideoInfo('D_U6luQ6I90')
.then(instance => {
  instance.getInfo()
  .then(info => {
    console.log(info)
  })
  .catch(err => {
    console.log(err)
  })
})

API

YoutubeVideoInfo(videoId)

Creates an instance of YoutubeVideoInfo

Name Type Description
videoId String The id of the youtube video you want info for

Returns: YoutubeVideoInfo instance

import YoutubeVideoInfo from 'joegesualdo/youtube-video-info-node';

new YoutubeVideoInfo('D_U6luQ6I90')
.then(instance => {
  ...
})
getInfo()

Gets the info for a youtube video.

Returns: Object where the key/values represent data for a youtube video.

import YoutubeVideoInfo from 'joegesualdo/youtube-video-info-node';

new YoutubeVideoInfo('D_U6luQ6I90')
.then(instance => {
  instance.getInfo()
  .then(info => {
    console.log(info)
  })
  .catch(err => {
    console.log(err)
  })
})

Test

$ npm test

Build

$ npm run build

License

MIT Joe Gesualdo

Keywords