twitch

Version, currently master branch1 version
  • master branchlatestSep 20, 2019

github.com/sledgang/twitch

Twitch API binding in Crystal

6 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  twitch:
    github: sledgang/twitch
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.21.1
License
MIT
Authors
Daniel Worrall <Daniel.Worrall@hotmail.co.uk>, snapcase <snapcase@octalzeroes.com>, Zac Nowicki <zachnowicki@gmail.com>

Dependencies

Runtime Dependencies

  • fast_irc0.3.0github: rx14/fast_irc.cr

README

# twitch

A binding to the [Twitch API](https://dev.twitch.tv/docs) implemented in [Crystal](https://crystal-lang.org/).

### WIP - Still under heavy design/development!

## Installation

Add this to your application's `shard.yml`:

```yaml
dependencies:
  twitch:
    github: y32/twitch
```

## Usage

There are several main components to the library:

- `Twitch::Kraken` - Client for interacting with Twitch's REST API

```crystal
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

```crystal
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](https://github.com/Daniel-Worrall) - creator, maintainer, spec-man extraordinaire
- [snapcase](https://github.com/snapcase) - creator, maintainer, IRC expert
- [z64](https://github.com/z64) - creator, maintainer, script kiddie