Skip to content

Commit

Permalink
Add instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Braiden Vasco committed Jun 20, 2015
1 parent 78db803 commit fa21707
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,47 @@ Lita::Adapters::Gitter
[![Coverage Status](https://coveralls.io/repos/braiden-vasco/lita-gitter/badge.svg)](https://coveralls.io/r/braiden-vasco/lita-gitter)

[Gitter](https://gitter.im) adapter for the [Lita](https://lita.io) chat bot.

Usage
-----

At first, see the documentation for Lita: https://docs.lita.io/

### Installation

Add **lita-gitter** to your Lita instance's Gemfile:

```ruby
gem 'lita-gitter', '~> 0.0.0'
```

### Preparation

Go to https://developer.gitter.im/apps, sign in if you are not already
signed in, and remember your token.

Then go to https://gitter.im/api/v1/rooms, find needed room by it's name
and remember room ID which precedes room name.

### Configuration

#### Required attributes

- `token` (String) - Secret token of Gitter user
- `room_id` (String) - Room ID

#### Example

This is an example `lita_config.rb` file:

```ruby
Lita.configure do |config|
config.robot.name = 'Lita'
config.robot.mention_name = 'lita'

config.robot.adapter = :gitter

config.adapters.gitter.token = 'LpMMyGbceCbUNl4ldRHfzjzb9a48F5WZYbgtBWoi'
config.adapters.gitter.room_id = 'Q5cjBQ9BwrNdK0JcicI9AYbL'
end
```

0 comments on commit fa21707

Please sign in to comment.