youtube-playlist-summary
v2.1.6
Published
it could help you easy to get all playlists informations.
Downloads
69
Readme
Youtube Playlist Summary
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