Coder Social home page Coder Social logo

tarumi's Introduction

Tarumi

===

Tarumi is a super simple library written in Ruby to interact with Slack webhooks. It was written by Abraham Kuri from Icalia Labs.

Table of contents

Configure Slack

Before you can start integrating the gem, you need to first add a webhook to which the bot wil ping and then send out the message, so let's do that:

  1. Open https://api.slack.com/ and sign in if you haven't
  2. Go to the Integrations section
  3. Then look for the Incoming WebHooks integration
  4. Select the channel you wish to hook the service
  5. You'll be redirected to a page with some steps to test the webhook, just take note of the token on the left.

You are now ready to go!

Installation & Usage

You can install and use Tarumi as a stand-alone library, to install it just run:

$ gem install tarumi

If you are using Rails, just add it to your Gemfile:

gem "tarumi"

And then run the bundle command to install it:

$ bundle

A simple example on how to use it is presented below:

require 'tarumi'

slackBot = Tarumi::Bot.new("yourteam", "yourtoken", hash_of_options)
slackBot.ping "A text to post"

The example above will post a message to the #general channel, but you can easily customize it with the hash of options when initializing the bot:

options = {
	username: "usernametopost",
	channel: "#anotherchannel",
	hook_name: "webhookname"
}

That should be it for you to easily configure the bot and start sending messages.

Contributing

  1. Fork it ( http://github.com//tarumi/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Heroes

Abraham Kuri

Copyright and license

Code and documentation copyright 2013-2014 Icalia Labs. Code released under the MIT license.

tarumi's People

Contributors

kurenn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.