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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/{integtest.yml → integration_test.yml} +6 -5
  3. data/.github/workflows/{rubocop.yml → lint.yml} +5 -4
  4. data/.github/workflows/{danger.yml → pr_lint.yml} +8 -6
  5. data/.github/workflows/test.yml +4 -2
  6. data/.gitignore +0 -1
  7. data/.rubocop.yml +4 -0
  8. data/.rubocop_todo.yml +8 -14
  9. data/.ruby-version +1 -0
  10. data/CHANGELOG.md +14 -0
  11. data/CONTRIBUTING.md +5 -4
  12. data/Gemfile +1 -6
  13. data/README.md +60 -63
  14. data/RELEASING.md +1 -1
  15. data/UPGRADING.md +28 -0
  16. data/bin/commands/admin_audit_anomaly_allow.rb +23 -0
  17. data/bin/commands/admin_conversations.rb +12 -11
  18. data/bin/commands/admin_users.rb +1 -1
  19. data/bin/commands/admin_users_session.rb +1 -1
  20. data/bin/commands/apps_connections.rb +2 -2
  21. data/bin/commands/bookmarks.rb +1 -0
  22. data/bin/commands/chat.rb +9 -6
  23. data/bin/commands/conversations.rb +8 -6
  24. data/bin/commands/files.rb +24 -0
  25. data/bin/commands/rtm.rb +0 -15
  26. data/bin/commands/views.rb +4 -2
  27. data/bin/commands.rb +1 -0
  28. data/bin/slack +1 -1
  29. data/lib/slack/real_time/api/message.rb +3 -2
  30. data/lib/slack/real_time/api/templates/event_handler.erb +5 -1
  31. data/lib/slack/real_time/api/typing.rb +2 -1
  32. data/lib/slack/real_time/client.rb +8 -26
  33. data/lib/slack/real_time/config.rb +3 -3
  34. data/lib/slack/real_time/models/channel.rb +4 -0
  35. data/lib/slack/real_time/models/{group.rb → mpim.rb} +1 -1
  36. data/lib/slack/real_time/models.rb +2 -1
  37. data/lib/slack/real_time/stores/base.rb +25 -9
  38. data/lib/slack/real_time/stores/starter.rb +323 -309
  39. data/lib/slack/real_time/stores/store.rb +265 -198
  40. data/lib/slack/real_time/stores.rb +1 -7
  41. data/lib/slack/version.rb +1 -1
  42. data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
  43. data/lib/slack/web/api/endpoints/admin_apps.rb +2 -2
  44. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
  45. data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
  46. data/lib/slack/web/api/endpoints/admin_auth_policy.rb +7 -7
  47. data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
  48. data/lib/slack/web/api/endpoints/admin_conversations.rb +30 -28
  49. data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +6 -6
  50. data/lib/slack/web/api/endpoints/admin_emoji.rb +7 -7
  51. data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +2 -2
  52. data/lib/slack/web/api/endpoints/admin_teams.rb +2 -2
  53. data/lib/slack/web/api/endpoints/admin_teams_admins.rb +1 -1
  54. data/lib/slack/web/api/endpoints/admin_teams_owners.rb +1 -1
  55. data/lib/slack/web/api/endpoints/admin_teams_settings.rb +11 -11
  56. data/lib/slack/web/api/endpoints/admin_usergroups.rb +7 -7
  57. data/lib/slack/web/api/endpoints/admin_users.rb +16 -16
  58. data/lib/slack/web/api/endpoints/admin_users_session.rb +8 -8
  59. data/lib/slack/web/api/endpoints/apps.rb +2 -2
  60. data/lib/slack/web/api/endpoints/apps_connections.rb +1 -1
  61. data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +1 -1
  62. data/lib/slack/web/api/endpoints/apps_manifest.rb +6 -6
  63. data/lib/slack/web/api/endpoints/bookmarks.rb +10 -8
  64. data/lib/slack/web/api/endpoints/bots.rb +1 -1
  65. data/lib/slack/web/api/endpoints/calls.rb +5 -5
  66. data/lib/slack/web/api/endpoints/calls_participants.rb +4 -4
  67. data/lib/slack/web/api/endpoints/chat.rb +36 -30
  68. data/lib/slack/web/api/endpoints/conversations.rb +37 -33
  69. data/lib/slack/web/api/endpoints/dialog.rb +2 -2
  70. data/lib/slack/web/api/endpoints/dnd.rb +1 -1
  71. data/lib/slack/web/api/endpoints/files.rb +45 -8
  72. data/lib/slack/web/api/endpoints/files_comments.rb +2 -2
  73. data/lib/slack/web/api/endpoints/files_remote.rb +8 -8
  74. data/lib/slack/web/api/endpoints/migration.rb +1 -1
  75. data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
  76. data/lib/slack/web/api/endpoints/pins.rb +3 -3
  77. data/lib/slack/web/api/endpoints/reactions.rb +4 -4
  78. data/lib/slack/web/api/endpoints/reminders.rb +5 -5
  79. data/lib/slack/web/api/endpoints/rtm.rb +0 -23
  80. data/lib/slack/web/api/endpoints/search.rb +3 -3
  81. data/lib/slack/web/api/endpoints/tooling_tokens.rb +1 -1
  82. data/lib/slack/web/api/endpoints/usergroups.rb +4 -4
  83. data/lib/slack/web/api/endpoints/usergroups_users.rb +3 -3
  84. data/lib/slack/web/api/endpoints/users.rb +4 -4
  85. data/lib/slack/web/api/endpoints/users_admin.rb +2 -2
  86. data/lib/slack/web/api/endpoints/views.rb +16 -11
  87. data/lib/slack/web/api/endpoints/workflows.rb +4 -4
  88. data/lib/slack/web/api/endpoints.rb +2 -0
  89. data/lib/slack/web/api/errors.rb +56 -6
  90. data/lib/slack/web/api/mixins/conversations.id.rb +1 -1
  91. data/lib/slack/web/api/mixins/users.id.rb +1 -1
  92. data/lib/slack/web/api/mixins/users.search.rb +2 -1
  93. data/lib/slack/web/api/patches/{chat.1.patch → chat.attachments-blocks.patch} +13 -14
  94. data/lib/slack/web/api/patches/{dialog.1.open-json-support.patch → dialog.encoded-json.patch} +4 -4
  95. data/lib/slack/web/api/patches/views.view-json.patch +55 -0
  96. data/lib/slack/web/api/templates/method.erb +1 -1
  97. data/lib/slack/web/config.rb +2 -2
  98. data/lib/tasks/real_time.rake +44 -22
  99. data/lib/tasks/web.rake +9 -2
  100. data/spec/fixtures/slack/web/rtm_connect.yml +85 -1
  101. data/spec/slack/events/config_spec.rb +2 -0
  102. data/spec/slack/events/request_spec.rb +4 -0
  103. data/spec/slack/messages/formatting_spec.rb +10 -0
  104. data/spec/slack/real_time/api/message_spec.rb +1 -1
  105. data/spec/slack/real_time/api/ping_spec.rb +1 -1
  106. data/spec/slack/real_time/api/typing_spec.rb +1 -1
  107. data/spec/slack/real_time/client_spec.rb +73 -111
  108. data/spec/slack/real_time/event_handlers/bot_spec.rb +19 -17
  109. data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +1 -1
  110. data/spec/slack/real_time/event_handlers/im_spec.rb +28 -25
  111. data/spec/slack/real_time/event_handlers/{group_spec.rb → private_channel_spec.rb} +35 -27
  112. data/spec/slack/real_time/event_handlers/{channel_spec.rb → public_channel_spec.rb} +24 -20
  113. data/spec/slack/real_time/event_handlers/team_spec.rb +7 -8
  114. data/spec/slack/real_time/event_handlers/user_spec.rb +6 -5
  115. data/spec/slack/real_time/stores/store_spec.rb +50 -0
  116. data/spec/slack/slack_spec.rb +1 -0
  117. data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +8 -0
  118. data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +17 -1
  119. data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +2 -0
  120. data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +13 -4
  121. data/spec/slack/web/api/endpoints/files_spec.rb +13 -0
  122. data/spec/slack/web/api/mixins/conversations_spec.rb +2 -0
  123. data/spec/slack/web/api/mixins/users_spec.rb +2 -0
  124. data/spec/slack/web/api/pagination/cursor_spec.rb +4 -0
  125. data/spec/slack/web/client_spec.rb +14 -4
  126. data/spec/support/real_time/loaded_client.rb +120 -0
  127. metadata +18 -35
  128. data/bin/commands/admin_conversations_whitelist.rb +0 -37
  129. data/bin/commands/apps_permissions.rb +0 -23
  130. data/bin/commands/apps_permissions_resources.rb +0 -15
  131. data/bin/commands/apps_permissions_scopes.rb +0 -13
  132. data/bin/commands/apps_permissions_users.rb +0 -26
  133. data/bin/commands/channels.rb +0 -23
  134. data/bin/commands/groups.rb +0 -14
  135. data/bin/commands/im.rb +0 -6
  136. data/bin/commands/mpim.rb +0 -6
  137. data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +0 -64
  138. data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -36
  139. data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +0 -31
  140. data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +0 -21
  141. data/lib/slack/web/api/endpoints/apps_permissions_users.rb +0 -50
  142. data/lib/slack/web/api/endpoints/channels.rb +0 -25
  143. data/lib/slack/web/api/endpoints/groups.rb +0 -13
  144. data/lib/slack/web/api/endpoints/im.rb +0 -13
  145. data/lib/slack/web/api/endpoints/mpim.rb +0 -13
  146. data/lib/slack/web/api/endpoints/presence.rb +0 -23
  147. data/lib/slack/web/api/patches/views.1.view-json.patch +0 -40
  148. data/lib/slack/web/api/patches/views.1.views-published.patch +0 -16
  149. data/spec/fixtures/slack/web/rtm_start.yml +0 -815
  150. data/spec/slack/real_time/rtm_start_spec.rb +0 -14
  151. 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: 243d21fccb29fbddcaac69727c60a1a947e5b7e3a53136f96953099539141ae6
