Module: Slack::Endpoint::Conversations
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/conversations.rb
Instance Method Summary collapse
-
#conversations_archive(options = {}) ⇒ Object
Archives a conversation.
-
#conversations_close(options = {}) ⇒ Object
Closes a direct message or multi-person direct message.
-
#conversations_create(options = {}) ⇒ Object
Initiates a public or private channel-based conversation.
-
#conversations_history(options = {}) ⇒ Object
Fetches a conversation’s history of messages and events.
-
#conversations_info(options = {}) ⇒ Object
Retrieve information about a conversation.
-
#conversations_invite(options = {}) ⇒ Object
Invites users to a channel.
-
#conversations_join(options = {}) ⇒ Object
Joins an existing conversation.
-
#conversations_kick(options = {}) ⇒ Object
Removes a user from a conversation.
-
#conversations_leave(options = {}) ⇒ Object
Leaves a conversation.
-
#conversations_list(options = {}) ⇒ Object
Lists all channels in a Slack team.
-
#conversations_members(options = {}) ⇒ Object
Retrieve members of a conversation.
-
#conversations_open(options = {}) ⇒ Object
Opens or resumes a direct message or multi-person direct message.
-
#conversations_rename(options = {}) ⇒ Object
Renames a conversation.
-
#conversations_replies(options = {}) ⇒ Object
Retrieve a thread of messages posted to a conversation.
-
#conversations_setPurpose(options = {}) ⇒ Object
Sets the purpose for a conversation.
-
#conversations_setTopic(options = {}) ⇒ Object
Sets the topic for a conversation.
-
#conversations_unarchive(options = {}) ⇒ Object
Reverses conversation archival.
Instance Method Details
#conversations_archive(options = {}) ⇒ Object
Archives a conversation.
14 15 16 17 |
# File 'lib/slack/endpoint/conversations.rb', line 14 def conversations_archive(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.archive", ) end |
#conversations_close(options = {}) ⇒ Object
Closes a direct message or multi-person direct message.
27 28 29 30 |
# File 'lib/slack/endpoint/conversations.rb', line 27 def conversations_close(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.close", ) end |
#conversations_create(options = {}) ⇒ Object
Initiates a public or private channel-based conversation
42 43 44 45 |
# File 'lib/slack/endpoint/conversations.rb', line 42 def conversations_create(={}) throw ArgumentError.new("Required arguments :name missing") if [:name].nil? post("conversations.create", ) end |
#conversations_history(options = {}) ⇒ Object
Fetches a conversation’s history of messages and events.
65 66 67 68 |
# File 'lib/slack/endpoint/conversations.rb', line 65 def conversations_history(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.history", ) end |
#conversations_info(options = {}) ⇒ Object
Retrieve information about a conversation.
80 81 82 83 |
# File 'lib/slack/endpoint/conversations.rb', line 80 def conversations_info(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.info", ) end |
#conversations_invite(options = {}) ⇒ Object
Invites users to a channel.
95 96 97 98 99 |
# File 'lib/slack/endpoint/conversations.rb', line 95 def conversations_invite(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :users missing") if [:users].nil? post("conversations.invite", ) end |
#conversations_join(options = {}) ⇒ Object
Joins an existing conversation.
109 110 111 112 |
# File 'lib/slack/endpoint/conversations.rb', line 109 def conversations_join(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.join", ) end |
#conversations_kick(options = {}) ⇒ Object
Removes a user from a conversation.
124 125 126 127 128 |
# File 'lib/slack/endpoint/conversations.rb', line 124 def conversations_kick(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :user missing") if [:user].nil? post("conversations.kick", ) end |
#conversations_leave(options = {}) ⇒ Object
Leaves a conversation.
138 139 140 141 |
# File 'lib/slack/endpoint/conversations.rb', line 138 def conversations_leave(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.leave", ) end |
#conversations_list(options = {}) ⇒ Object
Lists all channels in a Slack team.
157 158 159 |
# File 'lib/slack/endpoint/conversations.rb', line 157 def conversations_list(={}) post("conversations.list", ) end |
#conversations_members(options = {}) ⇒ Object
Retrieve members of a conversation.
173 174 175 176 |
# File 'lib/slack/endpoint/conversations.rb', line 173 def conversations_members(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.members", ) end |
#conversations_open(options = {}) ⇒ Object
Opens or resumes a direct message or multi-person direct message.
190 191 192 |
# File 'lib/slack/endpoint/conversations.rb', line 190 def conversations_open(={}) post("conversations.open", ) end |
#conversations_rename(options = {}) ⇒ Object
Renames a conversation.
204 205 206 207 208 |
# File 'lib/slack/endpoint/conversations.rb', line 204 def conversations_rename(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :name missing") if [:name].nil? post("conversations.rename", ) end |
#conversations_replies(options = {}) ⇒ Object
Retrieve a thread of messages posted to a conversation
230 231 232 233 234 |
# File 'lib/slack/endpoint/conversations.rb', line 230 def conversations_replies(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :ts missing") if [:ts].nil? post("conversations.replies", ) end |
#conversations_setPurpose(options = {}) ⇒ Object
Sets the purpose for a conversation.
246 247 248 249 250 |
# File 'lib/slack/endpoint/conversations.rb', line 246 def conversations_setPurpose(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :purpose missing") if [:purpose].nil? post("conversations.setPurpose", ) end |
#conversations_setTopic(options = {}) ⇒ Object
Sets the topic for a conversation.
262 263 264 265 266 |
# File 'lib/slack/endpoint/conversations.rb', line 262 def conversations_setTopic(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? throw ArgumentError.new("Required arguments :topic missing") if [:topic].nil? post("conversations.setTopic", ) end |
#conversations_unarchive(options = {}) ⇒ Object
Reverses conversation archival.
276 277 278 279 |
# File 'lib/slack/endpoint/conversations.rb', line 276 def conversations_unarchive(={}) throw ArgumentError.new("Required arguments :channel missing") if [:channel].nil? post("conversations.unarchive", ) end |