npm.io
1.0.1 • Published 5 years ago

ythnotify

Licence
MIT
Version
1.0.1
Deps
8
Size
34 kB
Vulns
25
Weekly
0
Stars
10

Youtube Twitch Notify

❯ Library for YouTube video upload and Twitch live detection


Install

# NPM
$ npm install ythnotify
# yarn
$ yarn add ythnotify

How to use?

❯ To use this module, you need a Youtube Data v3 API Key, Twitch API Secreat, and a Client ID.

Youtube API: Click here
Twitch API: Click here

Examples
const Yth = require("ythnotify")
const yth = new Yth.Client({
  youtube: {
    token: "API Key (Youtube Data V3 API) ",
    youtubers: ["https://www.youtube.com/channel/UCzRDCwJdqSSRwI4BgojVkIw"],
  },
  twitch: {
    secreat: "Secreat (Twitch API)",
    clientid: "Client ID (Twitch API)",
    streamers: ["https://www.twitch.tv/whitekj"],
  },
  interval: 60,
})

yth.on("YoutubeUpload", (data) => {
  console.log("New video detected! \n" + data)
})

yth.on("TwitchStreaming", (data) => {
  console.log("Start streaming! \n" + data)
})
Options

❯ General

Name Type Need Default Description
interval Number X 60 time to repeat

❯ Youtube

Name Type Need Default Description
token String O - Youtube Data v3 API's api key
youtubers String or Array O - List of YouTubers to detect uploads

❯ Twitch

Name Type Need Default Description
secreat String O - Twitch API secreat key
clientid String O - Twitch API Client ID
streamers String or Array O - List of Streamers to detect live
Used Code

Youtube Notify: Androz2091's DiscordYoutubeNotifier [ License: None ]

Authors

WhiteKJ, hands8142

License

This repository is MIT licensed.


If you have a problem or want to improve or add features, please make an issue or pull request. Thank you!

Keywords