Class: Fluent::SlackClient::IncomingWebhook
- Defined in:
- lib/fluent/plugin/slack_client.rb
Overview
Slack client for Incoming Webhook
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(endpoint) ⇒ IncomingWebhook
constructor
A new instance of IncomingWebhook.
- #post_message(params = {}, opts = {}) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(endpoint) ⇒ IncomingWebhook
Returns a new instance of IncomingWebhook.
50 51 52 53 |
# File 'lib/fluent/plugin/slack_client.rb', line 50 def initialize(endpoint) super() @endpoint = URI.parse(endpoint) end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
47 48 49 |
# File 'lib/fluent/plugin/slack_client.rb', line 47 def endpoint @endpoint end |
Instance Method Details
#post_message(params = {}, opts = {}) ⇒ Object
55 56 57 58 |
# File 'lib/fluent/plugin/slack_client.rb', line 55 def (params = {}, opts = {}) log.info { "out_slack: post_message #{params}" } post(endpoint, params) end |