slack-ruby-client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/integration_test.yml +19 -0
- data/.github/workflows/pr_lint.yml +1 -1
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/README.md +18 -14
- data/SECURITY.md +9 -0
- data/bin/commands/admin_analytics.rb +16 -10
- data/bin/commands/admin_apps.rb +48 -42
- data/bin/commands/admin_apps_approved.rb +17 -11
- data/bin/commands/admin_apps_requests.rb +27 -21
- data/bin/commands/admin_apps_restricted.rb +17 -11
- data/bin/commands/admin_audit_anomaly_allow.rb +22 -16
- data/bin/commands/admin_auth_policy.rb +37 -31
- data/bin/commands/admin_barriers.rb +44 -38
- data/bin/commands/admin_conversations.rb +221 -165
- data/bin/commands/admin_conversations_ekm.rb +17 -11
- data/bin/commands/admin_conversations_restrictAccess.rb +35 -29
- data/bin/commands/admin_emoji.rb +50 -44
- data/bin/commands/admin_inviteRequests.rb +34 -28
- data/bin/commands/admin_inviteRequests_approved.rb +16 -10
- data/bin/commands/admin_inviteRequests_denied.rb +16 -10
- data/bin/commands/admin_roles.rb +46 -0
- data/bin/commands/admin_teams.rb +26 -20
- data/bin/commands/admin_teams_admins.rb +16 -10
- data/bin/commands/admin_teams_owners.rb +16 -10
- data/bin/commands/admin_teams_settings.rb +59 -53
- data/bin/commands/admin_usergroups.rb +45 -39
- data/bin/commands/admin_users.rb +91 -85
- data/bin/commands/admin_users_session.rb +72 -66
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -9
- data/bin/commands/api.rb +14 -8
- data/bin/commands/apps.rb +15 -9
- data/bin/commands/apps_connections.rb +13 -7
- data/bin/commands/apps_event_authorizations.rb +16 -10
- data/bin/commands/apps_manifest.rb +48 -42
- data/bin/commands/auth.rb +21 -15
- data/bin/commands/auth_teams.rb +16 -10
- data/bin/commands/bookmarks.rb +50 -44
- data/bin/commands/bots.rb +15 -9
- data/bin/commands/calls.rb +49 -43
- data/bin/commands/calls_participants.rb +24 -18
- data/bin/commands/chat.rb +150 -144
- data/bin/commands/chat_scheduledMessages.rb +19 -13
- data/bin/commands/conversations.rb +233 -227
- data/bin/commands/dialog.rb +15 -9
- data/bin/commands/dnd.rb +46 -40
- data/bin/commands/emoji.rb +14 -7
- data/bin/commands/files.rb +110 -105
- data/bin/commands/files_comments.rb +15 -9
- data/bin/commands/files_remote.rb +73 -67
- data/bin/commands/functions_workflows_steps.rb +22 -0
- data/bin/commands/functions_workflows_steps_responses.rb +22 -0
- data/bin/commands/migration.rb +16 -10
- data/bin/commands/oauth.rb +18 -12
- data/bin/commands/oauth_v2.rb +28 -22
- data/bin/commands/openid_connect.rb +26 -20
- data/bin/commands/pins.rb +33 -26
- data/bin/commands/reactions.rb +52 -46
- data/bin/commands/reminders.rb +53 -47
- data/bin/commands/rtm.rb +15 -9
- data/bin/commands/search.rb +43 -37
- data/bin/commands/stars.rb +38 -32
- data/bin/commands/team.rb +47 -39
- data/bin/commands/team_billing.rb +13 -7
- data/bin/commands/team_preferences.rb +13 -7
- data/bin/commands/team_profile.rb +14 -8
- data/bin/commands/tooling_tokens.rb +14 -8
- data/bin/commands/usergroups.rb +64 -58
- data/bin/commands/usergroups_users.rb +27 -21
- data/bin/commands/users.rb +111 -105
- data/bin/commands/users_admin.rb +28 -22
- data/bin/commands/users_prefs.rb +13 -7
- data/bin/commands/users_profile.rb +26 -20
- data/bin/commands/views.rb +47 -41
- data/bin/commands/workflows.rb +36 -30
- data/bin/slack +48 -43
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
- data/lib/slack/web/api/endpoints/chat.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/emoji.rb +2 -0
- data/lib/slack/web/api/endpoints/files.rb +0 -2
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +28 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +28 -0
- data/lib/slack/web/api/endpoints/pins.rb +2 -0
- data/lib/slack/web/api/endpoints/team.rb +11 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +1 -1
- data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +6 -0
- data/lib/slack/web/api/errors.rb +62 -0
- data/lib/slack/web/api/templates/command.erb +18 -12
- data/lib/tasks/web.rake +0 -6
- data/slack-ruby-client.gemspec +0 -1
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +30 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +13 -0
- metadata +13 -19
- data/bin/commands.rb +0 -69
- data/lib/slack/web/api/templates/commands.erb +0 -6
data/bin/commands/stars.rb
CHANGED
@@ -1,40 +1,46 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Stars methods.'
|
8
|
+
command 'stars' do |g|
|
9
|
+
g.desc 'Save an item for later. Formerly known as _adding a star_.'
|
10
|
+
g.long_desc %( Save an item for later. Formerly known as _adding a star_. )
|
11
|
+
g.command 'add' do |c|
|
12
|
+
c.flag 'channel', desc: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).'
|
13
|
+
c.flag 'file', desc: 'File to add star to.'
|
14
|
+
c.flag 'file_comment', desc: 'File comment to add star to.'
|
15
|
+
c.flag 'timestamp', desc: 'Timestamp of the message to add star to.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.stars_add(options))
|
18
|
+
end
|
19
|
+
end
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
g.desc "List a user's saved items, formerly known as _stars_."
|
22
|
+
g.long_desc %( List a user's saved items, formerly known as _stars_. )
|
23
|
+
g.command 'list' do |c|
|
24
|
+
c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details."
|
25
|
+
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."
|
26
|
+
c.flag 'team_id', desc: 'encoded team id to list stars in, required if org token is used.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.stars_list(options))
|
29
|
+
end
|
30
|
+
end
|
28
31
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
g.desc 'Removes a saved item (star) from an item.'
|
33
|
+
g.long_desc %( Removes a saved item (star) from an item. )
|
34
|
+
g.command 'remove' do |c|
|
35
|
+
c.flag 'channel', desc: 'Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).'
|
36
|
+
c.flag 'file', desc: 'File to remove star from.'
|
37
|
+
c.flag 'file_comment', desc: 'File comment to remove star from.'
|
38
|
+
c.flag 'timestamp', desc: 'Timestamp of the message to remove star from.'
|
39
|
+
c.action do |_global_options, options, _args|
|
40
|
+
puts JSON.dump(@client.stars_remove(options))
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
40
46
|
end
|
data/bin/commands/team.rb
CHANGED
@@ -1,48 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Team methods.'
|
8
|
+
command 'team' do |g|
|
9
|
+
g.desc 'Gets the access logs for the current team.'
|
10
|
+
g.long_desc %( Gets the access logs for the current team. )
|
11
|
+
g.command 'accessLogs' do |c|
|
12
|
+
c.flag 'before', desc: 'End of time range of logs to include in results (inclusive).'
|
13
|
+
c.flag 'team_id', desc: 'encoded team id to get logs from, required if org token is used.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.team_accessLogs(options))
|
16
|
+
end
|
17
|
+
end
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
g.desc 'Gets billable users information for the current team.'
|
20
|
+
g.long_desc %( Gets billable users information for the current team. )
|
21
|
+
g.command 'billableInfo' do |c|
|
22
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.'
|
23
|
+
c.flag 'limit', desc: 'The maximum number of items to return.'
|
24
|
+
c.flag 'team_id', desc: 'encoded team id to get the billable information from, required if org token is used.'
|
25
|
+
c.flag 'user', desc: 'A user to retrieve the billable information for. Defaults to all users.'
|
26
|
+
c.action do |_global_options, options, _args|
|
27
|
+
puts JSON.dump(@client.team_billableInfo(options))
|
28
|
+
end
|
29
|
+
end
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
g.desc 'Gets information about the current team.'
|
32
|
+
g.long_desc %( Gets information about the current team. )
|
33
|
+
g.command 'info' do |c|
|
34
|
+
c.flag 'domain', desc: 'Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself.'
|
35
|
+
c.flag 'team', desc: 'Team to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels.'
|
36
|
+
c.action do |_global_options, options, _args|
|
37
|
+
puts JSON.dump(@client.team_info(options))
|
38
|
+
end
|
39
|
+
end
|
35
40
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
g.desc 'Gets the integration logs for the current team.'
|
42
|
+
g.long_desc %( Gets the integration logs for the current team. )
|
43
|
+
g.command 'integrationLogs' do |c|
|
44
|
+
c.flag 'app_id', desc: 'Filter logs to this Slack app. Defaults to all logs.'
|
45
|
+
c.flag 'change_type', desc: 'Filter logs with this change type. Defaults to all logs.'
|
46
|
+
c.flag 'service_id', desc: 'Filter logs to this service. Defaults to all logs.'
|
47
|
+
c.flag 'team_id', desc: 'encoded team id to get logs from, required if org token is used.'
|
48
|
+
c.flag 'user', desc: "Filter logs generated by this user's actions. Defaults to all logs."
|
49
|
+
c.action do |_global_options, options, _args|
|
50
|
+
puts JSON.dump(@client.team_integrationLogs(options))
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
46
54
|
end
|
47
55
|
end
|
48
56
|
end
|
@@ -1,13 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'TeamBilling methods.'
|
8
|
+
command 'team_billing' do |g|
|
9
|
+
g.desc "Reads a workspace's billing plan information."
|
10
|
+
g.long_desc %( Reads a workspace's billing plan information. )
|
11
|
+
g.command 'info' do |c|
|
12
|
+
c.action do |_global_options, options, _args|
|
13
|
+
puts JSON.dump(@client.team_billing_info(options))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -1,13 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'TeamPreferences methods.'
|
8
|
+
command 'team_preferences' do |g|
|
9
|
+
g.desc "Retrieve a list of a workspace's team preferences."
|
10
|
+
g.long_desc %( Retrieve a list of a workspace's team preferences. )
|
11
|
+
g.command 'list' do |c|
|
12
|
+
c.action do |_global_options, options, _args|
|
13
|
+
puts JSON.dump(@client.team_preferences_list(options))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -1,14 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'TeamProfile methods.'
|
8
|
+
command 'team_profile' do |g|
|
9
|
+
g.desc "Retrieve a team's profile."
|
10
|
+
g.long_desc %( Retrieve a team's profile. )
|
11
|
+
g.command 'get' do |c|
|
12
|
+
c.flag 'visibility', desc: 'Filter by visibility.'
|
13
|
+
c.action do |_global_options, options, _args|
|
14
|
+
puts JSON.dump(@client.team_profile_get(options))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
@@ -1,14 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'ToolingTokens methods.'
|
8
|
+
command 'tooling_tokens' do |g|
|
9
|
+
g.desc 'Exchanges a refresh token for a new app configuration token.'
|
10
|
+
g.long_desc %( Exchanges a refresh token for a new app configuration token. )
|
11
|
+
g.command 'rotate' do |c|
|
12
|
+
c.flag 'refresh_token', desc: 'The xoxe refresh token that was issued along with the old app configuration token.'
|
13
|
+
c.action do |_global_options, options, _args|
|
14
|
+
puts JSON.dump(@client.tooling_tokens_rotate(options))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
14
20
|
end
|
data/bin/commands/usergroups.rb
CHANGED
@@ -1,68 +1,74 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Usergroups methods.'
|
8
|
+
command 'usergroups' do |g|
|
9
|
+
g.desc 'Create a User Group'
|
10
|
+
g.long_desc %( Create a User Group )
|
11
|
+
g.command 'create' do |c|
|
12
|
+
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
|
13
|
+
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
|
14
|
+
c.flag 'description', desc: 'A short description of the User Group.'
|
15
|
+
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
|
16
|
+
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
|
17
|
+
c.flag 'team_id', desc: 'Encoded team id where the user group has to be created, required if org token is used.'
|
18
|
+
c.action do |_global_options, options, _args|
|
19
|
+
puts JSON.dump(@client.usergroups_create(options))
|
20
|
+
end
|
21
|
+
end
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
g.desc 'Disable an existing User Group'
|
24
|
+
g.long_desc %( Disable an existing User Group )
|
25
|
+
g.command 'disable' do |c|
|
26
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.'
|
27
|
+
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
28
|
+
c.flag 'team_id', desc: 'Encoded target team id where the user group is, required if org token is used.'
|
29
|
+
c.action do |_global_options, options, _args|
|
30
|
+
puts JSON.dump(@client.usergroups_disable(options))
|
31
|
+
end
|
32
|
+
end
|
30
33
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
g.desc 'Enable a User Group'
|
35
|
+
g.long_desc %( Enable a User Group )
|
36
|
+
g.command 'enable' do |c|
|
37
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.'
|
38
|
+
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
39
|
+
c.flag 'team_id', desc: 'Encoded team id where the user group is, required if org token is used.'
|
40
|
+
c.action do |_global_options, options, _args|
|
41
|
+
puts JSON.dump(@client.usergroups_enable(options))
|
42
|
+
end
|
43
|
+
end
|
41
44
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
45
|
+
g.desc 'List all User Groups for a team'
|
46
|
+
g.long_desc %( List all User Groups for a team )
|
47
|
+
g.command 'list' do |c|
|
48
|
+
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
|
49
|
+
c.flag 'include_disabled', desc: 'Include disabled User Groups.'
|
50
|
+
c.flag 'include_users', desc: 'Include the list of users for each User Group.'
|
51
|
+
c.flag 'team_id', desc: 'encoded team id to list user groups in, required if org token is used.'
|
52
|
+
c.action do |_global_options, options, _args|
|
53
|
+
puts JSON.dump(@client.usergroups_list(options))
|
54
|
+
end
|
55
|
+
end
|
53
56
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
57
|
+
g.desc 'Update an existing User Group'
|
58
|
+
g.long_desc %( Update an existing User Group )
|
59
|
+
g.command 'update' do |c|
|
60
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
|
61
|
+
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
|
62
|
+
c.flag 'description', desc: 'A short description of the User Group.'
|
63
|
+
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
|
64
|
+
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
65
|
+
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
|
66
|
+
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
67
|
+
c.action do |_global_options, options, _args|
|
68
|
+
puts JSON.dump(@client.usergroups_update(options))
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
66
72
|
end
|
67
73
|
end
|
68
74
|
end
|
@@ -1,28 +1,34 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'UsergroupsUsers methods.'
|
8
|
+
command 'usergroups_users' do |g|
|
9
|
+
g.desc 'List all users in a User Group'
|
10
|
+
g.long_desc %( List all users in a User Group )
|
11
|
+
g.command 'list' do |c|
|
12
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
|
13
|
+
c.flag 'include_disabled', desc: 'Allow results that involve disabled User Groups.'
|
14
|
+
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
15
|
+
c.action do |_global_options, options, _args|
|
16
|
+
puts JSON.dump(@client.usergroups_users_list(options))
|
17
|
+
end
|
18
|
+
end
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
g.desc 'Update the list of users for a User Group'
|
21
|
+
g.long_desc %( Update the list of users for a User Group )
|
22
|
+
g.command 'update' do |c|
|
23
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
|
24
|
+
c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the User Group.'
|
25
|
+
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
26
|
+
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.usergroups_users_update(options))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
26
32
|
end
|
27
33
|
end
|
28
34
|
end
|