slack-ruby-client 0.9.0 → 0.9.1

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -8
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +1 -1
  5. data/bin/commands.rb +1 -0
  6. data/bin/commands/api.rb +2 -2
  7. data/bin/commands/apps_permissions.rb +22 -0
  8. data/bin/commands/auth.rb +4 -4
  9. data/bin/commands/bots.rb +2 -2
  10. data/bin/commands/channels.rb +31 -31
  11. data/bin/commands/chat.rb +40 -23
  12. data/bin/commands/dnd.rb +8 -8
  13. data/bin/commands/emoji.rb +2 -2
  14. data/bin/commands/files.rb +17 -17
  15. data/bin/commands/files_comments.rb +6 -6
  16. data/bin/commands/groups.rb +36 -35
  17. data/bin/commands/im.rb +13 -13
  18. data/bin/commands/mpim.rb +11 -11
  19. data/bin/commands/oauth.rb +15 -2
  20. data/bin/commands/pins.rb +6 -6
  21. data/bin/commands/reactions.rb +13 -13
  22. data/bin/commands/reminders.rb +10 -10
  23. data/bin/commands/rtm.rb +10 -6
  24. data/bin/commands/search.rb +9 -9
  25. data/bin/commands/stars.rb +8 -8
  26. data/bin/commands/team.rb +10 -10
  27. data/bin/commands/team_profile.rb +2 -2
  28. data/bin/commands/usergroups.rb +16 -16
  29. data/bin/commands/usergroups_users.rb +4 -4
  30. data/bin/commands/users.rb +20 -18
  31. data/bin/commands/users_profile.rb +7 -7
  32. data/lib/slack/real_time/stores/starter.rb +20 -0
  33. data/lib/slack/real_time/stores/store.rb +20 -0
  34. data/lib/slack/version.rb +1 -1
  35. data/lib/slack/web/api/endpoints.rb +2 -0
  36. data/lib/slack/web/api/endpoints/api.rb +1 -1
  37. data/lib/slack/web/api/endpoints/apps_permissions.rb +35 -0
  38. data/lib/slack/web/api/endpoints/auth.rb +2 -2
  39. data/lib/slack/web/api/endpoints/bots.rb +1 -1
  40. data/lib/slack/web/api/endpoints/channels.rb +17 -18
  41. data/lib/slack/web/api/endpoints/chat.rb +67 -30
  42. data/lib/slack/web/api/endpoints/dnd.rb +4 -4
  43. data/lib/slack/web/api/endpoints/emoji.rb +1 -1
  44. data/lib/slack/web/api/endpoints/files.rb +16 -17
  45. data/lib/slack/web/api/endpoints/files_comments.rb +8 -8
  46. data/lib/slack/web/api/endpoints/groups.rb +21 -22
  47. data/lib/slack/web/api/endpoints/im.rb +8 -10
  48. data/lib/slack/web/api/endpoints/mpim.rb +7 -9
  49. data/lib/slack/web/api/endpoints/oauth.rb +23 -2
  50. data/lib/slack/web/api/endpoints/pins.rb +3 -5
  51. data/lib/slack/web/api/endpoints/reactions.rb +14 -16
  52. data/lib/slack/web/api/endpoints/reminders.rb +5 -5
  53. data/lib/slack/web/api/endpoints/rtm.rb +14 -6
  54. data/lib/slack/web/api/endpoints/search.rb +9 -9
  55. data/lib/slack/web/api/endpoints/stars.rb +7 -9
  56. data/lib/slack/web/api/endpoints/team.rb +8 -9
  57. data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
  58. data/lib/slack/web/api/endpoints/usergroups.rb +17 -17
  59. data/lib/slack/web/api/endpoints/usergroups_users.rb +2 -2
  60. data/lib/slack/web/api/endpoints/users.rb +15 -15
  61. data/lib/slack/web/api/endpoints/users_profile.rb +8 -8
  62. data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +4 -3
  63. data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +17 -0
  64. data/spec/integration/integration_spec.rb +1 -1
  65. data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +15 -0
  66. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +37 -1
  67. data/spec/slack/web/api/endpoints/files_comments_spec.rb +8 -8
  68. data/spec/slack/web/api/endpoints/files_spec.rb +0 -5
  69. data/spec/slack/web/api/endpoints/oauth_spec.rb +11 -0
  70. metadata +7 -2