4
- data.tar.gz: dcfeabe229a37247b94e4e030a5abf675792835b061a7917afdfcbd9827f4228
3
+ metadata.gz: 491089e27b5eab6a2d3a2834956a830ccbad387deb0c9fb848db739966b61ed8
4
+ data.tar.gz: 53a923e845941a2efea21daa5031c73011f55ac580e96a3694f88f3baa28f638
5
5
  SHA512:
6
- metadata.gz: 5891098e3cb0bb938241157c779c0a8cdac0e18edac21d0251dd80949c5d70f21cc3429773138fc0092e29937f4f525d51f9975a4aa0f059a7cfbcb78a3c3723
7
- data.tar.gz: 05a88513dad67cf2dc50dd2580a50588d99413801498fc959c495234955c419b5a861c86b8c98bef49ea50dfabb346aa26356c406a521f084555cece9249d364
6
+ metadata.gz: 185c57136e5100100c4f9fc2dbeb82de7a4f5e6fe4bcfad9c9a90c6c68a79c48ddbe50b3a9bebf7aeb211580933a8e5de6678359583a88aa39f236ea24dd2d10
7
+ data.tar.gz: bf2c43b27722ad5d7eabeabd1596437e662089ac1a4bc72e534719a6092c43b7e629a219da9e2af26f3795755c2acc6cff1dd378d49b1e408bde61a293196bf6
@@ -1,19 +1,21 @@
1
1
  name: Integration Tests
