Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/youtube-playlist-summary
it could help you easy to get all playlists informations.
https://github.com/alincode/youtube-playlist-summary
Last synced: about 2 months ago
JSON representation
it could help you easy to get all playlists informations.
- Host: GitHub
- URL: https://github.com/alincode/youtube-playlist-summary
- Owner: alincode
- License: mit
- Created: 2018-04-24T00:10:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-06T16:39:16.000Z (almost 4 years ago)
- Last Synced: 2024-10-30T22:54:08.755Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 68.4 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Youtube Playlist Summary
![Travis](https://img.shields.io/travis/alincode/youtube-playlist-summary.svg)
[![codecov](https://codecov.io/gh/alincode/youtube-playlist-summary/branch/master/graph/badge.svg)](https://codecov.io/gh/alincode/youtube-playlist-summary)
![GitHub package version](https://img.shields.io/github/package-json/v/alincode/youtube-playlist-summary.svg)
[![Dependency Status](https://img.shields.io/david/alincode/youtube-playlist-summary.svg?style=flat)](https://david-dm.org/alincode/youtube-playlist-summary) [![Greenkeeper badge](https://badges.greenkeeper.io/alincode/youtube-playlist-summary.svg)](https://greenkeeper.io/)
![npm downloads](https://img.shields.io/npm/dt/youtube-playlist-summary.svg)
it could help you easy to get all playlists informations.### Requirements
- node 8.x
### Install
```
$ npm install --save youtube-playlist-summary
```### Usage
- [How to get Youtube API key | step by step | 2020 - YouTube](https://www.youtube.com/watch?v=sVEytWDWYwM)
```js
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](https://github.com/alincode/youtube-playlist-summary)