@@ -2,8 +2,8 @@
2
2
 
3
3
  desc 'Pins methods.'
4
4
  command 'pins' do |g|
5
- g.desc 'This method pins an item (file, file comment, channel message, or group message) to a particular channel.'
6
- g.long_desc %( This method pins an item (file, file comment, channel message, or group message) to a particular channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. )
5
+ g.desc 'Pins an item to a channel.'
6
+ g.long_desc %( Pins an item to a channel. )
7
7
  g.command 'add' do |c|
8
8
  c.flag 'channel', desc: 'Channel to pin the item in.'
9
9
  c.flag 'file', desc: 'File to pin.'
@@ -14,8 +14,8 @@ command 'pins' do |g|
14
14
  end
15
15
  end
16
16
 
17
- g.desc 'This method lists the items pinned to a channel.'
18
- g.long_desc %( This method lists the items pinned to a channel. )
17
+ g.desc 'Lists items pinned to a channel.'
18
+ g.long_desc %( Lists items pinned to a channel. )
19
19
  g.command 'list' do |c|
20
20
  c.flag 'channel', desc: 'Channel to get pinned items for.'
21
21
  c.action do |_global_options, options, _args|
@@ -23,8 +23,8 @@ command 'pins' do |g|
23
23
  end
24
24
  end
25
25
 
26
- g.desc 'This method un-pins an item (file, file comment, channel message, or group message) from a channel.'
27
- g.long_desc %( This method un-pins an item (file, file comment, channel message, or group message) from a channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified. )
26
+ g.desc 'Un-pins an item from a channel.'
27
+ g.long_desc %( Un-pins an item from a channel. )
28
28
  g.command 'remove' do |c|
29
29
  c.flag 'channel', desc: 'Channel where the item is pinned to.'
30
30
  c.flag 'file', desc: 'File to un-pin.'
@@ -2,49 +2,49 @@
2
2
 
3
3
  desc 'Reactions methods.'
4
4
  command 'reactions' do |g|
5
- g.desc 'This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message).'
6
- g.long_desc %( This method adds a reaction (emoji) to an item (file, file comment, channel message, group message, or direct message). One of file, file_comment, or the combination of channel and timestamp must be specified. )
5
+ g.desc 'Adds a reaction to an item.'
6
+ g.long_desc %( Adds a reaction to an item. )
7
7
  g.command 'add' do |c|
8
8
  c.flag 'name', desc: 'Reaction (emoji) name.'
9
+ c.flag 'channel', desc: 'Channel where the message to add reaction to was posted.'
9
10
  c.flag 'file', desc: 'File to add reaction to.'
10
11
  c.flag 'file_comment', desc: 'File comment to add reaction to.'
11
- c.flag 'channel', desc: 'Channel where the message to add reaction to was posted.'
12
12
  c.flag 'timestamp', desc: 'Timestamp of the message to add reaction to.'
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump($client.reactions_add(options))
15
15
  end
16
16
  end
17
17
 
18
- g.desc 'This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message).'
19
- g.long_desc %( This method returns a list of all reactions for a single item (file, file comment, channel message, group message, or direct message). )
18
+ g.desc 'Gets reactions for an item.'
19
+ g.long_desc %( Gets reactions for an item. )
20
20
  g.command 'get' do |c|
21
+ c.flag 'channel', desc: 'Channel where the message to get reactions for was posted.'
21
22
  c.flag 'file', desc: 'File to get reactions for.'
22
23
  c.flag 'file_comment', desc: 'File comment to get reactions for.'
