module Slack::Web::Api::Endpoints::Chat

def chat_command(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/chat/chat.command.json -

Options Hash: (**options)
  • :text (Object) --
  • :command (Object) --
  • :channel (channel) --
def chat_command(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :command missing' if options[:command].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  logger.warn('The chat.command method is undocumented.')
  post('chat.command', options)
end

def chat_delete(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.delete.json -
    See: https://api.slack.com/methods/chat.delete -

Options Hash: (**options)
  • :as_user (boolean) --
  • :ts (timestamp) --
  • :channel (channel) --
def chat_delete(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  post('chat.delete', options)
end

def chat_deleteScheduledMessage(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.deleteScheduledMessage.json -
    See: https://api.slack.com/methods/chat.deleteScheduledMessage -

Options Hash: (**options)
  • :as_user (boolean) --
  • :scheduled_message_id (string) --
  • :channel (channel) --
def chat_deleteScheduledMessage(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :scheduled_message_id missing' if options[:scheduled_message_id].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  post('chat.deleteScheduledMessage', options)
end

def chat_getPermalink(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.getPermalink.json -
    See: https://api.slack.com/methods/chat.getPermalink -

Options Hash: (**options)
  • :message_ts (string) --
  • :channel (channel) --
def chat_getPermalink(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :message_ts missing' if options[:message_ts].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  post('chat.getPermalink', options)
end

def chat_meMessage(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.meMessage.json -
    See: https://api.slack.com/methods/chat.meMessage -

Options Hash: (**options)
  • :text (string) --
  • :channel (channel) --
def chat_meMessage(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :text missing' if options[:text].nil?
  post('chat.meMessage', options)
end

def chat_postEphemeral(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json -
    See: https://api.slack.com/methods/chat.postEphemeral -

Options Hash: (**options)
  • :username (string) --
  • :thread_ts (string) --
  • :parse (string) --
  • :link_names (boolean) --
  • :icon_url (string) --
  • :icon_emoji (string) --
  • :as_user (boolean) --
  • :text (string) --
  • :blocks (blocks[] as string) --
  • :attachments (string) --
  • :user (user) --
  • :channel (channel) --
def chat_postEphemeral(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :user missing' if options[:user].nil?
  raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
  options = options.merge(user: users_id(options)['user']['id']) if options[:user]
  options = encode_options_as_json(options, %i[attachments blocks])
  post('chat.postEphemeral', options)
end

def chat_postMessage(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json -
    See: https://api.slack.com/methods/chat.postMessage -

Options Hash: (**options)
  • :username (string) --
  • :unfurl_media (boolean) --
  • :unfurl_links (boolean) --
  • :thread_ts (string) --
  • :reply_broadcast (boolean) --
  • :parse (string) --
  • :mrkdwn (boolean) --
  • :metadata (string) --
  • :link_names (boolean) --
  • :icon_url (string) --
  • :icon_emoji (string) --
  • :as_user (boolean) --
  • :text (string) --
  • :blocks (blocks[] as string) --
  • :attachments (string) --
  • :channel (channel) --
def chat_postMessage(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
  options = encode_options_as_json(options, %i[attachments blocks metadata])
  post('chat.postMessage', options)
end

def chat_scheduleMessage(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.scheduleMessage.json -
    See: https://api.slack.com/methods/chat.scheduleMessage -

Options Hash: (**options)
  • :unfurl_media (boolean) --
  • :unfurl_links (boolean) --
  • :thread_ts (string) --
  • :reply_broadcast (boolean) --
  • :parse (enum) --
  • :metadata (string) --
  • :link_names (boolean) --
  • :as_user (boolean) --
  • :text (string) --
  • :blocks (blocks[] as string) --
  • :attachments (string) --
  • :post_at (integer) --
  • :channel (channel) --
def chat_scheduleMessage(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :post_at missing' if options[:post_at].nil?
  raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
  options = encode_options_as_json(options, %i[attachments blocks metadata])
  post('chat.scheduleMessage', options)
end

def chat_unfurl(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json -
    See: https://api.slack.com/methods/chat.unfurl -

Options Hash: (**options)
  • :user_auth_url (Object) --
  • :user_auth_required (boolean) --
  • :user_auth_message (Object) --
  • :user_auth_blocks (Object) --
  • :unfurl_id (string) --
  • :source (enum) --
  • :unfurls (string) --
  • :ts (timestamp) --
  • :channel (channel) --
def chat_unfurl(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
  raise ArgumentError, 'Required arguments :unfurls missing' if options[:unfurls].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  options = encode_options_as_json(options, %i[unfurls user_auth_blocks])
  post('chat.unfurl', options)
end

def chat_update(options = {})

Other tags:
    See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.update.json -
    See: https://api.slack.com/methods/chat.update -

Options Hash: (**options)
  • :reply_broadcast (boolean) --
  • :parse (string) --
  • :metadata (string) --
  • :link_names (boolean) --
  • :file_ids (array) --
  • :as_user (boolean) --
  • :text (string) --
  • :blocks (blocks[] as string) --
  • :attachments (string) --
  • :ts (timestamp) --
  • :channel (channel) --
def chat_update(options = {})
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
  raise ArgumentError, 'Required arguments :ts missing' if options[:ts].nil?
  raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
  options = encode_options_as_json(options, %i[attachments blocks metadata])
  post('chat.update', options)
end