slack-api 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11c9e5a9b4028a006780adf4ba5ccfb158d7b25b
4
- data.tar.gz: e8c4937e8cbbf6583ee5fce7ce4a0dd47aa9f526
3
+ metadata.gz: ba61b8e39ead3bbb161382597ccffe4a06a8a0b5
4
+ data.tar.gz: b74fbb09f63b6b921b68acc114a775895d80de0e
5
5
  SHA512:
6
- metadata.gz: 4912400acb9bcb0abd0f2e1b2ccff7fd0c06759c2f6c39850b141af528130000e23311cbb8a2b26ac878762d91c19c27a921e298b09c76d9e10d79d0c1f14127
7
- data.tar.gz: a758ccf87e742621f46f6dab7e22baf7faadec6d24bfe1c37954f3c24138501d7aaf1c7356022255c94f0a2eddc4d7f5e60d781c96f7073f1f434169413e8b62
6
+ metadata.gz: 5d35957df8df1a5f9ac62c53430a247a37f860407d46629234c98d8e0771f7cb97903d55c5b9bb519521b0bd6aaf02ff789cd3b4d706fdbed2665e180ebd11dd
7
+ data.tar.gz: 0df143f6899e4b94cacde10e17fb45f1db821af079422b433c458cce201d1049e61212e3e133d3e39f961cc1e4716ad3f7b56c8b83790086fff1cad19125747e
data/README.md CHANGED
@@ -20,6 +20,9 @@ Or install it yourself as:
20
20
 
21
21
  $ gem install slack-api
22
22
 
