sledgang / twitch

Twitch API binding in Crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Twitch API binding in Crystal

License:MIT License


Languages

Language:Crystal 100.0%