socialpulse
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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





© 2019 — 2024 Void Development, Ltd. All rights reserved.

Readme

Keywords

none

Package Sidebar

Install

npm i socialpulse

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

18.4 kB

Total Files

26

Last publish

Collaborators

  • clqu