slack-ruby-client 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +3 -3
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +5 -5
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +6 -2
- data/lib/slack/web/api/endpoints/api.rb +4 -5
- data/lib/slack/web/api/endpoints/auth.rb +2 -3
- data/lib/slack/web/api/endpoints/channels.rb +64 -73
- data/lib/slack/web/api/endpoints/chat.rb +15 -16
- data/lib/slack/web/api/endpoints/emoji.rb +2 -3
- data/lib/slack/web/api/endpoints/files.rb +33 -22
- data/lib/slack/web/api/endpoints/groups.rb +76 -76
- data/lib/slack/web/api/endpoints/im.rb +23 -26
- data/lib/slack/web/api/endpoints/oauth.rb +4 -4
- data/lib/slack/web/api/endpoints/pins.rb +61 -0
- data/lib/slack/web/api/endpoints/presence.rb +3 -4
- data/lib/slack/web/api/endpoints/reactions.rb +85 -0
- data/lib/slack/web/api/endpoints/rtm.rb +7 -3
- data/lib/slack/web/api/endpoints/search.rb +16 -19
- data/lib/slack/web/api/endpoints/stars.rb +3 -4
- data/lib/slack/web/api/endpoints/team.rb +29 -0
- data/lib/slack/web/api/endpoints/users.rb +20 -19
- data/lib/slack/web/api/tasks/generate.rake +2 -2
- data/lib/slack/web/api/templates/method.erb +4 -3
- metadata +34 -31
@@ -6,11 +6,10 @@ module Slack
|
|
6
6
|
module Endpoints
|
7
7
|
module Emoji
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# This method lists the custom emoji for a team.
|
10
10
|
#
|
11
11
|
# @see https://api.slack.com/methods/emoji.list
|
12
|
-
# @see https://github.com/
|
13
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/emoji.list.json
|
12
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/emoji.list.json
|
14
13
|
def emoji_list(options = {})
|
15
14
|
post('emoji.list', options)
|
16
15
|
end
|
@@ -6,22 +6,33 @@ module Slack
|
|
6
6
|
module Endpoints
|
7
7
|
module Files
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# This method deletes a file from your team.
|
10
10
|
#
|
11
|
-
# @option options [
|
12
|
-
#
|
11
|
+
# @option options [Object] :file
|
12
|
+
# ID of file to delete.
|
13
|
+
# @see https://api.slack.com/methods/files.delete
|
14
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.delete.json
|
15
|
+
def files_delete(options = {})
|
16
|
+
throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
|
17
|
+
post('files.delete', options)
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# This method returns information about a file in your team.
|
22
|
+
#
|
23
|
+
# @option options [Object] :file
|
24
|
+
# File to fetch info for.
|
13
25
|
# @see https://api.slack.com/methods/files.info
|
14
|
-
# @see https://github.com/
|
15
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/files.info.json
|
26
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.info.json
|
16
27
|
def files_info(options = {})
|
17
28
|
throw ArgumentError.new('Required arguments :file missing') if options[:file].nil?
|
18
29
|
post('files.info', options)
|
19
30
|
end
|
20
31
|
|
21
32
|
#
|
22
|
-
#
|
33
|
+
# This method returns a list of files within the team. It can be filtered and sliced in various ways.
|
23
34
|
#
|
24
|
-
# @option options [
|
35
|
+
# @option options [Object] :user
|
25
36
|
# Filter files created by a single user.
|
26
37
|
# @option options [Object] :ts_from
|
27
38
|
# Filter files created after this timestamp (inclusive).
|
@@ -30,27 +41,28 @@ module Slack
|
|
30
41
|
# @option options [Object] :types
|
31
42
|
# Filter files by type:
|
32
43
|
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
44
|
+
# all - All files
|
45
|
+
# posts - Posts
|
46
|
+
# snippets - Snippets
|
47
|
+
# images - Image files
|
48
|
+
# gdocs - Google docs
|
49
|
+
# zips - Zip files
|
50
|
+
# pdfs - PDF files
|
51
|
+
#
|
40
52
|
#
|
41
|
-
# You can pass multiple values in the types argument, like
|
53
|
+
# You can pass multiple values in the types argument, like types=posts,snippets.The default value is all, which does not filter the list.
|
54
|
+
# .
|
42
55
|
# @see https://api.slack.com/methods/files.list
|
43
|
-
# @see https://github.com/
|
44
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/files.list.json
|
56
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.list.json
|
45
57
|
def files_list(options = {})
|
46
58
|
post('files.list', options)
|
47
59
|
end
|
48
60
|
|
49
61
|
#
|
50
|
-
#
|
62
|
+
# This method allows you to create or upload an existing file.
|
51
63
|
#
|
52
64
|
# @option options [Object] :file
|
53
|
-
# File contents via
|
65
|
+
# File contents via multipart/form-data.
|
54
66
|
# @option options [Object] :content
|
55
67
|
# File contents via a POST var.
|
56
68
|
# @option options [Object] :filetype
|
@@ -61,11 +73,10 @@ module Slack
|
|
61
73
|
# Title of file.
|
62
74
|
# @option options [Object] :initial_comment
|
63
75
|
# Initial comment to add to file.
|
64
|
-
# @option options [
|
76
|
+
# @option options [Object] :channels
|
65
77
|
# Comma separated list of channels to share the file into.
|
66
78
|
# @see https://api.slack.com/methods/files.upload
|
67
|
-
# @see https://github.com/
|
68
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/files.upload.json
|
79
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.upload.json
|
69
80
|
def files_upload(options = {})
|
70
81
|
post('files.upload', options)
|
71
82
|
end
|
@@ -6,86 +6,94 @@ module Slack
|
|
6
6
|
module Endpoints
|
7
7
|
module Groups
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# This method archives a private group.
|
10
10
|
#
|
11
|
-
# @option options [
|
12
|
-
# Private group to archive
|
11
|
+
# @option options [Object] :channel
|
12
|
+
# Private group to archive.
|
13
13
|
# @see https://api.slack.com/methods/groups.archive
|
14
|
-
# @see https://github.com/
|
15
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.archive.json
|
14
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.archive.json
|
16
15
|
def groups_archive(options = {})
|
17
16
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
18
17
|
post('groups.archive', options)
|
19
18
|
end
|
20
19
|
|
21
20
|
#
|
22
|
-
#
|
21
|
+
# This method closes a private group.
|
23
22
|
#
|
24
|
-
# @option options [
|
23
|
+
# @option options [Object] :channel
|
25
24
|
# Group to open.
|
26
25
|
# @see https://api.slack.com/methods/groups.close
|
27
|
-
# @see https://github.com/
|
28
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.close.json
|
26
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.close.json
|
29
27
|
def groups_close(options = {})
|
30
28
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
31
29
|
post('groups.close', options)
|
32
30
|
end
|
33
31
|
|
34
32
|
#
|
35
|
-
#
|
33
|
+
# This method creates a private group.
|
36
34
|
#
|
37
35
|
# @option options [Object] :name
|
38
|
-
# Name of group to create
|
36
|
+
# Name of group to create.
|
39
37
|
# @see https://api.slack.com/methods/groups.create
|
40
|
-
# @see https://github.com/
|
41
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.create.json
|
38
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.create.json
|
42
39
|
def groups_create(options = {})
|
43
40
|
throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
|
44
41
|
post('groups.create', options)
|
45
42
|
end
|
46
43
|
|
47
44
|
#
|
48
|
-
#
|
45
|
+
# This method takes an existing private group and performs the following steps:
|
49
46
|
#
|
50
|
-
# @option options [
|
47
|
+
# @option options [Object] :channel
|
51
48
|
# Group to clone and archive.
|
52
49
|
# @see https://api.slack.com/methods/groups.createChild
|
53
|
-
# @see https://github.com/
|
54
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.createChild.json
|
50
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.createChild.json
|
55
51
|
def groups_createChild(options = {})
|
56
52
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
57
53
|
post('groups.createChild', options)
|
58
54
|
end
|
59
55
|
|
60
56
|
#
|
61
|
-
#
|
57
|
+
# This method returns a portion of messages/events from the specified private group.
|
58
|
+
# To read the entire history for a group, call the method with no latest or
|
59
|
+
# oldest arguments, and then continue paging using the instructions below.
|
62
60
|
#
|
63
|
-
# @option options [
|
61
|
+
# @option options [Object] :channel
|
64
62
|
# Group to fetch history for.
|
65
|
-
# @option options [
|
66
|
-
#
|
67
|
-
# @option options [
|
68
|
-
#
|
69
|
-
# @option options [Object] :
|
70
|
-
#
|
63
|
+
# @option options [Object] :latest
|
64
|
+
# End of time range of messages to include in results.
|
65
|
+
# @option options [Object] :oldest
|
66
|
+
# Start of time range of messages to include in results.
|
67
|
+
# @option options [Object] :inclusive
|
68
|
+
# Include messages with latest or oldest timestamp in results.
|
71
69
|
# @see https://api.slack.com/methods/groups.history
|
72
|
-
# @see https://github.com/
|
73
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.history.json
|
70
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.history.json
|
74
71
|
def groups_history(options = {})
|
75
72
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
76
73
|
post('groups.history', options)
|
77
74
|
end
|
78
75
|
|
79
76
|
#
|
80
|
-
#
|
77
|
+
# This method returns information about a private group.
|
81
78
|
#
|
82
|
-
# @option options [
|
79
|
+
# @option options [Object] :channel
|
80
|
+
# Group to get info on.
|
81
|
+
# @see https://api.slack.com/methods/groups.info
|
82
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.info.json
|
83
|
+
def groups_info(options = {})
|
84
|
+
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
85
|
+
post('groups.info', options)
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# This method is used to invite a user to a private group. The calling user must be a member of the group.
|
90
|
+
#
|
91
|
+
# @option options [Object] :channel
|
83
92
|
# Private group to invite user to.
|
84
|
-
# @option options [
|
93
|
+
# @option options [Object] :user
|
85
94
|
# User to invite.
|
86
95
|
# @see https://api.slack.com/methods/groups.invite
|
87
|
-
# @see https://github.com/
|
88
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.invite.json
|
96
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.invite.json
|
89
97
|
def groups_invite(options = {})
|
90
98
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
91
99
|
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
@@ -93,15 +101,14 @@ module Slack
|
|
93
101
|
end
|
94
102
|
|
95
103
|
#
|
96
|
-
#
|
104
|
+
# This method allows a user to remove another member from a private group.
|
97
105
|
#
|
98
|
-
# @option options [
|
106
|
+
# @option options [Object] :channel
|
99
107
|
# Group to remove user from.
|
100
|
-
# @option options [
|
108
|
+
# @option options [Object] :user
|
101
109
|
# User to remove from group.
|
102
110
|
# @see https://api.slack.com/methods/groups.kick
|
103
|
-
# @see https://github.com/
|
104
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.kick.json
|
111
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.kick.json
|
105
112
|
def groups_kick(options = {})
|
106
113
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
107
114
|
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
@@ -109,40 +116,38 @@ module Slack
|
|
109
116
|
end
|
110
117
|
|
111
118
|
#
|
112
|
-
#
|
119
|
+
# This method is used to leave a private group.
|
113
120
|
#
|
114
|
-
# @option options [
|
115
|
-
# Group to leave
|
121
|
+
# @option options [Object] :channel
|
122
|
+
# Group to leave.
|
116
123
|
# @see https://api.slack.com/methods/groups.leave
|
117
|
-
# @see https://github.com/
|
118
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.leave.json
|
124
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.leave.json
|
119
125
|
def groups_leave(options = {})
|
120
126
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
121
127
|
post('groups.leave', options)
|
122
128
|
end
|
123
129
|
|
124
130
|
#
|
125
|
-
#
|
131
|
+
# This method returns a list of groups in the team that the caller is in and archived groups that the caller was in.
|
132
|
+
# The list of (non-deactivated) members in each group is also returned.
|
126
133
|
#
|
127
134
|
# @option options [Object] :exclude_archived
|
128
135
|
# Don't return archived groups.
|
129
136
|
# @see https://api.slack.com/methods/groups.list
|
130
|
-
# @see https://github.com/
|
131
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.list.json
|
137
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.list.json
|
132
138
|
def groups_list(options = {})
|
133
139
|
post('groups.list', options)
|
134
140
|
end
|
135
141
|
|
136
142
|
#
|
137
|
-
#
|
143
|
+
# This method moves the read cursor in a private group.
|
138
144
|
#
|
139
|
-
# @option options [
|
145
|
+
# @option options [Object] :channel
|
140
146
|
# Group to set reading cursor in.
|
141
|
-
# @option options [
|
147
|
+
# @option options [Object] :ts
|
142
148
|
# Timestamp of the most recently seen message.
|
143
149
|
# @see https://api.slack.com/methods/groups.mark
|
144
|
-
# @see https://github.com/
|
145
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.mark.json
|
150
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.mark.json
|
146
151
|
def groups_mark(options = {})
|
147
152
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
148
153
|
throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
|
@@ -150,28 +155,26 @@ module Slack
|
|
150
155
|
end
|
151
156
|
|
152
157
|
#
|
153
|
-
#
|
158
|
+
# This method opens a private group.
|
154
159
|
#
|
155
|
-
# @option options [
|
160
|
+
# @option options [Object] :channel
|
156
161
|
# Group to open.
|
157
162
|
# @see https://api.slack.com/methods/groups.open
|
158
|
-
# @see https://github.com/
|
159
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.open.json
|
163
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.open.json
|
160
164
|
def groups_open(options = {})
|
161
165
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
162
166
|
post('groups.open', options)
|
163
167
|
end
|
164
168
|
|
165
169
|
#
|
166
|
-
#
|
170
|
+
# This method renames a private group.
|
167
171
|
#
|
168
|
-
# @option options [
|
169
|
-
# Group to rename
|
172
|
+
# @option options [Object] :channel
|
173
|
+
# Group to rename.
|
170
174
|
# @option options [Object] :name
|
171
175
|
# New name for group.
|
172
176
|
# @see https://api.slack.com/methods/groups.rename
|
173
|
-
# @see https://github.com/
|
174
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.rename.json
|
177
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.rename.json
|
175
178
|
def groups_rename(options = {})
|
176
179
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
177
180
|
throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
|
@@ -179,15 +182,14 @@ module Slack
|
|
179
182
|
end
|
180
183
|
|
181
184
|
#
|
182
|
-
#
|
185
|
+
# This method is used to change the purpose of a private group. The calling user must be a member of the private group.
|
183
186
|
#
|
184
|
-
# @option options [
|
185
|
-
# Private group to set the purpose of
|
187
|
+
# @option options [Object] :channel
|
188
|
+
# Private group to set the purpose of.
|
186
189
|
# @option options [Object] :purpose
|
187
|
-
# The new purpose
|
190
|
+
# The new purpose.
|
188
191
|
# @see https://api.slack.com/methods/groups.setPurpose
|
189
|
-
# @see https://github.com/
|
190
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.setPurpose.json
|
192
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.setPurpose.json
|
191
193
|
def groups_setPurpose(options = {})
|
192
194
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
193
195
|
throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil?
|
@@ -195,15 +197,14 @@ module Slack
|
|
195
197
|
end
|
196
198
|
|
197
199
|
#
|
198
|
-
#
|
200
|
+
# This method is used to change the topic of a private group. The calling user must be a member of the private group.
|
199
201
|
#
|
200
|
-
# @option options [
|
201
|
-
# Private group to set the topic of
|
202
|
+
# @option options [Object] :channel
|
203
|
+
# Private group to set the topic of.
|
202
204
|
# @option options [Object] :topic
|
203
|
-
# The new topic
|
205
|
+
# The new topic.
|
204
206
|
# @see https://api.slack.com/methods/groups.setTopic
|
205
|
-
# @see https://github.com/
|
206
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.setTopic.json
|
207
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.setTopic.json
|
207
208
|
def groups_setTopic(options = {})
|
208
209
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
209
210
|
throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil?
|
@@ -211,13 +212,12 @@ module Slack
|
|
211
212
|
end
|
212
213
|
|
213
214
|
#
|
214
|
-
#
|
215
|
+
# This method unarchives a private group.
|
215
216
|
#
|
216
|
-
# @option options [
|
217
|
-
# Group to unarchive
|
217
|
+
# @option options [Object] :channel
|
218
|
+
# Group to unarchive.
|
218
219
|
# @see https://api.slack.com/methods/groups.unarchive
|
219
|
-
# @see https://github.com/
|
220
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.unarchive.json
|
220
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups.unarchive.json
|
221
221
|
def groups_unarchive(options = {})
|
222
222
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
223
223
|
post('groups.unarchive', options)
|
@@ -6,57 +6,55 @@ module Slack
|
|
6
6
|
module Endpoints
|
7
7
|
module Im
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# This method closes a direct message channel.
|
10
10
|
#
|
11
|
-
# @option options [
|
11
|
+
# @option options [Object] :channel
|
12
12
|
# Direct message channel to close.
|
13
13
|
# @see https://api.slack.com/methods/im.close
|
14
|
-
# @see https://github.com/
|
15
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/im.close.json
|
14
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/im.close.json
|
16
15
|
def im_close(options = {})
|
17
16
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
18
17
|
post('im.close', options)
|
19
18
|
end
|
20
19
|
|
21
20
|
#
|
22
|
-
#
|
21
|
+
# This method returns a portion of messages/events from the specified direct message channel.
|
22
|
+
# To read the entire history for a direct message channel, call the method with no latest or
|
23
|
+
# oldest arguments, and then continue paging using the instructions below.
|
23
24
|
#
|
24
|
-
# @option options [
|
25
|
+
# @option options [Object] :channel
|
25
26
|
# Direct message channel to fetch history for.
|
26
|
-
# @option options [
|
27
|
-
#
|
28
|
-
# @option options [
|
29
|
-
#
|
30
|
-
# @option options [Object] :
|
31
|
-
#
|
27
|
+
# @option options [Object] :latest
|
28
|
+
# End of time range of messages to include in results.
|
29
|
+
# @option options [Object] :oldest
|
30
|
+
# Start of time range of messages to include in results.
|
31
|
+
# @option options [Object] :inclusive
|
32
|
+
# Include messages with latest or oldest timestamp in results.
|
32
33
|
# @see https://api.slack.com/methods/im.history
|
33
|
-
# @see https://github.com/
|
34
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/im.history.json
|
34
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/im.history.json
|
35
35
|
def im_history(options = {})
|
36
36
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
37
37
|
post('im.history', options)
|
38
38
|
end
|
39
39
|
|
40
40
|
#
|
41
|
-
#
|
41
|
+
# This method returns a list of all im channels that the user has.
|
42
42
|
#
|
43
43
|
# @see https://api.slack.com/methods/im.list
|
44
|
-
# @see https://github.com/
|
45
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/im.list.json
|
44
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/im.list.json
|
46
45
|
def im_list(options = {})
|
47
46
|
post('im.list', options)
|
48
47
|
end
|
49
48
|
|
50
49
|
#
|
51
|
-
#
|
50
|
+
# This method moves the read cursor in a direct message channel.
|
52
51
|
#
|
53
|
-
# @option options [
|
52
|
+
# @option options [Object] :channel
|
54
53
|
# Direct message channel to set reading cursor in.
|
55
|
-
# @option options [
|
54
|
+
# @option options [Object] :ts
|
56
55
|
# Timestamp of the most recently seen message.
|
57
56
|
# @see https://api.slack.com/methods/im.mark
|
58
|
-
# @see https://github.com/
|
59
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/im.mark.json
|
57
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/im.mark.json
|
60
58
|
def im_mark(options = {})
|
61
59
|
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
|
62
60
|
throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil?
|
@@ -64,13 +62,12 @@ module Slack
|
|
64
62
|
end
|
65
63
|
|
66
64
|
#
|
67
|
-
#
|
65
|
+
# This method opens a direct message channel with another member of your Slack team.
|
68
66
|
#
|
69
|
-
# @option options [
|
67
|
+
# @option options [Object] :user
|
70
68
|
# User to open a direct message channel with.
|
71
69
|
# @see https://api.slack.com/methods/im.open
|
72
|
-
# @see https://github.com/
|
73
|
-
# @see https://github.com/slackhq/slack-api-docs/blob/master/methods/im.open.json
|
70
|
+
# @see https://github.com/dblock/slack-api-ref/blob/master/methods/im.open.json
|
74
71
|
def im_open(options = {})
|
75
72
|
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
76
73
|
post('im.open', options)
|