23
- c.flag 'channel', desc: 'Channel where the message to get reactions for was posted.'
24
- c.flag 'timestamp', desc: 'Timestamp of the message to get reactions for.'
25
24
  c.flag 'full', desc: 'If true always return the complete reaction list.'
25
+ c.flag 'timestamp', desc: 'Timestamp of the message to get reactions for.'
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump($client.reactions_get(options))
28
28
  end
29
29
  end
30
30
 
31
- g.desc 'This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user.'
32
- g.long_desc %( This method returns a list of all items (file, file comment, channel message, group message, or direct message) reacted to by a user. )
31
+ g.desc 'Lists reactions made by a user.'
32
+ g.long_desc %( Lists reactions made by a user. )
33
33
  g.command 'list' do |c|
34
- c.flag 'user', desc: 'Show reactions made by this user. Defaults to the authed user.'
35
34
  c.flag 'full', desc: 'If true always return the complete reaction list.'
35
+ c.flag 'user', desc: 'Show reactions made by this user. Defaults to the authed user.'
36
36
  c.action do |_global_options, options, _args|
37
37
  puts JSON.dump($client.reactions_list(options))
38
38
  end
39
39
  end
40
40
 
41
- g.desc 'This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message).'
42
- g.long_desc %( This method removes a reaction (emoji) from an item (file, file comment, channel message, group message, or direct message). One of file, file_comment, or the combination of channel and timestamp must be specified. )
41
+ g.desc 'Removes a reaction from an item.'
42
+ g.long_desc %( Removes a reaction from an item. )
43
43
  g.command 'remove' do |c|
44
44
  c.flag 'name', desc: 'Reaction (emoji) name.'
45
+ c.flag 'channel', desc: 'Channel where the message to remove reaction from was posted.'
45
46
  c.flag 'file', desc: 'File to remove reaction from.'
46
47
  c.flag 'file_comment', desc: 'File comment to remove reaction from.'
47
- c.flag 'channel', desc: 'Channel where the message to remove reaction from was posted.'
48
48
  c.flag 'timestamp', desc: 'Timestamp of the message to remove reaction from.'
49
49
  c.action do |_global_options, options, _args|
50
50
  puts JSON.dump($client.reactions_remove(options))
@@ -2,8 +2,8 @@
2
2
 
3
3
  desc 'Reminders methods.'
4
4
  command 'reminders' do |g|
5
- g.desc 'This method creates a reminder.'
6
- g.long_desc %( This method creates a reminder. )
5
+ g.desc 'Creates a reminder.'
6
+ g.long_desc %( Creates a reminder. )
7
7
  g.command 'add' do |c|
8
8
  c.flag 'text', desc: 'The content of the reminder.'
9
9
  c.flag 'time', desc: 'When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").'
@@ -13,8 +13,8 @@ command 'reminders' do |g|
13
13
  end
14
14
  end
15
15
 
16
- g.desc 'This method completes a reminder.'
17
- g.long_desc %( This method completes a reminder. )
16
+ g.desc 'Marks a reminder as complete.'
17
+ g.long_desc %( Marks a reminder as complete. )
18
18
  g.command 'complete' do |c|
19
19
  c.flag 'reminder', desc: 'The ID of the reminder to be marked as complete.'
20
20
  c.action do |_global_options, options, _args|
@@ -22,8 +22,8 @@ command 'reminders' do |g|
22
22
  end
23
23
  end
24
24
 
25
- g.desc 'This method deletes a reminder.'
26
- g.long_desc %( This method deletes a reminder. )
25
+ g.desc 'Deletes a reminder.'
26
+ g.long_desc %( Deletes a reminder. )
27
27
  g.command 'delete' do |c|
28
28
  c.flag 'reminder', desc: 'The ID of the reminder.'
29
29
  c.action do |_global_options, options, _args|
@@ -31,8 +31,8 @@ command 'reminders' do |g|
31
31
  end
32
32
  end
33
33
 
34
- g.desc 'This method returns information about a reminder.'
35
- g.long_desc %( This method returns information about a reminder. )
34
+ g.desc 'Gets information about a reminder.'
35
+ g.long_desc %( Gets information about a reminder. )
36
36
  g.command 'info' do |c|