2
- on: [push]
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.1, concurrency: async-websocket }
9
+ - { ruby: 2.7, concurrency: async-websocket }
10
10
  name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
11
11
  steps:
12
- - uses: actions/checkout@v2
13
- - name: Install Ruby
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: Rubocop
1
+ name: Lint
2
2
  on: [push, pull_request]
3
3
  jobs:
4
- lint:
4
+ rubocop:
5
+ name: RuboCop
5
6
  runs-on: ubuntu-latest
6
7
  steps:
7
- - uses: actions/checkout@v2
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 Linter
2
- on: [pull_request]
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
- - uses: actions/checkout@v2
10
+ - name: Checkout
11
+ uses: actions/checkout@v3
10
12
  with:
11
13
  fetch-depth: 0
12
- - uses: ruby/setup-ruby@v1
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
- # the personal token is public, this is ok, base64 encode to avoid tripping Github
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
@@ -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
- - uses: actions/checkout@v2
18
- - name: Install Ruby
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
@@ -4,6 +4,5 @@
4
4
  .env
5
5
  .idea
6
6
  .rspec_status
7
- .ruby-version
8
7
  Gemfile.lock
9
8
  pkg
data/.rubocop.yml CHANGED
@@ -35,6 +35,10 @@ Style/Documentation:
35
35
  Style/ModuleFunction:
