Class: Slkecho::SlackRequest::PostMessage::Params
- Inherits:
-
Struct
- Object
- Struct
- Slkecho::SlackRequest::PostMessage::Params
- Defined in:
- lib/slkecho/slack_request/post_message.rb
Instance Attribute Summary collapse
-
#blocks ⇒ Object
Returns the value of attribute blocks.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#icon_emoji ⇒ Object
Returns the value of attribute icon_emoji.
-
#icon_url ⇒ Object
Returns the value of attribute icon_url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#blocks ⇒ Object
Returns the value of attribute blocks
13 14 15 |
# File 'lib/slkecho/slack_request/post_message.rb', line 13 def blocks @blocks end |
#channel ⇒ Object
Returns the value of attribute channel
13 14 15 |
# File 'lib/slkecho/slack_request/post_message.rb', line 13 def channel @channel end |
#icon_emoji ⇒ Object
Returns the value of attribute icon_emoji
13 14 15 |
# File 'lib/slkecho/slack_request/post_message.rb', line 13 def icon_emoji @icon_emoji end |
#icon_url ⇒ Object
Returns the value of attribute icon_url
13 14 15 |
# File 'lib/slkecho/slack_request/post_message.rb', line 13 def icon_url @icon_url end |
#username ⇒ Object
Returns the value of attribute username
13 14 15 |
# File 'lib/slkecho/slack_request/post_message.rb', line 13 def username @username end |
Instance Method Details
#to_request_body ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/slkecho/slack_request/post_message.rb', line 14 def to_request_body JSON.dump({ channel: channel, blocks: blocks, username: username, icon_url: icon_url, icon_emoji: icon_emoji }) end |