Skip to content

Commit bf1dea4

Browse files
committed
Updated from latest slack-api-ref.
1 parent 983ae1e commit bf1dea4

21 files changed

+57
-131
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 0.16.1 (Next)
22

3+
* [#368](https://github.com/slack-ruby/slack-ruby-client/pull/368): Removed `admin_conversations_whitelist` and `admin_conversations_disconnectShared` - [@dblock](https://github.com/dblock).
34
* [#359](https://github.com/slack-ruby/slack-ruby-client/pull/359): Handle non-JSON 500 errors - [@agrobbin](https://github.com/agrobbin).
45
* [#360](https://github.com/slack-ruby/slack-ruby-client/pull/360): Remove faye-websocket from the concurrency detection error message - [@dblock](https://github.com/dblock).
56
* Your contribution here.

bin/commands.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
require 'commands/admin_conversations'
1111
require 'commands/admin_conversations_ekm'
1212
require 'commands/admin_conversations_restrictAccess'
13-
require 'commands/admin_conversations_whitelist'
1413
require 'commands/admin_emoji'
1514
require 'commands/admin_inviteRequests'
1615
require 'commands/admin_inviteRequests_approved'

bin/commands/admin_analytics.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
g.desc 'Retrieve analytics data for a given date, presented as a compressed JSON file'
77
g.long_desc %( Retrieve analytics data for a given date, presented as a compressed JSON file )
88
g.command 'getFile' do |c|
9-
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member.'
9+
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).'
1010
c.flag 'date', desc: 'Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC.'
11+
c.flag 'metadata_only', desc: 'Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.'
1112
c.action do |_global_options, options, _args|
1213
puts JSON.dump($client.admin_analytics_getFile(options))
1314
end

bin/commands/admin_conversations.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@
4343
end
4444
end
4545

46-
g.desc 'Disconnect a connected channel from one or more workspaces.'
47-
g.long_desc %( Disconnect a connected channel from one or more workspaces. )
48-
g.command 'disconnectShared' do |c|
49-
c.flag 'channel_id', desc: 'The channel to be disconnected from some workspaces.'
50-
c.flag 'leaving_team_ids', desc: 'The team to be removed from the channel. Currently only a single team id can be specified.'
51-
c.action do |_global_options, options, _args|
52-
puts JSON.dump($client.admin_conversations_disconnectShared(options))
53-
end
54-
end
55-
5646
g.desc 'Get conversation preferences for a public or private channel.'
5747
g.long_desc %( Get conversation preferences for a public or private channel. )
5848
g.command 'getConversationPrefs' do |c|

bin/commands/admin_teams.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
g.desc 'Create an Enterprise team.'
77
g.long_desc %( Create an Enterprise team. )
88
g.command 'create' do |c|
9-
c.flag 'team_domain', desc: 'Team domain (for example, slacksoftballteam).'
9+
c.flag 'team_domain', desc: 'Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.'
1010
c.flag 'team_name', desc: 'Team name (for example, Slack Softball Team).'
1111
c.flag 'team_description', desc: 'Description for the team.'
1212
c.flag 'team_discoverability', desc: "Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted."

bin/commands/chat.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,21 @@
8080
g.long_desc %( Sends a message to a channel. )
8181
g.command 'postMessage' do |c|
8282
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
83-
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
84-
c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. This argument may not be used with newer bot tokens.'
83+
c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.'
8584
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
8685
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
87-
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. See authorship below. Use with bot tokens requires chat:write.customize.'
88-
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. See authorship below. Use with bot tokens requires chat:write.customize.'
86+
c.flag 'draft_id', desc: 'The id of the draft associated with the message.'
87+
c.flag 'icon_emoji', desc: '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.'
88+
c.flag 'icon_url', desc: '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.'
8989
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
9090
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
9191
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
9292
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
93+
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
9394
c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
9495
c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
9596
c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
96-
c.flag 'username', desc: "Set your bot's user name. See authorship below. Use with bot tokens requires chat:write.customize."
97+
c.flag 'username', desc: "Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below."
9798
c.action do |_global_options, options, _args|
9899
puts JSON.dump($client.chat_postMessage(options))
99100
end
@@ -125,7 +126,8 @@
125126
c.flag 'channel', desc: 'Channel ID of the message.'
126127
c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
127128
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.'
128-
c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
129+
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
130+
c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
129131
c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
130132
c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
131133
c.action do |_global_options, options, _args|

bin/commands/conversations.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
c.flag 'cursor', desc: "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."
102102
c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
103103
c.flag 'limit', desc: "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."
104-
c.flag 'team_id', desc: 'encoded team id to list channels in, required if org token is used.'
104+
c.flag 'team_id', desc: 'encoded team id to list channels in, required if token belongs to org-wide app.'
105105
c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
106106
c.action do |_global_options, options, _args|
107107
puts JSON.dump($client.conversations_list(options))
@@ -154,7 +154,7 @@
154154
g.long_desc %( Retrieve a thread of messages posted to a conversation )
155155
g.command 'replies' do |c|
156156
c.flag 'channel', desc: 'Conversation ID to fetch thread from.'
157-
c.flag 'ts', desc: "Unique identifier of a thread's parent message. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message."
157+
c.flag 'ts', desc: "Unique identifier of either a thread's parent message or a message in the thread. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message."
158158
c.flag 'cursor', desc: "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."
159159
c.flag 'inclusive', desc: 'Include messages with latest or oldest timestamp in results only when either timestamp is specified.'
160160
c.flag 'latest', desc: 'End of time range of messages to include in results.'

bin/commands/dnd.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
g.desc "Retrieves a user's current Do Not Disturb status."
2323
g.long_desc %( Retrieves a user's current Do Not Disturb status. )
2424
g.command 'info' do |c|
25+
c.flag 'team_id', desc: 'Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.'
2526
c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
2627
c.action do |_global_options, options, _args|
2728
puts JSON.dump($client.dnd_info(options))
@@ -41,6 +42,7 @@
4142
g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
4243
g.command 'teamInfo' do |c|
4344
c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
45+
c.flag 'team_id', desc: 'Encoded team id where passed in users belong, required if org token is used.'
4446
c.action do |_global_options, options, _args|
4547
puts JSON.dump($client.dnd_teamInfo(options))
4648
end

lib/slack/web/api/endpoints.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
require_relative 'endpoints/admin_conversations'
1111
require_relative 'endpoints/admin_conversations_ekm'
1212
require_relative 'endpoints/admin_conversations_restrictAccess'
13-
require_relative 'endpoints/admin_conversations_whitelist'
1413
require_relative 'endpoints/admin_emoji'
1514
require_relative 'endpoints/admin_inviteRequests'
1615
require_relative 'endpoints/admin_inviteRequests_approved'
@@ -86,7 +85,6 @@ module Endpoints
8685
include AdminConversations
8786
include AdminConversationsEkm
8887
include AdminConversationsRestrictaccess
89-
include AdminConversationsWhitelist
9088
include AdminEmoji
9189
include AdminInviterequests
9290
include AdminInviterequestsApproved

lib/slack/web/api/endpoints/admin_analytics.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ module AdminAnalytics
1010
# Retrieve analytics data for a given date, presented as a compressed JSON file
1111
#
1212
# @option options [Object] :type
13-
# The type of analytics to retrieve. The options are currently limited to member.
13+
# The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).
1414
# @option options [Object] :date
1515
# Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC.
16+
# @option options [Object] :metadata_only
17+
# Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.
1618
# @see https://api.slack.com/methods/admin.analytics.getFile
1719
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.analytics/admin.analytics.getFile.json
1820
def admin_analytics_getFile(options = {})

0 commit comments

Comments
 (0)