37
37
  c.flag 'reminder', desc: 'The ID of the reminder.'
38
38
  c.action do |_global_options, options, _args|
@@ -40,8 +40,8 @@ command 'reminders' do |g|
40
40
  end
41
41
  end
42
42
 
43
- g.desc 'This method lists all reminders created by or for a given user.'
44
- g.long_desc %( This method lists all reminders created by or for a given user. )
43
+ g.desc 'Lists all reminders created by or for a given user.'
44
+ g.long_desc %( Lists all reminders created by or for a given user. )
45
45
  g.command 'list' do |c|
46
46
  c.action do |_global_options, options, _args|
47
47
  puts JSON.dump($client.reminders_list(options))
@@ -2,21 +2,25 @@
2
2
 
3
3
  desc 'Rtm methods.'
4
4
  command 'rtm' do |g|
5
- g.desc 'This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.'
6
- g.long_desc %( This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. )
5
+ g.desc 'Starts a Real Time Messaging session.'
6
+ g.long_desc %( Starts a Real Time Messaging session. )
7
7
  g.command 'connect' do |c|
8
+ c.flag 'batch_presence_aware', desc: 'Group presence change notices as presence_change_batch events when possible. See batching.'
9
+ c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
8
10
  c.action do |_global_options, options, _args|
9
11
  puts JSON.dump($client.rtm_connect(options))
10
12
  end
11
13
  end
12
14
 
13
- g.desc 'This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket.'
14
- g.long_desc %( This method begins a Real Time Messaging API session and reserves your application a specific URL with which to connect via websocket. )
15
+ g.desc 'Starts a Real Time Messaging session.'
16
+ g.long_desc %( Starts a Real Time Messaging session. )
15
17
  g.command 'start' do |c|
16
- c.flag 'simple_latest', desc: 'Return timestamp only for latest message object of each channel (improves performance).'
17
- c.flag 'no_unreads', desc: 'Skip unread counts for each channel (improves performance).'
18
+ c.flag 'batch_presence_aware', desc: 'Group presence change notices as presence_change_batch events when possible. See batching.'
18
19
  c.flag 'mpim_aware', desc: 'Returns MPIMs to the client in the API response.'
19
20
  c.flag 'no_latest', desc: 'Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.'
21
+ c.flag 'no_unreads', desc: 'Skip unread counts for each channel (improves performance).'
22
+ c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
23
+ c.flag 'simple_latest', desc: 'Return timestamp only for latest message object of each channel (improves performance).'
20
24
  c.action do |_global_options, options, _args|
21
25
  puts JSON.dump($client.rtm_start(options))
22
26
  end
@@ -2,37 +2,37 @@
2
2
 
3
3
  desc "Search your team's files and messages."
4
4
  command 'search' do |g|
5
- g.desc 'This method allows users and applications to search both messages and files in a single call.'
6
- g.long_desc %( This method allows users and applications to search both messages and files in a single call. )
5
+ g.desc 'Searches for messages and files matching a query.'
6
+ g.long_desc %( Searches for messages and files matching a query. )
7
7
  g.command 'all' do |c|
8
8
  c.flag 'query', desc: 'Search query. May contains booleans, etc.'
9
+ c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
9
10
  c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
10
11
  c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
11
- c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
12
12
  c.action do |_global_options, options, _args|
13
13
  puts JSON.dump($client.search_all(options))
14
14
  end
15
15
  end
16
16
 
17
- g.desc 'This method returns files matching a search query.'
18
- g.long_desc %( This method returns files matching a search query. )
17
+ g.desc 'Searches for files matching a query.'
18
+ g.long_desc %( Searches for files matching a query. )
19
19
  g.command 'files' do |c|
20
20
  c.flag 'query', desc: 'Search query. May contain booleans, etc.'
21
+ c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
21
22
  c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
22
23
  c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
23
- c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
24
24
  c.action do |_global_options, options, _args|
