slack-ruby-client 0.11.1 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/.rubocop_todo.yml +39 -47
- data/.travis.yml +2 -2
- data/CHANGELOG.md +13 -1
- data/Gemfile +0 -1
- data/README.md +5 -5
- data/RELEASING.md +1 -1
- data/bin/commands.rb +3 -0
- data/bin/commands/apps_permissions_resources.rb +14 -0
- data/bin/commands/apps_permissions_scopes.rb +12 -0
- data/bin/commands/apps_permissions_users.rb +25 -0
- data/bin/commands/chat.rb +3 -2
- data/bin/commands/conversations.rb +1 -0
- data/bin/commands/files.rb +4 -1
- data/bin/commands/groups.rb +2 -0
- data/bin/commands/mpim.rb +2 -0
- data/bin/commands/oauth.rb +3 -2
- data/bin/commands/reactions.rb +2 -0
- data/bin/commands/rtm.rb +4 -2
- data/bin/commands/search.rb +2 -2
- data/bin/commands/stars.rb +2 -0
- data/bin/commands/users.rb +16 -3
- data/bin/commands/users_profile.rb +1 -1
- data/examples/hi_real_time_async_celluloid/hi.rb +3 -4
- data/examples/hi_real_time_async_eventmachine/hi.rb +3 -4
- data/lib/slack/messages/formatting.rb +0 -1
- data/lib/slack/real_time/concurrency/celluloid.rb +3 -2
- data/lib/slack/real_time/stores/starter.rb +10 -0
- data/lib/slack/real_time/stores/store.rb +10 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +6 -0
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +30 -0
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +20 -0
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +49 -0
- data/lib/slack/web/api/endpoints/chat.rb +5 -3
- data/lib/slack/web/api/endpoints/conversations.rb +2 -0
- data/lib/slack/web/api/endpoints/files.rb +14 -2
- data/lib/slack/web/api/endpoints/groups.rb +11 -1
- data/lib/slack/web/api/endpoints/mpim.rb +11 -1
- data/lib/slack/web/api/endpoints/oauth.rb +3 -1
- data/lib/slack/web/api/endpoints/reactions.rb +11 -1
- data/lib/slack/web/api/endpoints/rtm.rb +5 -1
- data/lib/slack/web/api/endpoints/search.rb +2 -2
- data/lib/slack/web/api/endpoints/stars.rb +11 -1
- data/lib/slack/web/api/endpoints/users.rb +28 -2
- data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
- data/lib/slack/web/api/patches/chat.5.postEphemeral-text-or-attachments.patch +13 -0
- data/slack-ruby-client.gemspec +1 -1
- data/spec/slack/messages/formatting_spec.rb +0 -1
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +79 -35
- data/spec/slack/slack_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +7 -0
- data/spec/slack/web/api/endpoints/apps_permissions_scopes_spec.rb +7 -0
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +6 -2
- data/spec/slack/web/api/mixins/channels_spec.rb +8 -6
- data/spec/slack/web/api/mixins/groups_spec.rb +8 -6
- data/spec/slack/web/api/mixins/users_spec.rb +9 -7
- metadata +18 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb40a47e675fcf0265b109933983e54e11b6c9df574d355debde7c8ec5430148
|
4
|
+
data.tar.gz: 3e32b46f06a4e0d28db8e2bcdd329b57b1d719adadc8e8fcc246f45e6128c59e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53da5f288963057384831ff33711031fa866aad91f3857eeaae312e303640a60316459ddd20f18940d145aa4b9cf57cd7c8fdff9dee82ecb912b809f85db49cd
|
7
|
+
data.tar.gz: f235bb2ea8e6b5e64d247e2727d50618d54e9af471a4fd73c0e02bf43d0d70dda712b5e973c8033ecebd20501843eb6eb11eaf57cd53c1f71b4b45fd411b03f5
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2018-08-20 08:24:54 -0400 using RuboCop version 0.58.2.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -14,60 +14,40 @@ Lint/HandleExceptions:
|
|
14
14
|
- 'spec/slack/real_time/concurrency/eventmachine_spec.rb'
|
15
15
|
|
16
16
|
# Offense count: 1
|
17
|
-
|
17
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
18
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
19
|
+
Naming/MemoizedInstanceVariableName:
|
18
20
|
Exclude:
|
19
|
-
- 'lib/slack/
|
20
|
-
|
21
|
-
# Offense count: 18
|
22
|
-
Metrics/AbcSize:
|
23
|
-
Max: 44
|
24
|
-
|
25
|
-
# Offense count: 81
|
26
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
27
|
-
Metrics/BlockLength:
|
28
|
-
Max: 421
|
21
|
+
- 'lib/slack/logger.rb'
|
29
22
|
|
30
23
|
# Offense count: 2
|
31
|
-
# Configuration parameters:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
Metrics/CyclomaticComplexity:
|
37
|
-
Max: 9
|
38
|
-
|
39
|
-
# Offense count: 741
|
40
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
41
|
-
# URISchemes: http, https
|
42
|
-
Metrics/LineLength:
|
43
|
-
Max: 266
|
44
|
-
|
45
|
-
# Offense count: 10
|
46
|
-
# Configuration parameters: CountComments.
|
47
|
-
Metrics/MethodLength:
|
48
|
-
Max: 42
|
24
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
25
|
+
# AllowedNames: io, id, to, by, on, in, at, ip
|
26
|
+
Naming/UncommunicativeMethodParamName:
|
27
|
+
Exclude:
|
28
|
+
- 'spec/support/queue_with_timeout.rb'
|
49
29
|
|
50
30
|
# Offense count: 1
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# Offense count: 3
|
56
|
-
Metrics/PerceivedComplexity:
|
57
|
-
Max: 11
|
31
|
+
Security/Open:
|
32
|
+
Exclude:
|
33
|
+
- 'lib/slack/real_time/client.rb'
|
58
34
|
|
59
|
-
# Offense count:
|
60
|
-
# Configuration parameters:
|
61
|
-
#
|
62
|
-
|
35
|
+
# Offense count: 2
|
36
|
+
# Configuration parameters: EnforcedStyle.
|
37
|
+
# SupportedStyles: inline, group
|
38
|
+
Style/AccessModifierDeclarations:
|
63
39
|
Exclude:
|
64
|
-
- 'lib/slack
|
40
|
+
- 'lib/slack/real_time/concurrency/eventmachine.rb'
|
41
|
+
- 'lib/slack/real_time/socket.rb'
|
65
42
|
|
66
|
-
# Offense count:
|
67
|
-
|
68
|
-
|
43
|
+
# Offense count: 2
|
44
|
+
# Cop supports --auto-correct.
|
45
|
+
Style/ExpandPathArguments:
|
46
|
+
Exclude:
|
47
|
+
- 'bin/slack'
|
48
|
+
- 'slack-ruby-client.gemspec'
|
69
49
|
|
70
|
-
# Offense count:
|
50
|
+
# Offense count: 152
|
71
51
|
# Configuration parameters: AllowedVariables.
|
72
52
|
Style/GlobalVars:
|
73
53
|
Enabled: false
|
@@ -79,8 +59,14 @@ Style/GuardClause:
|
|
79
59
|
- 'lib/slack/real_time/stores/store.rb'
|
80
60
|
- 'lib/slack/web/faraday/response/raise_error.rb'
|
81
61
|
|
62
|
+
# Offense count: 1
|
63
|
+
Style/MixinUsage:
|
64
|
+
Exclude:
|
65
|
+
- 'bin/slack'
|
66
|
+
|
82
67
|
# Offense count: 3
|
83
|
-
#
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
# Configuration parameters: EnforcedStyle.
|
84
70
|
# SupportedStyles: module_function, extend_self
|
85
71
|
Style/ModuleFunction:
|
86
72
|
Exclude:
|
@@ -92,3 +78,9 @@ Style/ModuleFunction:
|
|
92
78
|
Style/MultilineTernaryOperator:
|
93
79
|
Exclude:
|
94
80
|
- 'spec/support/real_time/connected_client.rb'
|
81
|
+
|
82
|
+
# Offense count: 1
|
83
|
+
# Cop supports --auto-correct.
|
84
|
+
Style/RandomWithOffset:
|
85
|
+
Exclude:
|
86
|
+
- 'spec/integration/integration_spec.rb'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
### 0.
|
1
|
+
### 0.12.0 (8/20/2018)
|
2
|
+
|
3
|
+
* [#216](https://github.com/slack-ruby/slack-ruby-client/pull/216): Handle `Errno::ECONNRESET` and empty buffer reads with celluloid-io - [@dblock](https://github.com/dblock).
|
4
|
+
* [#215](https://github.com/slack-ruby/slack-ruby-client/pull/215): Web API `groups_list`, `files_info`, `mpim_list`, `reactions_list` and `stars_list` now support cursor pagination - [@hotwatermorning](https://github.com/hotwatermorning).
|
5
|
+
* [#215](https://github.com/slack-ruby/slack-ruby-client/pull/215): Added `apps_permissions_users_list` and `apps_permissions_users_request` - [@hotwatermorning](https://github.com/hotwatermorning).
|
6
|
+
* [#209](https://github.com/slack-ruby/slack-ruby-client/pull/209): Changed `chat_postEphemeral`to check for existence of either `text` or `attachments` - [@peterzhu2118](https://github.com/peterzhu2118).
|
7
|
+
* [#207](https://github.com/slack-ruby/slack-ruby-client/pull/207): Added `apps_permissions_resources_list` and `apps_permissions_scopes_list` - [@jmanian](https://github.com/jmanian).
|
8
|
+
* [#207](https://github.com/slack-ruby/slack-ruby-client/pull/207): Added `users_conversations` - [@jmanian](https://github.com/jmanian).
|
9
|
+
* [#206](https://github.com/slack-ruby/slack-ruby-client/pull/206): Fix 100% cpu usage in async examples - [@felixbuenemann](https://github.com/felixbuenemann).
|
10
|
+
* [#217](https://github.com/slack-ruby/slack-ruby-client/pull/217): Upgraded RuboCop to 0.58.2 - [@dblock](https://github.com/dblock).
|
11
|
+
* [#217](https://github.com/slack-ruby/slack-ruby-client/pull/217): No longer tested with Ruby 2.1, added 2.5 - [@dblock](https://github.com/dblock).
|
12
|
+
|
13
|
+
### 0.11.1 (1/23/2018)
|
2
14
|
|
3
15
|
* [#187](https://github.com/slack-ruby/slack-ruby-client/pull/187): Concatenate error message when multiple errors present - [@chrislopresto](https://github.com/chrislopresto).
|
4
16
|
* [#188](https://github.com/slack-ruby/slack-ruby-client/pull/188): Fixed `NoMethodError` when Slack is unavailable - [@sonicdoe](https://github.com/sonicdoe).
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web) and [RealTime Messa
|
|
18
18
|
|
19
19
|
## Stable Release
|
20
20
|
|
21
|
-
You're reading the documentation for the **
|
21
|
+
You're reading the documentation for the **stable** release of slack-ruby-client, 0.12.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
22
22
|
|
23
23
|
## Installation
|
24
24
|
|
@@ -153,7 +153,7 @@ Refer to the [Slack Web API Method Reference](https://api.slack.com/methods) for
|
|
153
153
|
You can configure the Web client either globally or via the initializer.
|
154
154
|
|
155
155
|
```ruby
|
156
|
-
Slack::Web::Client.
|
156
|
+
Slack::Web::Client.configure do |config|
|
157
157
|
config.user_agent = 'Slack Ruby Client/1.0'
|
158
158
|
end
|
159
159
|
```
|
@@ -295,7 +295,7 @@ A smaller store that only stores and tracks information about the bot user, but
|
|
295
295
|
You can configure the RealTime client either globally or via the initializer.
|
296
296
|
|
297
297
|
```ruby
|
298
|
-
Slack::RealTime::Client.
|
298
|
+
Slack::RealTime::Client.configure do |config|
|
299
299
|
config.websocket_ping = 42
|
300
300
|
end
|
301
301
|
```
|
@@ -327,7 +327,7 @@ See a fully working example in [examples/hi_real_time](examples/hi_real_time/hi.
|
|
327
327
|
The RealTime client uses either [rtm.start](https://api.slack.com/methods/rtm.start) or [rtm.connect](https://api.slack.com/methods/rtm.connect) to open a connection. The former retrieves a lot of team information while the latter only serves connection purposes and is preferred. You should let the library choose the right method for you based on the `store_class` used and override this behavior with `start_method` when necessary.
|
328
328
|
|
329
329
|
```ruby
|
330
|
-
Slack::RealTime::Client.
|
330
|
+
Slack::RealTime::Client.configure do |config|
|
331
331
|
config.start_method = :rtm_start
|
332
332
|
end
|
333
333
|
```
|
@@ -360,7 +360,7 @@ See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_
|
|
360
360
|
The `rtm.start` call downloads a large amount of data. For large teams, consider reducing the amount of unnecessary data downloaded with `start_options`. You may also want to increase the default timeout of 180 seconds.
|
361
361
|
|
362
362
|
```ruby
|
363
|
-
Slack::RealTime::Client.
|
363
|
+
Slack::RealTime::Client.configure do |config|
|
364
364
|
# Return timestamp only for latest message object of each channel.
|
365
365
|
config.start_options[:simple_latest] = true
|
366
366
|
# Skip unread counts for each channel.
|
data/RELEASING.md
CHANGED
@@ -21,7 +21,7 @@ Change "Next" in [CHANGELOG.md](CHANGELOG.md) to the current date.
|
|
21
21
|
|
22
22
|
Remove the line with "Your contribution here.", since there will be no more contributions to this release.
|
23
23
|
|
24
|
-
|
24
|
+
In the "Stable Release" section of the README, change `**next**` to `**stable**` so users know that they are reading the documentation for a released version.
|
25
25
|
|
26
26
|
```
|
27
27
|
## Stable Release
|
data/bin/commands.rb
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'commands/api'
|
4
4
|
require 'commands/apps_permissions'
|
5
|
+
require 'commands/apps_permissions_resources'
|
6
|
+
require 'commands/apps_permissions_scopes'
|
7
|
+
require 'commands/apps_permissions_users'
|
5
8
|
require 'commands/auth'
|
6
9
|
require 'commands/bots'
|
7
10
|
require 'commands/channels'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This file was auto-generated by lib/tasks/web.rake
|
2
|
+
|
3
|
+
desc 'AppsPermissionsResources methods.'
|
4
|
+
command 'apps_permissions_resources' do |g|
|
5
|
+
g.desc 'Returns list of resource grants this app has on a team.'
|
6
|
+
g.long_desc %( Returns list of resource grants this app has on a team. )
|
7
|
+
g.command 'list' do |c|
|
8
|
+
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."
|
9
|
+
c.flag 'limit', desc: 'The maximum number of items to return.'
|
10
|
+
c.action do |_global_options, options, _args|
|
11
|
+
puts JSON.dump($client.apps_permissions_resources_list(options))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file was auto-generated by lib/tasks/web.rake
|
2
|
+
|
3
|
+
desc 'AppsPermissionsScopes methods.'
|
4
|
+
command 'apps_permissions_scopes' do |g|
|
5
|
+
g.desc 'Returns list of scopes this app has on a team.'
|
6
|
+
g.long_desc %( Returns list of scopes this app has on a team. )
|
7
|
+
g.command 'list' do |c|
|
8
|
+
c.action do |_global_options, options, _args|
|
9
|
+
puts JSON.dump($client.apps_permissions_scopes_list(options))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by lib/tasks/web.rake
|
2
|
+
|
3
|
+
desc 'AppsPermissionsUsers methods.'
|
4
|
+
command 'apps_permissions_users' do |g|
|
5
|
+
g.desc 'Returns list of user grants and corresponding scopes this app has on a team.'
|
6
|
+
g.long_desc %( Returns list of user grants and corresponding scopes this app has on a team. )
|
7
|
+
g.command 'list' do |c|
|
8
|
+
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."
|
9
|
+
c.flag 'limit', desc: 'The maximum number of items to return.'
|
10
|
+
c.action do |_global_options, options, _args|
|
11
|
+
puts JSON.dump($client.apps_permissions_users_list(options))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
g.desc 'Enables an app to trigger a permissions modal to grant an app access to a user access scope.'
|
16
|
+
g.long_desc %( Enables an app to trigger a permissions modal to grant an app access to a user access scope. )
|
17
|
+
g.command 'request' do |c|
|
18
|
+
c.flag 'scopes', desc: 'A comma separated list of user scopes to request for.'
|
19
|
+
c.flag 'trigger_id', desc: 'Token used to trigger the request.'
|
20
|
+
c.flag 'user', desc: 'The user this scope is being requested for.'
|
21
|
+
c.action do |_global_options, options, _args|
|
22
|
+
puts JSON.dump($client.apps_permissions_users_request(options))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/bin/commands/chat.rb
CHANGED
@@ -63,12 +63,13 @@ command 'chat' do |g|
|
|
63
63
|
g.long_desc %( Sends a message to a channel. )
|
64
64
|
g.command 'postMessage' do |c|
|
65
65
|
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
|
66
|
-
c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead."
|
66
|
+
c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead. Provide no more than 40,000 characters or risk truncation."
|
67
67
|
c.flag 'as_user', desc: 'Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.'
|
68
68
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
69
69
|
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
|
70
70
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
|
71
71
|
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
|
72
|
+
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
|
72
73
|
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
|
73
74
|
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
|
74
75
|
c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
|
@@ -102,7 +103,7 @@ command 'chat' do |g|
|
|
102
103
|
c.flag 'ts', desc: 'Timestamp of the message to be updated.'
|
103
104
|
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
|
104
105
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text.'
|
105
|
-
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none.
|
106
|
+
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. See below.'
|
106
107
|
c.flag 'parse', desc: 'Change how messages are treated. Defaults to client, unlike chat.postMessage. See below.'
|
107
108
|
c.action do |_global_options, options, _args|
|
108
109
|
puts JSON.dump($client.chat_update(options))
|
@@ -25,6 +25,7 @@ command 'conversations' do |g|
|
|
25
25
|
g.command 'create' do |c|
|
26
26
|
c.flag 'name', desc: 'Name of the public or private channel to create.'
|
27
27
|
c.flag 'is_private', desc: 'Create a private channel instead of a public one.'
|
28
|
+
c.flag 'user_ids', desc: 'Required for workspace apps. A list of between 1 and 30 human users that will be added to the newly-created conversation. This argument has no effect when used by classic Slack apps.'
|
28
29
|
c.action do |_global_options, options, _args|
|
29
30
|
puts JSON.dump($client.conversations_create(options))
|
30
31
|
end
|
data/bin/commands/files.rb
CHANGED
@@ -26,6 +26,8 @@ command 'files' do |g|
|
|
26
26
|
g.long_desc %( Gets information about a team file. )
|
27
27
|
g.command 'info' do |c|
|
28
28
|
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
29
|
+
c.flag 'cursor', desc: "Parameter for pagination. File comments are paginated for a single file. 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 of comments. See pagination for more details."
|
30
|
+
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."
|
29
31
|
c.action do |_global_options, options, _args|
|
30
32
|
puts JSON.dump($client.files_info(options))
|
31
33
|
end
|
@@ -92,7 +94,8 @@ You can pass multiple values in the types argument, like types=spaces,snippets.T
|
|
92
94
|
c.flag 'file', desc: 'File contents via multipart/form-data. If omitting this parameter, you must submit content.'
|
93
95
|
c.flag 'filename', desc: 'Filename of file.'
|
94
96
|
c.flag 'filetype', desc: 'A file type identifier.'
|
95
|
-
c.flag 'initial_comment', desc: '
|
97
|
+
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
98
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead."
|
96
99
|
c.flag 'title', desc: 'Title of file.'
|
97
100
|
c.action do |_global_options, options, _args|
|
98
101
|
puts JSON.dump($client.files_upload(options))
|
data/bin/commands/groups.rb
CHANGED
@@ -94,8 +94,10 @@ command 'groups' do |g|
|
|
94
94
|
g.desc 'Lists private channels that the calling user has access to.'
|
95
95
|
g.long_desc %( Lists private channels that the calling user has access to. )
|
96
96
|
g.command 'list' do |c|
|
97
|
+
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."
|
97
98
|
c.flag 'exclude_archived', desc: "Don't return archived private channels."
|
98
99
|
c.flag 'exclude_members', desc: 'Exclude the members from each group.'
|
100
|
+
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."
|
99
101
|
c.action do |_global_options, options, _args|
|
100
102
|
puts JSON.dump($client.groups_list(options))
|
101
103
|
end
|
data/bin/commands/mpim.rb
CHANGED
@@ -27,6 +27,8 @@ command 'mpim' do |g|
|
|
27
27
|
g.desc 'Lists multiparty direct message channels for the calling user.'
|
28
28
|
g.long_desc %( Lists multiparty direct message channels for the calling user. )
|
29
29
|
g.command 'list' do |c|
|
30
|
+
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."
|
31
|
+
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."
|
30
32
|
c.action do |_global_options, options, _args|
|
31
33
|
puts JSON.dump($client.mpim_list(options))
|
32
34
|
end
|
data/bin/commands/oauth.rb
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
|
3
3
|
desc 'Oauth methods.'
|
4
4
|
command 'oauth' do |g|
|
5
|
-
g.desc 'Exchanges a temporary OAuth code for an
|
6
|
-
g.long_desc %( Exchanges a temporary OAuth code for an
|
5
|
+
g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
|
6
|
+
g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
|
7
7
|
g.command 'access' do |c|
|
8
8
|
c.flag 'client_id', desc: 'Issued when you created your application.'
|
9
9
|
c.flag 'client_secret', desc: 'Issued when you created your application.'
|
10
10
|
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
|
11
11
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
12
|
+
c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel.'
|
12
13
|
c.action do |_global_options, options, _args|
|
13
14
|
puts JSON.dump($client.oauth_access(options))
|
14
15
|
end
|
data/bin/commands/reactions.rb
CHANGED
@@ -31,7 +31,9 @@ command 'reactions' do |g|
|
|
31
31
|
g.desc 'Lists reactions made by a user.'
|
32
32
|
g.long_desc %( Lists reactions made by a user. )
|
33
33
|
g.command 'list' do |c|
|
34
|
+
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."
|
34
35
|
c.flag 'full', desc: 'If true always return the complete reaction list.'
|
36
|
+
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."
|
35
37
|
c.flag 'user', desc: 'Show reactions made by this user. Defaults to the authed user.'
|
36
38
|
c.action do |_global_options, options, _args|
|
37
39
|
puts JSON.dump($client.reactions_list(options))
|
data/bin/commands/rtm.rb
CHANGED
@@ -5,7 +5,8 @@ command 'rtm' do |g|
|
|
5
5
|
g.desc 'Starts a Real Time Messaging session.'
|
6
6
|
g.long_desc %( Starts a Real Time Messaging session. )
|
7
7
|
g.command 'connect' do |c|
|
8
|
-
c.flag 'batch_presence_aware', desc: '
|
8
|
+
c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
|
9
|
+
c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
|
9
10
|
c.action do |_global_options, options, _args|
|
10
11
|
puts JSON.dump($client.rtm_connect(options))
|
11
12
|
end
|
@@ -14,11 +15,12 @@ command 'rtm' do |g|
|
|
14
15
|
g.desc 'Starts a Real Time Messaging session.'
|
15
16
|
g.long_desc %( Starts a Real Time Messaging session. )
|
16
17
|
g.command 'start' do |c|
|
17
|
-
c.flag 'batch_presence_aware', desc: '
|
18
|
+
c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
|
18
19
|
c.flag 'include_locale', desc: 'Set this to true to receive the locale for users and channels. Defaults to false.'
|
19
20
|
c.flag 'mpim_aware', desc: 'Returns MPIMs to the client in the API response.'
|
20
21
|
c.flag 'no_latest', desc: 'Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.'
|
21
22
|
c.flag 'no_unreads', desc: 'Skip unread counts for each channel (improves performance).'
|
23
|
+
c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
|
22
24
|
c.flag 'simple_latest', desc: 'Return timestamp only for latest message object of each channel (improves performance).'
|
23
25
|
c.action do |_global_options, options, _args|
|
24
26
|
puts JSON.dump($client.rtm_start(options))
|
data/bin/commands/search.rb
CHANGED
@@ -17,7 +17,7 @@ command 'search' do |g|
|
|
17
17
|
g.desc 'Searches for files matching a query.'
|
18
18
|
g.long_desc %( Searches for files matching a query. )
|
19
19
|
g.command 'files' do |c|
|
20
|
-
c.flag 'query', desc: 'Search query.
|
20
|
+
c.flag 'query', desc: 'Search query.'
|
21
21
|
c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
|
22
22
|
c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
|
23
23
|
c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
|
@@ -29,7 +29,7 @@ command 'search' do |g|
|
|
29
29
|
g.desc 'Searches for messages matching a query.'
|
30
30
|
g.long_desc %( Searches for messages matching a query. )
|
31
31
|
g.command 'messages' do |c|
|
32
|
-
c.flag 'query', desc: 'Search query.
|
32
|
+
c.flag 'query', desc: 'Search query.'
|
33
33
|
c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
|
34
34
|
c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
|
35
35
|
c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
|