Socket
Socket
Sign inDemoInstall

@sighmir/twitch-pubsub

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sighmir/twitch-pubsub

Typescript Twitch PubSub API Client


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

twitch-pubsub

NPM version Pipeline Status Dependency Status Dev Dependency Status

twitch-pubsub is a Typescript wrapper to the Twitch PubSub API.

Requirements

Documentation

Getting Started

If you are using Node.js, install twitch-pubsub using npm:

$ npm install @sighmir/twitch-pubsub

You can now require and use twitch-pubsub like so:

import twitchPubSub from "@sighmir/twitch-pubsub";

const TWITCH_TOKEN = process.env.TWITCH_TOKEN!;

const tps = twitchPubSub(TWITCH_TOKEN);

tps.on("whispers.45744081", (data) => {
  console.log(data);
});

tps.on("ping", () => {
  console.log("PONG");
});

Refer to the PubSub API Documentation and the example for more information.

Browser

You can also load this script on your browser like so:

<script src="https://cdn.jsdelivr.net/npm/@sighmir/twitch-pubsub/dist/bundle.js"></script>

You can now use twitch-pubsub normally on the page, like you would on Node.js.

License

twitch-pubsub - Typescript Twitch PubSub API Client.
Copyright (C) 2020  Guilherme Caulada (Sighmir)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Keywords

FAQs

Package last updated on 22 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc