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
This method archives a private group.
-
#groups_close(options = {}) ⇒ Object
This method closes a private group.
-
#groups_create(options = {}) ⇒ Object
This method creates a private group.
-
#groups_createChild(options = {}) ⇒ Object
This method takes an existing private group and performs the following steps:.
-
#groups_history(options = {}) ⇒ Object
This method returns a portion of messages/events from the specified private group.
-
#groups_info(options = {}) ⇒ Object
This method returns information about a private group.
-
#groups_invite(options = {}) ⇒ Object
This method is used to invite a user to a private group.
-
#groups_kick(options = {}) ⇒ Object
This method allows a user to remove another member from a private group.
-
#groups_leave(options = {}) ⇒ Object
This method is used to leave a private group.
-
#groups_list(options = {}) ⇒ Object
This method returns a list of groups in the team that the caller is in and archived groups that the caller was in.
-
#groups_mark(options = {}) ⇒ Object
This method moves the read cursor in a private group.
-
#groups_open(options = {}) ⇒ Object
This method opens a private group.
-
#groups_rename(options = {}) ⇒ Object
This method renames a private group.
-
#groups_setPurpose(options = {}) ⇒ Object
This method is used to change the purpose of a private group.
-
#groups_setTopic(options = {}) ⇒ Object
This method is used to change the topic of a private group.
-
#groups_unarchive(options = {}) ⇒ Object
This method unarchives a private group.
Instance Method Details
#groups_archive(options = {}) ⇒ Object
This method archives a private group.
15 16 17 18 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 15 def groups_archive( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.archive', ) end |
#groups_close(options = {}) ⇒ Object
This method closes a private group.
27 28 29 30 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 27 def groups_close( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.close', ) end |
#groups_create(options = {}) ⇒ Object
This method creates a private group.
39 40 41 42 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 39 def groups_create( = {}) throw ArgumentError.new('Required arguments :name missing') if [:name].nil? post('groups.create', ) end |
#groups_createChild(options = {}) ⇒ Object
This method takes an existing private group and performs the following steps:
51 52 53 54 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 51 def groups_createChild( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.createChild', ) end |
#groups_history(options = {}) ⇒ Object
This method returns a portion of messages/events from the specified private group. To read the entire history for a group, call the method with no latest or oldest arguments, and then continue paging using the instructions below.
71 72 73 74 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 71 def groups_history( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.history', ) end |
#groups_info(options = {}) ⇒ Object
This method returns information about a private group.
83 84 85 86 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 83 def groups_info( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.info', ) end |
#groups_invite(options = {}) ⇒ Object
This method is used to invite a user to a private group. The calling user must be a member of the group.
97 98 99 100 101 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 97 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
This method allows a user to remove another member from a private group.
112 113 114 115 116 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 112 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
This method is used to leave a private group.
125 126 127 128 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 125 def groups_leave( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.leave', ) end |
#groups_list(options = {}) ⇒ Object
This method returns a list of groups in the team that the caller is in and archived groups that the caller was in. The list of (non-deactivated) members in each group is also returned.
138 139 140 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 138 def groups_list( = {}) post('groups.list', ) end |
#groups_mark(options = {}) ⇒ Object
This method moves the read cursor in a private group.
151 152 153 154 155 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 151 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
This method opens a private group.
164 165 166 167 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 164 def groups_open( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? post('groups.open', ) end |
#groups_rename(options = {}) ⇒ Object
This method renames a private group.
178 179 180 181 182 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 178 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
This method is used to change the purpose of a private group. The calling user must be a member of the private group.
193 194 195 196 197 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 193 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
This method is used to change the topic of a private group. The calling user must be a member of the private group.
208 209 210 211 212 |
# File 'lib/slack/web/api/endpoints/groups.rb', line 208 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
This method 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 |