slack-ruby-client 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/{integtest.yml → integration_test.yml} +6 -5
- data/.github/workflows/{rubocop.yml → lint.yml} +5 -4
- data/.github/workflows/{danger.yml → pr_lint.yml} +8 -6
- data/.github/workflows/test.yml +4 -2
- data/.gitignore +0 -1
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +8 -14
- data/.ruby-version +1 -0
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +5 -4
- data/Gemfile +1 -6
- data/README.md +60 -63
- data/RELEASING.md +1 -1
- data/UPGRADING.md +28 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +23 -0
- data/bin/commands/admin_conversations.rb +12 -11
- data/bin/commands/admin_users.rb +1 -1
- data/bin/commands/admin_users_session.rb +1 -1
- data/bin/commands/apps_connections.rb +2 -2
- data/bin/commands/bookmarks.rb +1 -0
- data/bin/commands/chat.rb +9 -6
- data/bin/commands/conversations.rb +8 -6
- data/bin/commands/files.rb +24 -0
- data/bin/commands/rtm.rb +0 -15
- data/bin/commands/views.rb +4 -2
- data/bin/commands.rb +1 -0
- data/bin/slack +1 -1
- data/lib/slack/real_time/api/message.rb +3 -2
- data/lib/slack/real_time/api/templates/event_handler.erb +5 -1
- data/lib/slack/real_time/api/typing.rb +2 -1
- data/lib/slack/real_time/client.rb +8 -26
- data/lib/slack/real_time/config.rb +3 -3
- data/lib/slack/real_time/models/channel.rb +4 -0
- data/lib/slack/real_time/models/{group.rb → mpim.rb} +1 -1
- data/lib/slack/real_time/models.rb +2 -1
- data/lib/slack/real_time/stores/base.rb +25 -9
- data/lib/slack/real_time/stores/starter.rb +323 -309
- data/lib/slack/real_time/stores/store.rb +265 -198
- data/lib/slack/real_time/stores.rb +1 -7
- 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.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_conversations.rb +30 -28
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_emoji.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +7 -7
- data/lib/slack/web/api/endpoints/admin_users.rb +16 -16
- data/lib/slack/web/api/endpoints/admin_users_session.rb +8 -8
- data/lib/slack/web/api/endpoints/apps.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_connections.rb +1 -1
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +1 -1
- data/lib/slack/web/api/endpoints/apps_manifest.rb +6 -6
- data/lib/slack/web/api/endpoints/bookmarks.rb +10 -8
- data/lib/slack/web/api/endpoints/bots.rb +1 -1
- data/lib/slack/web/api/endpoints/calls.rb +5 -5
- data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
- data/lib/slack/web/api/endpoints/chat.rb +36 -30
- data/lib/slack/web/api/endpoints/conversations.rb +37 -33
- data/lib/slack/web/api/endpoints/dialog.rb +2 -2
- data/lib/slack/web/api/endpoints/dnd.rb +1 -1
- data/lib/slack/web/api/endpoints/files.rb +45 -8
- data/lib/slack/web/api/endpoints/files_comments.rb +2 -2
- data/lib/slack/web/api/endpoints/files_remote.rb +8 -8
- 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/pins.rb +3 -3
- data/lib/slack/web/api/endpoints/reactions.rb +4 -4
- data/lib/slack/web/api/endpoints/reminders.rb +5 -5
- data/lib/slack/web/api/endpoints/rtm.rb +0 -23
- data/lib/slack/web/api/endpoints/search.rb +3 -3
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +1 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +4 -4
- data/lib/slack/web/api/endpoints/usergroups_users.rb +3 -3
- data/lib/slack/web/api/endpoints/users.rb +4 -4
- data/lib/slack/web/api/endpoints/users_admin.rb +2 -2
- data/lib/slack/web/api/endpoints/views.rb +16 -11
- data/lib/slack/web/api/endpoints/workflows.rb +4 -4
- data/lib/slack/web/api/endpoints.rb +2 -0
- data/lib/slack/web/api/errors.rb +56 -6
- data/lib/slack/web/api/mixins/conversations.id.rb +1 -1
- data/lib/slack/web/api/mixins/users.id.rb +1 -1
- data/lib/slack/web/api/mixins/users.search.rb +2 -1
- data/lib/slack/web/api/patches/{chat.1.patch → chat.attachments-blocks.patch} +13 -14
- data/lib/slack/web/api/patches/{dialog.1.open-json-support.patch → dialog.encoded-json.patch} +4 -4
- data/lib/slack/web/api/patches/views.view-json.patch +55 -0
- data/lib/slack/web/api/templates/method.erb +1 -1
- data/lib/slack/web/config.rb +2 -2
- data/lib/tasks/real_time.rake +44 -22
- data/lib/tasks/web.rake +9 -2
- data/spec/fixtures/slack/web/rtm_connect.yml +85 -1
- data/spec/slack/events/config_spec.rb +2 -0
- data/spec/slack/events/request_spec.rb +4 -0
- data/spec/slack/messages/formatting_spec.rb +10 -0
- data/spec/slack/real_time/api/message_spec.rb +1 -1
- data/spec/slack/real_time/api/ping_spec.rb +1 -1
- data/spec/slack/real_time/api/typing_spec.rb +1 -1
- data/spec/slack/real_time/client_spec.rb +73 -111
- data/spec/slack/real_time/event_handlers/bot_spec.rb +19 -17
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +1 -1
- data/spec/slack/real_time/event_handlers/im_spec.rb +28 -25
- data/spec/slack/real_time/event_handlers/{group_spec.rb → private_channel_spec.rb} +35 -27
- data/spec/slack/real_time/event_handlers/{channel_spec.rb → public_channel_spec.rb} +24 -20
- data/spec/slack/real_time/event_handlers/team_spec.rb +7 -8
- data/spec/slack/real_time/event_handlers/user_spec.rb +6 -5
- data/spec/slack/real_time/stores/store_spec.rb +50 -0
- data/spec/slack/slack_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +17 -1
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +2 -0
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +13 -4
- data/spec/slack/web/api/endpoints/files_spec.rb +13 -0
- data/spec/slack/web/api/mixins/conversations_spec.rb +2 -0
- data/spec/slack/web/api/mixins/users_spec.rb +2 -0
- data/spec/slack/web/api/pagination/cursor_spec.rb +4 -0
- data/spec/slack/web/client_spec.rb +14 -4
- data/spec/support/real_time/loaded_client.rb +120 -0
- metadata +18 -35
- data/bin/commands/admin_conversations_whitelist.rb +0 -37
- data/bin/commands/apps_permissions.rb +0 -23
- data/bin/commands/apps_permissions_resources.rb +0 -15
- data/bin/commands/apps_permissions_scopes.rb +0 -13
- data/bin/commands/apps_permissions_users.rb +0 -26
- data/bin/commands/channels.rb +0 -23
- data/bin/commands/groups.rb +0 -14
- data/bin/commands/im.rb +0 -6
- data/bin/commands/mpim.rb +0 -6
- data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +0 -64
- data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -36
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +0 -31
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +0 -21
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +0 -50
- data/lib/slack/web/api/endpoints/channels.rb +0 -25
- data/lib/slack/web/api/endpoints/groups.rb +0 -13
- data/lib/slack/web/api/endpoints/im.rb +0 -13
- data/lib/slack/web/api/endpoints/mpim.rb +0 -13
- data/lib/slack/web/api/endpoints/presence.rb +0 -23
- data/lib/slack/web/api/patches/views.1.view-json.patch +0 -40
- data/lib/slack/web/api/patches/views.1.views-published.patch +0 -16
- data/spec/fixtures/slack/web/rtm_start.yml +0 -815
- data/spec/slack/real_time/rtm_start_spec.rb +0 -14
- data/spec/slack/real_time/store_spec.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 491089e27b5eab6a2d3a2834956a830ccbad387deb0c9fb848db739966b61ed8
|
4
|
+
data.tar.gz: 53a923e845941a2efea21daa5031c73011f55ac580e96a3694f88f3baa28f638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185c57136e5100100c4f9fc2dbeb82de7a4f5e6fe4bcfad9c9a90c6c68a79c48ddbe50b3a9bebf7aeb211580933a8e5de6678359583a88aa39f236ea24dd2d10
|
7
|
+
data.tar.gz: bf2c43b27722ad5d7eabeabd1596437e662089ac1a4bc72e534719a6092c43b7e629a219da9e2af26f3795755c2acc6cff1dd378d49b1e408bde61a293196bf6
|
@@ -1,19 +1,21 @@
|
|
1
1
|
name: Integration Tests
|
2
|
-
on:
|
2
|
+
on: push
|
3
3
|
jobs:
|
4
4
|
test:
|
5
5
|
runs-on: ubuntu-latest
|
6
6
|
strategy:
|
7
7
|
matrix:
|
8
8
|
entry:
|
9
|
-
- { ruby: 2.7
|
9
|
+
- { ruby: 2.7, concurrency: async-websocket }
|
10
10
|
name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
|
11
11
|
steps:
|
12
|
-
-
|
13
|
-
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v3
|
14
|
+
- name: Set up Ruby
|
14
15
|
uses: ruby/setup-ruby@v1
|
15
16
|
with:
|
16
17
|
ruby-version: ${{ matrix.entry.ruby }}
|
18
|
+
bundler-cache: true
|
17
19
|
- name: Run Tests
|
18
20
|
env:
|
19
21
|
CONCURRENCY: ${{ matrix.entry.concurrency }}
|
@@ -22,4 +24,3 @@ jobs:
|
|
22
24
|
run: |
|
23
25
|
bundle install
|
24
26
|
bundle exec rake
|
25
|
-
|
@@ -1,13 +1,14 @@
|
|
1
|
-
name:
|
1
|
+
name: Lint
|
2
2
|
on: [push, pull_request]
|
3
3
|
jobs:
|
4
|
-
|
4
|
+
rubocop:
|
5
|
+
name: RuboCop
|
5
6
|
runs-on: ubuntu-latest
|
6
7
|
steps:
|
7
|
-
-
|
8
|
+
- name: Checkout
|
9
|
+
uses: actions/checkout@v3
|
8
10
|
- name: Set up Ruby
|
9
11
|
uses: ruby/setup-ruby@v1
|
10
12
|
with:
|
11
|
-
ruby-version: 2.7
|
12
13
|
bundler-cache: true
|
13
14
|
- run: bundle exec rubocop
|
@@ -1,19 +1,21 @@
|
|
1
|
-
name: PR
|
2
|
-
on:
|
1
|
+
name: PR Lint
|
2
|
+
on: pull_request
|
3
3
|
jobs:
|
4
4
|
danger:
|
5
|
+
name: Dangerfile
|
5
6
|
runs-on: ubuntu-latest
|
6
7
|
env:
|
7
8
|
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
|
8
9
|
steps:
|
9
|
-
-
|
10
|
+
- name: Checkout
|
11
|
+
uses: actions/checkout@v3
|
10
12
|
with:
|
11
13
|
fetch-depth: 0
|
12
|
-
-
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
13
16
|
with:
|
14
|
-
ruby-version: 2.6
|
15
17
|
bundler-cache: true
|
16
18
|
- run: |
|
17
|
-
#
|
19
|
+
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
|
18
20
|
TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)
|
19
21
|
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
data/.github/workflows/test.yml
CHANGED
@@ -14,11 +14,13 @@ jobs:
|
|
14
14
|
- { ruby: jruby-head, ignore: true }
|
15
15
|
name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
|
16
16
|
steps:
|
17
|
-
-
|
18
|
-
|
17
|
+
- name: Checkout
|
18
|
+
uses: actions/checkout@v3
|
19
|
+
- name: Set up Ruby
|
19
20
|
uses: ruby/setup-ruby@v1
|
20
21
|
with:
|
21
22
|
ruby-version: ${{ matrix.entry.ruby }}
|
23
|
+
bundler-cache: true
|
22
24
|
- name: Set Concurrency
|
23
25
|
run: |
|
24
26
|
if [[ ! -z "${{ matrix.entry.concurrency }}" ]]; then
|
data/.gitignore
CHANGED
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 2022-
|
3
|
+
# on 2022-10-02 05:05:29 UTC using RuboCop version 1.26.1.
|
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
|
@@ -93,19 +93,13 @@ RSpec/ContextMethod:
|
|
93
93
|
- 'spec/slack/messages/formatting_spec.rb'
|
94
94
|
- 'spec/slack/web/api/mixins/users_spec.rb'
|
95
95
|
|
96
|
-
# Offense count:
|
96
|
+
# Offense count: 74
|
97
97
|
# Configuration parameters: Prefixes.
|
98
98
|
# Prefixes: when, with, without
|
99
99
|
RSpec/ContextWording:
|
100
100
|
Enabled: false
|
101
101
|
|
102
|
-
# Offense count:
|
103
|
-
# This cop supports safe auto-correction (--auto-correct).
|
104
|
-
# Configuration parameters: AllowConsecutiveOneLiners.
|
105
|
-
RSpec/EmptyLineAfterExample:
|
106
|
-
Enabled: false
|
107
|
-
|
108
|
-
# Offense count: 64
|
102
|
+
# Offense count: 63
|
109
103
|
# Configuration parameters: CountAsOne.
|
110
104
|
RSpec/ExampleLength:
|
111
105
|
Max: 18
|
@@ -116,13 +110,13 @@ RSpec/ExampleLength:
|
|
116
110
|
RSpec/FilePath:
|
117
111
|
Enabled: false
|
118
112
|
|
119
|
-
# Offense count:
|
113
|
+
# Offense count: 63
|
120
114
|
# Configuration parameters: .
|
121
115
|
# SupportedStyles: have_received, receive
|
122
116
|
RSpec/MessageSpies:
|
123
117
|
EnforcedStyle: receive
|
124
118
|
|
125
|
-
# Offense count:
|
119
|
+
# Offense count: 92
|
126
120
|
RSpec/MultipleExpectations:
|
127
121
|
Max: 5
|
128
122
|
|
@@ -137,11 +131,11 @@ RSpec/NamedSubject:
|
|
137
131
|
Exclude:
|
138
132
|
- 'spec/slack/web/api/mixins/conversations_list_spec.rb'
|
139
133
|
|
140
|
-
# Offense count:
|
134
|
+
# Offense count: 44
|
141
135
|
RSpec/NestedGroups:
|
142
136
|
Max: 6
|
143
137
|
|
144
|
-
# Offense count:
|
138
|
+
# Offense count: 5
|
145
139
|
RSpec/StubbedMock:
|
146
140
|
Exclude:
|
147
141
|
- 'spec/slack/real_time/client_spec.rb'
|
@@ -162,7 +156,7 @@ RSpec/SubjectStub:
|
|
162
156
|
RSpec/VerifiedDoubleReference:
|
163
157
|
EnforcedStyle: string
|
164
158
|
|
165
|
-
# Offense count:
|
159
|
+
# Offense count: 10
|
166
160
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
167
161
|
RSpec/VerifiedDoubles:
|
168
162
|
Exclude:
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
### 2.0.0 (2022/10/19)
|
2
|
+
|
3
|
+
* [#416](https://github.com/slack-ruby/slack-ruby-client/pull/416): Removes default values for Faraday's SSL settings `ca_file` and `ca_path` - [@irphilli](https://github.com/irphilli).
|
4
|
+
* [#417](https://github.com/slack-ruby/slack-ruby-client/pull/417): Raise rescuable errors - [@zachahn](https://github.com/zachahn).
|
5
|
+
* [#419](https://github.com/slack-ruby/slack-ruby-client/pull/419): Use `rtm.connect` instead of `rtm.start` - [@kstole](https://github.com/kstole).
|
6
|
+
* [#420](https://github.com/slack-ruby/slack-ruby-client/pull/420): Fix default store missing event hooks - [@kstole](https://github.com/kstole).
|
7
|
+
* [#421](https://github.com/slack-ruby/slack-ruby-client/pull/421): Added `admin_audit_anomaly_allow_getItem`, `admin_audit_anomaly_allow_updateItem`, `files_completeUploadExternal`, `files_getUploadURLExternal` - [@kstole](https://github.com/kstole).
|
8
|
+
* [#421](https://github.com/slack-ruby/slack-ruby-client/pull/421): Raise error for mutually exclusive required options in views methods - [@kstole](https://github.com/kstole).
|
9
|
+
* [#424](https://github.com/slack-ruby/slack-ruby-client/pull/424): Updated real_time.rake to remove outdated event hooks and organize alphabetically - [@kstole](https://github.com/kstole).
|
10
|
+
* [#423](https://github.com/slack-ruby/slack-ruby-client/pull/423): Changed default store to `Slack::RealTime::Stores::Starter` and removed `Slack::RealTime::Store` - [@kstole](https://github.com/kstole).
|
11
|
+
* [#423](https://github.com/slack-ruby/slack-ruby-client/pull/423): Replaced `channels` and `groups` caches with `public_channels` and `private_channels` - [@kstole](https://github.com/kstole).
|
12
|
+
* [#423](https://github.com/slack-ruby/slack-ruby-client/pull/423): Added configurable `hello` hook to initialize `Slack::RealTime::Stores::Store` upon successful connection - [@kstole](https://github.com/kstole).
|
13
|
+
* [#425](https://github.com/slack-ruby/slack-ruby-client/pull/425): Updated web.rake to remove outdated endpoints and commands - [@kstole](https://github.com/kstole).
|
14
|
+
|
1
15
|
### 1.1.0 (2022/06/05)
|
2
16
|
|
3
17
|
* [#400](https://github.com/slack-ruby/slack-ruby-client/pull/400): Replace Travis-CI with GitHub Actions - [@dblock](https://github.com/dblock).
|
data/CONTRIBUTING.md
CHANGED
@@ -35,7 +35,7 @@ Create a new App under [https://api.slack.com/apps](https://api.slack.com/apps).
|
|
35
35
|
|
36
36
|
On the next screen, note the API token.
|
37
37
|
|
38
|
-
To run [the example in examples/
|
38
|
+
To run [the example in examples/hi_real_time_and_web](examples/hi_real_time_and_web/hi.rb), open a terminal, cd into _examples/hi_real_time_and_web_, run `bundle install`, followed by `SLACK_API_TOKEN=<your API token> bundle exec ruby hi.rb`.
|
39
39
|
|
40
40
|
## Contribute Code
|
41
41
|
|
@@ -59,7 +59,7 @@ We definitely appreciate pull requests that highlight or reproduce a problem, ev
|
|
59
59
|
|
60
60
|
Implement your feature or bug fix.
|
61
61
|
|
62
|
-
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally
|
62
|
+
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally ignored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
|
63
63
|
|
64
64
|
Make sure that `bundle exec rake` completes without errors.
|
65
65
|
|
@@ -82,7 +82,7 @@ The broad steps are:
|
|
82
82
|
2. Make a change to a generated file, for example `lib/slack/web/api/endpoints/chat.rb`.
|
83
83
|
3. Generate a patch:
|
84
84
|
```
|
85
|
-
git diff --no-color HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.
|
85
|
+
git diff --no-color HEAD lib/slack/web/api/endpoints/chat.rb > lib/slack/web/api/patches/chat.added-support.patch
|
86
86
|
```
|
87
87
|
4. Run `rake slack:api:update` to ensure that the patch is cleanly applied. Implement a test for the added or modified functionality and commit the patch file.
|
88
88
|
|
@@ -90,7 +90,8 @@ The broad steps are:
|
|
90
90
|
|
91
91
|
The auto-generated method files may drift overtime e.g. new arguments may be added or descriptions changed. Since previous patches were based on the older auto-generated files, git may be unable to apply them to the new files. Resolving them requires some good ol' splicing:
|
92
92
|
1. Run `rake slack:api:update SKIP_PATCH=true` to create the raw auto-generated files. Commit the files that you are updating, so we can run `git diff` later.
|
93
|
-
2. Go through the old patches for the files (e.g. in `lib/slack/web/api/patches/chat.
|
93
|
+
2. Go through the old patches for the files (e.g. in `lib/slack/web/api/patches/chat.added-support.patch`), copying code into the new files.
|
94
|
+
- Run `git apply --reject path/to/patch-file.patch` to see hunks that couldn't be applied.
|
94
95
|
3. Continue with Step 2 [above](#patching-slack-web-api).
|
95
96
|
|
96
97
|
|
data/Gemfile
CHANGED
@@ -24,11 +24,6 @@ group :test do
|
|
24
24
|
gem 'rubocop-rake'
|
25
25
|
gem 'rubocop-rspec'
|
26
26
|
gem 'timecop'
|
27
|
-
|
28
|
-
# https://github.com/vcr/vcr/pull/907
|
29
|
-
gem 'vcr', github: 'vcr/vcr', ref: '7ac8292c'
|
30
|
-
else
|
31
|
-
gem 'vcr'
|
32
|
-
end
|
27
|
+
gem 'vcr'
|
33
28
|
gem 'webmock'
|
34
29
|
end
|
data/README.md
CHANGED
@@ -38,14 +38,13 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
38
38
|
- [Rate Limiting](#rate-limiting)
|
39
39
|
- [Other Errors](#other-errors)
|
40
40
|
- [RealTime Client](#realtime-client)
|
41
|
-
- [Slack::RealTime::
|
42
|
-
|
43
|
-
|
44
|
-
- [
|
45
|
-
- [
|
46
|
-
|
41
|
+
- [Configuring Slack::RealTime::Client](#configuring-slackrealtimeclient)
|
42
|
+
- [Caveats](#caveats)
|
43
|
+
- [websocket_ping](#websocket_ping)
|
44
|
+
- [RealTime Store](#realtime-store)
|
45
|
+
- [Slack::RealTime::Stores::Starter](#slackrealtimestoresstarter)
|
46
|
+
- [Slack::RealTime::Stores::Store](#slackrealtimestoresstore)
|
47
47
|
- [Combining RealTime and Web Clients](#combining-realtime-and-web-clients)
|
48
|
-
- [Large Team Considerations](#large-team-considerations)
|
49
48
|
- [Concurrency](#concurrency)
|
50
49
|
- [Async](#async)
|
51
50
|
- [Events API](#events-api)
|
@@ -71,7 +70,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
71
70
|
|
72
71
|
## Stable Release
|
73
72
|
|
74
|
-
You're reading the documentation for the **stable** release of slack-ruby-client,
|
73
|
+
You're reading the documentation for the **stable** release of slack-ruby-client, 2.0.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
75
74
|
|
76
75
|
## Installation
|
77
76
|
|
@@ -176,7 +175,7 @@ client.files_upload(
|
|
176
175
|
|
177
176
|
##### Get Channel Info
|
178
177
|
|
179
|
-
You can use a channel ID or name (prefixed with `#`) in all functions that take a `:channel` argument. Lookup by name is not supported by the Slack API and the `channels_id` method called invokes `conversations_list` in order to locate the channel ID.
|
178
|
+
You can use a channel ID or name (prefixed with `#`) in all functions that take a `:channel` argument. Lookup by name is not supported by the Slack API and the `channels_id` method called invokes `conversations_list` in order to locate the channel ID. This invocation can have a cost if you have many Slack channels. In this scenario, we encourage you to use channel id.
|
180
179
|
|
181
180
|
```ruby
|
182
181
|
client.conversations_info(channel: 'C04KB5X4D') # calls conversations_info
|
@@ -374,32 +373,7 @@ You can send a ping with `ping`.
|
|
374
373
|
client.ping
|
375
374
|
```
|
376
375
|
|
377
|
-
|
378
|
-
|
379
|
-
property | description
|
380
|
-
---------|-------------------------------------------------------------------------------------------------
|
381
|
-
url | A WebSocket Message Server URL.
|
382
|
-
self | The authenticated bot user.
|
383
|
-
team | Details on the authenticated user's team.
|
384
|
-
users | A hash of user objects by user ID.
|
385
|
-
channels | A hash of channel objects, one for every channel visible to the authenticated user.
|
386
|
-
groups | A hash of group objects, one for every group the authenticated user is in.
|
387
|
-
ims | A hash of IM objects, one for every direct message channel visible to the authenticated user.
|
388
|
-
bots | Details of the integrations set up on this team.
|
389
|
-
|
390
|
-
It also tracks changes, such as users being renamed, added or deleted, therefore `client.users` is always up-to-date.
|
391
|
-
|
392
|
-
Tracking with a local store can be disabled with `Slack::RealTime::Client.new(store_class: nil)`. Other stores are also available.
|
393
|
-
|
394
|
-
#### Slack::RealTime::Stores::Store
|
395
|
-
|
396
|
-
The default store that tracks all changes. By default the client will be connected using `rtm_start`.
|
397
|
-
|
398
|
-
#### Slack::RealTime::Stores::Starter
|
399
|
-
|
400
|
-
A smaller store that only stores and tracks information about the bot user, but not channels, users, groups, ims or bots. By default the client will be connected using `rtm_connect`.
|
401
|
-
|
402
|
-
### Configuring Slack::RealTime::Client
|
376
|
+
#### Configuring Slack::RealTime::Client
|
403
377
|
|
404
378
|
You can configure the RealTime client either globally or via the initializer.
|
405
379
|
|
@@ -420,20 +394,21 @@ setting | description
|
|
420
394
|
token | Slack API token.
|
421
395
|
websocket_ping | How long the socket can be idle before sending a ping message to confirm it's still connected, default is 30.
|
422
396
|
websocket_proxy | Connect via proxy, include `:origin` and `:headers`.
|
423
|
-
|
424
|
-
|
425
|
-
|
397
|
+
start_options | Options to pass to `rtm.connect`, default is `{ request: { timeout: 180 } }`.
|
398
|
+
store_class | Local store class, default is an in-memory `Slack::RealTime::Stores::Starter`.
|
399
|
+
store_options | Options to initialize the store, default is `{}`.
|
426
400
|
logger | Optional `Logger` instance that logs RealTime requests and socket data.
|
427
401
|
|
428
|
-
Note that the RealTime client uses a Web client to obtain the WebSocket URL via [rtm.
|
402
|
+
Note that the RealTime client uses a Web client to obtain the WebSocket URL via [rtm.connect](https://api.slack.com/methods/rtm.connect). While `token` and `logger` options are passed down from the RealTime client, you may also configure Web client options via `Slack::Web::Client.configure` as described above.
|
429
403
|
|
430
|
-
See a fully working example in [examples/
|
404
|
+
See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_time_and_web/hi.rb).
|
405
|
+
|
406
|
+
![](examples/hi_real_time_and_web/hi.gif)
|
431
407
|
|
432
|
-
|
408
|
+
##### Caveats
|
433
409
|
|
434
|
-
|
410
|
+
###### `websocket_ping`
|
435
411
|
|
436
|
-
##### `websocket_ping`
|
437
412
|
This setting determines how long the socket can be idle before sending a ping message to confirm it's still connected.
|
438
413
|
|
439
414
|
It's important to note that if a ping message was sent and no response was received within the amount of time specified in `websocket_ping` the client will attempt to reestablish it's connection to the message server.
|
@@ -442,16 +417,55 @@ Note that the ping may take between `websocket_ping` and `websocket_ping * 3/2`
|
|
442
417
|
|
443
418
|
To disable this feature set `websocket_ping` to 0.
|
444
419
|
|
445
|
-
|
420
|
+
#### RealTime Store
|
421
|
+
|
422
|
+
The RealTime client exposes and maintains a local store upon successful connection.
|
423
|
+
Event hooks keep the store's cached data up-to-date.
|
424
|
+
|
425
|
+
Tracking with a local store can be disabled with `Slack::RealTime::Client.new(store_class: nil)`.
|
426
|
+
|
427
|
+
##### `Slack::RealTime::Stores::Starter`
|
428
|
+
|
429
|
+
A small store that only caches and tracks data returned in the [rtm.connect](https://api.slack.com/methods/rtm.connect#examples) response.
|
430
|
+
This store provides `self` and `team` for accessing the limited data about the authenticated user and its workspace, but does not cache other users or bots, channels, or direct messages.
|
431
|
+
|
432
|
+
##### `Slack::RealTime::Stores::Store`
|
446
433
|
|
447
|
-
|
434
|
+
A more complete store that tracks most changes visible to the authenticated user.
|
448
435
|
|
436
|
+
You can see all of the cache types in the table below (each is a hash indexed by its objects' `id`).
|
437
|
+
|
438
|
+
Cache | Description
|
439
|
+
-------------------|-------------------------------------------------------------------------------------------------
|
440
|
+
`teams` | Workspaces (teams). Will likely contain only one `team`.
|
441
|
+
`users` | All [user](https://api.slack.com/types/user) objects, including `self`.
|
442
|
+
`bots` | All [bot users](https://api.slack.com/bot-users) (from Slack Apps and legacy custom integrations).
|
443
|
+
`public_channels` | Public [conversation](https://api.slack.com/types/conversation) objects.
|
444
|
+
`private_channels` | Private [conversation](https://api.slack.com/types/conversation) and [group](https://api.slack.com/types/group) objects with the authenticated user as a member.
|
445
|
+
`ims` | Visible [im](https://api.slack.com/types/im) objects, direct message channels with the authenticated user.
|
446
|
+
`mpims` | Visible [mpim](https://api.slack.com/types/mpim) objects, multiparty direct message channels that include the authenticated user.
|
447
|
+
|
448
|
+
By default, none of these caches are initialized with data beyond what is returned from [rtm.connect](https://api.slack.com/methods/rtm.connect#examples), same as [Slack::RealTime::Stores::Starter](#slackrealtimestoresstarter).
|
449
|
+
When configured, this store initializes its caches by making additional calls to Web API methods upon successful connection to the RTM API (i.e. "hello" message).
|
450
|
+
|
451
|
+
Configure by specifying which caches to fetch:
|
452
|
+
```ruby
|
453
|
+
Slack::RealTime::Client.configure do |config|
|
454
|
+
config.store_class = Slack::RealTime::Stores::Store
|
455
|
+
config.store_options = { caches: %i[teams users public_channels private_channels ims] }
|
456
|
+
end
|
457
|
+
```
|
458
|
+
or with the `:all` option:
|
449
459
|
```ruby
|
450
460
|
Slack::RealTime::Client.configure do |config|
|
451
|
-
config.
|
461
|
+
config.store_class = Slack::RealTime::Stores::Store
|
462
|
+
config.store_options = { caches: :all }
|
452
463
|
end
|
453
464
|
```
|
454
465
|
|
466
|
+
Note: For `teams`, this makes a single call to `team.info`, while for `users` and all conversation-like types, this makes paginated calls to `users.list` and `conversations.list` respectively.
|
467
|
+
Only `bots` requires a separate call for every bot user, so may be slow if your workplace has a lot of bot users.
|
468
|
+
|
455
469
|
### Combining RealTime and Web Clients
|
456
470
|
|
457
471
|
Since the Web client is used to obtain the RealTime client's WebSocket URL, you can continue using the Web client in combination with the RealTime client.
|
@@ -475,23 +489,6 @@ See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_
|
|
475
489
|
|
476
490
|
![](examples/hi_real_time_and_web/hi.gif)
|
477
491
|
|
478
|
-
### Large Team Considerations
|
479
|
-
|
480
|
-
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.
|
481
|
-
|
482
|
-
```ruby
|
483
|
-
Slack::RealTime::Client.configure do |config|
|
484
|
-
# Return timestamp only for latest message object of each channel.
|
485
|
-
config.start_options[:simple_latest] = true
|
486
|
-
# Skip unread counts for each channel.
|
487
|
-
config.start_options[:no_unreads] = true
|
488
|
-
# Increase request timeout to 6 minutes.
|
489
|
-
config.start_options[:request][:timeout] = 360
|
490
|
-
end
|
491
|
-
```
|
492
|
-
|
493
|
-
See [#134](https://github.com/slack-ruby/slack-ruby-client/issues/134) for a discussion on this topic.
|
494
|
-
|
495
492
|
#### Concurrency
|
496
493
|
|
497
494
|
`Slack::RealTime::Client` needs help from a concurrency library and supports [Async](https://github.com/socketry/async).
|
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
|
-
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.
|
24
|
+
In the "Stable Release" section of the README, change `**next**` to `**stable**` and add the version number so users know that they are reading the documentation for a released version.
|
25
25
|
|
26
26
|
```
|
27
27
|
## Stable Release
|
data/UPGRADING.md
CHANGED
@@ -1,6 +1,34 @@
|
|
1
1
|
Upgrading Slack-Ruby-Client
|
2
2
|
===========================
|
3
3
|
|
4
|
+
### Upgrading to >= 2.0.0
|
5
|
+
|
6
|
+
[#416](https://github.com/slack-ruby/slack-ruby-client/pull/416) Removes default values for Faraday's SSL settings `ca_file` and `ca_path`.
|
7
|
+
|
8
|
+
If you previously relied on `OpenSSL::X509::DEFAULT_CERT_FILE` or `OpenSSL::X509::DEFAULT_CERT_DIR` to set these values you must now do so explicitly. E.g.:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
Slack::Web::Client.configure do |config|
|
12
|
+
config.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE
|
13
|
+
config.ca_path = OpenSSL::X509::DEFAULT_CERT_DIR
|
14
|
+
end
|
15
|
+
```
|
16
|
+
|
17
|
+
or
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
client = Slack::Web::Client.new(ca_file: OpenSSL::X509::DEFAULT_CERT_FILE, ca_path: OpenSSL::X509::DEFAULT_CERT_DIR)
|
21
|
+
```
|
22
|
+
|
23
|
+
#### RealTime Stores
|
24
|
+
|
25
|
+
Slack has deprecated the `rtm.start` method and [replaced its response](https://api.slack.com/changelog/2021-10-rtm-start-to-stop) with that of `rtm.connect`, so it has been removed from the library along with the `start_method` configuration ([#419](https://github.com/slack-ruby/slack-ruby-client/pull/419)) and `Slack::RealTime::Stores::Starter` is now the default store.
|
26
|
+
If your app still relies on the old `rtm.start` behavior, you can achieve a similar result with `Slack::RealTime::Stores::Store`, which initializes itself using Web API methods (see [README](README.md#slackrealtimestoresstore)).
|
27
|
+
|
28
|
+
The names of the Store caches `channels` and `groups` have been changed to `public_channels` and `private_channels` to reflect their true meaning.
|
29
|
+
This is consistent with the [Slack Web API](https://api.slack.com/methods/conversations.list#arg_types), although [event types for private channels](https://api.slack.com/events?query=group) still use the term `group`.
|
30
|
+
In both cases, private channels consist of both [conversation types](https://api.slack.com/types/conversation) (`id: 'C...'', is_channel: true, is_group: false, is_private: true`) and [group types](https://api.slack.com/types/group) (`id: 'G...', is_channel: false, is_group: true, is_private: true`) depending whether the object was created before or after March 2021.
|
31
|
+
|
4
32
|
### Upgrading to >= 1.0.0
|
5
33
|
|
6
34
|
#### Deprecated Methods
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
desc 'AdminAuditAnomalyAllow methods.'
|
5
|
+
command 'admin_audit_anomaly_allow' do |g|
|
6
|
+
g.desc 'API to allow enterprise grid admins to read the allow list of IP blocks and ASNs from the enterprise configuration.'
|
7
|
+
g.long_desc %( API to allow enterprise grid admins to read the allow list of IP blocks and ASNs from the enterprise configuration. )
|
8
|
+
g.command 'getItem' do |c|
|
9
|
+
c.action do |_global_options, options, _args|
|
10
|
+
puts JSON.dump($client.admin_audit_anomaly_allow_getItem(options))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
g.desc 'API to allow enterprise grid admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.'
|
15
|
+
g.long_desc %( API to allow enterprise grid admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration. )
|
16
|
+
g.command 'updateItem' do |c|
|
17
|
+
c.flag 'trusted_asns', desc: 'allow list of Autonomous System Numbers (ASN) in the enterprise grid configuarion.'
|
18
|
+
c.flag 'trusted_cidr', desc: 'allow list of IPv4 addressses using cidr notation in the enterprise grid configuarion.'
|
19
|
+
c.action do |_global_options, options, _args|
|
20
|
+
puts JSON.dump($client.admin_audit_anomaly_allow_updateItem(options))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -63,10 +63,10 @@ command 'admin_conversations' do |g|
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
g.desc "This API endpoint can be used by any admin to get a
|
67
|
-
g.long_desc %( This API endpoint can be used by any admin to get a
|
66
|
+
g.desc "This API endpoint can be used by any admin to get a conversation's retention policy."
|
67
|
+
g.long_desc %( This API endpoint can be used by any admin to get a conversation's retention policy. )
|
68
68
|
g.command 'getCustomRetention' do |c|
|
69
|
-
c.flag 'channel_id', desc: 'The
|
69
|
+
c.flag 'channel_id', desc: 'The conversation to get the retention policy for.'
|
70
70
|
c.action do |_global_options, options, _args|
|
71
71
|
puts JSON.dump($client.admin_conversations_getCustomRetention(options))
|
72
72
|
end
|
@@ -93,10 +93,10 @@ command 'admin_conversations' do |g|
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
g.desc "This API endpoint can be used by any admin to remove a
|
97
|
-
g.long_desc %( This API endpoint can be used by any admin to remove a
|
96
|
+
g.desc "This API endpoint can be used by any admin to remove a conversation's retention policy."
|
97
|
+
g.long_desc %( This API endpoint can be used by any admin to remove a conversation's retention policy. )
|
98
98
|
g.command 'removeCustomRetention' do |c|
|
99
|
-
c.flag 'channel_id', desc: 'The
|
99
|
+
c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
|
100
100
|
c.action do |_global_options, options, _args|
|
101
101
|
puts JSON.dump($client.admin_conversations_removeCustomRetention(options))
|
102
102
|
end
|
@@ -115,13 +115,14 @@ command 'admin_conversations' do |g|
|
|
115
115
|
g.desc 'Search for public or private channels in an Enterprise organization.'
|
116
116
|
g.long_desc %( Search for public or private channels in an Enterprise organization. )
|
117
117
|
g.command 'search' do |c|
|
118
|
+
c.flag 'connected_team_ids', desc: 'Array of encoded team IDs, signifying the external orgs to search through.'
|
118
119
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
119
120
|
c.flag 'limit', desc: 'Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.'
|
120
121
|
c.flag 'query', desc: 'Name of the the channel to query by.'
|
121
122
|
c.flag 'search_channel_types', desc: '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.'
|
122
123
|
c.flag 'sort', desc: '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.'
|
123
124
|
c.flag 'sort_dir', desc: '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).'
|
124
|
-
c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the workspaces to search through.'
|
125
|
+
c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
|
125
126
|
c.action do |_global_options, options, _args|
|
126
127
|
puts JSON.dump($client.admin_conversations_search(options))
|
127
128
|
end
|
@@ -137,11 +138,11 @@ command 'admin_conversations' do |g|
|
|
137
138
|
end
|
138
139
|
end
|
139
140
|
|
140
|
-
g.desc "This API endpoint can be used by any admin to set a
|
141
|
-
g.long_desc %( This API endpoint can be used by any admin to set a
|
141
|
+
g.desc "This API endpoint can be used by any admin to set a conversation's retention policy."
|
142
|
+
g.long_desc %( This API endpoint can be used by any admin to set a conversation's retention policy. )
|
142
143
|
g.command 'setCustomRetention' do |c|
|
143
|
-
c.flag 'channel_id', desc: 'The
|
144
|
-
c.flag 'duration_days', desc: 'The message retention duration in days to set for this
|
144
|
+
c.flag 'channel_id', desc: 'The conversation to set the retention policy for.'
|
145
|
+
c.flag 'duration_days', desc: 'The message retention duration in days to set for this conversation.'
|
145
146
|
c.action do |_global_options, options, _args|
|
146
147
|
puts JSON.dump($client.admin_conversations_setCustomRetention(options))
|
147
148
|
end
|
data/bin/commands/admin_users.rb
CHANGED
@@ -39,7 +39,7 @@ command 'admin_users' do |g|
|
|
39
39
|
g.command 'list' do |c|
|
40
40
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
41
41
|
c.flag 'limit', desc: 'Limit for how many users to be retrieved per page.'
|
42
|
-
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
|
42
|
+
c.flag 'team_id', desc: 'The ID (T1234) of the workspace. The team_id is required if you use an org-level token.'
|
43
43
|
c.action do |_global_options, options, _args|
|
44
44
|
puts JSON.dump($client.admin_users_list(options))
|
45
45
|
end
|
@@ -68,7 +68,7 @@ command 'admin_users_session' do |g|
|
|
68
68
|
g.desc 'Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users.'
|
69
69
|
g.long_desc %( Configure the user-level session settings—the session duration and what happens when the client closes—for one or more users. )
|
70
70
|
g.command 'setSettings' do |c|
|
71
|
-
c.flag 'user_ids', desc: 'The list of user IDs to apply the session settings for.'
|
71
|
+
c.flag 'user_ids', desc: 'The list of up to 1,000 user IDs to apply the session settings for.'
|
72
72
|
c.flag 'desktop_app_browser_quit', desc: 'Terminate the session when the client—either the desktop app or a browser window—is closed.'
|
73
73
|
c.flag 'duration', desc: "The session duration, in seconds. The minimum value is 28800, which represents 8 hours; the max value is 315569520 or 10 years (that's a long Slack session)."
|
74
74
|
c.action do |_global_options, options, _args|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
desc 'AppsConnections methods.'
|
5
5
|
command 'apps_connections' do |g|
|
6
|
-
g.desc 'Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over
|
7
|
-
g.long_desc %( Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over
|
6
|
+
g.desc 'Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over.'
|
7
|
+
g.long_desc %( Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over. )
|
8
8
|
g.command 'open' do |c|
|
9
9
|
c.action do |_global_options, options, _args|
|
10
10
|
puts JSON.dump($client.apps_connections_open(options))
|
data/bin/commands/bookmarks.rb
CHANGED
@@ -45,6 +45,7 @@ command 'bookmarks' do |g|
|
|
45
45
|
g.command 'remove' do |c|
|
46
46
|
c.flag 'bookmark_id', desc: 'Bookmark to remove.'
|
47
47
|
c.flag 'channel_id', desc: 'Channel to remove bookmark.'
|
48
|
+
c.flag 'quip_section_id', desc: 'Quip section ID to unbookmark.'
|
48
49
|
c.action do |_global_options, options, _args|
|
49
50
|
puts JSON.dump($client.bookmarks_remove(options))
|
50
51
|
end
|