class Slack::Api::ChatPostMessage
- Slack::Api::ChatPostMessage
- Slack::Api::Base
- Reference
- Object
Defined in:
slack/api/endpoints/chat_post_message.crConstant Summary
-
ASSIGNED_TYPES =
[attachments : Array(EventData::Attachment) | ::Nil, blocks : Array(Slack::UI::Block) | ::Nil, channel : String, text : String | ::Nil, token : String, icon_emoji : String | ::Nil, icon_url : String | ::Nil, link_names : Bool | ::Nil, mrkdwn : Bool | ::Nil, parse : String | ::Nil = "none", reply_broadcast : Bool | ::Nil, thread_ts : String | ::Nil, unfurl_links : Bool | ::Nil, unfurl_media : Bool | ::Nil, username : String | ::Nil] of TypeDeclaration
Constructors
- .new(channel : String, token : String, attachments : Array(EventData::Attachment) | Nil = nil, blocks : Array(Slack::UI::Block) | Nil = nil, text : String | Nil = nil, icon_emoji : String | Nil = nil, icon_url : String | Nil = nil, link_names : Bool | Nil = nil, mrkdwn : Bool | Nil = nil, parse : String | Nil = "none", reply_broadcast : Bool | Nil = nil, thread_ts : String | Nil = nil, unfurl_links : Bool | Nil = nil, unfurl_media : Bool | Nil = nil, username : String | Nil = nil)
- .new(pull : JSON::PullParser)
Class Method Summary
-
.post_blocks(blocks : Enumerable, channel : String, token : String, thread_ts : String | Nil = nil)
Add a helper so Array(Slack::UI::Block) can be easily passed for calls that allow mixed blocks.
Instance Method Summary
- #after_initialize
- #attachments : Array(EventData::Attachment) | Nil
- #attachments=(attachments : Array(EventData::Attachment) | Nil)
- #base_url
- #blocks : Array(Slack::UI::Block) | Nil
- #blocks=(blocks : Array(Slack::UI::Block) | Nil)
- #call : Slack::Models::Chat::PostMessage
- #channel : String
- #channel=(channel : String)
- #content_type : ContentTypes
-
#icon_emoji : String | Nil
Extract this into a configuration object.
-
#icon_emoji=(icon_emoji : String | Nil)
Extract this into a configuration object.
-
#icon_url : String | Nil
Extract this into a configuration object.
-
#icon_url=(icon_url : String | Nil)
Extract this into a configuration object.
-
#link_names : Bool | Nil
Extract this into a configuration object.
-
#link_names=(link_names : Bool | Nil)
Extract this into a configuration object.
-
#mrkdwn : Bool | Nil
Extract this into a configuration object.
-
#mrkdwn=(mrkdwn : Bool | Nil)
Extract this into a configuration object.
-
#parse : String | Nil
Extract this into a configuration object.
-
#parse=(parse : String | Nil)
Extract this into a configuration object.
-
#reply_broadcast : Bool | Nil
Extract this into a configuration object.
-
#reply_broadcast=(reply_broadcast : Bool | Nil)
Extract this into a configuration object.
- #text : String | Nil
- #text=(text : String | Nil)
-
#thread_ts : String | Nil
Extract this into a configuration object.
-
#thread_ts=(thread_ts : String | Nil)
Extract this into a configuration object.
- #token : String
- #token=(token : String)
-
#unfurl_links : Bool | Nil
Extract this into a configuration object.
-
#unfurl_links=(unfurl_links : Bool | Nil)
Extract this into a configuration object.
-
#unfurl_media : Bool | Nil
Extract this into a configuration object.
-
#unfurl_media=(unfurl_media : Bool | Nil)
Extract this into a configuration object.
-
#username : String | Nil
Extract this into a configuration object.
-
#username=(username : String | Nil)
Extract this into a configuration object.
Instance methods inherited from class Slack::Api::Base
base_url
base_url,
call : Slack::Model
call,
content_type : ContentTypes
content_type,
headers
headers,
token
token
Constructor methods inherited from class Slack::Api::Base
new(pull : JSON::PullParser)
new
Constructor Detail
Class Method Detail
Add a helper so Array(Slack::UI::Block) can be easily passed for calls that allow mixed blocks. (chat.postMessage, etc). This is a bit of a hack to get around the fact that the Array could be many different types depending on the user, as the user is creating the Array type -- e.g:
Array(Slack::UI::Blocks::Section | Slack::UI::Blocks::Input)?
This should be improved with something that handles type guards a bit more elegantly or something that propertly handles the combinatorics on arrays.
Instance Method Detail
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage
Extract this into a configuration object.
Options -- https://api.slack.com/methods/chat.postMessage