slack-api 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slack/endpoint.rb +8 -0
- data/lib/slack/endpoint/api.rb +1 -1
- data/lib/slack/endpoint/apps.rb +34 -0
- data/lib/slack/endpoint/auth.rb +2 -2
- data/lib/slack/endpoint/bots.rb +1 -1
- data/lib/slack/endpoint/channels.rb +25 -20
- data/lib/slack/endpoint/chat.rb +81 -33
- data/lib/slack/endpoint/conversations.rb +283 -0
- data/lib/slack/endpoint/dialog.rb +24 -0
- data/lib/slack/endpoint/dnd.rb +4 -4
- data/lib/slack/endpoint/emoji.rb +1 -1
- data/lib/slack/endpoint/files.rb +28 -28
- data/lib/slack/endpoint/groups.rb +24 -23
- data/lib/slack/endpoint/im.rb +16 -12
- data/lib/slack/endpoint/migration.rb +23 -0
- data/lib/slack/endpoint/mpim.rb +9 -11
- data/lib/slack/endpoint/oauth.rb +24 -2
- data/lib/slack/endpoint/pins.rb +3 -5
- data/lib/slack/endpoint/reactions.rb +16 -18
- data/lib/slack/endpoint/reminders.rb +5 -5
- data/lib/slack/endpoint/search.rb +21 -21
- data/lib/slack/endpoint/stars.rb +7 -9
- data/lib/slack/endpoint/team.rb +11 -12
- data/lib/slack/endpoint/usergroups.rb +19 -19
- data/lib/slack/endpoint/users.rb +40 -23
- data/lib/slack/version.rb +1 -1
- metadata +6 -2
@@ -0,0 +1,283 @@
|
|
1
|
+
# This file was auto-generated by lib/generators/tasks/generate.rb
|
2
|
+
|
3
|
+
module Slack
|
4
|
+
module Endpoint
|
5
|
+
module Conversations
|
6
|
+
#
|
7
|
+
# Archives a conversation.
|
8
|
+
#
|
9
|
+
# @option options [Object] :channel
|
10
|
+
# ID of conversation to archive
|
11
|
+
# @see https://api.slack.com/methods/conversations.archive
|
12
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.archive.md
|
13
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.archive.json
|
14
|
+
def conversations_archive(options={})
|
15
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
16
|
+
post("conversations.archive", options)
|
17
|
+
end
|
18
|
+
|
19
|
+
#
|
20
|
+
# Closes a direct message or multi-person direct message.
|
21
|
+
#
|
22
|
+
# @option options [Object] :channel
|
23
|
+
# Conversation to close.
|
24
|
+
# @see https://api.slack.com/methods/conversations.close
|
25
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.close.md
|
26
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.close.json
|
27
|
+
def conversations_close(options={})
|
28
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
29
|
+
post("conversations.close", options)
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# Initiates a public or private channel-based conversation
|
34
|
+
#
|
35
|
+
# @option options [Object] :name
|
36
|
+
# Name of the public or private channel to create
|
37
|
+
# @option options [Object] :is_private
|
38
|
+
# Create a private channel instead of a public one
|
39
|
+
# @see https://api.slack.com/methods/conversations.create
|
40
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.create.md
|
41
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.create.json
|
42
|
+
def conversations_create(options={})
|
43
|
+
throw ArgumentError.new("Required arguments :name missing") if options[:name].nil?
|
44
|
+
post("conversations.create", options)
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Fetches a conversation's history of messages and events.
|
49
|
+
#
|
50
|
+
# @option options [Object] :channel
|
51
|
+
# Conversation ID to fetch history for.
|
52
|
+
# @option options [Object] :cursor
|
53
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
54
|
+
# @option options [Object] :inclusive
|
55
|
+
# Include messages with latest or oldest timestamp in results only when either timestamp is specified.
|
56
|
+
# @option options [Object] :latest
|
57
|
+
# End of time range of messages to include in results.
|
58
|
+
# @option options [Object] :limit
|
59
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
|
60
|
+
# @option options [Object] :oldest
|
61
|
+
# Start of time range of messages to include in results.
|
62
|
+
# @see https://api.slack.com/methods/conversations.history
|
63
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.history.md
|
64
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.history.json
|
65
|
+
def conversations_history(options={})
|
66
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
67
|
+
post("conversations.history", options)
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Retrieve information about a conversation.
|
72
|
+
#
|
73
|
+
# @option options [Object] :channel
|
74
|
+
# Conversation ID to learn more about
|
75
|
+
# @option options [Object] :include_locale
|
76
|
+
# Set this to true to receive the locale for this conversation. Defaults to false
|
77
|
+
# @see https://api.slack.com/methods/conversations.info
|
78
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.info.md
|
79
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.info.json
|
80
|
+
def conversations_info(options={})
|
81
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
82
|
+
post("conversations.info", options)
|
83
|
+
end
|
84
|
+
|
85
|
+
#
|
86
|
+
# Invites users to a channel.
|
87
|
+
#
|
88
|
+
# @option options [Object] :channel
|
89
|
+
# The ID of the public or private channel to invite user(s) to.
|
90
|
+
# @option options [Object] :users
|
91
|
+
# A comma separated list of user IDs. Up to 30 users may be listed.
|
92
|
+
# @see https://api.slack.com/methods/conversations.invite
|
93
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.invite.md
|
94
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.invite.json
|
95
|
+
def conversations_invite(options={})
|
96
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
97
|
+
throw ArgumentError.new("Required arguments :users missing") if options[:users].nil?
|
98
|
+
post("conversations.invite", options)
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
# Joins an existing conversation.
|
103
|
+
#
|
104
|
+
# @option options [Object] :channel
|
105
|
+
# ID of conversation to join
|
106
|
+
# @see https://api.slack.com/methods/conversations.join
|
107
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.join.md
|
108
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.join.json
|
109
|
+
def conversations_join(options={})
|
110
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
111
|
+
post("conversations.join", options)
|
112
|
+
end
|
113
|
+
|
114
|
+
#
|
115
|
+
# Removes a user from a conversation.
|
116
|
+
#
|
117
|
+
# @option options [Object] :channel
|
118
|
+
# ID of conversation to remove user from.
|
119
|
+
# @option options [Object] :user
|
120
|
+
# User ID to be removed.
|
121
|
+
# @see https://api.slack.com/methods/conversations.kick
|
122
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.kick.md
|
123
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.kick.json
|
124
|
+
def conversations_kick(options={})
|
125
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
126
|
+
throw ArgumentError.new("Required arguments :user missing") if options[:user].nil?
|
127
|
+
post("conversations.kick", options)
|
128
|
+
end
|
129
|
+
|
130
|
+
#
|
131
|
+
# Leaves a conversation.
|
132
|
+
#
|
133
|
+
# @option options [Object] :channel
|
134
|
+
# Conversation to leave
|
135
|
+
# @see https://api.slack.com/methods/conversations.leave
|
136
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.leave.md
|
137
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.leave.json
|
138
|
+
def conversations_leave(options={})
|
139
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
140
|
+
post("conversations.leave", options)
|
141
|
+
end
|
142
|
+
|
143
|
+
#
|
144
|
+
# Lists all channels in a Slack team.
|
145
|
+
#
|
146
|
+
# @option options [Object] :cursor
|
147
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
148
|
+
# @option options [Object] :exclude_archived
|
149
|
+
# Set to true to exclude archived channels from the list
|
150
|
+
# @option options [Object] :limit
|
151
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
|
152
|
+
# @option options [Object] :types
|
153
|
+
# Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im
|
154
|
+
# @see https://api.slack.com/methods/conversations.list
|
155
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.list.md
|
156
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.list.json
|
157
|
+
def conversations_list(options={})
|
158
|
+
post("conversations.list", options)
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# Retrieve members of a conversation.
|
163
|
+
#
|
164
|
+
# @option options [Object] :channel
|
165
|
+
# ID of the conversation to retrieve members for
|
166
|
+
# @option options [Object] :cursor
|
167
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
168
|
+
# @option options [Object] :limit
|
169
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
|
170
|
+
# @see https://api.slack.com/methods/conversations.members
|
171
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.members.md
|
172
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.members.json
|
173
|
+
def conversations_members(options={})
|
174
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
175
|
+
post("conversations.members", options)
|
176
|
+
end
|
177
|
+
|
178
|
+
#
|
179
|
+
# Opens or resumes a direct message or multi-person direct message.
|
180
|
+
#
|
181
|
+
# @option options [Object] :channel
|
182
|
+
# Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead.
|
183
|
+
# @option options [Object] :return_im
|
184
|
+
# Boolean, indicates you want the full IM channel definition in the response.
|
185
|
+
# @option options [Object] :users
|
186
|
+
# Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users.
|
187
|
+
# @see https://api.slack.com/methods/conversations.open
|
188
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.open.md
|
189
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.open.json
|
190
|
+
def conversations_open(options={})
|
191
|
+
post("conversations.open", options)
|
192
|
+
end
|
193
|
+
|
194
|
+
#
|
195
|
+
# Renames a conversation.
|
196
|
+
#
|
197
|
+
# @option options [Object] :channel
|
198
|
+
# ID of conversation to rename
|
199
|
+
# @option options [Object] :name
|
200
|
+
# New name for conversation.
|
201
|
+
# @see https://api.slack.com/methods/conversations.rename
|
202
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.rename.md
|
203
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.rename.json
|
204
|
+
def conversations_rename(options={})
|
205
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
206
|
+
throw ArgumentError.new("Required arguments :name missing") if options[:name].nil?
|
207
|
+
post("conversations.rename", options)
|
208
|
+
end
|
209
|
+
|
210
|
+
#
|
211
|
+
# Retrieve a thread of messages posted to a conversation
|
212
|
+
#
|
213
|
+
# @option options [Object] :channel
|
214
|
+
# Conversation ID to fetch thread from.
|
215
|
+
# @option options [Object] :ts
|
216
|
+
# Unique identifier of a thread's parent message.
|
217
|
+
# @option options [Object] :cursor
|
218
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
219
|
+
# @option options [Object] :inclusive
|
220
|
+
# Include messages with latest or oldest timestamp in results only when either timestamp is specified.
|
221
|
+
# @option options [Object] :latest
|
222
|
+
# End of time range of messages to include in results.
|
223
|
+
# @option options [Object] :limit
|
224
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.
|
225
|
+
# @option options [Object] :oldest
|
226
|
+
# Start of time range of messages to include in results.
|
227
|
+
# @see https://api.slack.com/methods/conversations.replies
|
228
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.replies.md
|
229
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.replies.json
|
230
|
+
def conversations_replies(options={})
|
231
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
232
|
+
throw ArgumentError.new("Required arguments :ts missing") if options[:ts].nil?
|
233
|
+
post("conversations.replies", options)
|
234
|
+
end
|
235
|
+
|
236
|
+
#
|
237
|
+
# Sets the purpose for a conversation.
|
238
|
+
#
|
239
|
+
# @option options [Object] :channel
|
240
|
+
# Conversation to set the purpose of
|
241
|
+
# @option options [Object] :purpose
|
242
|
+
# A new, specialer purpose
|
243
|
+
# @see https://api.slack.com/methods/conversations.setPurpose
|
244
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.setPurpose.md
|
245
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.setPurpose.json
|
246
|
+
def conversations_setPurpose(options={})
|
247
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
248
|
+
throw ArgumentError.new("Required arguments :purpose missing") if options[:purpose].nil?
|
249
|
+
post("conversations.setPurpose", options)
|
250
|
+
end
|
251
|
+
|
252
|
+
#
|
253
|
+
# Sets the topic for a conversation.
|
254
|
+
#
|
255
|
+
# @option options [Object] :channel
|
256
|
+
# Conversation to set the topic of
|
257
|
+
# @option options [Object] :topic
|
258
|
+
# The new topic string. Does not support formatting or linkification.
|
259
|
+
# @see https://api.slack.com/methods/conversations.setTopic
|
260
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.setTopic.md
|
261
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.setTopic.json
|
262
|
+
def conversations_setTopic(options={})
|
263
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
264
|
+
throw ArgumentError.new("Required arguments :topic missing") if options[:topic].nil?
|
265
|
+
post("conversations.setTopic", options)
|
266
|
+
end
|
267
|
+
|
268
|
+
#
|
269
|
+
# Reverses conversation archival.
|
270
|
+
#
|
271
|
+
# @option options [Object] :channel
|
272
|
+
# ID of conversation to unarchive
|
273
|
+
# @see https://api.slack.com/methods/conversations.unarchive
|
274
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.unarchive.md
|
275
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/conversations.unarchive.json
|
276
|
+
def conversations_unarchive(options={})
|
277
|
+
throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil?
|
278
|
+
post("conversations.unarchive", options)
|
279
|
+
end
|
280
|
+
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This file was auto-generated by lib/generators/tasks/generate.rb
|
2
|
+
|
3
|
+
module Slack
|
4
|
+
module Endpoint
|
5
|
+
module Dialog
|
6
|
+
#
|
7
|
+
# Open a dialog with a user
|
8
|
+
#
|
9
|
+
# @option options [Object] :dialog
|
10
|
+
# The dialog definition. This must be a JSON-encoded string.
|
11
|
+
# @option options [Object] :trigger_id
|
12
|
+
# Exchange a trigger to post to the user.
|
13
|
+
# @see https://api.slack.com/methods/dialog.open
|
14
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/dialog.open.md
|
15
|
+
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/dialog.open.json
|
16
|
+
def dialog_open(options={})
|
17
|
+
throw ArgumentError.new("Required arguments :dialog missing") if options[:dialog].nil?
|
18
|
+
throw ArgumentError.new("Required arguments :trigger_id missing") if options[:trigger_id].nil?
|
19
|
+
post("dialog.open", options)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/slack/endpoint/dnd.rb
CHANGED
@@ -4,7 +4,7 @@ module Slack
|
|
4
4
|
module Endpoint
|
5
5
|
module Dnd
|
6
6
|
#
|
7
|
-
# Ends the user's
|
7
|
+
# Ends the current user's Do Not Disturb session immediately.
|
8
8
|
#
|
9
9
|
# @see https://api.slack.com/methods/dnd.endDnd
|
10
10
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endDnd.md
|
@@ -24,7 +24,7 @@ module Slack
|
|
24
24
|
end
|
25
25
|
|
26
26
|
#
|
27
|
-
#
|
27
|
+
# Retrieves a user's current Do Not Disturb status.
|
28
28
|
#
|
29
29
|
# @option options [Object] :user
|
30
30
|
# User to fetch status for (defaults to current user)
|
@@ -36,7 +36,7 @@ module Slack
|
|
36
36
|
end
|
37
37
|
|
38
38
|
#
|
39
|
-
#
|
39
|
+
# Turns on Do Not Disturb mode for the current user, or changes its duration.
|
40
40
|
#
|
41
41
|
# @option options [Object] :num_minutes
|
42
42
|
# Number of minutes, from now, to snooze until.
|
@@ -49,7 +49,7 @@ module Slack
|
|
49
49
|
end
|
50
50
|
|
51
51
|
#
|
52
|
-
#
|
52
|
+
# Retrieves the Do Not Disturb status for users on a team.
|
53
53
|
#
|
54
54
|
# @option options [Object] :users
|
55
55
|
# Comma-separated list of users to fetch Do Not Disturb status for
|
data/lib/slack/endpoint/emoji.rb
CHANGED
@@ -4,7 +4,7 @@ module Slack
|
|
4
4
|
module Endpoint
|
5
5
|
module Emoji
|
6
6
|
#
|
7
|
-
#
|
7
|
+
# Lists custom emoji for a team.
|
8
8
|
#
|
9
9
|
# @see https://api.slack.com/methods/emoji.list
|
10
10
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/emoji.list.md
|
data/lib/slack/endpoint/files.rb
CHANGED
@@ -6,21 +6,21 @@ module Slack
|
|
6
6
|
#
|
7
7
|
# Add a comment to an existing file.
|
8
8
|
#
|
9
|
-
# @option options [Object] :file
|
10
|
-
# File to add a comment to.
|
11
9
|
# @option options [Object] :comment
|
12
10
|
# Text of the comment to add.
|
11
|
+
# @option options [Object] :file
|
12
|
+
# File to add a comment to.
|
13
13
|
# @see https://api.slack.com/methods/files.comments.add
|
14
14
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.add.md
|
15
15
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.add.json
|
16
16
|
def files_comments_add(options={})
|
17
|
-
throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
|
18
17
|
throw ArgumentError.new("Required arguments :comment missing") if options[:comment].nil?
|
18
|
+
throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
|
19
19
|
post("files.comments.add", options)
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
|
-
#
|
23
|
+
# Deletes an existing comment on a file.
|
24
24
|
#
|
25
25
|
# @option options [Object] :file
|
26
26
|
# File to delete a comment from.
|
@@ -36,26 +36,26 @@ module Slack
|
|
36
36
|
end
|
37
37
|
|
38
38
|
#
|
39
|
-
# Edit an existing
|
39
|
+
# Edit an existing file comment.
|
40
40
|
#
|
41
|
+
# @option options [Object] :comment
|
42
|
+
# Text of the comment to edit.
|
41
43
|
# @option options [Object] :file
|
42
44
|
# File containing the comment to edit.
|
43
45
|
# @option options [Object] :id
|
44
46
|
# The comment to edit.
|
45
|
-
# @option options [Object] :comment
|
46
|
-
# Text of the comment to edit.
|
47
47
|
# @see https://api.slack.com/methods/files.comments.edit
|
48
48
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.edit.md
|
49
49
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.edit.json
|
50
50
|
def files_comments_edit(options={})
|
51
|
+
throw ArgumentError.new("Required arguments :comment missing") if options[:comment].nil?
|
51
52
|
throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
|
52
53
|
throw ArgumentError.new("Required arguments :id missing") if options[:id].nil?
|
53
|
-
throw ArgumentError.new("Required arguments :comment missing") if options[:comment].nil?
|
54
54
|
post("files.comments.edit", options)
|
55
55
|
end
|
56
56
|
|
57
57
|
#
|
58
|
-
#
|
58
|
+
# Deletes a file.
|
59
59
|
#
|
60
60
|
# @option options [Object] :file
|
61
61
|
# ID of file to delete.
|
@@ -68,7 +68,7 @@ module Slack
|
|
68
68
|
end
|
69
69
|
|
70
70
|
#
|
71
|
-
#
|
71
|
+
# Gets information about a team file.
|
72
72
|
#
|
73
73
|
# @option options [Object] :file
|
74
74
|
# Specify a file by providing its ID.
|
@@ -85,12 +85,14 @@ module Slack
|
|
85
85
|
end
|
86
86
|
|
87
87
|
#
|
88
|
-
#
|
88
|
+
# Lists & filters team files.
|
89
89
|
#
|
90
|
-
# @option options [Object] :user
|
91
|
-
# Filter files created by a single user.
|
92
90
|
# @option options [Object] :channel
|
93
91
|
# Filter files appearing in a specific channel, indicated by its ID.
|
92
|
+
# @option options [Object] :count
|
93
|
+
# Number of items to return per page.
|
94
|
+
# @option options [Object] :page
|
95
|
+
# Page number of results to return.
|
94
96
|
# @option options [Object] :ts_from
|
95
97
|
# Filter files created after this timestamp (inclusive).
|
96
98
|
# @option options [Object] :ts_to
|
@@ -109,10 +111,8 @@ module Slack
|
|
109
111
|
#
|
110
112
|
#
|
111
113
|
# You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.
|
112
|
-
# @option options [Object] :
|
113
|
-
#
|
114
|
-
# @option options [Object] :page
|
115
|
-
# Page number of results to return.
|
114
|
+
# @option options [Object] :user
|
115
|
+
# Filter files created by a single user.
|
116
116
|
# @see https://api.slack.com/methods/files.list
|
117
117
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.list.md
|
118
118
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.list.json
|
@@ -121,7 +121,7 @@ module Slack
|
|
121
121
|
end
|
122
122
|
|
123
123
|
#
|
124
|
-
#
|
124
|
+
# Revokes public/external sharing access for a file
|
125
125
|
#
|
126
126
|
# @option options [Object] :file
|
127
127
|
# File to revoke
|
@@ -134,7 +134,7 @@ module Slack
|
|
134
134
|
end
|
135
135
|
|
136
136
|
#
|
137
|
-
#
|
137
|
+
# Enables a file for public/external sharing.
|
138
138
|
#
|
139
139
|
# @option options [Object] :file
|
140
140
|
# File to share
|
@@ -160,22 +160,22 @@ module Slack
|
|
160
160
|
end
|
161
161
|
|
162
162
|
#
|
163
|
-
#
|
163
|
+
# Uploads or creates a file.
|
164
164
|
#
|
165
|
-
# @option options [Object] :
|
166
|
-
#
|
165
|
+
# @option options [Object] :channels
|
166
|
+
# Comma-separated list of channel names or IDs where the file will be shared.
|
167
167
|
# @option options [Object] :content
|
168
168
|
# File contents via a POST variable. If omitting this parameter, you must provide a file.
|
169
|
-
# @option options [Object] :
|
170
|
-
#
|
169
|
+
# @option options [Object] :file
|
170
|
+
# File contents via multipart/form-data. If omitting this parameter, you must submit content.
|
171
171
|
# @option options [Object] :filename
|
172
172
|
# Filename of file.
|
173
|
-
# @option options [Object] :
|
174
|
-
#
|
173
|
+
# @option options [Object] :filetype
|
174
|
+
# A file type identifier.
|
175
175
|
# @option options [Object] :initial_comment
|
176
176
|
# Initial comment to add to file.
|
177
|
-
# @option options [Object] :
|
178
|
-
#
|
177
|
+
# @option options [Object] :title
|
178
|
+
# Title of file.
|
179
179
|
# @see https://api.slack.com/methods/files.upload
|
180
180
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.upload.md
|
181
181
|
# @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.upload.json
|