25
25
  puts JSON.dump($client.search_files(options))
26
26
  end
27
27
  end
28
28
 
29
- g.desc 'This method returns messages matching a search query.'
30
- g.long_desc %( This method returns messages matching a search query. )
29
+ g.desc 'Searches for messages matching a query.'
30
+ g.long_desc %( Searches for messages matching a query. )
31
31
  g.command 'messages' do |c|
32
32
  c.flag 'query', desc: 'Search query. May contains booleans, etc.'
33
+ c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
33
34
  c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
34
35
  c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
35
- c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
36
36
  c.action do |_global_options, options, _args|
37
37
  puts JSON.dump($client.search_messages(options))
38
38
  end
@@ -2,32 +2,32 @@
2
2
 
3
3
  desc 'Stars methods.'
4
4
  command 'stars' do |g|
5
- g.desc 'This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.'
6
- g.long_desc %( This method adds a star to an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified. )
5
+ g.desc 'Adds a star to an item.'
6
+ g.long_desc %( Adds a star to an item. )
7
7
  g.command 'add' do |c|
8
+ c.flag 'channel', desc: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).'
8
9
  c.flag 'file', desc: 'File to add star to.'
9
10
  c.flag 'file_comment', desc: 'File comment to add star to.'
10
- c.flag 'channel', desc: 'Channel to add star to, or channel where the message to add star to was posted (used with timestamp).'
11
11
  c.flag 'timestamp', desc: 'Timestamp of the message to add star to.'
12
12
  c.action do |_global_options, options, _args|
13
13
  puts JSON.dump($client.stars_add(options))
14
14
  end
15
15
  end
16
16
 
17
- g.desc 'This method lists the items starred by the authed user.'
18
- g.long_desc %( This method lists the items starred by the authed user. )
17
+ g.desc 'Lists stars for a user.'
18
+ g.long_desc %( Lists stars for a user. )
19
19
  g.command 'list' do |c|
20
20
  c.action do |_global_options, options, _args|
21
21
  puts JSON.dump($client.stars_list(options))
22
22
  end
23
23
  end
24
24
 
25
- g.desc 'This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user.'
26
- g.long_desc %( This method removes a star from an item (message, file, file comment, channel, private group, or DM) on behalf of the authenticated user. One of file, file_comment, channel, or the combination of channel and timestamp must be specified. )
25
+ g.desc 'Removes a star from an item.'
26
+ g.long_desc %( Removes a star from an item. )
27
27
  g.command 'remove' do |c|
28
+ c.flag 'channel', desc: 'Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).'
28
29
  c.flag 'file', desc: 'File to remove star from.'
29
30
  c.flag 'file_comment', desc: 'File comment to remove star from.'
30
- c.flag 'channel', desc: 'Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).'
31
31
  c.flag 'timestamp', desc: 'Timestamp of the message to remove star from.'
32
32
  c.action do |_global_options, options, _args|
33
33
  puts JSON.dump($client.stars_remove(options))
@@ -2,8 +2,8 @@
2
2
 
3
3
  desc 'Team methods.'
4
4
  command 'team' do |g|
5
- g.desc 'This method is used to get the access logs for users on a team.'
6
- g.long_desc %( This method is used to get the access logs for users on a team. )
5
+ g.desc 'Gets the access logs for the current team.'
6
+ g.long_desc %( Gets the access logs for the current team. )
7
7
  g.command 'accessLogs' do |c|
8
8
  c.flag 'before', desc: 'End of time range of logs to include in results (inclusive).'
9
9
  c.action do |_global_options, options, _args|
@@ -11,8 +11,8 @@ command 'team' do |g|
11
11
  end
12
12
  end
13
13
 
