Class: Fluent::SlackClient::IncomingWebhook

Inherits:
Base
  • Object
show all
Defined in:
lib/fluent/plugin/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.



105
106
107
# File 'lib/fluent/plugin/slack_client.rb', line 105

def initialize(endpoint, https_proxy = nil)
  super
end

Instance Method Details

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



109
110
111
112
# File 'lib/fluent/plugin/slack_client.rb', line 109

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