Module: Slack::Web::Api::Endpoints::Groups
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/groups.rb
Instance Method Summary collapse
-
#groups_archive(options = {}) ⇒ Object
Archives a private channel.
-
#groups_create(options = {}) ⇒ Object
Creates a private channel.
-
#groups_createChild(options = {}) ⇒ Object
Clones and archives a private channel.
-
#groups_history(options = {}) ⇒ Object
Fetches history of messages and events from a private channel.
-
#groups_info(options = {}) ⇒ Object
Gets information about a private channel.
-
#groups_invite(options = {}) ⇒ Object
Invites a user to a private channel.
-
#groups_kick(options = {}) ⇒ Object
Removes a user from a private channel.
-
#groups_leave(options = {}) ⇒ Object
Leaves a private channel.
-
#groups_list(options = {}) ⇒ Object
Lists private channels that the calling user has access to.
-
#groups_mark(options = {}) ⇒ Object
Sets the read cursor in a private channel.
-
#groups_open(options = {}) ⇒ Object
Opens a private channel.
-
#groups_rename(options = {}) ⇒ Object
Renames a private channel.
-
#groups_replies(options = {}) ⇒ Object
Retrieve a thread of messages posted to a private channel.
-
#groups_setPurpose(options = {}) ⇒ Object
Sets the purpose for a private channel.
-
#groups_setTopic(options = {}) ⇒ Object
Sets the topic for a private channel.
-
#groups_unarchive(options = {}) ⇒ Object
Unarchives a private channel.
Instance Method Details
#groups_archive(options = {}) ⇒ Object
Archives a private channel.
16 17 18 19 20 21 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 16 def groups_archive( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.archive: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.archive.') post('groups.archive', ) end |
#groups_create(options = {}) ⇒ Object
Creates a private channel.
34 35 36 37 38 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 34 def groups_create( = {}) throw ArgumentError.new('Required arguments :name missing') if [:name].nil? logger.warn('groups.create: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.create.') post('groups.create', ) end |
#groups_createChild(options = {}) ⇒ Object
Clones and archives a private channel.
47 48 49 50 51 52 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 47 def groups_createChild( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.createChild: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: .') post('groups.createChild', ) end |
#groups_history(options = {}) ⇒ Object
Fetches history of messages and events from a private channel.
69 70 71 72 73 74 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 69 def groups_history( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.history: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.history.') post('groups.history', ) end |
#groups_info(options = {}) ⇒ Object
Gets information about a private channel.
85 86 87 88 89 90 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 85 def groups_info( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.info: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.info.') post('groups.info', ) end |
#groups_invite(options = {}) ⇒ Object
Invites a user to a private channel.
101 102 103 104 105 106 107 108 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 101 def groups_invite( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :user missing') if [:user].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] = .merge(user: users_id()['user']['id']) if [:user] logger.warn('groups.invite: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.invite.') post('groups.invite', ) end |
#groups_kick(options = {}) ⇒ Object
Removes a user from a private channel.
119 120 121 122 123 124 125 126 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 119 def groups_kick( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :user missing') if [:user].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] = .merge(user: users_id()['user']['id']) if [:user] logger.warn('groups.kick: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.kick.') post('groups.kick', ) end |
#groups_leave(options = {}) ⇒ Object
Leaves a private channel.
135 136 137 138 139 140 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 135 def groups_leave( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.leave: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.leave.') post('groups.leave', ) end |
#groups_list(options = {}) ⇒ Object
Lists private channels that the calling user has access to.
157 158 159 160 161 162 163 164 165 166 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 157 def groups_list( = {}) logger.warn('groups.list: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.list, users.conversations.') if block_given? Pagination::Cursor.new(self, :groups_list, ).each do |page| yield page end else post('groups.list', ) end end |
#groups_mark(options = {}) ⇒ Object
Sets the read cursor in a private channel.
177 178 179 180 181 182 183 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 177 def groups_mark( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if [:ts].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.mark: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.mark.') post('groups.mark', ) end |
#groups_open(options = {}) ⇒ Object
Opens a private channel.
192 193 194 195 196 197 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 192 def groups_open( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.open: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: .') post('groups.open', ) end |
#groups_rename(options = {}) ⇒ Object
Renames a private channel.
210 211 212 213 214 215 216 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 210 def groups_rename( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :name missing') if [:name].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.rename: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.rename.') post('groups.rename', ) end |
#groups_replies(options = {}) ⇒ Object
Retrieve a thread of messages posted to a private channel
227 228 229 230 231 232 233 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 227 def groups_replies( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if [:thread_ts].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.replies: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.replies.') post('groups.replies', ) end |
#groups_setPurpose(options = {}) ⇒ Object
Sets the purpose for a private channel.
244 245 246 247 248 249 250 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 244 def groups_setPurpose( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if [:purpose].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.setPurpose: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.setPurpose.') post('groups.setPurpose', ) end |
#groups_setTopic(options = {}) ⇒ Object
Sets the topic for a private channel.
261 262 263 264 265 266 267 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 261 def groups_setTopic( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if [:topic].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.setTopic: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.setTopic.') post('groups.setTopic', ) end |
#groups_unarchive(options = {}) ⇒ Object
Unarchives a private channel.
276 277 278 279 280 281 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 276 def groups_unarchive( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: groups_id()['group']['id']) if [:channel] logger.warn('groups.unarchive: This method is deprecated. It will stop functioning in February 2021 and will not work with newly created apps after June 10th, 2020. Alternative methods: conversations.unarchive.') post('groups.unarchive', ) end |