PeertransferChat

A wrapper that works as a unique interface to integrate a chat system into the peerTransfer platform.

Build Status

Build Status Coverage Status Code Climate Dependency Status

Installation

Add this line to your application's Gemfile:

gem 'peertransfer_chat', git: 'https://github.com/peertransfer/peertransfer_chat.git'

And then execute:

$ bundle

Or install it yourself as:

$ gem install peertransfer_chat

Usage

Configure the chat client:

PeertransferChat.configure do |config|
  config.team = team_name
  config.incoming_token = team_token
  config.channel = team_channel
  config.username = team_username
end

Send a message:

PeertransferChat::Client.speak('There are issues pending review')

Upload a file:

PeertransferChat::Client.upload('/path/to/a/file.txt')

Slack settings description

  • team Your team
  • channel Channel name
  • api_token This token comes from your user https://api.slack.com/web
  • rtm_token Real time messaging, you can find it in integration -> bot -> token
  • incomming_token Incoming web hook token, you can create one in integration -> incomming webhooks
  • channel_id Channel id you can find it in the code of your slack team web page