lib/slack/endpoint/chat.rb in slack-api-1.2.1 vs lib/slack/endpoint/chat.rb in slack-api-1.2.2

- old
+ new

@@ -25,28 +25,28 @@ # # @option options [Object] :channel # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. # @option options [Object] :text # Text of the message to send. See below for an explanation of formatting. - # @option options [Object] :username - # Name of bot. - # @option options [Object] :as_user - # Pass true to post the message as the authed user, instead of as a bot # @option options [Object] :parse - # Change how messages are treated. See below. + # Change how messages are treated. Defaults to none. See below. # @option options [Object] :link_names # Find and link channel names and usernames. # @option options [Object] :attachments # Structured message attachments. # @option options [Object] :unfurl_links # Pass true to enable unfurling of primarily text-based content. # @option options [Object] :unfurl_media # Pass false to disable unfurling of media content. + # @option options [Object] :username + # Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. + # @option options [Object] :as_user + # Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. # @option options [Object] :icon_url - # URL to an image to use as the icon for this message + # URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. # @option options [Object] :icon_emoji - # emoji to use as the icon for this message. Overrides icon_url. + # emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. # @see https://api.slack.com/methods/chat.postMessage # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.postMessage.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.postMessage.json def chat_postMessage(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? @@ -54,23 +54,25 @@ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("chat.postMessage", options) end # - # This method updates a message in a channel. + # This method updates a message in a channel. Though related to chat.postMessage, some parameters of chat.update are handled differently. # # @option options [Object] :ts # Timestamp of the message to be updated. # @option options [Object] :channel # Channel containing the message to be updated. # @option options [Object] :text # New text for the message, using the default formatting rules. # @option options [Object] :attachments # Structured message attachments. # @option options [Object] :parse - # Change how messages are treated. See below. + # Change how messages are treated. Defaults to client, unlike chat.postMessage. See below. # @option options [Object] :link_names - # Find and link channel names and usernames. + # Find and link channel names and usernames. Defaults to none. This parameter should be used in conjunction with parse. To set link_names to 1, specify a parse mode of full. + # @option options [Object] :as_user + # Pass true to update the message as the authed user. Bot users in this context are considered authed users. # @see https://api.slack.com/methods/chat.update # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.update.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.update.json def chat_update(options={}) throw ArgumentError.new("Required arguments :ts missing") if options[:ts].nil?