36
36
  Enabled: false
37
37
 
38
+ Style/NumericLiterals:
39
+ Exclude:
40
+ - 'spec/**/*'
41
+
38
42
  RSpec/InstanceVariable:
39
43
  Enabled: false
40
44
 
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-05-04 06:11:49 UTC using RuboCop version 1.26.1.
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: 77
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: 127
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: 65
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: 96
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: 50
134
+ # Offense count: 44
141
135
  RSpec/NestedGroups:
142
136
  Max: 6
143
137
 
144
- # Offense count: 6
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: 12
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/hi_real_time](examples/hi_real_time/hi.rb), open a terminal, cd into _examples/hi_real_time_, run `bundle install`, followed by `SLACK_API_TOKEN=<your API token> bundle exec ruby hi.rb`.
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 ingored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
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.1.patch
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.1.patch`), copying code into the new files.
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
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
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::Stores::Store](#slackrealtimestoresstore)
42
- - [Slack::RealTime::Stores::Starter](#slackrealtimestoresstarter)
43
- - [Configuring Slack::RealTime::Client](#configuring-slackrealtimeclient)
44
- - [Caveats](#caveats)
45
- - [websocket_ping](#websocket_ping)
46
- - [Connection Methods](#connection-methods)
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, 1.1.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
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
- By default, the RealTime client exposes and maintains a local store with the properties of [rtm.start](https://api.slack.com/methods/rtm.start) upon a successful connection.
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
- store_class | Local store class name, default is an in-memory `Slack::RealTime::Stores::Store`.
424
- start_method | Optional start method, either `:rtm_start` or `:rtm_connect`.
425
- start_options | Options to pass into `rtm.start` or `rtm.connect`, default is `{ request: { timeout: 180 } }`.
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.start](https://api.slack.com/methods/rtm.start) or [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.
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/hi_real_time](examples/hi_real_time/hi.rb).
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
- ![](examples/hi_real_time/hi.gif)
408
+ ##### Caveats
433
409
 
434
- #### Caveats
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
- ### Connection Methods
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
- 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.
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.start_method = :rtm_start
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 channel's retention policy."
67
- g.long_desc %( This API endpoint can be used by any admin to get a channel's retention policy. )
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 channel to get the retention policy for.'
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 channel's retention policy."
97
- g.long_desc %( This API endpoint can be used by any admin to remove a channel's retention policy. )
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 channel to set the retention policy for.'
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 channel's retention policy."
141
- g.long_desc %( This API endpoint can be used by any admin to set a channel's retention policy. )
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 channel to set the retention policy for.'
144
- c.flag 'duration_days', desc: 'The message retention duration in days to set for this channel.'
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
@@ -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))
@@ -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