Module: Slack::Endpoint::Groups
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/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.
14 15 16 17 |
# File 'lib/slack/endpoint/groups.rb', line 14 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.
27 28 29 30 |
# File 'lib/slack/endpoint/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
Creates a private group.
40 41 42 43 |
# File 'lib/slack/endpoint/groups.rb', line 40 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.
53 54 55 56 |
# File 'lib/slack/endpoint/groups.rb', line 53 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.
72 73 74 75 |
# File 'lib/slack/endpoint/groups.rb', line 72 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.
87 88 89 90 91 |
# File 'lib/slack/endpoint/groups.rb', line 87 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.
103 104 105 106 107 |
# File 'lib/slack/endpoint/groups.rb', line 103 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.
117 118 119 120 |
# File 'lib/slack/endpoint/groups.rb', line 117 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.
130 131 132 |
# File 'lib/slack/endpoint/groups.rb', line 130 def groups_list(={}) post("groups.list", ) end |
#groups_mark(options = {}) ⇒ Object
Sets the read cursor in a private group.
144 145 146 147 148 |
# File 'lib/slack/endpoint/groups.rb', line 144 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.
158 159 160 161 |
# File 'lib/slack/endpoint/groups.rb', line 158 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.
173 174 175 176 177 |
# File 'lib/slack/endpoint/groups.rb', line 173 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.
189 190 191 192 193 |
# File 'lib/slack/endpoint/groups.rb', line 189 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.
205 206 207 208 209 |
# File 'lib/slack/endpoint/groups.rb', line 205 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.
219 220 221 222 |
# File 'lib/slack/endpoint/groups.rb', line 219 def groups_unarchive(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("groups.unarchive", ) end |