Skip to content

Allar/nodecg-twitch-service

Repository files navigation

nodecg-twitch-service

This is a nodecg bundle that provides access to Twitch channel data.

This doesn't provide any graphical elements itself, but allows other bundles to easily grab Twitch info and catch Twitch events.

Todo

  • follows
  • subscriptions
  • chat messages

Installation

Navigate to your bundles folder of your nodecg site, and run:

nodecg install Allar/nodecg-twitch-service

You must configure the bundle before it can be loaded.

Configuration

Create file named cfg/nodecg-twitch-service.json inside your nodecg site. You must provide both a channel name and a Twitch Application client id.

You can create a Twitch Application here

Example config file:

{
  "channel": "awesomeallar",
  "client_id": "q0vl7q7kpcpg8d3t1wka02s253y2fkf"
}

Accessing Twitch Data

This service provides Twitch data in two ways. Replicants and messages.

Replicants

Channel

  • ChannelOnline: Boolean, whether channel is currently streaming.
  • ChannelName: String, title of the channel.
  • ChannelAudience: String, audience of the channel (everyone, mature).
  • ChannelViewersTotal: Number, the number of views the channel has.
  • ChannelViewersCurrent: Number, the number of viewers currently watching the channel.
  • ChannelFollowers: Number, the number of users following the channel.

Messages

Channel

  • channel-followed: Sent when a user follows this channel. Sends Twitch User data of follower.

About

Emits events from Twitch to other nodecg bundles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published