GithubHelp home page GithubHelp logo

todokku / nodecg-twitchie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nelsongar/nodecg-twitchie

0.0 1.0 0.0 603 KB

๐Ÿค–๐Ÿ’œ Twitchie makes it easy to get all your Twitch channel, stream, and chat information in NodeCG!

HTML 0.30% JavaScript 30.74% TypeScript 68.96%

nodecg-twitchie's Introduction

๐Ÿค–๐Ÿ’œ nodecg-twitchie

Twitchie makes it easy to get all your Twitch channel, stream, and chat information in NodeCG, so that you can get to the fun bit and start making overlays and graphics!

Out of the box, Twitchie will provide you with all of this:

Compatibility

Twitchie requires that you use a version of NodeCG greater than 1.5.0, and a version of node greater than 6.4.0, because of some compatibility stuff.

Usage

Everything that Twitchie handles is exposed through NodeCG's replicants and bundle messages, in the nodecg-twitchie namespace. This means that getting stream information in your graphics is extra-simple!

const showSubscriber = subscriber => {
  // show notification in your graphics...
}

const updateChannelInfo = info => {
  // update now playing, uptime, etc...
}

nodecg.listenFor('channel.subscriber', 'nodecg-twitchie', showSubscriber)

const streamInfo = nodecg.Replicant('stream.info', 'nodecg-twitchie')
streamInfo.on('change', updateStreamInfo)

The twitchie client

The default export of this module is a little client for use in your graphics, which gives you an easy way to listen to events or access your stream information in your graphics without having to manually configure loads of replicants. Using the twitchie client, the above example could be rewritten like so...

import twitchie from 'nodecg-twitchie'

twitchie.on('channel.subscriber', showSubscriber)
twitchie.stream.info.on('change', updateStreamInfo)

Events and Replicants

For a full list of all the events you can subscribe to, and the data Twitchie makes available through replicants, please see the Events and Replicants wiki page.

Custom requests with Twitchie

The twitchie extension exposes an instance of the Twitch library. If you want to query the Twitch API directly, you can access it through nodecg.extensions['nodecg-twitchie'].api.

Configuring Twitchie

In order to use Twitchie, you'll need to enable Twitch logins on your NodeCG instance, as we use this authentication to connect to the Twitch API and chat. Instructions on how to do this can be found in the NodeCG documentation.

Please make sure you've included user_read and chat_login in your scopes!

nodecg-twitchie's People

Contributors

helloitsdani avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.