module Slack::Web::Api::Endpoints::Channels
def channels_archive(options = {})
- See: https://github.com/dblock/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/dblock/slack-api-ref/blob/master/methods/channels/channels.create.json -
See: https://api.slack.com/methods/channels.create -
Options Hash:
(**options)
-
:name
(Object
) --
def channels_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('channels.create', options) end
def channels_history(options = {})
- See: https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.history.json -
See: https://api.slack.com/methods/channels.history -
Options Hash:
(**options)
-
:unreads
(Object
) -- -
:inclusive
(Object
) -- -
:oldest
(timestamp
) -- -
:latest
(timestamp
) -- -
: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/dblock/slack-api-ref/blob/master/methods/channels/channels.info.json -
See: https://api.slack.com/methods/channels.info -
Options Hash:
(**options)
-
: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/dblock/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/dblock/slack-api-ref/blob/master/methods/channels/channels.join.json -
See: https://api.slack.com/methods/channels.join -
Options Hash:
(**options)
-
: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/dblock/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/dblock/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/dblock/slack-api-ref/blob/master/methods/channels/channels.list.json -
See: https://api.slack.com/methods/channels.list -
Options Hash:
(**options)
-
:exclude_archived
(Object
) --
def channels_list(options = {}) post('channels.list', options) end
def channels_mark(options = {})
- See: https://github.com/dblock/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/dblock/slack-api-ref/blob/master/methods/channels/channels.rename.json -
See: https://api.slack.com/methods/channels.rename -
Options Hash:
(**options)
-
: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_setPurpose(options = {})
- See: https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.setPurpose.json -
See: https://api.slack.com/methods/channels.setPurpose -
Options Hash:
(**options)
-
: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/dblock/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/dblock/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