Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.32 KB

README.md

File metadata and controls

51 lines (36 loc) · 1.32 KB

mebots Gem Version

Ruby library for interfacing with the MeBots API.

API documentation

Setup

First, install the module:

Add mebots to your Gemfile.

gem 'mebots'

and then run

bundle install

in the same directory as the Gemfile.

Or install directly from RubyGems:

gem install mebots

Then, to use these functions, you must import the module:

require 'mebots'

To create a new bot object:

bot = Bot.new('your_bot_shortname', 'bot token (from edit page)')
# You may wish to store your token in a config file or environment variable

You can obtain your API key as described here.

Retrieval Functions

Bot.instance(group_id) will get information on the instance of your bot that is in a given group. It returns an Instance object, which has the property id. That string can be passed to the GroupMe API when sending a message as described here.

See example.py for a complete usage example.

See this repository for an example of a fully-functioning bot in Python using MeBots.

Author

Erik Boesen

License

GPL