socialpulse
v1.0.0
Published
**Socialpulse** package is a social media alert package that provides instant broadcast notification in applications such as Instagram and twitch.
Downloads
16
Readme
Introduction
Socialpulse package is a social media alert package that provides instant broadcast notification in applications such as Instagram and twitch.
With low latency, you can get information quickly when the broadcasts of the broadcasters start to broadcast, below is the user guide.
Installation
npm i socialpulse --save
# or
yarn add socialpulse
Usage
Kick
import { Kick } from "socialpulse";
const kick = new Kick({
channels: ['hype'],
liveChannels: [],
interval: 10000
});
kick.addChannel('naru');
kick.lookup('hype').then(console.log);
kick.on('live', (stream: Stream) => {
console.log(stream);
});
kick.on('offline', (stream: Stream) => {
console.log(stream);
});
YouTube
import { YouTube } from "socialpulse";
const youtube = new YouTube({
channels: [ "CHANNEL_ID" ],
postedVideos: [],
interval: 10000
});
youtube.addChannel('CHANNEL_ID');
youtube.on('upload', (video: Video) => {
console.log(video);
});
Twitch
import { Twitch } from "socialpulse";
const twitch = new Twitch({
channels: ['rraenee'],
liveChannels: [],
interval: 10000,
client: {
id: '', // Get from: https://dev.twitch.tv
secret: '', // Get from: https://dev.twitch.tv
token: '' // After entering the ID and SECRET, run it and check your console, a token will be automatically generated for you. So you can leave this blank.
}
});
twitch.addChannel('elraenn');
twitch.on('live', (stream: Stream) => {
console.log(stream);
});
twitch.on('offline', (stream: Stream) => {
console.log(stream);
});
API
Providers
|Name|Events|Implemented|Import Name|
|---|---|---|---|
|Twitch|live
, offline
|✅|Twitch
|
|YouTube|upload
|✅|YouTube
|
|Kick|live
, offline
|✅|Kick
|
|Instagram|-
|❌|Instagram
|
|Reddit|-
|❌|Reddit
|
|Twitter|-
|❌|Twitter
|
|Game Discounts|-
|❌|GameDiscounts
|