Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitch-webhook

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitch-webhook

A Node JS library for new Twitch Helix API Webhooks

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Node.js Twitch Helix Webhooks

Build Status Coverage Status JavaScript Style Guide dependencies Status devDependencies Status Node version Read the Docs (version) https://nodei.co/npm/twitch-webhook.png?downloads=true&downloadRank=true&stars=true

Installation

Install with NPM:

npm install --save twitch-webhook

Usage

const TwitchWebhook = require('twitch-webhook')

const twitchWebhook = new TwitchWebhook({
    client_id: 'Your Twitch Client ID',
    callback: 'Your Callback URL',
    secret: 'It\'s a secret',
    listen: { 
        port: 8080,         // default: 8443
        host: '127.0.0.1',  // default: 0.0.0.0
        autoStart: false    // default: true
    }
})

twitchWebhook.on('streams', ({ topic, endpoint, event }) => {
    console.log(event)
})

twitchWebhook.on('users/follows', ({ topic, endpoint, event }) => {
    console.log(event)
})

twitchWebhook.on('*', ({ topic, endpoint, event }) => {
    console.log(topic, event)
})

twitchWebhook.subscribe('users/follows', {
    from_id: 'User id'
})

twitchWebhook.subscribe('streams', {
    user_id: 'User id'
})

Documentation

API Reference

Keywords

FAQs

Package last updated on 02 Jan 2018

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc