slack-ruby-client 2.6.0 → 3.0.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/.github/workflows/test.yml +4 -10
- data/.github/workflows/update_api.yml +1 -1
- data/.rubocop_todo.yml +58 -71
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +0 -9
- data/LICENSE.md +1 -1
- data/README.md +31 -220
- data/Rakefile +0 -1
- data/UPGRADING.md +4 -0
- data/bin/commands/admin_analytics.rb +1 -1
- data/bin/commands/admin_apps.rb +4 -4
- data/bin/commands/admin_apps_activities.rb +7 -7
- data/bin/commands/admin_apps_approved.rb +4 -4
- data/bin/commands/admin_apps_config.rb +3 -1
- data/bin/commands/admin_apps_requests.rb +5 -5
- data/bin/commands/admin_apps_restricted.rb +4 -4
- data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
- data/bin/commands/admin_auth_policy.rb +5 -5
- data/bin/commands/admin_barriers.rb +3 -3
- data/bin/commands/admin_conversations.rb +15 -15
- data/bin/commands/admin_conversations_ekm.rb +2 -2
- data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
- data/bin/commands/admin_emoji.rb +5 -5
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_inviteRequests.rb +3 -3
- data/bin/commands/admin_inviteRequests_approved.rb +1 -1
- data/bin/commands/admin_inviteRequests_denied.rb +1 -1
- data/bin/commands/admin_roles.rb +3 -3
- data/bin/commands/admin_teams.rb +3 -3
- data/bin/commands/admin_teams_admins.rb +2 -2
- data/bin/commands/admin_teams_owners.rb +2 -2
- data/bin/commands/admin_teams_settings.rb +5 -5
- data/bin/commands/admin_usergroups.rb +4 -4
- data/bin/commands/admin_users.rb +12 -11
- data/bin/commands/admin_users_session.rb +6 -5
- data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
- data/bin/commands/admin_workflows.rb +6 -6
- data/bin/commands/admin_workflows_collaborators.rb +2 -2
- data/bin/commands/apps_activities.rb +7 -7
- data/bin/commands/apps_auth_external.rb +1 -1
- data/bin/commands/apps_datastore.rb +12 -12
- data/bin/commands/apps_event_authorizations.rb +3 -3
- data/bin/commands/apps_manifest.rb +1 -1
- data/bin/commands/assistant_search.rb +18 -2
- data/bin/commands/assistant_threads.rb +2 -2
- data/bin/commands/auth.rb +1 -1
- data/bin/commands/auth_teams.rb +1 -1
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/calls.rb +5 -5
- data/bin/commands/canvases.rb +2 -2
- data/bin/commands/canvases_access.rb +1 -1
- data/bin/commands/chat.rb +23 -24
- data/bin/commands/conversations.rb +8 -8
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
- data/bin/commands/conversations_requestSharedInvite.rb +4 -4
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +5 -5
- data/bin/commands/files_remote.rb +1 -1
- data/bin/commands/functions.rb +1 -1
- data/bin/commands/functions_distributions_permissions.rb +15 -15
- data/bin/commands/functions_workflows_steps.rb +2 -2
- data/bin/commands/functions_workflows_steps_responses.rb +2 -2
- data/bin/commands/migration.rb +2 -2
- data/bin/commands/oauth_v2.rb +1 -1
- data/bin/commands/openid_connect.rb +1 -1
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +2 -2
- data/bin/commands/rtm.rb +15 -0
- data/bin/commands/search.rb +4 -4
- data/bin/commands/slackLists.rb +37 -0
- data/bin/commands/slackLists_access.rb +34 -0
- data/bin/commands/slackLists_download.rb +31 -0
- data/bin/commands/slackLists_items.rb +76 -0
- data/bin/commands/team.rb +1 -1
- data/bin/commands/team_externalTeams.rb +4 -4
- data/bin/commands/usergroups.rb +10 -10
- data/bin/commands/usergroups_users.rb +5 -5
- data/bin/commands/users.rb +1 -1
- data/bin/commands/users_discoverableContacts.rb +1 -1
- data/bin/commands/views.rb +4 -4
- data/bin/commands/workflows_featured.rb +50 -0
- data/bin/commands/workflows_triggers_permissions.rb +7 -7
- data/examples/files_upload_v2/files_upload_v2.rb +8 -0
- data/lib/slack/events/request.rb +1 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
- data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
- data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
- data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
- data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
- data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
- data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
- data/lib/slack/web/api/endpoints/calls.rb +10 -10
- data/lib/slack/web/api/endpoints/canvases.rb +4 -4
- data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
- data/lib/slack/web/api/endpoints/chat.rb +53 -55
- data/lib/slack/web/api/endpoints/conversations.rb +16 -16
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
- data/lib/slack/web/api/endpoints/dnd.rb +2 -2
- data/lib/slack/web/api/endpoints/files.rb +11 -11
- data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
- data/lib/slack/web/api/endpoints/functions.rb +3 -3
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
- data/lib/slack/web/api/endpoints/migration.rb +1 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
- data/lib/slack/web/api/endpoints/reactions.rb +6 -6
- data/lib/slack/web/api/endpoints/reminders.rb +4 -4
- data/lib/slack/web/api/endpoints/rtm.rb +23 -0
- data/lib/slack/web/api/endpoints/search.rb +8 -8
- data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
- data/lib/slack/web/api/endpoints/team.rb +3 -3
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
- data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
- data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
- data/lib/slack/web/api/endpoints/users.rb +2 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
- data/lib/slack/web/api/endpoints/views.rb +9 -9
- data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
- data/lib/slack/web/api/endpoints.rb +10 -2
- data/lib/slack/web/api/errors.rb +88 -46
- data/lib/slack/web/api/helpers/files.rb +32 -22
- data/lib/slack/web/api/mixins/conversations.id.rb +14 -3
- data/lib/slack/web/api/mixins/users.id.rb +7 -3
- data/lib/slack/web/faraday/response/raise_error.rb +20 -2
- data/lib/slack-ruby-client.rb +0 -12
- data/lib/tasks/update.rake +0 -1
- data/lib/tasks/web.rake +0 -4
- data/slack-ruby-client.gemspec +1 -1
- metadata +19 -38
- data/.github/workflows/integration_test.yml +0 -45
- data/bin/commands/workflows.rb +0 -44
- data/examples/hi_real_time_and_web/Gemfile +0 -6
- data/examples/hi_real_time_and_web/hi.gif +0 -0
- data/examples/hi_real_time_and_web/hi.rb +0 -28
- data/examples/hi_real_time_async_async/Gemfile +0 -7
- data/examples/hi_real_time_async_async/Procfile +0 -2
- data/examples/hi_real_time_async_async/hi.rb +0 -41
- data/lib/slack/real_time/api/message.rb +0 -23
- data/lib/slack/real_time/api/message_id.rb +0 -15
- data/lib/slack/real_time/api/ping.rb +0 -19
- data/lib/slack/real_time/api/schema/event.json +0 -23
- data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
- data/lib/slack/real_time/api/typing.rb +0 -20
- data/lib/slack/real_time/client.rb +0 -271
- data/lib/slack/real_time/concurrency/async.rb +0 -142
- data/lib/slack/real_time/concurrency.rb +0 -8
- data/lib/slack/real_time/config.rb +0 -62
- data/lib/slack/real_time/models/base.rb +0 -11
- data/lib/slack/real_time/models/bot.rb +0 -9
- data/lib/slack/real_time/models/channel.rb +0 -13
- data/lib/slack/real_time/models/im.rb +0 -9
- data/lib/slack/real_time/models/mpim.rb +0 -9
- data/lib/slack/real_time/models/team.rb +0 -9
- data/lib/slack/real_time/models/user.rb +0 -9
- data/lib/slack/real_time/models.rb +0 -9
- data/lib/slack/real_time/socket.rb +0 -118
- data/lib/slack/real_time/stores/base.rb +0 -47
- data/lib/slack/real_time/stores/starter.rb +0 -449
- data/lib/slack/real_time/stores/store.rb +0 -624
- data/lib/slack/real_time/stores.rb +0 -5
- data/lib/slack/web/api/endpoints/workflows.rb +0 -63
- data/lib/tasks/real_time.rake +0 -81
@@ -45,15 +45,15 @@ module Slack
|
|
45
45
|
#
|
46
46
|
# Move public or private channels in bulk.
|
47
47
|
#
|
48
|
-
# @option options [array] :channel_ids
|
49
|
-
# An array of channel IDs.
|
50
48
|
# @option options [string] :target_team_id
|
51
49
|
# Target team ID.
|
50
|
+
# @option options [array] :channel_ids
|
51
|
+
# An array of channel IDs.
|
52
52
|
# @see https://api.slack.com/methods/admin.conversations.bulkMove
|
53
53
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkMove.json
|
54
54
|
def admin_conversations_bulkMove(options = {})
|
55
|
-
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
56
55
|
raise ArgumentError, 'Required arguments :target_team_id missing' if options[:target_team_id].nil?
|
56
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
57
57
|
post('admin.conversations.bulkMove', options)
|
58
58
|
end
|
59
59
|
|
@@ -86,12 +86,12 @@ module Slack
|
|
86
86
|
#
|
87
87
|
# Create a public or private channel-based conversation.
|
88
88
|
#
|
89
|
-
# @option options [boolean] :is_private
|
90
|
-
# When true, creates a private channel instead of a public channel.
|
91
89
|
# @option options [string] :name
|
92
90
|
# Name of the public or private channel to create.
|
93
91
|
# @option options [string] :description
|
94
92
|
# Description of the public or private channel to create.
|
93
|
+
# @option options [boolean] :is_private
|
94
|
+
# When true, creates a private channel instead of a public channel.
|
95
95
|
# @option options [boolean] :org_wide
|
96
96
|
# When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel.
|
97
97
|
# @option options [Object] :team_id
|
@@ -99,8 +99,8 @@ module Slack
|
|
99
99
|
# @see https://api.slack.com/methods/admin.conversations.create
|
100
100
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.create.json
|
101
101
|
def admin_conversations_create(options = {})
|
102
|
-
raise ArgumentError, 'Required arguments :is_private missing' if options[:is_private].nil?
|
103
102
|
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
103
|
+
raise ArgumentError, 'Required arguments :is_private missing' if options[:is_private].nil?
|
104
104
|
post('admin.conversations.create', options)
|
105
105
|
end
|
106
106
|
|
@@ -139,7 +139,7 @@ module Slack
|
|
139
139
|
# @option options [Object] :channel_id
|
140
140
|
# The channel to be disconnected from some workspaces.
|
141
141
|
# @option options [array] :leaving_team_ids
|
142
|
-
#
|
142
|
+
# Used for disconnecting a team from a shared channel. Only one team ID may be passed at a time.
|
143
143
|
# @see https://api.slack.com/methods/admin.conversations.disconnectShared
|
144
144
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.disconnectShared.json
|
145
145
|
def admin_conversations_disconnectShared(options = {})
|
@@ -196,15 +196,15 @@ module Slack
|
|
196
196
|
#
|
197
197
|
# Invite a user to a public or private channel.
|
198
198
|
#
|
199
|
-
# @option options [Object] :channel_id
|
200
|
-
# The channel that the users will be invited to.
|
201
199
|
# @option options [array] :user_ids
|
202
200
|
# The users to invite.
|
201
|
+
# @option options [Object] :channel_id
|
202
|
+
# The channel that the users will be invited to.
|
203
203
|
# @see https://api.slack.com/methods/admin.conversations.invite
|
204
204
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.invite.json
|
205
205
|
def admin_conversations_invite(options = {})
|
206
|
-
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
207
206
|
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
207
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
208
208
|
post('admin.conversations.invite', options)
|
209
209
|
end
|
210
210
|
|
@@ -230,21 +230,21 @@ module Slack
|
|
230
230
|
#
|
231
231
|
# Returns channels on the given team using the filters.
|
232
232
|
#
|
233
|
-
# @option options [integer] :last_message_activity_before
|
234
|
-
# Filter by public channels where the most recent message was sent before last_message_activity.
|
235
233
|
# @option options [array] :team_ids
|
236
234
|
# Array of team IDs to filter by.
|
235
|
+
# @option options [integer] :max_member_count
|
236
|
+
# Filter by public channels with member count equal to or less than the specified number.
|
237
|
+
# @option options [integer] :last_message_activity_before
|
238
|
+
# Filter by public channels where the most recent message was sent before last_message_activity.
|
237
239
|
# @option options [string] :cursor
|
238
240
|
# Set cursor to next_cursor returned in the previous call, to fetch the next page.
|
239
241
|
# @option options [integer] :limit
|
240
242
|
# Maximum number of results.
|
241
|
-
# @option options [integer] :max_member_count
|
242
|
-
# Filter by public channels with member count equal to or less than the specified number.
|
243
243
|
# @see https://api.slack.com/methods/admin.conversations.lookup
|
244
244
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.lookup.json
|
245
245
|
def admin_conversations_lookup(options = {})
|
246
|
-
raise ArgumentError, 'Required arguments :last_message_activity_before missing' if options[:last_message_activity_before].nil?
|
247
246
|
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
247
|
+
raise ArgumentError, 'Required arguments :last_message_activity_before missing' if options[:last_message_activity_before].nil?
|
248
248
|
if block_given?
|
249
249
|
Pagination::Cursor.new(self, :admin_conversations_lookup, options).each do |page|
|
250
250
|
yield page
|
@@ -272,7 +272,6 @@ module Slack
|
|
272
272
|
# @option options [Object] :channel_id
|
273
273
|
# The channel to rename.
|
274
274
|
# @option options [string] :name
|
275
|
-
# .
|
276
275
|
# @see https://api.slack.com/methods/admin.conversations.rename
|
277
276
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.rename.json
|
278
277
|
def admin_conversations_rename(options = {})
|
@@ -284,22 +283,22 @@ module Slack
|
|
284
283
|
#
|
285
284
|
# Search for public or private channels in an Enterprise organization.
|
286
285
|
#
|
286
|
+
# @option options [array] :team_ids
|
287
|
+
# Comma separated string of team IDs, signifying the internal workspaces to search through.
|
287
288
|
# @option options [array] :connected_team_ids
|
288
289
|
# Array of encoded team IDs, signifying the external orgs to search through.
|
289
|
-
# @option options [string] :cursor
|
290
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
291
|
-
# @option options [integer] :limit
|
292
|
-
# Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
|
293
290
|
# @option options [string] :query
|
294
291
|
# Name of the the channel to query by.
|
292
|
+
# @option options [integer] :limit
|
293
|
+
# Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
|
294
|
+
# @option options [string] :cursor
|
295
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
295
296
|
# @option options [array] :search_channel_types
|
296
297
|
# The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.
|
297
298
|
# @option options [string] :sort
|
298
|
-
# Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.
|
299
|
+
# Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted .
|
299
300
|
# @option options [string] :sort_dir
|
300
301
|
# Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).
|
301
|
-
# @option options [array] :team_ids
|
302
|
-
# Comma separated string of team IDs, signifying the internal workspaces to search through.
|
303
302
|
# @option options [boolean] :total_count_only
|
304
303
|
# Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.
|
305
304
|
# @see https://api.slack.com/methods/admin.conversations.search
|
@@ -346,16 +345,16 @@ module Slack
|
|
346
345
|
end
|
347
346
|
|
348
347
|
#
|
349
|
-
# Set the workspaces in an Enterprise
|
348
|
+
# Set the workspaces in an Enterprise org that connect to a public or private channel.
|
350
349
|
#
|
351
350
|
# @option options [string] :channel_id
|
352
351
|
# The encoded channel_id to add or remove to workspaces.
|
353
|
-
# @option options [boolean] :org_channel
|
354
|
-
# True if channel has to be converted to an org channel.
|
355
|
-
# @option options [array] :target_team_ids
|
356
|
-
# A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
|
357
352
|
# @option options [Object] :team_id
|
358
353
|
# The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.
|
354
|
+
# @option options [array] :target_team_ids
|
355
|
+
# A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
|
356
|
+
# @option options [boolean] :org_channel
|
357
|
+
# True if channel has to be converted to an org channel.
|
359
358
|
# @see https://api.slack.com/methods/admin.conversations.setTeams
|
360
359
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setTeams.json
|
361
360
|
def admin_conversations_setTeams(options = {})
|
@@ -11,12 +11,12 @@ module Slack
|
|
11
11
|
#
|
12
12
|
# @option options [string] :channel_ids
|
13
13
|
# A comma-separated list of channels to filter to.
|
14
|
-
# @option options [string] :cursor
|
15
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
-
# @option options [integer] :limit
|
17
|
-
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
14
|
# @option options [string] :team_ids
|
19
15
|
# A comma-separated list of the workspaces to which the channels you would like returned belong.
|
16
|
+
# @option options [integer] :limit
|
17
|
+
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
|
+
# @option options [string] :cursor
|
19
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
20
20
|
# @see https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo
|
21
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.ekm/admin.conversations.ekm.listOriginalConnectedChannelInfo.json
|
22
22
|
def admin_conversations_ekm_listOriginalConnectedChannelInfo(options = {})
|
@@ -9,17 +9,17 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Add an allowlist of IDP groups for accessing a channel
|
11
11
|
#
|
12
|
-
# @option options [Object] :channel_id
|
13
|
-
# The channel to link this group to.
|
14
|
-
# @option options [Object] :group_id
|
15
|
-
# The IDP Group ID to be an allowlist for the private channel.
|
16
12
|
# @option options [Object] :team_id
|
17
13
|
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
14
|
+
# @option options [Object] :group_id
|
15
|
+
# The IDP Group ID to be an allowlist for the private channel.
|
16
|
+
# @option options [Object] :channel_id
|
17
|
+
# The channel to link this group to.
|
18
18
|
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.addGroup.json
|
20
20
|
def admin_conversations_restrictAccess_addGroup(options = {})
|
21
|
-
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
22
21
|
raise ArgumentError, 'Required arguments :group_id missing' if options[:group_id].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
23
23
|
post('admin.conversations.restrictAccess.addGroup', options)
|
24
24
|
end
|
25
25
|
|
@@ -27,7 +27,6 @@ module Slack
|
|
27
27
|
# List all IDP Groups linked to a channel
|
28
28
|
#
|
29
29
|
# @option options [Object] :channel_id
|
30
|
-
# .
|
31
30
|
# @option options [Object] :team_id
|
32
31
|
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
33
32
|
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups
|
@@ -40,18 +39,18 @@ module Slack
|
|
40
39
|
#
|
41
40
|
# Remove a linked IDP group linked from a private channel
|
42
41
|
#
|
43
|
-
# @option options [Object] :channel_id
|
44
|
-
# The channel to remove the linked group from.
|
45
|
-
# @option options [Object] :group_id
|
46
|
-
# The IDP Group ID to remove from the private channel.
|
47
42
|
# @option options [Object] :team_id
|
48
43
|
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
44
|
+
# @option options [Object] :group_id
|
45
|
+
# The IDP Group ID to remove from the private channel.
|
46
|
+
# @option options [Object] :channel_id
|
47
|
+
# The channel to remove the linked group from.
|
49
48
|
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup
|
50
49
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.removeGroup.json
|
51
50
|
def admin_conversations_restrictAccess_removeGroup(options = {})
|
52
|
-
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
53
|
-
raise ArgumentError, 'Required arguments :group_id missing' if options[:group_id].nil?
|
54
51
|
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
52
|
+
raise ArgumentError, 'Required arguments :group_id missing' if options[:group_id].nil?
|
53
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
55
54
|
post('admin.conversations.restrictAccess.removeGroup', options)
|
56
55
|
end
|
57
56
|
end
|
@@ -24,20 +24,20 @@ module Slack
|
|
24
24
|
#
|
25
25
|
# Add an emoji alias.
|
26
26
|
#
|
27
|
-
# @option options [string] :alias_for
|
28
|
-
# Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.
|
29
27
|
# @option options [string] :name
|
30
28
|
# The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.
|
29
|
+
# @option options [string] :alias_for
|
30
|
+
# Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.
|
31
31
|
# @see https://api.slack.com/methods/admin.emoji.addAlias
|
32
32
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.addAlias.json
|
33
33
|
def admin_emoji_addAlias(options = {})
|
34
|
-
raise ArgumentError, 'Required arguments :alias_for missing' if options[:alias_for].nil?
|
35
34
|
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
35
|
+
raise ArgumentError, 'Required arguments :alias_for missing' if options[:alias_for].nil?
|
36
36
|
post('admin.emoji.addAlias', options)
|
37
37
|
end
|
38
38
|
|
39
39
|
#
|
40
|
-
# List emoji for an Enterprise
|
40
|
+
# List emoji for an Enterprise organization.
|
41
41
|
#
|
42
42
|
# @option options [string] :cursor
|
43
43
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
@@ -56,7 +56,7 @@ module Slack
|
|
56
56
|
end
|
57
57
|
|
58
58
|
#
|
59
|
-
# Remove an emoji across an Enterprise
|
59
|
+
# Remove an emoji across an Enterprise organization
|
60
60
|
#
|
61
61
|
# @option options [string] :name
|
62
62
|
# The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.
|
@@ -9,14 +9,14 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Look up functions by a set of apps
|
11
11
|
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# The team context to retrieve functions from.
|
12
14
|
# @option options [array] :app_ids
|
13
15
|
# Comma-separated array of app IDs to get functions for; max 50.
|
14
16
|
# @option options [string] :cursor
|
15
17
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
18
|
# @option options [integer] :limit
|
17
19
|
# The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.
|
18
|
-
# @option options [Object] :team_id
|
19
|
-
# The team context to retrieve functions from.
|
20
20
|
# @see https://api.slack.com/methods/admin.functions.list
|
21
21
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions/admin.functions.list.json
|
22
22
|
def admin_functions_list(options = {})
|
@@ -9,10 +9,10 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Approve a workspace invite request.
|
11
11
|
#
|
12
|
-
# @option options [string] :invite_request_id
|
13
|
-
# ID of the request to invite.
|
14
12
|
# @option options [string] :team_id
|
15
13
|
# ID for the workspace where the invite request was made.
|
14
|
+
# @option options [string] :invite_request_id
|
15
|
+
# ID of the request to invite.
|
16
16
|
# @see https://api.slack.com/methods/admin.inviteRequests.approve
|
17
17
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.approve.json
|
18
18
|
def admin_inviteRequests_approve(options = {})
|
@@ -23,10 +23,10 @@ module Slack
|
|
23
23
|
#
|
24
24
|
# Deny a workspace invite request.
|
25
25
|
#
|
26
|
-
# @option options [string] :invite_request_id
|
27
|
-
# ID of the request to invite.
|
28
26
|
# @option options [string] :team_id
|
29
27
|
# ID for the workspace where the invite request was made.
|
28
|
+
# @option options [string] :invite_request_id
|
29
|
+
# ID of the request to invite.
|
30
30
|
# @see https://api.slack.com/methods/admin.inviteRequests.deny
|
31
31
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.deny.json
|
32
32
|
def admin_inviteRequests_deny(options = {})
|
@@ -37,12 +37,12 @@ module Slack
|
|
37
37
|
#
|
38
38
|
# List all pending workspace invite requests.
|
39
39
|
#
|
40
|
+
# @option options [string] :team_id
|
41
|
+
# ID for the workspace where the invite requests were made.
|
40
42
|
# @option options [string] :cursor
|
41
43
|
# Value of the next_cursor field sent as part of the previous API response.
|
42
44
|
# @option options [integer] :limit
|
43
45
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
44
|
-
# @option options [string] :team_id
|
45
|
-
# ID for the workspace where the invite requests were made.
|
46
46
|
# @see https://api.slack.com/methods/admin.inviteRequests.list
|
47
47
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.list.json
|
48
48
|
def admin_inviteRequests_list(options = {})
|
@@ -9,12 +9,12 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all approved workspace invite requests.
|
11
11
|
#
|
12
|
+
# @option options [string] :team_id
|
13
|
+
# ID for the workspace where the invite requests were made.
|
12
14
|
# @option options [string] :cursor
|
13
15
|
# Value of the next_cursor field sent as part of the previous API response.
|
14
16
|
# @option options [integer] :limit
|
15
17
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
16
|
-
# @option options [string] :team_id
|
17
|
-
# ID for the workspace where the invite requests were made.
|
18
18
|
# @see https://api.slack.com/methods/admin.inviteRequests.approved.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests.approved/admin.inviteRequests.approved.list.json
|
20
20
|
def admin_inviteRequests_approved_list(options = {})
|
@@ -9,12 +9,12 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all denied workspace invite requests.
|
11
11
|
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# ID for the workspace where the invite requests were made.
|
12
14
|
# @option options [string] :cursor
|
13
15
|
# Value of the next_cursor field sent as part of the previous api response.
|
14
16
|
# @option options [integer] :limit
|
15
17
|
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.
|
16
|
-
# @option options [Object] :team_id
|
17
|
-
# ID for the workspace where the invite requests were made.
|
18
18
|
# @see https://api.slack.com/methods/admin.inviteRequests.denied.list
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests.denied/admin.inviteRequests.denied.list.json
|
20
20
|
def admin_inviteRequests_denied_list(options = {})
|
@@ -9,17 +9,17 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Adds members to the specified role with the specified scopes
|
11
11
|
#
|
12
|
-
# @option options [array] :entity_ids
|
13
|
-
# List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
|
14
12
|
# @option options [string] :role_id
|
15
13
|
# ID of the role to which users will be assigned.
|
14
|
+
# @option options [array] :entity_ids
|
15
|
+
# List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
|
16
16
|
# @option options [array] :user_ids
|
17
17
|
# List of IDs from the users to be added to the given role.
|
18
18
|
# @see https://api.slack.com/methods/admin.roles.addAssignments
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.addAssignments.json
|
20
20
|
def admin_roles_addAssignments(options = {})
|
21
|
-
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
22
21
|
raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
23
23
|
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
24
24
|
post('admin.roles.addAssignments', options)
|
25
25
|
end
|
@@ -29,12 +29,12 @@ module Slack
|
|
29
29
|
#
|
30
30
|
# @option options [string] :cursor
|
31
31
|
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
32
|
-
# @option options [array] :entity_ids
|
33
|
-
# The entities for which the roles apply.
|
34
32
|
# @option options [integer] :limit
|
35
33
|
# The maximum number of items to return. Must be between 1 - 200 both inclusive.
|
36
34
|
# @option options [array] :role_ids
|
37
35
|
# collection of role ids to scope results by.
|
36
|
+
# @option options [array] :entity_ids
|
37
|
+
# The entities for which the roles apply.
|
38
38
|
# @option options [string] :sort_dir
|
39
39
|
# Sort direction. Default is descending on date_create, can be either ASC or DESC.
|
40
40
|
# @see https://api.slack.com/methods/admin.roles.listAssignments
|
@@ -52,17 +52,17 @@ module Slack
|
|
52
52
|
#
|
53
53
|
# Removes a set of users from a role for the given scopes and entities
|
54
54
|
#
|
55
|
-
# @option options [array] :entity_ids
|
56
|
-
# List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
|
57
55
|
# @option options [string] :role_id
|
58
56
|
# ID of the role to which users will be assigned.
|
57
|
+
# @option options [array] :entity_ids
|
58
|
+
# List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
|
59
59
|
# @option options [array] :user_ids
|
60
60
|
# List of IDs of the users whose roles will be revoked.
|
61
61
|
# @see https://api.slack.com/methods/admin.roles.removeAssignments
|
62
62
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.removeAssignments.json
|
63
63
|
def admin_roles_removeAssignments(options = {})
|
64
|
-
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
65
64
|
raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
|
65
|
+
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
66
66
|
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
67
67
|
post('admin.roles.removeAssignments', options)
|
68
68
|
end
|
@@ -26,12 +26,12 @@ module Slack
|
|
26
26
|
end
|
27
27
|
|
28
28
|
#
|
29
|
-
# List all teams
|
29
|
+
# List all teams in an Enterprise organization
|
30
30
|
#
|
31
|
-
# @option options [string] :cursor
|
32
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
33
31
|
# @option options [integer] :limit
|
34
32
|
# The maximum number of items to return. Must be a positive integer no larger than 1000.
|
33
|
+
# @option options [string] :cursor
|
34
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
35
35
|
# @see https://api.slack.com/methods/admin.teams.list
|
36
36
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json
|
37
37
|
def admin_teams_list(options = {})
|
@@ -9,12 +9,11 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# List all of the admins on a given workspace.
|
11
11
|
#
|
12
|
-
# @option options [Object] :team_id
|
13
|
-
# .
|
14
|
-
# @option options [string] :cursor
|
15
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
12
|
# @option options [integer] :limit
|
17
13
|
# The maximum number of items to return.
|
14
|
+
# @option options [string] :cursor
|
15
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
+
# @option options [Object] :team_id
|
18
17
|
# @see https://api.slack.com/methods/admin.teams.admins.list
|
19
18
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.admins/admin.teams.admins.list.json
|
20
19
|
def admin_teams_admins_list(options = {})
|
@@ -10,11 +10,10 @@ module Slack
|
|
10
10
|
# List all of the owners on a given workspace.
|
11
11
|
#
|
12
12
|
# @option options [Object] :team_id
|
13
|
-
# .
|
14
|
-
# @option options [string] :cursor
|
15
|
-
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
13
|
# @option options [integer] :limit
|
17
14
|
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
15
|
+
# @option options [string] :cursor
|
16
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
18
17
|
# @see https://api.slack.com/methods/admin.teams.owners.list
|
19
18
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.owners/admin.teams.owners.list.json
|
20
19
|
def admin_teams_owners_list(options = {})
|
@@ -10,7 +10,6 @@ module Slack
|
|
10
10
|
# Fetch information about settings in a workspace
|
11
11
|
#
|
12
12
|
# @option options [Object] :team_id
|
13
|
-
# .
|
14
13
|
# @see https://api.slack.com/methods/admin.teams.settings.info
|
15
14
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.info.json
|
16
15
|
def admin_teams_settings_info(options = {})
|
@@ -21,45 +20,45 @@ module Slack
|
|
21
20
|
#
|
22
21
|
# Set the default channels of a workspace.
|
23
22
|
#
|
24
|
-
# @option options [array] :channel_ids
|
25
|
-
# An array of channel IDs.
|
26
23
|
# @option options [Object] :team_id
|
27
24
|
# ID for the workspace to set the default channel for.
|
25
|
+
# @option options [array] :channel_ids
|
26
|
+
# An array of channel IDs.
|
28
27
|
# @see https://api.slack.com/methods/admin.teams.settings.setDefaultChannels
|
29
28
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDefaultChannels.json
|
30
29
|
def admin_teams_settings_setDefaultChannels(options = {})
|
31
|
-
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
32
30
|
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
31
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
33
32
|
post('admin.teams.settings.setDefaultChannels', options)
|
34
33
|
end
|
35
34
|
|
36
35
|
#
|
37
36
|
# Set the description of a given workspace.
|
38
37
|
#
|
39
|
-
# @option options [string] :description
|
40
|
-
# The new description for the workspace.
|
41
38
|
# @option options [Object] :team_id
|
42
39
|
# ID for the workspace to set the description for.
|
40
|
+
# @option options [string] :description
|
41
|
+
# The new description for the workspace.
|
43
42
|
# @see https://api.slack.com/methods/admin.teams.settings.setDescription
|
44
43
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDescription.json
|
45
44
|
def admin_teams_settings_setDescription(options = {})
|
46
|
-
raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
|
47
45
|
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
46
|
+
raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
|
48
47
|
post('admin.teams.settings.setDescription', options)
|
49
48
|
end
|
50
49
|
|
51
50
|
#
|
52
51
|
# An API method that allows admins to set the discoverability of a given workspace
|
53
52
|
#
|
54
|
-
# @option options [string] :discoverability
|
55
|
-
# This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
|
56
53
|
# @option options [Object] :team_id
|
57
54
|
# The ID of the workspace to set discoverability on.
|
55
|
+
# @option options [string] :discoverability
|
56
|
+
# This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
|
58
57
|
# @see https://api.slack.com/methods/admin.teams.settings.setDiscoverability
|
59
58
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDiscoverability.json
|
60
59
|
def admin_teams_settings_setDiscoverability(options = {})
|
61
|
-
raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
|
62
60
|
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
61
|
+
raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
|
63
62
|
post('admin.teams.settings.setDiscoverability', options)
|
64
63
|
end
|
65
64
|
|
@@ -81,15 +80,15 @@ module Slack
|
|
81
80
|
#
|
82
81
|
# Set the name of a given workspace.
|
83
82
|
#
|
84
|
-
# @option options [string] :name
|
85
|
-
# The new name of the workspace.
|
86
83
|
# @option options [Object] :team_id
|
87
84
|
# ID for the workspace to set the name for.
|
85
|
+
# @option options [string] :name
|
86
|
+
# The new name of the workspace.
|
88
87
|
# @see https://api.slack.com/methods/admin.teams.settings.setName
|
89
88
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setName.json
|
90
89
|
def admin_teams_settings_setName(options = {})
|
91
|
-
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
92
90
|
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
91
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
93
92
|
post('admin.teams.settings.setName', options)
|
94
93
|
end
|
95
94
|
end
|
@@ -9,34 +9,34 @@ module Slack
|
|
9
9
|
#
|
10
10
|
# Add up to one hundred default channels to an IDP group.
|
11
11
|
#
|
12
|
-
# @option options [array] :channel_ids
|
13
|
-
# Comma separated string of channel IDs.
|
14
12
|
# @option options [string] :usergroup_id
|
15
13
|
# ID of the IDP group to add default channels for.
|
16
14
|
# @option options [string] :team_id
|
17
15
|
# The workspace to add default channels in.
|
16
|
+
# @option options [array] :channel_ids
|
17
|
+
# Comma separated string of channel IDs.
|
18
18
|
# @see https://api.slack.com/methods/admin.usergroups.addChannels
|
19
19
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addChannels.json
|
20
20
|
def admin_usergroups_addChannels(options = {})
|
21
|
-
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
22
21
|
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
23
23
|
post('admin.usergroups.addChannels', options)
|
24
24
|
end
|
25
25
|
|
26
26
|
#
|
27
27
|
# Associate one or more default workspaces with an organization-wide IDP group.
|
28
28
|
#
|
29
|
-
# @option options [array] :team_ids
|
30
|
-
# A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
|
31
29
|
# @option options [string] :usergroup_id
|
32
30
|
# An encoded usergroup (IDP Group) ID.
|
31
|
+
# @option options [array] :team_ids
|
32
|
+
# A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
|
33
33
|
# @option options [boolean] :auto_provision
|
34
34
|
# When true, this method automatically creates new workspace accounts for the IDP group members.
|
35
35
|
# @see https://api.slack.com/methods/admin.usergroups.addTeams
|
36
36
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addTeams.json
|
37
37
|
def admin_usergroups_addTeams(options = {})
|
38
|
-
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
39
38
|
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
39
|
+
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
40
40
|
post('admin.usergroups.addTeams', options)
|
41
41
|
end
|
42
42
|
|
@@ -45,10 +45,10 @@ module Slack
|
|
45
45
|
#
|
46
46
|
# @option options [Object] :usergroup_id
|
47
47
|
# ID of the IDP group to list default channels for.
|
48
|
-
# @option options [boolean] :include_num_members
|
49
|
-
# Flag to include or exclude the count of members per channel.
|
50
48
|
# @option options [string] :team_id
|
51
49
|
# ID of the the workspace.
|
50
|
+
# @option options [boolean] :include_num_members
|
51
|
+
# Flag to include or exclude the count of members per channel.
|
52
52
|
# @see https://api.slack.com/methods/admin.usergroups.listChannels
|
53
53
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.listChannels.json
|
54
54
|
def admin_usergroups_listChannels(options = {})
|
@@ -59,15 +59,15 @@ module Slack
|
|
59
59
|
#
|
60
60
|
# Remove one or more default channels from an org-level IDP group (user group).
|
61
61
|
#
|
62
|
-
# @option options [array] :channel_ids
|
63
|
-
# Comma-separated string of channel IDs.
|
64
62
|
# @option options [string] :usergroup_id
|
65
63
|
# ID of the IDP Group.
|
64
|
+
# @option options [array] :channel_ids
|
65
|
+
# Comma-separated string of channel IDs.
|
66
66
|
# @see https://api.slack.com/methods/admin.usergroups.removeChannels
|
67
67
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeChannels.json
|
68
68
|
def admin_usergroups_removeChannels(options = {})
|
69
|
-
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
70
69
|
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
70
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
71
71
|
post('admin.usergroups.removeChannels', options)
|
72
72
|
end
|
73
73
|
end
|