tr-yt-api v1.0.3
Get your new Youtube Video
Function
The only function is to get the latest YT Video
Installation
npm i tr-yt-api
Example
const yt_api = require('tr-yt-api')
var user = new yt_api.ytuser()
user.on('logged_in' , (keys)=>{
user.addChannel("CHANNEL ID")
})
user.on('new_video', (video)=>{
console.log(video)
})
user.key('Your Key from console.developers.google.com')
Format of the video:
{ "kind": "youtube#searchResult", "etag": "", "id": { "kind": "youtube#video", "videoId": "" }, "snippet": { "publishedAt": "2020-08-09T13:30:21Z", "channelId": "", "title": "", "description": "", "thumbnails": { "default": { "url": "", "width": 120, "height": 90 }, "medium": { "url": "", "width": 320, "height": 180 }, "high": { "url": "", "width": 480, "height": 360 } }, "channelTitle": "", "liveBroadcastContent": "none", "publishTime": "2020-08-09T13:30:21Z" } }