easy-youtube-api
v1.0.0
Published
Easy youtube v3 api
Downloads
3
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
Search
Options:
- maxResults - default 5
- type - id, minimal or full
Callback
const youtubeApi = require("easy-youtube-api");
const youtube = new youtubeApi("Your key");
youtube.search("Cat", {maxResults: 5, type: "id"}, data => console.log(data));
Promise
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));