Sha256: 1b8db9dc64d6d323a880503d6a361c4ed66cbb0331e9a9c1dc3ef8f0ab565a14

Contents?: true

Size: 1.46 KB

Versions: 3

Compression:

Stored size: 1.46 KB

Contents

# lita-tweet

[![Build Status](https://travis-ci.org/indirect/lita-tweet.png?branch=master)](https://travis-ci.org/indirect/lita-tweet)
[![Coverage Status](https://coveralls.io/repos/indirect/lita-tweet/badge.png)](https://coveralls.io/r/indirect/lita-tweet)

Allows the Lita chat bot to tweet on command.


## Installation

Add lita-tweet to your Lita instance's Gemfile:

```ruby
gem "lita-tweet"
```

## Configuration

To make this plugin work, you'll need to set at least `TWITTER\_CONSUMER\_KEY` and `TWITTER\_CONSUMER\_SECRET`. If you want to host the bot at a specific URL, rather than the default `0.0.0.0:1234` type address, you'll also need to set `SERVER\_URL` so that the bot knows where to send users and Twitter auth callbacks.

```ruby
require "lita-tweet" if ENV.has_key?("TWITTER_CONSUMER_KEY")

Lita.configure do |config|
  if ENV.has_key?("TWITTER_CONSUMER_KEY")
    config.handlers.tweet.http_url = ENV["SERVER_URL"]
    config.handlers.tweet.consumer_key = ENV.fetch("TWITTER_CONSUMER_KEY")
    config.handlers.tweet.consumer_secret = ENV.fetch("TWITTER_CONSUMER_SECRET")
  end
end
```

## Usage

To authorize an account for tweeting, use the command `twitter accounts add` and follow the instructions. To tweet, use the command `tweet some text that should go in the tweet`. To delete the last tweet, use the command `untweet`. For a complete list of commands, including how to map specific twitter accounts to specific chat channels, see the output from the command `help`.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lita-tweet-0.4.2 README.md
lita-tweet-0.4.1 README.md
lita-tweet-0.4.0 README.md