module Slack::Web::Api::Endpoints::Channels
def channels_archive(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.archive.json -
See: https://api.slack.com/methods/channels.archive -
Options Hash:
(**options)-
:channel(channel) --
def channels_archive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.archive', options) end
def channels_create(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.create.json -
See: https://api.slack.com/methods/channels.create -
Options Hash:
(**options)-
:validate(Object) -- -
:name(Object) --
def channels_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('channels.create', options) end
def channels_delete(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/channels/channels.delete.json -
Options Hash:
(**options)-
:channel(channel) --
def channels_delete(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] logger.warn('The channels.delete method is undocumented.') post('channels.delete', options) end
def channels_history(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.history.json -
See: https://api.slack.com/methods/channels.history -
Options Hash:
(**options)-
:unreads(Object) -- -
:oldest(timestamp) -- -
:latest(timestamp) -- -
:inclusive(Object) -- -
:channel(channel) --
def channels_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.history', options) end
def channels_info(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.info.json -
See: https://api.slack.com/methods/channels.info -
Options Hash:
(**options)-
:include_locale(Object) -- -
:channel(channel) --
def channels_info(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.info', options) end
def channels_invite(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.invite.json -
See: https://api.slack.com/methods/channels.invite -
Options Hash:
(**options)-
:user(user) -- -
:channel(channel) --
def channels_invite(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('channels.invite', options) end
def channels_join(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.join.json -
See: https://api.slack.com/methods/channels.join -
Options Hash:
(**options)-
:validate(Object) -- -
:name(Object) --
def channels_join(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('channels.join', options) end
def channels_kick(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.kick.json -
See: https://api.slack.com/methods/channels.kick -
Options Hash:
(**options)-
:user(user) -- -
:channel(channel) --
def channels_kick(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('channels.kick', options) end
def channels_leave(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.leave.json -
See: https://api.slack.com/methods/channels.leave -
Options Hash:
(**options)-
:channel(channel) --
def channels_leave(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.leave', options) end
def channels_list(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.list.json -
See: https://api.slack.com/methods/channels.list -
Options Hash:
(**options)-
:limit(Object) -- -
:exclude_members(Object) -- -
:exclude_archived(Object) -- -
:cursor(Object) --
def channels_list(options = {}) if block_given? Pagination::Cursor.new(self, :channels_list, options).each do |page| yield page end else post('channels.list', options) end end
def channels_mark(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.mark.json -
See: https://api.slack.com/methods/channels.mark -
Options Hash:
(**options)-
:ts(timestamp) -- -
:channel(channel) --
def channels_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.mark', options) end
def channels_rename(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.rename.json -
See: https://api.slack.com/methods/channels.rename -
Options Hash:
(**options)-
:validate(Object) -- -
:name(Object) -- -
:channel(channel) --
def channels_rename(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.rename', options) end
def channels_replies(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.replies.json -
See: https://api.slack.com/methods/channels.replies -
Options Hash:
(**options)-
:thread_ts(Object) -- -
:channel(channel) --
def channels_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.replies', options) end
def channels_setPurpose(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.setPurpose.json -
See: https://api.slack.com/methods/channels.setPurpose -
Options Hash:
(**options)-
:name_tagging(Object) -- -
:purpose(Object) -- -
:channel(channel) --
def channels_setPurpose(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.setPurpose', options) end
def channels_setTopic(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.setTopic.json -
See: https://api.slack.com/methods/channels.setTopic -
Options Hash:
(**options)-
:topic(Object) -- -
:channel(channel) --
def channels_setTopic(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.setTopic', options) end
def channels_unarchive(options = {})
- See: https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.unarchive.json -
See: https://api.slack.com/methods/channels.unarchive -
Options Hash:
(**options)-
:channel(channel) --
def channels_unarchive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('channels.unarchive', options) end