# yt-playlists

> A wrapper for Googles Youtube API focused on just playlists. ### Installing ``` npm i yt-playlists -s ```

Latest version **1.0.1** (published 2020-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install yt-playlists
pnpm add yt-playlists
yarn add yt-playlists
bun add yt-playlists
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-01-21 |
| First published | 2020-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | levitatingbusinessman |
| Keywords | youtube, playlists, yt |

## Links

- npm: https://www.npmjs.com/package/yt-playlists
- npm.io page: https://npm.io/package/yt-playlists

## Recent versions

- 1.0.1 (latest) — 2020-01-21
- 1.0.0 — 2020-01-18

## README

# YT-PLAYLISTS
A wrapper for Googles Youtube API focused on just playlists.
### Installing
```
npm i yt-playlists -s
```

### Usage
```JS
const KEY = "API KEY"
const {getVideos, getPlaylistInfo} = require("yt-playlists")(KEY)

//General playlist information (/youtube/v3/playlists)
getPlaylistInfo(ID).then(info => {
    // do stuff
})

//List of all videos (/youtube/v3/playlistItems)
getVideos(ID).then(async info => {
    //The array of videos
    const videos = info.items()
    
    /*
        At first the array only includes the first 50 videos
        But you can easily fetch 50 more
    */
    async videos.fetchMore()
    
    //Or fetch all of them
    async videos.fetchAll()
})

```
If you need a Google API key, you can do so here: https://developers.google.com/youtube/v3/getting-started

### Output
The output of yt-playlists is the same as what's documented on Googles documentation, see:
[getVideos](https://developers.google.com/youtube/v3/docs/playlistItems), [getPlaylistInfo](https://developers.google.com/youtube/v3/docs/playlists).

---
_Source: https://npm.io/package/yt-playlists · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