23
+ ## Documentation
24
+ [http://www.rubydoc.info/gems/slack-api](http://www.rubydoc.info/gems/slack-api)
25
+
23
26
  ## Usage
24
27
 
25
28
  ```ruby
@@ -32,7 +35,11 @@ end
32
35
  Slack.auth_test
33
36
  ```
34
37
 
35
- ### RTM
38
+ ## Examples
39
+
40
+ [https://github.com/aki017/slack-ruby-gem/tree/dev/examples](https://github.com/aki017/slack-ruby-gem/tree/dev/examples)
41
+
42
+ ## RTM
36
43
 
37
44
  [Slack Bot Real Time Messaging API Integration in Ruby Tutorial](http://code.dblock.org/2015/04/28/slack-bot-real-time-messaging-api-integration-tutorial.html) thanks @dblock
38
45
 
@@ -0,0 +1,35 @@
1
+ require "slack"
2
+ require "yaml"
3
+
4
+ token = ENV["TOKEN"] || (print "Token: "; gets.strip)
5
+ client = Slack::Client.new token: token
6
+
7
+ # Get users list
8
+ puts "Get users list"
9
+ users = Hash[client.users_list["members"].map{|m| [m["id"], m["name"]]}]
10
+
11
+ puts YAML.dump users
12
+ puts
13
+ puts
14
+
15
+ # Get channels list
16
+ puts "Get channels list"
17
+ channels = client.channels_list["channels"]
18
+ puts YAML.dump channels
19
+ puts
20
+ puts
21
+
22
+ channels.each do |c|
23
+ puts "- id: #{c["id"]}, name: #{c["name"]}"
24
+
25
+ # Get channel histry
26
+ messages = client.channels_history(channel: "#{c["id"]}")["messages"]
27
+ messages.each do |message|
28
+ user_name = users[message["user"]]
29
+ text = message["text"].inspect
30
+ puts " - #{user_name}: #{text}"
31
+ end
32
+ end
33
+
34
+ sleep 1
35
+
@@ -4,6 +4,7 @@ require_relative 'endpoint/api'
4
4
  require_relative 'endpoint/auth'
5
5
  require_relative 'endpoint/channels'
6
6
  require_relative 'endpoint/chat'
7
+ require_relative 'endpoint/dnd'
7
8
  require_relative 'endpoint/emoji'
8
9
  require_relative 'endpoint/files'
9
10
  require_relative 'endpoint/groups'
@@ -25,6 +26,7 @@ module Slack
25
26
  include Auth
26
27
  include Channels
27
28
  include Chat
29
+ include Dnd
28
30
  include Emoji
29
31
  include Files
30
32
  include Groups
@@ -32,9 +32,7 @@ module Slack
32
32
  end
33
33
 
34
34
  #
35
- # This method returns a portion of messages/events from the specified channel.
36
- # To read the entire history for a channel, call the method with no latest or
37
- # oldest arguments, and then continue paging using the instructions below.
35
+ # This method returns a portion of message events from the specified channel.
38
36
  #
39
37
  # @option options [Object] :channel
40
38
  # Channel to fetch history for.
@@ -135,9 +133,7 @@ module Slack
135
133
  end
136
134
 
137
135
  #
138
- # This method returns a list of all channels in the team. This includes channels the caller is in, channels
139
- # they are not currently in, and archived channels. The number of (non-deactivated) members in each channel
140
- # is also returned.
136
+ # This method returns a list of all channels in the team. This includes channels the caller is in, channels they are not currently in, and archived channels but does not include private channels. The number of (non-deactivated) members in each channel is also returned.
141
137
  #
142
138
  # @option options [Object] :exclude_archived
143
139
  # Don't return archived channels.
@@ -27,12 +27,8 @@ module Slack
27
27
  # Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.
28
28
  # @option options [Object] :text
29
29
  # Text of the message to send. See below for an explanation of formatting.
30
- # @option options [Object] :username
31
- # Name of bot.
32
- # @option options [Object] :as_user
33
- # Pass true to post the message as the authed user, instead of as a bot
34
30
  # @option options [Object] :parse
35
- # Change how messages are treated. See below.
31
+ # Change how messages are treated. Defaults to none. See below.
36
32
  # @option options [Object] :link_names
37
33
  # Find and link channel names and usernames.
38
34
  # @option options [Object] :attachments
@@ -41,10 +37,14 @@ module Slack
41
37
  # Pass true to enable unfurling of primarily text-based content.
42
38
  # @option options [Object] :unfurl_media
43
39
  # Pass false to disable unfurling of media content.
40
+ # @option options [Object] :username
41
+ # Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
42
+ # @option options [Object] :as_user
43
+ # Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.
44
44
  # @option options [Object] :icon_url
45
- # URL to an image to use as the icon for this message
45
+ # URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
46
46
  # @option options [Object] :icon_emoji
47
- # emoji to use as the icon for this message. Overrides icon_url.
47
+ # emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
48
48
  # @see https://api.slack.com/methods/chat.postMessage
49
49
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.postMessage.md
50
50
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.postMessage.json
@@ -56,7 +56,7 @@ module Slack
56
56
  end
57
57
 
58
58
  #
59
- # This method updates a message in a channel.
59
+ # This method updates a message in a channel. Though related to chat.postMessage, some parameters of chat.update are handled differently.
60
60
  #
61
61
  # @option options [Object] :ts
62
62
  # Timestamp of the message to be updated.
@@ -67,9 +67,11 @@ module Slack
67
67
  # @option options [Object] :attachments
68
68
  # Structured message attachments.
69
69
  # @option options [Object] :parse
70
- # Change how messages are treated. See below.
70
+ # Change how messages are treated. Defaults to client, unlike chat.postMessage. See below.
71
71
  # @option options [Object] :link_names
72
- # Find and link channel names and usernames.
72
+ # Find and link channel names and usernames. Defaults to none. This parameter should be used in conjunction with parse. To set link_names to 1, specify a parse mode of full.
73
+ # @option options [Object] :as_user
74
+ # Pass true to update the message as the authed user. Bot users in this context are considered authed users.
73
75
  # @see https://api.slack.com/methods/chat.update
74
76
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.update.md
75
77
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/chat.update.json
@@ -0,0 +1,70 @@
1
+ # This file was auto-generated by lib/generators/tasks/generate.rb
2
+
3
+ module Slack
4
+ module Endpoint
5
+ module Dnd
6
+ #
7
+ # Ends the user's currently scheduled Do Not Disturb session immediately.
8
+ #
9
+ # @see https://api.slack.com/methods/dnd.endDnd
10
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endDnd.md
11
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endDnd.json
12
+ def dnd_endDnd(options={})
13
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
14
+ post("dnd.endDnd", options)
15
+ end
16
+
17
+ #
18
+ # Ends the current user's snooze mode immediately.
19
+ #
20
+ # @see https://api.slack.com/methods/dnd.endSnooze
21
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endSnooze.md
22
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endSnooze.json
23
+ def dnd_endSnooze(options={})
24
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
25
+ post("dnd.endSnooze", options)
26
+ end
27
+
28
+ #
29
+ # Provides information about a user's current Do Not Disturb settings.
30
+ #
31
+ # @option options [Object] :user
32
+ # User to fetch status for (defaults to current user)
33
+ # @see https://api.slack.com/methods/dnd.info
34
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.info.md
35
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.info.json
36
+ def dnd_info(options={})
37
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
38
+ post("dnd.info", options)
39
+ end
40
+
41
+ #
42
+ # Adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration.
43
+ #
44
+ # @option options [Object] :num_minutes
45
+ # Number of minutes, from now, to snooze until.
46
+ # @see https://api.slack.com/methods/dnd.setSnooze
47
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.setSnooze.md
48
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.setSnooze.json
49
+ def dnd_setSnooze(options={})
50
+ throw ArgumentError.new("Required arguments :num_minutes missing") if options[:num_minutes].nil?
51
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
52
+ post("dnd.setSnooze", options)
53
+ end
54
+
55
+ #
56
+ # Provides information about the current Do Not Disturb settings for users of a Slack team.
57
+ #
58
+ # @option options [Object] :users
59
+ # Comma-separated list of users to fetch Do Not Disturb status for
60
+ # @see https://api.slack.com/methods/dnd.teamInfo
61
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.teamInfo.md
62
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.teamInfo.json
63
+ def dnd_teamInfo(options={})
64
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
65
+ post("dnd.teamInfo", options)
66
+ end
67
+
68
+ end
69
+ end
70
+ end
@@ -3,6 +3,26 @@
3
3
  module Slack
4
4
  module Endpoint
5
5
  module Files
6
+ #
7
+ # Edit an existing comment on a file. Only the user who created a comment may make edits. Teams may configure a limited time window during which file comment edits are allowed.
8
+ #
9
+ # @option options [Object] :file
10
+ # File containing the comment to edit.
11
+ # @option options [Object] :id
12
+ # The comment to edit.
13
+ # @option options [Object] :comment
14
+ # Text of the comment to edit.
15
+ # @see https://api.slack.com/methods/files.comments
16
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.md
17
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.comments.json
18
+ def files_comments(options={})
19
+ throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
20
+ throw ArgumentError.new("Required arguments :id missing") if options[:id].nil?
21
+ throw ArgumentError.new("Required arguments :comment missing") if options[:comment].nil?
22
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
23
+ post("files.comments", options)
24
+ end
25
+
6
26
  #
7
27
  # This method deletes a file from your team.
8
28
  #
@@ -21,7 +41,7 @@ module Slack
21
41
  # This method returns information about a file in your team.
22
42
  #
23
43
  # @option options [Object] :file
24
- # File to fetch info for
44
+ # Specify a file by providing its ID.
25
45
  # @option options [Object] :count
26
46
  # Number of items to return per page.
27
47
  # @option options [Object] :page
@@ -40,6 +60,8 @@ module Slack
40
60
  #
41
61
  # @option options [Object] :user
42
62
  # Filter files created by a single user.
63
+ # @option options [Object] :channel
64
+ # Filter files appearing in a specific channel, indicated by its ID.
43
65
  # @option options [Object] :ts_from
44
66
  # Filter files created after this timestamp (inclusive).
45
67
  # @option options [Object] :ts_to
@@ -70,6 +92,34 @@ module Slack
70
92
  post("files.list", options)
71
93
  end
72
94
 
95
+ #
96
+ # This method disables public/external sharing for a file.
97
+ #
98
+ # @option options [Object] :file
99
+ # File to revoke
100
+ # @see https://api.slack.com/methods/files.revokePublicURL
101
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.revokePublicURL.md
102
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.revokePublicURL.json
103
+ def files_revokePublicURL(options={})
104
+ throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
105
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
106
+ post("files.revokePublicURL", options)
107
+ end
108
+
109
+ #
110
+ # This method enables public/external sharing for a file.
111
+ #
112
+ # @option options [Object] :file
113
+ # File to share
114
+ # @see https://api.slack.com/methods/files.sharedPublicURL
115
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.sharedPublicURL.md
116
+ # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.sharedPublicURL.json
117
+ def files_sharedPublicURL(options={})
118
+ throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
119
+ options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
120
+ post("files.sharedPublicURL", options)
121
+ end
122
+
73
123
  #
74
124
  # This method allows you to create or upload an existing file.
75
125
  #
@@ -86,11 +136,13 @@ module Slack
86
136
  # @option options [Object] :initial_comment
87
137
  # Initial comment to add to file.
88
138
  # @option options [Object] :channels
89
- # Comma separated list of channels to share the file into.
139
+ # Comma-separated list of channel names or IDs where the file will be shared.
90
140
  # @see https://api.slack.com/methods/files.upload
91
141
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.upload.md
92
142
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/files.upload.json
93
143
  def files_upload(options={})
144
+ throw ArgumentError.new("Required arguments :file missing") if options[:file].nil?
145
+ throw ArgumentError.new("Required arguments :filename missing") if options[:filename].nil?
94
146
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
95
147
  post("files.upload", options)
96
148
  end
@@ -4,10 +4,10 @@ module Slack
4
4
  module Endpoint
5
5
  module Groups
6
6
  #
7
- # This method archives a private group.
7
+ # This method archives a private channel.
8
8
  #
9
9
  # @option options [Object] :channel
10
- # Private group to archive
10
+ # Private channel to archive
11
11
  # @see https://api.slack.com/methods/groups.archive
12
12
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.archive.md
13
13
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.archive.json
@@ -18,10 +18,10 @@ module Slack
18
18
  end
19
19
 
20
20
  #
21
- # This method closes a private group.
21
+ # This method closes a private channel.
22
22
  #
23
23
  # @option options [Object] :channel
24
- # Group to close.
24
+ # Private channel to close.
25
25
  # @see https://api.slack.com/methods/groups.close
26
26
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.close.md
27
27
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.close.json
@@ -32,10 +32,10 @@ module Slack
32
32
  end
33
33
 
34
34
  #
35
- # This method creates a private group.
35
+ # This method creates a private channel.
36
36
  #
37
37
  # @option options [Object] :name
38
- # Name of group to create
38
+ # Name of private channel to create
39
39
  # @see https://api.slack.com/methods/groups.create
40
40
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.create.md
41
41
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.create.json
@@ -46,10 +46,10 @@ module Slack
46
46
  end
47
47
 
48
48
  #
49
- # This method takes an existing private group and performs the following steps:
49
+ # This method takes an existing private channel and performs the following steps:
50
50
  #
51
51
  # @option options [Object] :channel
52
- # Group to clone and archive.
52
+ # Private channel to clone and archive.
53
53
  # @see https://api.slack.com/methods/groups.createChild
54
54
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.createChild.md
55
55
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.createChild.json
@@ -60,12 +60,12 @@ module Slack
60
60
  end
61
61
 
62
62
  #
63
- # This method returns a portion of messages/events from the specified private group.
64
- # To read the entire history for a group, call the method with no latest or
63
+ # This method returns a portion of messages/events from the specified private channel.
64
+ # To read the entire history for a private channel, call the method with no latest or
65
65
  # oldest arguments, and then continue paging using the instructions below.
66
66
  #
67
67
  # @option options [Object] :channel
68
- # Group to fetch history for.
68
+ # Private channel to fetch history for.
69
69
  # @option options [Object] :latest
70
70
  # End of time range of messages to include in results.
71
71
  # @option options [Object] :oldest
@@ -86,10 +86,10 @@ module Slack
86
86
  end
87
87
 
88
88
  #
89
- # This method returns information about a private group.
89
+ # This method returns information about a private channel.
90
90
  #
91
91
  # @option options [Object] :channel
92
- # Group to get info on
92
+ # Private channel to get info on
93
93
  # @see https://api.slack.com/methods/groups.info
94
94
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.info.md
95
95
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.info.json
@@ -100,10 +100,10 @@ module Slack
100
100
  end
101
101
 
102
102
  #
103
- # This method is used to invite a user to a private group. The calling user must be a member of the group.
103
+ # This method is used to invite a user to a private channel. The calling user must be a member of the private channel.
104
104
  #
105
105
  # @option options [Object] :channel
106
- # Private group to invite user to.
106
+ # Private channel to invite user to.
107
107
  # @option options [Object] :user
108
108
  # User to invite.
109
109
  # @see https://api.slack.com/methods/groups.invite
@@ -117,12 +117,12 @@ module Slack
117
117
  end
118
118
 
119
119
  #
120
- # This method allows a user to remove another member from a private group.
120
+ # This method allows a user to remove another member from a private channel.
121
121
  #
122
122
  # @option options [Object] :channel
123
- # Group to remove user from.
123
+ # Private channel to remove user from.
124
124
  # @option options [Object] :user
125
- # User to remove from group.
125
+ # User to remove from private channel.
126
126
  # @see https://api.slack.com/methods/groups.kick
127
127
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.kick.md
128
128
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.kick.json
@@ -134,10 +134,10 @@ module Slack
134
134
  end
135
135
 
136
136
  #
137
- # This method is used to leave a private group.
137
+ # This method is used to leave a private channel.
138
138
  #
139
139
  # @option options [Object] :channel
140
- # Group to leave
140
+ # Private channel to leave
141
141
  # @see https://api.slack.com/methods/groups.leave
142
142
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.leave.md
143
143
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.leave.json
@@ -148,11 +148,11 @@ module Slack
148
148
  end
149
149
 
150
150
  #
151
- # This method returns a list of groups in the team that the caller is in and archived groups that the caller was in.
152
- # The list of (non-deactivated) members in each group is also returned.
151
+ # This method returns a list of private channels in the team that the caller is in and archived groups that the caller was in.
152
+ # The list of (non-deactivated) members in each private channel is also returned.
153
153
  #
154
154
  # @option options [Object] :exclude_archived
155
- # Don't return archived groups.
155
+ # Don't return archived private channels.
156
156
  # @see https://api.slack.com/methods/groups.list
157
157
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.list.md
158
158
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.list.json
@@ -162,10 +162,10 @@ module Slack
162
162
  end
163
163
 
164
164
  #
165
- # This method moves the read cursor in a private group.
165
+ # This method moves the read cursor in a private channel.
166
166
  #
167
167
  # @option options [Object] :channel
168
- # Group to set reading cursor in.
168
+ # Private channel to set reading cursor in.
169
169
  # @option options [Object] :ts
170
170
  # Timestamp of the most recently seen message.
171
171
  # @see https://api.slack.com/methods/groups.mark
@@ -179,10 +179,10 @@ module Slack
179
179
  end
180
180
 
181
181
  #
182
- # This method opens a private group.
182
+ # This method opens a private channel.
183
183
  #
184
184
  # @option options [Object] :channel
185
- # Group to open.
185
+ # Private channel to open.
186
186
  # @see https://api.slack.com/methods/groups.open
187
187
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.open.md
188
188
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.open.json
@@ -193,12 +193,12 @@ module Slack
193
193
  end
194
194
 
195
195
  #
196
- # This method renames a private group.
196
+ # This method renames a private channel.
197
197
  #
198
198
  # @option options [Object] :channel
199
- # Group to rename
199
+ # Private channel to rename
200
200
  # @option options [Object] :name
201
- # New name for group.
201
+ # New name for private channel.
202
202
  # @see https://api.slack.com/methods/groups.rename
203
203
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.rename.md
204
204
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.rename.json
@@ -210,10 +210,10 @@ module Slack
210
210
  end
211
211
 
212
212
  #
213
- # This method is used to change the purpose of a private group. The calling user must be a member of the private group.
213
+ # This method is used to change the purpose of a private channel. The calling user must be a member of the private channel.
214
214
  #
215
215
  # @option options [Object] :channel
216
- # Private group to set the purpose of
216
+ # Private channel to set the purpose of
217
217
  # @option options [Object] :purpose
218
218
  # The new purpose
219
219
  # @see https://api.slack.com/methods/groups.setPurpose
@@ -227,10 +227,10 @@ module Slack
227
227
  end
228
228
 
229
229
  #
230
- # This method is used to change the topic of a private group. The calling user must be a member of the private group.
230
+ # This method is used to change the topic of a private channel. The calling user must be a member of the private channel.
231
231
  #
232
232
  # @option options [Object] :channel
233
- # Private group to set the topic of
233
+ # Private channel to set the topic of
234
234
  # @option options [Object] :topic
235
235
  # The new topic
236
236
  # @see https://api.slack.com/methods/groups.setTopic
@@ -244,10 +244,10 @@ module Slack
244
244
  end
245
245
 
246
246
  #
247
- # This method unarchives a private group.
247
+ # This method unarchives a private channel.
248
248
  #
249
249
  # @option options [Object] :channel
250
- # Group to unarchive
250
+ # Private channel to unarchive
251
251
  # @see https://api.slack.com/methods/groups.unarchive
252
252
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.unarchive.md
253
253
  # @see https://github.com/aki017/slack-api-docs/blob/master/methods/groups.unarchive.json
@@ -35,7 +35,7 @@ module Slack
35
35
  # @option options [Object] :service_id
36
36
  # Filter logs to this service. Defaults to all logs.
37
37
  # @option options [Object] :app_id
38
- # Filter logs to this API application. Defaults to all logs.
38
+ # Filter logs to this Slack app. Defaults to all logs.
39
39
  # @option options [Object] :user
40
40
  # Filter logs generated by this user’s actions. Defaults to all logs.
41
41
  # @option options [Object] :change_type
@@ -1,3 +1,3 @@
1
1
  module Slack
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - aki017
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2016-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -263,6 +263,7 @@ files:
263
263
  - LICENSE.txt
264
264
  - README.md
265
265
  - Rakefile
266
+ - examples/basic.rb
266
267
  - lib/faraday/raise_http_exception.rb
267
268
  - lib/generators/schema.json
268
269
  - lib/generators/tasks/generate.rb
@@ -278,6 +279,7 @@ files:
278
279
  - lib/slack/endpoint/auth.rb
279
280
  - lib/slack/endpoint/channels.rb
280
281
  - lib/slack/endpoint/chat.rb
282
+ - lib/slack/endpoint/dnd.rb
281
283
  - lib/slack/endpoint/emoji.rb
282
284
  - lib/slack/endpoint/files.rb
283
285
  - lib/slack/endpoint/groups.rb
@@ -341,7 +343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
343
  version: '0'
342
344
  requirements: []
343
345
  rubyforge_project:
344
- rubygems_version: 2.2.3
346
+ rubygems_version: 2.5.1
345
347
  signing_key:
346
348
  specification_version: 4
347
349
  summary: A Ruby wrapper for the Slack API