Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jimmycuadra/lita-urban-dictionary

A Lita handler for fetching definitions from Urban Dictionary.
https://github.com/jimmycuadra/lita-urban-dictionary

chatops lita lita-handler ruby urban-dictionary

Last synced: 21 days ago
JSON representation

A Lita handler for fetching definitions from Urban Dictionary.

Awesome Lists containing this project

README

        

# lita-urban-dictionary

[![Build Status](https://travis-ci.org/jimmycuadra/lita-urban-dictionary.png?branch=master)](https://travis-ci.org/jimmycuadra/lita-urban-dictionary)
[![Code Climate](https://codeclimate.com/github/jimmycuadra/lita-urban-dictionary.png)](https://codeclimate.com/github/jimmycuadra/lita-urban-dictionary)
[![Coverage Status](https://coveralls.io/repos/jimmycuadra/lita-urban-dictionary/badge.png)](https://coveralls.io/r/jimmycuadra/lita-urban-dictionary)

**lita-urban-dictionary** is a handler for [Lita](https://github.com/jimmycuadra/lita) looks up the definitions of words on [Urban Dictionary](http://www.urbandictionary.com/).

## Installation

Add lita-urban-dictionary to your Lita instance's Gemfile:

``` ruby
gem "lita-urban-dictionary"
```

## Configuration

### Optional attributes

* **max_response_size** (`Integer`, `nil`) - Sets a ceiling on the response size of the queried defintion, or `nil` for no limit.. Default: `20`.

### Example

This example configuration sets a max response size of 5 lines.

``` ruby
Lita.configure do |config|
config.handlers.urban_dictionary.max_response_size = 5
end
```

## Usage

To get the definition of a word:

```
Lita: ud WORD
```

## License

[MIT](http://opensource.org/licenses/MIT)