Skip to content

sledgang/twitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitch

A binding to the Twitch API implemented in Crystal.

WIP - Still under heavy design/development!

Installation

Add this to your application's shard.yml:

dependencies:
  twitch:
    github: y32/twitch

Usage

There are several main components to the library:

  • Twitch::Kraken - Client for interacting with Twitch's REST API
require "twitch/kraken"

twitch = Twitch::Kraken.new(token: "cfabdegwdoklmawdzdo98xt2fo512y")

Refer to the documentation for the kinds of requests you can make with this client.

  • Twitch::IRC - Client for building IRC applications
require "twitch/irc"

bot = Twitch::IRC.new(nick: "nekka", token: "cfabdegwdoklmawdzdo98xt2fo512y")

# Create a handler to process incoming messages
bot.on_message do |message|
  # handle this message
end

# Connect to Twitch
bot.run!

Contributors

  • Daniel-Worrall - creator, maintainer, spec-man extraordinaire
  • snapcase - creator, maintainer, IRC expert
  • z64 - creator, maintainer, script kiddie

Releases

No releases published

Packages

No packages published