Class: Alerty::Plugin::Slack::SlackClient::IncomingWebhook

Inherits:
Base
  • Object
show all
Defined in:
lib/alerty/plugin/slack/slack_client.rb

Overview

Slack client for Incoming Webhook api.slack.com/incoming-webhooks

Instance Attribute Summary

Attributes inherited from Base

#debug_dev, #endpoint, #https_proxy, #log

Instance Method Summary collapse

Methods inherited from Base

#post, #proxy_class

Constructor Details

#initialize(endpoint, https_proxy = nil) ⇒ IncomingWebhook

Returns a new instance of IncomingWebhook.



126
127
128
# File 'lib/alerty/plugin/slack/slack_client.rb', line 126

def initialize(endpoint, https_proxy = nil)
  super
end

Instance Method Details

#post_message(params = {}, opts = {}) ⇒ Object



130
131
132
133
# File 'lib/alerty/plugin/slack/slack_client.rb', line 130

def post_message(params = {}, opts = {})
  log.info { "out_slack: post_message #{params}" }
  post(endpoint, params)
end