Skip to content

gurjant31/slackwebhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Web Hook Gem Version

Note: There are plans to add the slack message formatting directly to the gem. For now, you send the slack formatted slack message as normal type.

Slackwebhook send messages to slack hooks depend upon the message type.

Installation

gem install slackwebhook

Require

require 'slackwebhook'

Usage

  • First Require the gem: require 'Slackwbhook'
  • Creating new instance require webhook url. hook = Slackwebhook.new('webhook_url')
  • Select Type. Leave it if not sure. Normal by default hook.type = 'info'
  • Send message. response = hook.send('message')
  • See response. puts hook.output
require 'slackwebhook'

hook = Slackwebhook.new('hook_url')
hook.type = "alert"
hook.send = "example: Change the configuration of servers"
response = hook.output #return net/http object back

Message Types

  • Info
  • Warning
  • Alert
  • Normal default

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Ruby Gem for sending message to slack web hooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages