twitch

Twitch API binding in Crystal

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
Repository

twitch

Owner
Statistic
  • 5
  • 2
  • 0
  • 0
  • 1
  • about 5 years ago
  • June 7, 2017
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 09:31:56 GMT

Languages