Node.js Twitch Helix Webhooks
Little Node.js module to interact with new Twitch Helix API Webhooks.
Install
npm install --save twitch-webhook
Usage
Note: Twitch will return old payload for "users/follows" topic
if {first: 1}
is not specified
const TwitchWebhook = const twitchWebhook = client_id: 'Your Twitch Client ID' callback: 'Your Callback URL' secret: 'It\'s a secret' // default: false lease_seconds: 259200 // default: 864000 (maximum value) listen: port: 8080 // default: 8443 host: '127.0.0.1' // default: 0.0.0.0 autoStart: false // default: true // set listener for all topicstwitchWebhook // set listener for topictwitchWebhook // subscribe to topictwitchWebhook // renew the subscription when it expirestwitchWebhook // tell Twitch that we no longer listen// otherwise it will try to send events to a down appprocess