youtube-playlist-summary

2.1.6 • Public • Published

Youtube Playlist Summary

Travis codecov GitHub package version Dependency Status Greenkeeper badge npm downloads

it could help you easy to get all playlists informations.

Requirements

  • node 8.x

Install

$ npm install --save youtube-playlist-summary

Usage

const PlaylistSummary = require('youtube-playlist-summary')
const config = {
  GOOGLE_API_KEY: 'YOUR_GOOGLE_API_KEY', // require
  PLAYLIST_ITEM_KEY: ['publishedAt', 'title', 'description', 'videoId', 'videoUrl'], // option
}

const ps = new PlaylistSummary(config)
const CHANNEL_ID = 'UCQCaS3atWyNHEy5PkDXdpNg'
const PLAY_LIST_ID = 'PL9f8_QifuTL4CS8-OyA-4WADhkddOnRS4'

ps.getPlaylistItems(PLAY_LIST_ID)
  .then((result) => {
    console.log(result)
  })
  .catch((error) => {
    console.error(error)
  })

ps.getPlaylists(CHANNEL_ID)
  .then((result) => {
    console.log(result)
  })
  .catch((error) => {
    console.error(error)
  })

ps.getSummary(CHANNEL_ID)
  .then((result) => {
    console.log(result)
  })
  .catch((error) => {
    console.error(error)
  })

License

MIT © alincode

Readme

Keywords

Package Sidebar

Install

npm i youtube-playlist-summary

Weekly Downloads

5

Version

2.1.6

License

MIT

Unpacked Size

20.7 kB

Total Files

17

Last publish

Collaborators

  • alincode