Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

easy-youtube-api

MineGame1595MIT1.0.0

Easy youtube v3 api

youtube, api, v3, easy, simple

readme

easy-youtube-api

Easy youtube v3 api

Information

For now only supports search and videoIndo

Instalation

npm: npm install easy-youtube-api --save
yarn: yarn add easy-youtube-api

Usage

Options:
  1. maxResults - default 5
  2. type - id, minimal or full

    Callback

    `js const youtubeApi = require("easy-youtube-api"); const youtube = new youtubeApi("Your key");

youtube.search("Cat", {maxResults: 5, type: "id"}, data => console.log(data));

#### Promise
```js
const youtubeApi = require("easy-youtube-api");
const youtube = new youtubeApi("Your key");

youtube.search("Cat", {maxResults: 5, type: "id"})
  .then(data => console.log(data));

VideoInfo

For multiple videos separate it by comma: 0I647GU3Jsc,0I647GU3Jsc,0I647GU3Jsc

Callback

const youtubeApi = require("easy-youtube-api");
const youtube = new youtubeApi("Your key");

youtube.videoId("0I647GU3Jsc", data => console.log(data));

Promise

const youtubeApi = require("easy-youtube-api");
const youtube = new youtubeApi("Your key");

youtube.search("0I647GU3Jsc")
  .then(data => console.log(data));