14
- g.desc 'This method lists billable information for each user on the team. Currently this consists solely of whether the user is'
15
- g.long_desc %( This method lists billable information for each user on the team. Currently this consists solely of whether the user is subject to billing per Slack's Fair Billing policy. )
14
+ g.desc 'Gets billable users information for the current team.'
15
+ g.long_desc %( Gets billable users information for the current team. )
16
16
  g.command 'billableInfo' do |c|
17
17
  c.flag 'user', desc: 'A user to retrieve the billable information for. Defaults to all users.'
18
18
  c.action do |_global_options, options, _args|
@@ -20,21 +20,21 @@ command 'team' do |g|
20
20
  end
21
21
  end
22
22
 
23
- g.desc 'This method provides information about your team.'
24
- g.long_desc %( This method provides information about your team. )
23
+ g.desc 'Gets information about the current team.'
24
+ g.long_desc %( Gets information about the current team. )
25
25
  g.command 'info' do |c|
26
26
  c.action do |_global_options, options, _args|
27
27
  puts JSON.dump($client.team_info(options))
28
28
  end
29
29
  end
30
30
 
31
- g.desc 'This method lists the integration activity logs for a team, including when integrations are added, modified and removed. This method can only be called by Admins.'
32
- g.long_desc %( This method lists the integration activity logs for a team, including when integrations are added, modified and removed. This method can only be called by Admins. )
31
+ g.desc 'Gets the integration logs for the current team.'
32
+ g.long_desc %( Gets the integration logs for the current team. )
33
33
  g.command 'integrationLogs' do |c|
34
- c.flag 'service_id', desc: 'Filter logs to this service. Defaults to all logs.'
35
34
  c.flag 'app_id', desc: 'Filter logs to this Slack app. Defaults to all logs.'
36
- c.flag 'user', desc: "Filter logs generated by this user's actions. Defaults to all logs."
37
35
  c.flag 'change_type', desc: 'Filter logs with this change type. Defaults to all logs.'
36
+ c.flag 'service_id', desc: 'Filter logs to this service. Defaults to all logs.'
37
+ c.flag 'user', desc: "Filter logs generated by this user's actions. Defaults to all logs."
38
38
  c.action do |_global_options, options, _args|
39
39
  puts JSON.dump($client.team_integrationLogs(options))
40
40
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  desc 'TeamProfile methods.'
4
4
  command 'team_profile' do |g|
5
- g.desc 'This method is used to get the profile field definitions for this team.'
6
- g.long_desc %( This method is used to get the profile field definitions for this team. )
5
+ g.desc "Retrieve a team's profile."
6
+ g.long_desc %( Retrieve a team's profile. )
7
7
  g.command 'get' do |c|
8
8
  c.flag 'visibility', desc: 'Filter by visibility.'
9
9
  c.action do |_global_options, options, _args|
@@ -2,21 +2,21 @@
2
2
 
3
3
  desc "Get info on your team's User Groups."
4
4
  command 'usergroups' do |g|
5
- g.desc 'This method is used to create a User Group.'
6
- g.long_desc %( This method is used to create a User Group. )
5
+ g.desc 'Create a User Group'
6
+ g.long_desc %( Create a User Group )
7
7
  g.command 'create' do |c|
8
8
  c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
9
- c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
10
- c.flag 'description', desc: 'A short description of the User Group.'
11
9
  c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
10
+ c.flag 'description', desc: 'A short description of the User Group.'
11
+ c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
12
12
  c.flag 'include_count', desc: 'Include the number of users in each User Group.'
13
13
  c.action do |_global_options, options, _args|
14
14
  puts JSON.dump($client.usergroups_create(options))
15
15
  end
16
16
  end
17
17
 
18
- g.desc 'This method disables an existing User Group.'
19
- g.long_desc %( This method disables an existing User Group. )
18
+ g.desc 'Disable an existing User Group'
19
+ g.long_desc %( Disable an existing User Group )
20
20
  g.command 'disable' do |c|
21
21
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.'
22
22
  c.flag 'include_count', desc: 'Include the number of users in the User Group.'
@@ -25,8 +25,8 @@ command 'usergroups' do |g|
25
25
  end
26
26
  end
27
27
 
28
- g.desc 'This method enables a User Group which was previously disabled.'
29
- g.long_desc %( This method enables a User Group which was previously disabled. )
28
+ g.desc 'Enable a User Group'
29
+ g.long_desc %( Enable a User Group )
30
30
  g.command 'enable' do |c|
31
31
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.'
32
32
  c.flag 'include_count', desc: 'Include the number of users in the User Group.'
@@ -35,26 +35,26 @@ command 'usergroups' do |g|
35
35
  end
36
36
  end
37
37
 
38
- g.desc 'This method returns a list of all User Groups in the team. This can optionally include disabled User Groups.'
39
- g.long_desc %( This method returns a list of all User Groups in the team. This can optionally include disabled User Groups. )
38
+ g.desc 'List all User Groups for a team'
39
+ g.long_desc %( List all User Groups for a team )
40
40
  g.command 'list' do |c|
41
- c.flag 'include_disabled', desc: 'Include disabled User Groups.'
42
41
  c.flag 'include_count', desc: 'Include the number of users in each User Group.'
42
+ c.flag 'include_disabled', desc: 'Include disabled User Groups.'
43
43
  c.flag 'include_users', desc: 'Include the list of users for each User Group.'
44
44
  c.action do |_global_options, options, _args|
45
45
  puts JSON.dump($client.usergroups_list(options))
46
46
  end
47
47
  end
48
48
 
49
- g.desc 'This method updates the properties of an existing User Group.'
50
- g.long_desc %( This method updates the properties of an existing User Group. )
49
+ g.desc 'Update an existing User Group'
50
+ g.long_desc %( Update an existing User Group )
51
51
  g.command 'update' do |c|
52
52
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
53
- c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
54
- c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
55
- c.flag 'description', desc: 'A short description of the User Group.'
56
53
  c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
54
+ c.flag 'description', desc: 'A short description of the User Group.'
55
+ c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
57
56
  c.flag 'include_count', desc: 'Include the number of users in the User Group.'
57
+ c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
58
58
  c.action do |_global_options, options, _args|
59
59
  puts JSON.dump($client.usergroups_update(options))
60
60
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  desc 'UsergroupsUsers methods.'
4
4
  command 'usergroups_users' do |g|
5
- g.desc 'This method returns a list of all users within a User Group.'
6
- g.long_desc %( This method returns a list of all users within a User Group. )
5
+ g.desc 'List all users in a User Group'
6
+ g.long_desc %( List all users in a User Group )
7
7
  g.command 'list' do |c|
8
8
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
9
9
  c.flag 'include_disabled', desc: 'Allow results that involve disabled User Groups.'
@@ -12,8 +12,8 @@ command 'usergroups_users' do |g|
12
12
  end
13
13
  end
14
14
 
15
- g.desc 'This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter.'
16
- g.long_desc %( This method updates the list of users that belong to a User Group. This method replaces all users in a User Group with the list of users provided in the users parameter. )
15
+ g.desc 'Update the list of users for a User Group'
16
+ g.long_desc %( Update the list of users for a User Group )
17
17
  g.command 'update' do |c|
18
18
  c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
19
19
  c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the User Group.'
@@ -2,16 +2,16 @@
2
2
 
3
3
  desc 'Get info on members of your Slack team.'
4
4
  command 'users' do |g|
5
- g.desc 'This method allows the user to delete their profile image. It will clear whatever image is currently set.'
6
- g.long_desc %( This method allows the user to delete their profile image. It will clear whatever image is currently set. )
5
+ g.desc 'Delete the user profile photo'
6
+ g.long_desc %( Delete the user profile photo )
7
7
  g.command 'deletePhoto' do |c|
8
8
  c.action do |_global_options, options, _args|
9
9
  puts JSON.dump($client.users_deletePhoto(options))
10
10
  end
11
11
  end
12
12
 
13
- g.desc "This method lets you find out information about a user's presence."
14
- g.long_desc %( This method lets you find out information about a user's presence. Consult the presence documentation for more details. )
13
+ g.desc 'Gets user presence information.'
14
+ g.long_desc %( Gets user presence information. )
15
15
  g.command 'getPresence' do |c|
16
16
  c.flag 'user', desc: 'User to get presence info on. Defaults to the authed user.'
17
17
  c.action do |_global_options, options, _args|
@@ -19,16 +19,16 @@ command 'users' do |g|
19
19
  end
20
20
  end
21
21
 
22
- g.desc "After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user's identity."
23
- g.long_desc %( After your Slack app is awarded an identity token through Sign in with Slack, use this method to retrieve a user's identity. )
22
+ g.desc "Get a user's identity."
23
+ g.long_desc %( Get a user's identity. )
24
24
  g.command 'identity' do |c|
25
25
  c.action do |_global_options, options, _args|
26
26
  puts JSON.dump($client.users_identity(options))
27
27
  end
28
28
  end
29
29
 
30
- g.desc 'This method returns information about a team member.'
31
- g.long_desc %( This method returns information about a team member. )
30
+ g.desc 'Gets information about a user.'
31
+ g.long_desc %( Gets information about a user. )
32
32
  g.command 'info' do |c|
33
33
  c.flag 'user', desc: 'User to get info on.'
34
34
  c.action do |_global_options, options, _args|
@@ -36,37 +36,39 @@ command 'users' do |g|
36
36
  end
37
37
  end
38
38
 
39
- g.desc 'This method returns a list of all users in the team. This includes deleted/deactivated users.'
40
- g.long_desc %( This method returns a list of all users in the team. This includes deleted/deactivated users. )
39
+ g.desc 'Lists all users in a Slack team.'
40
+ g.long_desc %( Lists all users in a Slack team. )
41
41
  g.command 'list' do |c|
42
- c.flag 'presence', desc: 'Whether to include presence data in the output.'
42
+ 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."
43
+ 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 users list hasn't been reached."
44
+ c.flag 'presence', desc: 'Whether to include presence data in the output. Setting this to false improves performance, especially with large teams.'
43
45
  c.action do |_global_options, options, _args|
44
46
  puts JSON.dump($client.users_list(options))
45
47
  end
46
48
  end
47
49
 
48
- g.desc 'This method lets the slack messaging server know that the authenticated user'
49
- g.long_desc %( This method lets the slack messaging server know that the authenticated user is currently active. Consult the presence documentation for more details. )
50
+ g.desc 'Marks a user as active.'
51
+ g.long_desc %( Marks a user as active. )
50
52
  g.command 'setActive' do |c|
51
53
  c.action do |_global_options, options, _args|
52
54
  puts JSON.dump($client.users_setActive(options))
53
55
  end
54
56
  end
55
57
 
56
- g.desc 'This method allows the user to set their profile image. The caller can pass image data via image.'
57
- g.long_desc %( This method allows the user to set their profile image. The caller can pass image data via image. )
58
+ g.desc 'Set the user profile photo'
59
+ g.long_desc %( Set the user profile photo )
58
60
  g.command 'setPhoto' do |c|
59
61
  c.flag 'image', desc: 'File contents via multipart/form-data.'
62
+ c.flag 'crop_w', desc: 'Width/height of crop box (always square).'
60
63
  c.flag 'crop_x', desc: 'X coordinate of top-left corner of crop box.'
61
64
  c.flag 'crop_y', desc: 'Y coordinate of top-left corner of crop box.'
62
- c.flag 'crop_w', desc: 'Width/height of crop box (always square).'
63
65
  c.action do |_global_options, options, _args|
64
66
  puts JSON.dump($client.users_setPhoto(options))
65
67
  end
66
68
  end
67
69
 
68
- g.desc "This method lets you set the calling user's manual presence."
69
- g.long_desc %( This method lets you set the calling user's manual presence. Consult the presence documentation for more details. )
70
+ g.desc 'Manually sets user presence.'
71
+ g.long_desc %( Manually sets user presence. )
70
72
  g.command 'setPresence' do |c|
71
73
  c.flag 'presence', desc: 'Either auto or away.'
72
74
  c.action do |_global_options, options, _args|