slack-ruby-client 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +3 -10
- data/.rubocop_todo.yml +45 -67
- data/CHANGELOG.md +7 -0
- data/Gemfile +0 -9
- data/LICENSE.md +1 -1
- data/README.md +16 -219
- data/Rakefile +0 -1
- data/UPGRADING.md +4 -0
- data/bin/commands/admin_analytics.rb +1 -1
- data/bin/commands/admin_apps.rb +4 -4
- data/bin/commands/admin_apps_activities.rb +7 -7
- data/bin/commands/admin_apps_approved.rb +4 -4
- data/bin/commands/admin_apps_config.rb +3 -1
- data/bin/commands/admin_apps_requests.rb +5 -5
- data/bin/commands/admin_apps_restricted.rb +4 -4
- data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
- data/bin/commands/admin_auth_policy.rb +5 -5
- data/bin/commands/admin_barriers.rb +3 -3
- data/bin/commands/admin_conversations.rb +15 -15
- data/bin/commands/admin_conversations_ekm.rb +2 -2
- data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
- data/bin/commands/admin_emoji.rb +5 -5
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_inviteRequests.rb +3 -3
- data/bin/commands/admin_inviteRequests_approved.rb +1 -1
- data/bin/commands/admin_inviteRequests_denied.rb +1 -1
- data/bin/commands/admin_roles.rb +3 -3
- data/bin/commands/admin_teams.rb +3 -3
- data/bin/commands/admin_teams_admins.rb +2 -2
- data/bin/commands/admin_teams_owners.rb +2 -2
- data/bin/commands/admin_teams_settings.rb +5 -5
- data/bin/commands/admin_usergroups.rb +4 -4
- data/bin/commands/admin_users.rb +12 -11
- data/bin/commands/admin_users_session.rb +6 -5
- data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
- data/bin/commands/admin_workflows.rb +6 -6
- data/bin/commands/admin_workflows_collaborators.rb +2 -2
- data/bin/commands/apps_activities.rb +7 -7
- data/bin/commands/apps_auth_external.rb +1 -1
- data/bin/commands/apps_datastore.rb +12 -12
- data/bin/commands/apps_event_authorizations.rb +3 -3
- data/bin/commands/apps_manifest.rb +1 -1
- data/bin/commands/assistant_search.rb +18 -2
- data/bin/commands/assistant_threads.rb +2 -2
- data/bin/commands/auth.rb +1 -1
- data/bin/commands/auth_teams.rb +1 -1
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/calls.rb +5 -5
- data/bin/commands/canvases.rb +2 -2
- data/bin/commands/canvases_access.rb +1 -1
- data/bin/commands/chat.rb +23 -24
- data/bin/commands/conversations.rb +8 -8
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
- data/bin/commands/conversations_requestSharedInvite.rb +4 -4
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +5 -5
- data/bin/commands/files_remote.rb +1 -1
- data/bin/commands/functions.rb +1 -1
- data/bin/commands/functions_distributions_permissions.rb +15 -15
- data/bin/commands/functions_workflows_steps.rb +2 -2
- data/bin/commands/functions_workflows_steps_responses.rb +2 -2
- data/bin/commands/migration.rb +2 -2
- data/bin/commands/oauth_v2.rb +1 -1
- data/bin/commands/openid_connect.rb +1 -1
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +2 -2
- data/bin/commands/rtm.rb +15 -0
- data/bin/commands/search.rb +4 -4
- data/bin/commands/slackLists.rb +37 -0
- data/bin/commands/slackLists_access.rb +34 -0
- data/bin/commands/slackLists_download.rb +31 -0
- data/bin/commands/slackLists_items.rb +76 -0
- data/bin/commands/team.rb +1 -1
- data/bin/commands/team_externalTeams.rb +4 -4
- data/bin/commands/usergroups.rb +10 -10
- data/bin/commands/usergroups_users.rb +5 -5
- data/bin/commands/users.rb +1 -1
- data/bin/commands/users_discoverableContacts.rb +1 -1
- data/bin/commands/views.rb +4 -4
- data/bin/commands/workflows_featured.rb +50 -0
- data/bin/commands/workflows_triggers_permissions.rb +7 -7
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
- data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
- data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
- data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
- data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
- data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
- data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
- data/lib/slack/web/api/endpoints/calls.rb +10 -10
- data/lib/slack/web/api/endpoints/canvases.rb +4 -4
- data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
- data/lib/slack/web/api/endpoints/chat.rb +53 -55
- data/lib/slack/web/api/endpoints/conversations.rb +16 -16
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
- data/lib/slack/web/api/endpoints/dnd.rb +2 -2
- data/lib/slack/web/api/endpoints/files.rb +11 -11
- data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
- data/lib/slack/web/api/endpoints/functions.rb +3 -3
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
- 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/openid_connect.rb +2 -2
- data/lib/slack/web/api/endpoints/reactions.rb +6 -6
- data/lib/slack/web/api/endpoints/reminders.rb +4 -4
- data/lib/slack/web/api/endpoints/rtm.rb +23 -0
- data/lib/slack/web/api/endpoints/search.rb +8 -8
- data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
- data/lib/slack/web/api/endpoints/team.rb +3 -3
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
- data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
- data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
- data/lib/slack/web/api/endpoints/users.rb +2 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
- data/lib/slack/web/api/endpoints/views.rb +9 -9
- data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
- data/lib/slack/web/api/endpoints.rb +10 -2
- data/lib/slack/web/api/errors.rb +88 -46
- data/lib/slack/web/faraday/response/raise_error.rb +20 -2
- data/lib/slack-ruby-client.rb +0 -12
- data/lib/tasks/update.rake +0 -1
- data/lib/tasks/web.rake +0 -4
- metadata +12 -35
- data/.github/workflows/integration_test.yml +0 -45
- data/bin/commands/workflows.rb +0 -44
- data/examples/hi_real_time_and_web/Gemfile +0 -6
- data/examples/hi_real_time_and_web/hi.gif +0 -0
- data/examples/hi_real_time_and_web/hi.rb +0 -28
- data/examples/hi_real_time_async_async/Gemfile +0 -7
- data/examples/hi_real_time_async_async/Procfile +0 -2
- data/examples/hi_real_time_async_async/hi.rb +0 -41
- data/lib/slack/real_time/api/message.rb +0 -23
- data/lib/slack/real_time/api/message_id.rb +0 -15
- data/lib/slack/real_time/api/ping.rb +0 -19
- data/lib/slack/real_time/api/schema/event.json +0 -23
- data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
- data/lib/slack/real_time/api/typing.rb +0 -20
- data/lib/slack/real_time/client.rb +0 -271
- data/lib/slack/real_time/concurrency/async.rb +0 -142
- data/lib/slack/real_time/concurrency.rb +0 -8
- data/lib/slack/real_time/config.rb +0 -62
- data/lib/slack/real_time/models/base.rb +0 -11
- data/lib/slack/real_time/models/bot.rb +0 -9
- data/lib/slack/real_time/models/channel.rb +0 -13
- data/lib/slack/real_time/models/im.rb +0 -9
- data/lib/slack/real_time/models/mpim.rb +0 -9
- data/lib/slack/real_time/models/team.rb +0 -9
- data/lib/slack/real_time/models/user.rb +0 -9
- data/lib/slack/real_time/models.rb +0 -9
- data/lib/slack/real_time/socket.rb +0 -118
- data/lib/slack/real_time/stores/base.rb +0 -47
- data/lib/slack/real_time/stores/starter.rb +0 -449
- data/lib/slack/real_time/stores/store.rb +0 -624
- data/lib/slack/real_time/stores.rb +0 -5
- data/lib/slack/web/api/endpoints/workflows.rb +0 -63
- data/lib/tasks/real_time.rake +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269481f640bde0fb03347512f5ca656fb1b72553d18eb7d3bd00e816ff0d6ce9
|
4
|
+
data.tar.gz: 11f927246113d6b2e2392fe6d39d6ea72b09f83eb32a8154057cb3cce8b95720
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e9761d68a675cfbdf024b2ce2384e905e6cc41e7519a6f8ace72fad29dbbb28456f66759501c1c17b3a3d6e764446c77b4fa4293f02b4dd4fc2321c0aa27349
|
7
|
+
data.tar.gz: e821106e4af2fa24b55b239b5d95192fa7df916fb333065b6855de289390e2fece6469589dca5bdc11d128a343ff97494ed5ea0dd643cb2a591d0a57e8862d30
|
data/.github/workflows/test.yml
CHANGED
@@ -7,7 +7,6 @@ jobs:
|
|
7
7
|
matrix:
|
8
8
|
entry:
|
9
9
|
- { ruby: "2.7" }
|
10
|
-
- { ruby: "2.7", concurrency: async-websocket }
|
11
10
|
- { ruby: "3.0" }
|
12
11
|
- { ruby: "3.1" }
|
13
12
|
- { ruby: "3.2" }
|
@@ -15,16 +14,10 @@ jobs:
|
|
15
14
|
- { ruby: "3.4" }
|
16
15
|
- { ruby: ruby-head, ignore: true }
|
17
16
|
- { ruby: jruby-head, ignore: true }
|
18
|
-
name: test (ruby=${{ matrix.entry.ruby }}
|
17
|
+
name: test (ruby=${{ matrix.entry.ruby }})
|
19
18
|
steps:
|
20
19
|
- name: Checkout
|
21
20
|
uses: actions/checkout@v4
|
22
|
-
- name: Set Concurrency
|
23
|
-
run: |
|
24
|
-
if [[ ! -z "${{ matrix.entry.concurrency }}" ]]; then
|
25
|
-
echo "Setting concurrency to ${{ matrix.entry.concurrency }}."
|
26
|
-
echo "CONCURRENCY=${{ matrix.entry.concurrency }}" >> $GITHUB_ENV
|
27
|
-
fi
|
28
21
|
- name: Set up Ruby
|
29
22
|
uses: ruby/setup-ruby@v1
|
30
23
|
with:
|
@@ -41,7 +34,7 @@ jobs:
|
|
41
34
|
with:
|
42
35
|
parallel: true
|
43
36
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
44
|
-
flag-name: run-${{ matrix.entry.ruby }}
|
37
|
+
flag-name: run-${{ matrix.entry.ruby }}
|
45
38
|
allow-empty: ${{ matrix.entry.ignore || false }}
|
46
39
|
|
47
40
|
finish:
|
@@ -53,4 +46,4 @@ jobs:
|
|
53
46
|
uses: coverallsapp/github-action@v2
|
54
47
|
with:
|
55
48
|
parallel-finished: true
|
56
|
-
carryforward: 'run-2.7,run-2.7-async-websocket,run-3.0,run-3.1,run-3.2,run-3.3'
|
49
|
+
carryforward: 'run-2.7,run-2.7-async-websocket,run-3.0,run-3.1,run-3.2,run-3.3,run-3.4'
|
data/.rubocop_todo.yml
CHANGED
@@ -1,37 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-09-21 17:08:14 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
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 1
|
10
|
-
# Configuration parameters: AllowedMethods.
|
11
|
-
# AllowedMethods: enums
|
12
|
-
Lint/ConstantDefinitionInBlock:
|
13
|
-
Exclude:
|
14
|
-
- 'lib/tasks/real_time.rake'
|
15
|
-
|
16
|
-
# Offense count: 2
|
17
|
-
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
18
|
-
Lint/EmptyBlock:
|
19
|
-
Exclude:
|
20
|
-
- 'spec/slack/real_time/concurrency/clients/async_spec.rb'
|
21
|
-
- 'spec/support/real_time/concurrency/mock.rb'
|
22
|
-
|
23
|
-
# Offense count: 1
|
24
|
-
# Configuration parameters: AllowComments.
|
25
|
-
Lint/EmptyClass:
|
26
|
-
Exclude:
|
27
|
-
- 'spec/support/real_time/concurrency/mock.rb'
|
28
|
-
|
29
|
-
# Offense count: 2
|
30
|
-
Lint/MissingSuper:
|
31
|
-
Exclude:
|
32
|
-
- 'lib/slack/real_time/stores/starter.rb'
|
33
|
-
- 'lib/slack/real_time/stores/store.rb'
|
34
|
-
|
35
9
|
# Offense count: 1
|
36
10
|
# This cop supports unsafe auto-correction (--auto-correct-all).
|
37
11
|
Lint/NonDeterministicRequireOrder:
|
@@ -44,17 +18,17 @@ Lint/RedundantCopDisableDirective:
|
|
44
18
|
Exclude:
|
45
19
|
- 'lib/slack-ruby-client.rb'
|
46
20
|
|
47
|
-
# Offense count:
|
21
|
+
# Offense count: 7
|
48
22
|
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
49
23
|
Metrics/AbcSize:
|
50
24
|
Max: 67
|
51
25
|
|
52
|
-
# Offense count:
|
26
|
+
# Offense count: 4
|
53
27
|
# Configuration parameters: IgnoredMethods.
|
54
28
|
Metrics/CyclomaticComplexity:
|
55
29
|
Max: 15
|
56
30
|
|
57
|
-
# Offense count:
|
31
|
+
# Offense count: 10
|
58
32
|
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
59
33
|
Metrics/MethodLength:
|
60
34
|
Max: 45
|
@@ -64,7 +38,7 @@ Metrics/MethodLength:
|
|
64
38
|
Metrics/ParameterLists:
|
65
39
|
Max: 6
|
66
40
|
|
67
|
-
# Offense count:
|
41
|
+
# Offense count: 2
|
68
42
|
# Configuration parameters: IgnoredMethods.
|
69
43
|
Metrics/PerceivedComplexity:
|
70
44
|
Max: 17
|
@@ -88,7 +62,7 @@ Performance/RegexpMatch:
|
|
88
62
|
Exclude:
|
89
63
|
- 'lib/tasks/web.rake'
|
90
64
|
|
91
|
-
# Offense count:
|
65
|
+
# Offense count: 2
|
92
66
|
# This cop supports safe auto-correction (--auto-correct).
|
93
67
|
Performance/StringInclude:
|
94
68
|
Exclude:
|
@@ -101,30 +75,55 @@ RSpec/ContextMethod:
|
|
101
75
|
- 'spec/slack/messages/formatting_spec.rb'
|
102
76
|
- 'spec/slack/web/api/mixins/users_spec.rb'
|
103
77
|
|
104
|
-
# Offense count:
|
78
|
+
# Offense count: 59
|
105
79
|
# Configuration parameters: Prefixes.
|
106
80
|
# Prefixes: when, with, without
|
107
81
|
RSpec/ContextWording:
|
108
|
-
|
82
|
+
Exclude:
|
83
|
+
- 'spec/slack/events/config_spec.rb'
|
84
|
+
- 'spec/slack/events/request_spec.rb'
|
85
|
+
- 'spec/slack/messages/formatting_spec.rb'
|
86
|
+
- 'spec/slack/slack_spec.rb'
|
87
|
+
- 'spec/slack/web/api/endpoints/custom/auth_spec.rb'
|
88
|
+
- 'spec/slack/web/api/endpoints/custom/chat_spec.rb'
|
89
|
+
- 'spec/slack/web/api/endpoints/custom/conversations_spec.rb'
|
90
|
+
- 'spec/slack/web/api/endpoints/custom/dialog_spec.rb'
|
91
|
+
- 'spec/slack/web/api/endpoints/custom/users_spec.rb'
|
92
|
+
- 'spec/slack/web/api/mixins/conversations_list_spec.rb'
|
93
|
+
- 'spec/slack/web/api/mixins/users_spec.rb'
|
94
|
+
- 'spec/slack/web/api/options_spec.rb'
|
95
|
+
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
96
|
+
- 'spec/slack/web/client_spec.rb'
|
97
|
+
- 'spec/slack/web/faraday/request_spec.rb'
|
109
98
|
|
110
|
-
# Offense count:
|
99
|
+
# Offense count: 35
|
111
100
|
# Configuration parameters: CountAsOne.
|
112
101
|
RSpec/ExampleLength:
|
113
|
-
Max:
|
102
|
+
Max: 17
|
114
103
|
|
115
|
-
# Offense count:
|
104
|
+
# Offense count: 10
|
116
105
|
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
117
106
|
# Include: **/*_spec*rb*, **/spec/**/*
|
118
107
|
RSpec/FilePath:
|
119
|
-
|
108
|
+
Exclude:
|
109
|
+
- 'spec/slack/version_spec.rb'
|
110
|
+
- 'spec/slack/web/api/endpoints/custom/auth_spec.rb'
|
111
|
+
- 'spec/slack/web/api/endpoints/custom/chat_spec.rb'
|
112
|
+
- 'spec/slack/web/api/endpoints/custom/conversations_spec.rb'
|
113
|
+
- 'spec/slack/web/api/endpoints/custom/dialog_spec.rb'
|
114
|
+
- 'spec/slack/web/api/endpoints/custom/files_spec.rb'
|
115
|
+
- 'spec/slack/web/api/endpoints/custom/users_spec.rb'
|
116
|
+
- 'spec/slack/web/api/endpoints/custom/views_spec.rb'
|
117
|
+
- 'spec/slack/web/api/mixins/conversations_list_spec.rb'
|
118
|
+
- 'spec/slack/web/api/options_spec.rb'
|
120
119
|
|
121
|
-
# Offense count:
|
120
|
+
# Offense count: 66
|
122
121
|
# Configuration parameters: .
|
123
122
|
# SupportedStyles: have_received, receive
|
124
123
|
RSpec/MessageSpies:
|
125
124
|
EnforcedStyle: receive
|
126
125
|
|
127
|
-
# Offense count:
|
126
|
+
# Offense count: 65
|
128
127
|
RSpec/MultipleExpectations:
|
129
128
|
Max: 5
|
130
129
|
|
@@ -139,15 +138,13 @@ RSpec/NamedSubject:
|
|
139
138
|
Exclude:
|
140
139
|
- 'spec/slack/web/api/mixins/conversations_list_spec.rb'
|
141
140
|
|
142
|
-
# Offense count:
|
141
|
+
# Offense count: 26
|
143
142
|
RSpec/NestedGroups:
|
144
|
-
Max:
|
143
|
+
Max: 5
|
145
144
|
|
146
|
-
# Offense count:
|
145
|
+
# Offense count: 3
|
147
146
|
RSpec/StubbedMock:
|
148
147
|
Exclude:
|
149
|
-
- 'spec/slack/real_time/client_spec.rb'
|
150
|
-
- 'spec/slack/real_time/event_handlers/event_handlers_spec.rb'
|
151
148
|
- 'spec/slack/web/api/endpoints/custom/conversations_spec.rb'
|
152
149
|
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
153
150
|
- 'spec/slack/web/client_spec.rb'
|
@@ -165,14 +162,12 @@ RSpec/SubjectStub:
|
|
165
162
|
RSpec/VerifiedDoubleReference:
|
166
163
|
EnforcedStyle: string
|
167
164
|
|
168
|
-
# Offense count:
|
165
|
+
# Offense count: 2
|
169
166
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
170
167
|
RSpec/VerifiedDoubles:
|
171
168
|
Exclude:
|
172
169
|
- 'spec/slack/events/request_spec.rb'
|
173
|
-
- 'spec/slack/real_time/client_spec.rb'
|
174
170
|
- 'spec/slack/web/faraday/response/raise_error_spec.rb'
|
175
|
-
- 'spec/support/real_time/connected_client.rb'
|
176
171
|
|
177
172
|
# Offense count: 1
|
178
173
|
# This cop supports safe auto-correction (--auto-correct).
|
@@ -180,26 +175,17 @@ Rake/Desc:
|
|
180
175
|
Exclude:
|
181
176
|
- 'lib/tasks/git.rake'
|
182
177
|
|
183
|
-
# Offense count: 1
|
184
|
-
# Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
|
185
|
-
# SupportedStyles: inline, group
|
186
|
-
Style/AccessModifierDeclarations:
|
187
|
-
Exclude:
|
188
|
-
- 'lib/slack/real_time/client.rb'
|
189
|
-
|
190
178
|
# Offense count: 4
|
191
179
|
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
192
180
|
# SupportedStyles: annotated, template, unannotated
|
193
181
|
Style/FormatStringToken:
|
194
182
|
EnforcedStyle: unannotated
|
195
183
|
|
196
|
-
# Offense count:
|
184
|
+
# Offense count: 2
|
197
185
|
# This cop supports safe auto-correction (--auto-correct).
|
198
186
|
Style/GlobalStdStream:
|
199
187
|
Exclude:
|
200
188
|
- 'lib/slack/logger.rb'
|
201
|
-
- 'lib/tasks/real_time.rake'
|
202
|
-
- 'spec/integration/integration_spec.rb'
|
203
189
|
- 'spec/slack/web/client_spec.rb'
|
204
190
|
|
205
191
|
# Offense count: 1
|
@@ -219,19 +205,11 @@ Style/MultilineTernaryOperator:
|
|
219
205
|
Exclude:
|
220
206
|
- 'spec/support/vcr.rb'
|
221
207
|
|
222
|
-
# Offense count:
|
208
|
+
# Offense count: 2
|
223
209
|
Style/OpenStructUse:
|
224
210
|
Exclude:
|
225
211
|
- 'spec/slack/web/api/endpoints/custom/chat_spec.rb'
|
226
212
|
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
227
|
-
- 'spec/slack/web/faraday/response/raise_error_spec.rb'
|
228
|
-
|
229
|
-
# Offense count: 1
|
230
|
-
# Configuration parameters: AllowedMethods.
|
231
|
-
# AllowedMethods: respond_to_missing?
|
232
|
-
Style/OptionalBooleanParameter:
|
233
|
-
Exclude:
|
234
|
-
- 'spec/support/queue_with_timeout.rb'
|
235
213
|
|
236
214
|
# Offense count: 1
|
237
215
|
# This cop supports safe auto-correction (--auto-correct).
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
### 3.0.0 (2025/09/22)
|
2
|
+
|
3
|
+
* [#573](https://github.com/slack-ruby/slack-ruby-client/pull/573): Removed support for RTM APIs - [@dblock](https://github.com/dblock).
|
4
|
+
* [#568](https://github.com/slack-ruby/slack-ruby-client/pull/568): Redact Authorization header in response stored in the error - [@levenleven](https://github.com/levenleven).
|
5
|
+
* [#558](https://github.com/slack-ruby/slack-ruby-client/pull/558): Update API from [slack-api-ref@c408935](https://github.com/slack-ruby/slack-api-ref/commit/c408935) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
6
|
+
* [#571](https://github.com/slack-ruby/slack-ruby-client/pull/571): Update API from [slack-api-ref@e1a2c4d](https://github.com/slack-ruby/slack-api-ref/commit/e1a2c4d) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
7
|
+
|
1
8
|
### 2.7.0 (2025/07/20)
|
2
9
|
|
3
10
|
* [#554](https://github.com/slack-ruby/slack-ruby-client/pull/557): Require Faraday >= 2.0.1 - [@anrichvs](https://github.com/AnrichVS).
|
data/Gemfile
CHANGED
@@ -3,15 +3,6 @@ source 'http://rubygems.org'
|
|
3
3
|
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
if ENV.key?('CONCURRENCY')
|
7
|
-
case ENV['CONCURRENCY']
|
8
|
-
when 'async-websocket'
|
9
|
-
gem 'async-websocket', '~> 0.8.0', require: false
|
10
|
-
else
|
11
|
-
gem ENV['CONCURRENCY'], require: false
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
6
|
group :test do
|
16
7
|
gem 'activesupport'
|
17
8
|
gem 'base64'
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2015-
|
3
|
+
Copyright (c) 2015-2025 Daniel Doubrovkine, Artsy and Contributors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -2,11 +2,10 @@ Slack Ruby Client
|
|
2
2
|
=================
|
3
3
|
|
4
4
|
[](http://badge.fury.io/rb/slack-ruby-client)
|
5
|
-
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/integration_test.yml)
|
6
5
|
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/test.yml)
|
7
6
|
[](https://coveralls.io/github/slack-ruby/slack-ruby-client?branch=master)
|
8
7
|
|
9
|
-
A Ruby client for the Slack [Web](https://api.slack.com/web)
|
8
|
+
A Ruby client for the Slack [Web](https://api.slack.com/web) and [Events](https://api.slack.com/events-api) APIs. Comes with a handy command-line client, too. If you are not familiar with these concepts, you might want to watch [this video](http://code.dblock.org/2016/03/11/your-first-slack-bot-service-video.html).
|
10
9
|
|
11
10
|

|
12
11
|
|
@@ -38,16 +37,6 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
38
37
|
- [Slack Errors](#slack-errors)
|
39
38
|
- [Rate Limiting](#rate-limiting)
|
40
39
|
- [Other Errors](#other-errors)
|
41
|
-
- [RealTime Client](#realtime-client)
|
42
|
-
- [Configuring Slack::RealTime::Client](#configuring-slackrealtimeclient)
|
43
|
-
- [Caveats](#caveats)
|
44
|
-
- [websocket_ping](#websocket_ping)
|
45
|
-
- [RealTime Store](#realtime-store)
|
46
|
-
- [Slack::RealTime::Stores::Starter](#slackrealtimestoresstarter)
|
47
|
-
- [Slack::RealTime::Stores::Store](#slackrealtimestoresstore)
|
48
|
-
- [Combining RealTime and Web Clients](#combining-realtime-and-web-clients)
|
49
|
-
- [Concurrency](#concurrency)
|
50
|
-
- [Async](#async)
|
51
40
|
- [Events API](#events-api)
|
52
41
|
- [Configuring Slack::Events](#configuring-slackevents)
|
53
42
|
- [Verifying the Request Signature](#verifying-the-request-signature)
|
@@ -67,7 +56,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
67
56
|
- [Send a Message](#send-a-message)
|
68
57
|
- [Get Channel Info](#get-channel-info-1)
|
69
58
|
- [List Users](#list-users)
|
70
|
-
- [Enterprise Support](#enterprise-support)
|
59
|
+
- [Sponsorship and Enterprise Support](#sponsorship-and-enterprise-support)
|
71
60
|
- [History](#history)
|
72
61
|
- [Security](#security)
|
73
62
|
- [Contributing](#contributing)
|
@@ -75,13 +64,13 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
75
64
|
|
76
65
|
## Useful to Me?
|
77
66
|
|
78
|
-
* This library lets you send messages to Slack via the Web API
|
67
|
+
* This library lets you send messages to Slack via the Web API and facilitates integration with the Events API.
|
79
68
|
* To write a complete bot for Slack you need more than this library, and it's much easier to start with [slack-ruby-bot-server-events](https://github.com/slack-ruby/slack-ruby-bot-server-events).
|
80
69
|
* To respond to slash commands, interactive components, or events at the lowest level, implement a web application using your favorite web framework, and use this library to call the Slack Web API, and to verify that events are coming from Slack.
|
81
70
|
|
82
71
|
## Stable Release
|
83
72
|
|
84
|
-
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, v3.0.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
85
74
|
|
86
75
|
## Installation
|
87
76
|
|
@@ -91,12 +80,6 @@ Add to Gemfile.
|
|
91
80
|
gem 'slack-ruby-client'
|
92
81
|
```
|
93
82
|
|
94
|
-
If you're going to be using the RealTime client, add `async-websocket`. See below for more information about concurrency.
|
95
|
-
|
96
|
-
```
|
97
|
-
gem 'async-websocket', '~> 0.8.0'
|
98
|
-
```
|
99
|
-
|
100
83
|
Run `bundle install`.
|
101
84
|
|
102
85
|
## Usage
|
@@ -285,12 +268,12 @@ You can configure the Web client either globally or via the initializer.
|
|
285
268
|
|
286
269
|
```ruby
|
287
270
|
Slack::Web::Client.configure do |config|
|
288
|
-
config.user_agent = 'Slack Ruby Client/
|
271
|
+
config.user_agent = 'Slack Ruby Client/3.0'
|
289
272
|
end
|
290
273
|
```
|
291
274
|
|
292
275
|
```ruby
|
293
|
-
client = Slack::Web::Client.new(user_agent: 'Slack Ruby Client/
|
276
|
+
client = Slack::Web::Client.new(user_agent: 'Slack Ruby Client/3.0')
|
294
277
|
```
|
295
278
|
|
296
279
|
The following settings are supported.
|
@@ -318,7 +301,7 @@ You can also pass request options, including `timeout` and `open_timeout` into i
|
|
318
301
|
client.conversations_list(request: { timeout: 180 })
|
319
302
|
```
|
320
303
|
|
321
|
-
You can
|
304
|
+
You can control what proxy options are used by modifying the `http_proxy` environment variable per [Net::HTTP's documentation](https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#class-Net::HTTP-label-Proxies).
|
322
305
|
|
323
306
|
Note that Docker on OSX seems to incorrectly set the proxy, causing `Faraday::ConnectionFailed, ERROR -- : Failed to open TCP connection to : (getaddrinfo: Name or service not known)`. You might need to manually unset `http_proxy` in that case, eg. `http_proxy="" bundle exec ruby ./my_bot.rb`.
|
324
307
|
|
@@ -402,194 +385,6 @@ Specifically `Slack::Web::Api::Errors::ParsingError` will be raised on non-json
|
|
402
385
|
|
403
386
|
In any other case, a `Faraday::ClientError` will be raised.
|
404
387
|
|
405
|
-
### RealTime Client
|
406
|
-
|
407
|
-
The Real Time Messaging API is a WebSocket-based API that allows you to receive events from Slack in real time and send messages as user.
|
408
|
-
|
409
|
-
```ruby
|
410
|
-
client = Slack::RealTime::Client.new
|
411
|
-
|
412
|
-
client.on :hello do
|
413
|
-
puts "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
|
414
|
-
end
|
415
|
-
|
416
|
-
client.on :message do |data|
|
417
|
-
case data.text
|
418
|
-
when 'bot hi' then
|
419
|
-
client.message(channel: data.channel, text: "Hi <@#{data.user}>!")
|
420
|
-
when /^bot/ then
|
421
|
-
client.message(channel: data.channel, text: "Sorry <@#{data.user}>, what?")
|
422
|
-
end
|
423
|
-
end
|
424
|
-
|
425
|
-
client.on :close do |_data|
|
426
|
-
puts "Client is about to disconnect"
|
427
|
-
end
|
428
|
-
|
429
|
-
client.on :closed do |_data|
|
430
|
-
puts "Client has disconnected successfully!"
|
431
|
-
end
|
432
|
-
|
433
|
-
client.start!
|
434
|
-
```
|
435
|
-
|
436
|
-
You can send typing indicators with `typing`.
|
437
|
-
|
438
|
-
```ruby
|
439
|
-
client.typing channel: data.channel
|
440
|
-
```
|
441
|
-
|
442
|
-
You can send a ping with `ping`.
|
443
|
-
|
444
|
-
```ruby
|
445
|
-
client.ping
|
446
|
-
```
|
447
|
-
|
448
|
-
#### Configuring Slack::RealTime::Client
|
449
|
-
|
450
|
-
You can configure the RealTime client either globally or via the initializer.
|
451
|
-
|
452
|
-
```ruby
|
453
|
-
Slack::RealTime::Client.configure do |config|
|
454
|
-
config.websocket_ping = 42
|
455
|
-
end
|
456
|
-
```
|
457
|
-
|
458
|
-
```ruby
|
459
|
-
client = Slack::RealTime::Client.new(websocket_ping: 42)
|
460
|
-
```
|
461
|
-
|
462
|
-
The following settings are supported.
|
463
|
-
|
464
|
-
setting | description
|
465
|
-
----------------|-----------------------------------------------------------------------------------------------------
|
466
|
-
token | Slack API token.
|
467
|
-
websocket_ping | How long the socket can be idle before sending a ping message to confirm it's still connected, default is 30.
|
468
|
-
websocket_proxy | Connect via proxy, include `:origin` and `:headers`.
|
469
|
-
start_options | Options to pass to `rtm.connect`, default is `{ request: { timeout: 180 } }`.
|
470
|
-
store_class | Local store class, default is an in-memory `Slack::RealTime::Stores::Starter`.
|
471
|
-
store_options | Options to initialize the store, default is `{}`.
|
472
|
-
async_handlers | Option to run handlers asynchronously. Valid options are `:all` or `:none`, default is `:none`.
|
473
|
-
logger | Optional `Logger` instance that logs RealTime requests and socket data.
|
474
|
-
|
475
|
-
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.
|
476
|
-
|
477
|
-
See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_time_and_web/hi.rb).
|
478
|
-
|
479
|
-

|
480
|
-
|
481
|
-
##### Caveats
|
482
|
-
|
483
|
-
###### `websocket_ping`
|
484
|
-
|
485
|
-
This setting determines how long the socket can be idle before sending a ping message to confirm it's still connected.
|
486
|
-
|
487
|
-
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.
|
488
|
-
|
489
|
-
Note that the ping may take between `websocket_ping` and `websocket_ping * 3/2` seconds to actually trigger when there is no activity on the socket. This is because the timer that checks whether to ping is triggered at every `websocket_ping / 2` interval.
|
490
|
-
|
491
|
-
To disable this feature set `websocket_ping` to 0.
|
492
|
-
|
493
|
-
#### RealTime Store
|
494
|
-
|
495
|
-
The RealTime client exposes and maintains a local store upon successful connection.
|
496
|
-
Event hooks keep the store's cached data up-to-date.
|
497
|
-
|
498
|
-
Tracking with a local store can be disabled with `Slack::RealTime::Client.new(store_class: nil)`.
|
499
|
-
|
500
|
-
##### `Slack::RealTime::Stores::Starter`
|
501
|
-
|
502
|
-
A small store that only caches and tracks data returned in the [rtm.connect](https://api.slack.com/methods/rtm.connect#examples) response.
|
503
|
-
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.
|
504
|
-
|
505
|
-
##### `Slack::RealTime::Stores::Store`
|
506
|
-
|
507
|
-
A more complete store that tracks most changes visible to the authenticated user.
|
508
|
-
|
509
|
-
You can see all of the cache types in the table below (each is a hash indexed by its objects' `id`).
|
510
|
-
|
511
|
-
Cache | Description
|
512
|
-
-------------------|-------------------------------------------------------------------------------------------------
|
513
|
-
`teams` | Workspaces (teams). Will likely contain only one `team`.
|
514
|
-
`users` | All [user](https://api.slack.com/types/user) objects, including `self`.
|
515
|
-
`bots` | All [bot users](https://api.slack.com/bot-users) (from Slack Apps and legacy custom integrations).
|
516
|
-
`public_channels` | Public [conversation](https://api.slack.com/types/conversation) objects.
|
517
|
-
`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.
|
518
|
-
`ims` | Visible [im](https://api.slack.com/types/im) objects, direct message channels with the authenticated user.
|
519
|
-
`mpims` | Visible [mpim](https://api.slack.com/types/mpim) objects, multiparty direct message channels that include the authenticated user.
|
520
|
-
|
521
|
-
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).
|
522
|
-
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).
|
523
|
-
|
524
|
-
Configure by specifying which caches to fetch:
|
525
|
-
```ruby
|
526
|
-
Slack::RealTime::Client.configure do |config|
|
527
|
-
config.store_class = Slack::RealTime::Stores::Store
|
528
|
-
config.store_options = { caches: %i[teams users public_channels private_channels ims] }
|
529
|
-
end
|
530
|
-
```
|
531
|
-
or with the `:all` option:
|
532
|
-
```ruby
|
533
|
-
Slack::RealTime::Client.configure do |config|
|
534
|
-
config.store_class = Slack::RealTime::Stores::Store
|
535
|
-
config.store_options = { caches: :all }
|
536
|
-
end
|
537
|
-
```
|
538
|
-
|
539
|
-
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.
|
540
|
-
Only `bots` requires a separate call for every bot user, so may be slow if your workplace has a lot of bot users.
|
541
|
-
|
542
|
-
### Combining RealTime and Web Clients
|
543
|
-
|
544
|
-
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.
|
545
|
-
|
546
|
-
```ruby
|
547
|
-
client = Slack::RealTime::Client.new
|
548
|
-
|
549
|
-
client.on :message do |data|
|
550
|
-
case data.text
|
551
|
-
when 'bot hi' then
|
552
|
-
client.web_client.chat_postMessage(channel: data.channel, text: "Hi <@#{data.user}>!")
|
553
|
-
when /^bot/ then
|
554
|
-
client.web_client.chat_postMessage(channel: data.channel, text: "Sorry <@#{data.user}>, what?")
|
555
|
-
end
|
556
|
-
end
|
557
|
-
|
558
|
-
client.start!
|
559
|
-
```
|
560
|
-
|
561
|
-
See a fully working example in [examples/hi_real_time_and_web](examples/hi_real_time_and_web/hi.rb).
|
562
|
-
|
563
|
-

|
564
|
-
|
565
|
-
#### Concurrency
|
566
|
-
|
567
|
-
`Slack::RealTime::Client` needs help from a concurrency library and supports [Async](https://github.com/socketry/async).
|
568
|
-
|
569
|
-
```ruby
|
570
|
-
Slack::RealTime.configure do |config|
|
571
|
-
config.concurrency = Slack::RealTime::Concurrency::Async
|
572
|
-
end
|
573
|
-
```
|
574
|
-
|
575
|
-
Use `client.start_async` instead of `client.start!`. A good example of such application is [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server).
|
576
|
-
|
577
|
-
```ruby
|
578
|
-
client = Slack::RealTime::Client.new
|
579
|
-
|
580
|
-
client.start_async
|
581
|
-
```
|
582
|
-
|
583
|
-
##### Async
|
584
|
-
|
585
|
-
Add `async-websocket` to your Gemfile.
|
586
|
-
|
587
|
-
```
|
588
|
-
gem 'async-websocket'
|
589
|
-
```
|
590
|
-
|
591
|
-
See a fully working example in [examples/hi_real_time_async_async](examples/hi_real_time_async_async/hi.rb).
|
592
|
-
|
593
388
|
### Events API
|
594
389
|
|
595
390
|
This library provides limited support for the [Slack Events API](https://api.slack.com/events-api).
|
@@ -622,9 +417,11 @@ slack_request.verify!
|
|
622
417
|
|
623
418
|
To specify secrets on a per-request basis:
|
624
419
|
```ruby
|
625
|
-
Slack::Events::Request.new(
|
626
|
-
|
627
|
-
|
420
|
+
Slack::Events::Request.new(
|
421
|
+
http_request,
|
422
|
+
signing_secret: signing_secret,
|
423
|
+
signature_expires_in: signature_expires_in
|
424
|
+
)
|
628
425
|
```
|
629
426
|
|
630
427
|
The `verify!` call may raise `Slack::Events::Request::MissingSigningSecret`, `Slack::Events::Request::InvalidSignature` or `Slack::Events::Request::TimestampExpired` errors.
|
@@ -807,11 +604,11 @@ $ slack users list | jq '.members | map({(.id): .name})'
|
|
807
604
|
|
808
605
|
See `slack help` for a complete command-line reference.
|
809
606
|
|
810
|
-
## Enterprise Support
|
607
|
+
## Sponsorship and Enterprise Support
|
811
608
|
|
812
|
-
|
609
|
+
This library was created and has been maintained for a decade by [@dblock](https://github.com/dblock). Please consider [a sponsorship](https://github.com/sponsors/dblock).
|
813
610
|
|
814
|
-
|
611
|
+
Enterprise Support is available as part of a Tidelift Subscription. Click [here](https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-slack-ruby-client&utm_medium=referral&utm_campaign=enterprise) for more details.
|
815
612
|
|
816
613
|
## History
|
817
614
|
|
@@ -827,6 +624,6 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
|
827
624
|
|
828
625
|
## Copyright and License
|
829
626
|
|
830
|
-
Copyright (c) 2015-
|
627
|
+
Copyright (c) 2015-2025, [Daniel Doubrovkine](https://twitter.com/dblockdotorg), [Artsy](https://www.artsy.net) and [Contributors](CHANGELOG.md).
|
831
628
|
|
832
629
|
This project is licensed under the [MIT License](LICENSE.md).
|
data/Rakefile
CHANGED
data/UPGRADING.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Upgrading Slack-Ruby-Client
|
2
2
|
===========================
|
3
3
|
|
4
|
+
### Upgrading to >= 3.0.0
|
5
|
+
|
6
|
+
Support for the [RTM API](https://docs.slack.dev/tools/java-slack-sdk/guides/rtm/) has been removed in [#573](https://github.com/slack-ruby/slack-ruby-client/pull/573). By now you should have [migrated your app to granular permissions](https://code.dblock.org/2020/11/30/migrating-classic-slack-ruby-bots-to-granular-permissions.html), and you should lock your slack-ruby-client to 2.x for those bots. Next, to remove RTM components we found it more effective to just [write a new version of a bot](https://code.dblock.org/2024/06/30/writing-a-channel-slack-bot.html) and avoid a complex migration.
|
7
|
+
|
4
8
|
### Upgrading to >= 2.0.0
|
5
9
|
|
6
10
|
[#416](https://github.com/slack-ruby/slack-ruby-client/pull/416) Removes default values for Faraday's SSL settings `ca_file` and `ca_path`.
|
@@ -9,8 +9,8 @@ module Slack
|
|
9
9
|
g.desc 'Retrieve analytics data for a given date, presented as a compressed JSON file'
|
10
10
|
g.long_desc %( Retrieve analytics data for a given date, presented as a compressed JSON file )
|
11
11
|
g.command 'getFile' do |c|
|
12
|
-
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).'
|
13
12
|
c.flag 'date', desc: 'Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC. Required unless metadata_only is set to true.'
|
13
|
+
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member (for Enterprise org member analytics) and public_channel (for public channel analytics).'
|
14
14
|
c.flag 'metadata_only', desc: 'Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.'
|
15
15
|
c.action do |_global_options, options, _args|
|
16
16
|
puts JSON.dump(@client.admin_analytics_getFile(options))
|