1.0.1 • Published 3 years ago

ythnotify v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

NameTypeNeedDefaultDescription
intervalNumberX60time to repeat

❯ Youtube

NameTypeNeedDefaultDescription
tokenStringO-Youtube Data v3 API's api key
youtubersString or ArrayO-List of YouTubers to detect uploads

❯ Twitch

NameTypeNeedDefaultDescription
secreatStringO-Twitch API secreat key
clientidStringO-Twitch API Client ID
streamersString or ArrayO-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!