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 group.
-
#groups_close(options = {}) ⇒ Object
Closes a private group.
-
#groups_create(options = {}) ⇒ Object
Creates a private group.
-
#groups_createChild(options = {}) ⇒ Object
Clones and archives a private group.
-
#groups_history(options = {}) ⇒ Object
Fetches history of messages and events from a private group.
-
#groups_invite(options = {}) ⇒ Object
Invites a user to a private group.
-
#groups_kick(options = {}) ⇒ Object
Removes a user from a private group.
-
#groups_leave(options = {}) ⇒ Object
Leaves a private group.
-
#groups_list(options = {}) ⇒ Object
Lists private groups that the calling user has access to.
-
#groups_mark(options = {}) ⇒ Object
Sets the read cursor in a private group.
-
#groups_open(options = {}) ⇒ Object
Opens a private group.
-
#groups_rename(options = {}) ⇒ Object
Renames a private group.
-
#groups_setPurpose(options = {}) ⇒ Object
Sets the purpose for a private group.
-
#groups_setTopic(options = {}) ⇒ Object
Sets the topic for a private group.
-
#groups_unarchive(options = {}) ⇒ Object
Unarchives a private group.
Instance Method Details
#groups_archive(options = {}) ⇒ Object
Archives a private group.
16 17 18 19 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 16 def groups_archive( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.archive', ) end |
#groups_close(options = {}) ⇒ Object
Closes a private group.
29 30 31 32 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 29 def groups_close( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.close', ) end |
#groups_create(options = {}) ⇒ Object
Creates a private group.
42 43 44 45 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 42 def groups_create( = {}) throw ArgumentError.new('Required arguments :name missing') if [:name].nil? post('groups.create', ) end |
#groups_createChild(options = {}) ⇒ Object
Clones and archives a private group.
55 56 57 58 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 55 def groups_createChild( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.createChild', ) end |
#groups_history(options = {}) ⇒ Object
Fetches history of messages and events from a private group.
74 75 76 77 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 74 def groups_history( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.history', ) end |
#groups_invite(options = {}) ⇒ Object
Invites a user to a private group.
89 90 91 92 93 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 89 def groups_invite( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :user missing') if [:user].nil? post('groups.invite', ) end |
#groups_kick(options = {}) ⇒ Object
Removes a user from a private group.
105 106 107 108 109 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 105 def groups_kick( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :user missing') if [:user].nil? post('groups.kick', ) end |
#groups_leave(options = {}) ⇒ Object
Leaves a private group.
119 120 121 122 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 119 def groups_leave( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.leave', ) end |
#groups_list(options = {}) ⇒ Object
Lists private groups that the calling user has access to.
132 133 134 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 132 def groups_list( = {}) post('groups.list', ) end |
#groups_mark(options = {}) ⇒ Object
Sets the read cursor in a private group.
146 147 148 149 150 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 146 def groups_mark( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if [:ts].nil? post('groups.mark', ) end |
#groups_open(options = {}) ⇒ Object
Opens a private group.
160 161 162 163 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 160 def groups_open( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.open', ) end |
#groups_rename(options = {}) ⇒ Object
Renames a private group.
175 176 177 178 179 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 175 def groups_rename( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :name missing') if [:name].nil? post('groups.rename', ) end |
#groups_setPurpose(options = {}) ⇒ Object
Sets the purpose for a private group.
191 192 193 194 195 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 191 def groups_setPurpose( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if [:purpose].nil? post('groups.setPurpose', ) end |
#groups_setTopic(options = {}) ⇒ Object
Sets the topic for a private group.
207 208 209 210 211 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 207 def groups_setTopic( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if [:topic].nil? post('groups.setTopic', ) end |
#groups_unarchive(options = {}) ⇒ Object
Unarchives a private group.
221 222 223 224 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 221 def groups_unarchive( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.unarchive', ) end |