slack-ruby-client 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -0
- data/.github/workflows/update_api.yml +2 -2
- data/.rubocop_todo.yml +47 -16
- data/CHANGELOG.md +30 -13
- data/CONTRIBUTING.md +7 -7
- data/Gemfile +1 -0
- data/README.md +41 -23
- data/bin/commands/admin_conversations.rb +21 -0
- data/bin/commands/admin_users_session.rb +1 -1
- data/bin/commands/admin_workflows.rb +3 -1
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -4
- data/bin/commands/assistant_threads.rb +45 -0
- data/bin/commands/bookmarks.rb +1 -0
- data/bin/commands/canvases.rb +4 -4
- data/bin/commands/canvases_access.rb +3 -3
- data/bin/commands/chat.rb +7 -3
- data/bin/commands/conversations.rb +5 -5
- data/bin/commands/conversations_canvases.rb +2 -2
- data/bin/commands/conversations_requestSharedInvite.rb +48 -0
- data/bin/commands/files.rb +2 -1
- data/bin/commands/usergroups.rb +5 -0
- data/bin/commands/usergroups_users.rb +2 -0
- data/examples/files_upload_v2/.env.example +1 -0
- data/examples/files_upload_v2/Gemfile +5 -0
- data/examples/files_upload_v2/README.md +13 -0
- data/examples/files_upload_v2/files_upload_v2.rb +37 -0
- data/examples/oauth_v2/.env.example +4 -0
- data/examples/oauth_v2/Gemfile +7 -0
- data/examples/oauth_v2/README.md +33 -0
- data/examples/oauth_v2/oauth_v2.rb +60 -0
- data/lib/slack/messages/formatting.rb +1 -1
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_workflows.rb +5 -1
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +2 -2
- data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +2 -0
- data/lib/slack/web/api/endpoints/canvases.rb +2 -2
- data/lib/slack/web/api/endpoints/canvases_access.rb +4 -4
- data/lib/slack/web/api/endpoints/chat.rb +11 -3
- data/lib/slack/web/api/endpoints/conversations.rb +4 -4
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
- data/lib/slack/web/api/endpoints/files.rb +3 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +10 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +4 -0
- data/lib/slack/web/api/endpoints.rb +4 -0
- data/lib/slack/web/api/errors.rb +48 -4
- data/lib/slack/web/api/helpers/files.rb +87 -0
- data/lib/slack/web/api/helpers.rb +13 -0
- data/lib/slack/web/api/templates/method.erb +1 -1
- data/lib/slack/web/api/templates/method_spec.erb +4 -5
- data/lib/slack/web/client.rb +1 -0
- data/lib/slack/web/faraday/connection.rb +13 -26
- data/lib/slack/web/faraday/options.rb +24 -0
- data/lib/slack/web/faraday/request.rb +2 -1
- data/lib/slack-ruby-client.rb +2 -0
- data/lib/tasks/web.rake +1 -3
- data/slack-ruby-client.gemspec +2 -1
- metadata +32 -154
- data/screenshots/create-app.png +0 -0
- data/spec/fixtures/slack/web/429_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_success.yml +0 -81
- data/spec/fixtures/slack/web/conversations_info.yml +0 -167
- data/spec/fixtures/slack/web/conversations_setTopic.yml +0 -84
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +0 -172
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +0 -253
- data/spec/fixtures/slack/web/paginated_users_list.yml +0 -613
- data/spec/fixtures/slack/web/rtm_connect.yml +0 -391
- data/spec/fixtures/slack/web/users_info.yml +0 -214
- data/spec/fixtures/slack/web/users_list.yml +0 -133
- data/spec/fixtures/slack/web/views_open_error.yml +0 -83
- data/spec/integration/integration_spec.rb +0 -207
- data/spec/slack/config_spec.rb +0 -16
- data/spec/slack/events/config_spec.rb +0 -35
- data/spec/slack/events/request_spec.rb +0 -199
- data/spec/slack/messages/formatting_spec.rb +0 -156
- data/spec/slack/real_time/api/message_spec.rb +0 -20
- data/spec/slack/real_time/api/ping_spec.rb +0 -17
- data/spec/slack/real_time/api/typing_spec.rb +0 -19
- data/spec/slack/real_time/client_spec.rb +0 -601
- data/spec/slack/real_time/concurrency/clients/async_spec.rb +0 -16
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -21
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -47
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -16
- data/spec/slack/real_time/event_handlers/im_spec.rb +0 -51
- data/spec/slack/real_time/event_handlers/private_channel_spec.rb +0 -99
- data/spec/slack/real_time/event_handlers/public_channel_spec.rb +0 -123
- data/spec/slack/real_time/event_handlers/team_spec.rb +0 -63
- data/spec/slack/real_time/event_handlers/user_spec.rb +0 -65
- data/spec/slack/real_time/rtm_connect_spec.rb +0 -14
- data/spec/slack/real_time/stores/store_spec.rb +0 -50
- data/spec/slack/slack_spec.rb +0 -93
- data/spec/slack/version_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_activities_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_config_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +0 -35
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +0 -32
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +0 -133
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_functions_permissions_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/admin_functions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +0 -30
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +0 -53
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +0 -41
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +0 -67
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_workflows_collaborators_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/admin_workflows_permissions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_workflows_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/api_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_activities_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_auth_external_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_datastore_spec.rb +0 -74
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +0 -44
- data/spec/slack/web/api/endpoints/apps_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/auth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/bots_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/calls_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/canvases_access_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/canvases_sections_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/canvases_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/chat_spec.rb +0 -134
- data/spec/slack/web/api/endpoints/conversations_canvases_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb +0 -19
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -27
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -206
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +0 -112
- data/spec/slack/web/api/endpoints/dialog_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/files_spec.rb +0 -57
- data/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb +0 -10
- data/spec/slack/web/api/endpoints/functions_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/migration_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/openid_connect_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/pins_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/search_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/stars_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_billing_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_externalTeams_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/users_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/views_spec.rb +0 -65
- data/spec/slack/web/api/endpoints/workflows_spec.rb +0 -34
- data/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb +0 -31
- data/spec/slack/web/api/error_spec.rb +0 -14
- data/spec/slack/web/api/errors/slack_error_spec.rb +0 -33
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +0 -21
- data/spec/slack/web/api/mixins/conversations_spec.rb +0 -45
- data/spec/slack/web/api/mixins/users_spec.rb +0 -52
- data/spec/slack/web/api/options_spec.rb +0 -69
- data/spec/slack/web/api/pagination/cursor_spec.rb +0 -102
- data/spec/slack/web/client_spec.rb +0 -359
- data/spec/slack/web/faraday/request_spec.rb +0 -80
- data/spec/slack/web/faraday/response/raise_error_spec.rb +0 -86
- data/spec/spec_helper.rb +0 -30
- data/spec/support/queue_with_timeout.rb +0 -35
- data/spec/support/real_time/concurrency/mock.rb +0 -31
- data/spec/support/real_time/connected_client.rb +0 -21
- data/spec/support/real_time/event.rb +0 -12
- data/spec/support/real_time/loaded_client.rb +0 -120
- data/spec/support/token.rb +0 -11
- data/spec/support/vcr.rb +0 -45
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Slack
|
3
|
+
module Web
|
4
|
+
module Api
|
5
|
+
module Helpers
|
6
|
+
module Files
|
7
|
+
#
|
8
|
+
# Uses Slack APIs new sequential file upload flow. This replaces the files.upload method
|
9
|
+
# @see https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
|
10
|
+
# @see https://api.slack.com/messaging/files#uploading_files
|
11
|
+
#
|
12
|
+
# @option params [string] :filename
|
13
|
+
# Name of the file being uploaded.
|
14
|
+
# @option params [string] :content
|
15
|
+
# File contents via a POST variable.
|
16
|
+
# @option params [string] :alt_txt
|
17
|
+
# Description of image for screen-reader.
|
18
|
+
# @option params [string] :snippet_type
|
19
|
+
# Syntax type of the snippet being uploaded.
|
20
|
+
# @option params [string] :title
|
21
|
+
# Title of file.
|
22
|
+
# @option params [string] :channel_id
|
23
|
+
# Channel ID where the file will be shared. If not specified the file will be private.
|
24
|
+
# @option params [string] :channel
|
25
|
+
# Channel where the file will be shared, alias of channel_id. If not specified the file will be private.
|
26
|
+
# @option params [string] :channels
|
27
|
+
# Comma-separated string of channel IDs where the file will be shared. If not specified the file will be private.
|
28
|
+
# @option params [string] :initial_comment
|
29
|
+
# The message text introducing the file in specified channels.
|
30
|
+
# @option params [string] :thread_ts
|
31
|
+
# Provide another message's ts value to upload this file as a reply.
|
32
|
+
# Never use a reply's ts value; use its parent instead.
|
33
|
+
# Also make sure to provide only one channel when using 'thread_ts'.
|
34
|
+
def files_upload_v2(params = {})
|
35
|
+
%i[filename content].each do |param|
|
36
|
+
raise ArgumentError, "Required argument :#{param} missing" if params[param].nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
channel_params = %i[channel channels channel_id].map { |param| params[param] }.compact
|
40
|
+
raise ArgumentError, 'Only one of :channel, :channels, or :channel_id is required' if channel_params.size > 1
|
41
|
+
|
42
|
+
complete_upload_request_params = params.slice(:initial_comment, :thread_ts)
|
43
|
+
|
44
|
+
if params[:channels]
|
45
|
+
complete_upload_request_params[:channels] = Array(params[:channels]).map do |channel|
|
46
|
+
conversations_id(channel: channel)['channel']['id']
|
47
|
+
end.uniq.join(',')
|
48
|
+
elsif params[:channel]
|
49
|
+
complete_upload_request_params[:channel] = conversations_id(
|
50
|
+
channel: params[:channel]
|
51
|
+
)['channel']['id']
|
52
|
+
elsif params[:channel_id]
|
53
|
+
complete_upload_request_params[:channel_id] = params[:channel_id]
|
54
|
+
end
|
55
|
+
|
56
|
+
content = params[:content]
|
57
|
+
title = params[:title] || params[:filename]
|
58
|
+
|
59
|
+
upload_url_request_params = params.slice(:filename, :alt_txt, :snippet_type)
|
60
|
+
upload_url_request_params[:length] = content.bytesize
|
61
|
+
|
62
|
+
# Get the upload url.
|
63
|
+
get_upload_url_response = files_getUploadURLExternal(upload_url_request_params)
|
64
|
+
upload_url = get_upload_url_response[:upload_url]
|
65
|
+
file_id = get_upload_url_response[:file_id]
|
66
|
+
|
67
|
+
# Upload the file.
|
68
|
+
::Faraday::Connection.new(upload_url, options) do |connection|
|
69
|
+
connection.request :multipart
|
70
|
+
connection.request :url_encoded
|
71
|
+
connection.use ::Slack::Web::Faraday::Response::WrapError
|
72
|
+
connection.response :logger, logger if logger
|
73
|
+
connection.adapter adapter
|
74
|
+
end.post do |request|
|
75
|
+
request.body = content
|
76
|
+
end
|
77
|
+
|
78
|
+
# Complete the upload.
|
79
|
+
complete_upload_request_params[:files] = [{ id: file_id, title: title }].to_json
|
80
|
+
|
81
|
+
files_completeUploadExternal(complete_upload_request_params)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -48,7 +48,7 @@ module Slack
|
|
48
48
|
<% end %>
|
49
49
|
<% if data['group'] == 'groups' && data['args']['channel'] && !data['args']['channel']['desc'].include?('Can be an encoded ID, or a name.') %>
|
50
50
|
options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
|
51
|
-
<% elsif data['args']['channel'] &&
|
51
|
+
<% elsif data['args']['channel'] && ['Can be an encoded ID, or a name.', 'encoded ID or channel name'].none? { |desc| data['args']['channel']['desc'].include?(desc) } %>
|
52
52
|
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
53
53
|
<% end %>
|
54
54
|
<% if data['args']['user'] %>
|
@@ -8,20 +8,19 @@ RSpec.describe Slack::Web::Api::Endpoints::<%= group.gsub(".", "_").camelize %>
|
|
8
8
|
<% names.sort.each_with_index do |(name, data), index| %>
|
9
9
|
<% next if data['mixin'] %>
|
10
10
|
<% group_required_params = data['arg_groups']&.map { |grp| grp['args'].first if grp['args'].size > 1 } || [] %>
|
11
|
-
<% required_params = data['args'].select{ |k, v| v['required']
|
11
|
+
<% required_params = data['args'].select{ |k, v| v['required'] } %>
|
12
|
+
<% all_required_params = data['args'].select{ |k, v| v['required'] || group_required_params.include?(k) } %>
|
12
13
|
<% json_params = data['args'].map { |arg_name, arg_v| arg_name if arg_v['format'] == 'json' }.compact %>
|
13
|
-
<% next if
|
14
|
+
<% next if all_required_params.none? && json_params.none? && data['arg_groups'].nil? %>
|
14
15
|
<% method_name = [group.gsub(".", "_"), name].join('_') %>
|
15
|
-
<% example_params =
|
16
|
+
<% example_params = all_required_params.to_h { |var, opts| [var, opts['example']] } %>
|
16
17
|
context '<%= group %>_<%= name %>' do
|
17
|
-
<% unless custom_spec_exists %>
|
18
18
|
<% required_params.each do |arg_name, arg_v| %>
|
19
19
|
it 'requires <%= arg_name %>' do
|
20
20
|
<% params_except_required = example_params.reject { |name, _| name == arg_name }.map { |name, val| "#{name}: %q[#{val}]" }.join(', ') %>
|
21
21
|
expect { client.<%= method_name %><%= params_except_required.empty? ? '' : "(#{params_except_required})" %> }.to raise_error ArgumentError, /Required arguments :<%= arg_name %> missing/
|
22
22
|
end
|
23
23
|
<% end %>
|
24
|
-
<% end %>
|
25
24
|
<% data['arg_groups']&.each do |arg_group| %>
|
26
25
|
<% next if arg_group['args'].size <= 1 %>
|
27
26
|
it 'requires one of <%= arg_group['args'].join(', ') %>' do
|
data/lib/slack/web/client.rb
CHANGED
@@ -3,35 +3,22 @@ module Slack
|
|
3
3
|
module Web
|
4
4
|
module Faraday
|
5
5
|
module Connection
|
6
|
+
include Slack::Web::Faraday::Options
|
7
|
+
|
6
8
|
private
|
7
9
|
|
8
10
|
def connection
|
9
|
-
@connection ||=
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
request_options[:timeout] = timeout if timeout
|
21
|
-
request_options[:open_timeout] = open_timeout if open_timeout
|
22
|
-
options[:request] = request_options if request_options.any?
|
23
|
-
|
24
|
-
::Faraday::Connection.new(endpoint, options) do |connection|
|
25
|
-
connection.request :multipart
|
26
|
-
connection.request :url_encoded
|
27
|
-
connection.use ::Slack::Web::Faraday::Response::RaiseError
|
28
|
-
connection.response :mashify, mash_class: Slack::Messages::Message
|
29
|
-
connection.response :json, content_type: /\b*$/
|
30
|
-
connection.use ::Slack::Web::Faraday::Response::WrapError
|
31
|
-
connection.response :logger, logger if logger
|
32
|
-
connection.adapter adapter
|
33
|
-
end
|
34
|
-
end
|
11
|
+
@connection ||= ::Faraday::Connection.new(endpoint, options) do |connection|
|
12
|
+
connection.headers['Accept'] = 'application/json; charset=utf-8'
|
13
|
+
connection.request :multipart
|
14
|
+
connection.request :url_encoded
|
15
|
+
connection.use ::Slack::Web::Faraday::Response::RaiseError
|
16
|
+
connection.response :mashify, mash_class: Slack::Messages::Message
|
17
|
+
connection.response :json, content_type: /\b*$/
|
18
|
+
connection.use ::Slack::Web::Faraday::Response::WrapError
|
19
|
+
connection.response :logger, logger if logger
|
20
|
+
connection.adapter adapter
|
21
|
+
end
|
35
22
|
end
|
36
23
|
end
|
37
24
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Slack
|
3
|
+
module Web
|
4
|
+
module Faraday
|
5
|
+
module Options
|
6
|
+
def options
|
7
|
+
@options ||= begin
|
8
|
+
options = { headers: {} }
|
9
|
+
options[:headers]['User-Agent'] = user_agent if user_agent
|
10
|
+
options[:proxy] = proxy if proxy
|
11
|
+
options[:ssl] = { ca_path: ca_path, ca_file: ca_file } if ca_path || ca_file
|
12
|
+
|
13
|
+
request_options = {}
|
14
|
+
request_options[:timeout] = timeout if timeout
|
15
|
+
request_options[:open_timeout] = open_timeout if open_timeout
|
16
|
+
options[:request] = request_options if request_options.any?
|
17
|
+
|
18
|
+
options
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -28,10 +28,11 @@ module Slack
|
|
28
28
|
request.url(path, options)
|
29
29
|
when :post, :put
|
30
30
|
request.path = path
|
31
|
-
options.compact!
|
31
|
+
options.compact! if options.respond_to? :compact
|
32
32
|
request.body = options unless options.empty?
|
33
33
|
end
|
34
34
|
request.headers['Authorization'] = "Bearer #{token}" if token
|
35
|
+
|
35
36
|
request.options.merge!(options.delete(:request)) if options.key?(:request)
|
36
37
|
end
|
37
38
|
response.body
|
data/lib/slack-ruby-client.rb
CHANGED
@@ -33,10 +33,12 @@ require_relative 'slack/web/api/errors/server_error'
|
|
33
33
|
require_relative 'slack/web/api/options'
|
34
34
|
require_relative 'slack/web/faraday/response/raise_error'
|
35
35
|
require_relative 'slack/web/faraday/response/wrap_error'
|
36
|
+
require_relative 'slack/web/faraday/options'
|
36
37
|
require_relative 'slack/web/faraday/connection'
|
37
38
|
require_relative 'slack/web/faraday/request'
|
38
39
|
require_relative 'slack/web/api/mixins'
|
39
40
|
require_relative 'slack/web/api/endpoints'
|
41
|
+
require_relative 'slack/web/api/helpers'
|
40
42
|
require_relative 'slack/web/pagination/cursor'
|
41
43
|
require_relative 'slack/web/client'
|
42
44
|
|
data/lib/tasks/web.rake
CHANGED
@@ -56,9 +56,7 @@ namespace :slack do
|
|
56
56
|
snaked_group = group.tr('.', '_')
|
57
57
|
rendered_method = method_template.result(group: group, names: names)
|
58
58
|
File.write "lib/slack/web/api/endpoints/#{snaked_group}.rb", rendered_method
|
59
|
-
|
60
|
-
File.exist?("spec/slack/web/api/endpoints/custom_specs/#{group}_spec.rb")
|
61
|
-
rendered_method_spec = method_spec_template.result(group: group, names: names, custom_spec_exists: custom_spec_exists)
|
59
|
+
rendered_method_spec = method_spec_template.result(group: group, names: names)
|
62
60
|
File.write "spec/slack/web/api/endpoints/#{snaked_group}_spec.rb", rendered_method_spec
|
63
61
|
|
64
62
|
unless ENV.key?('SKIP_PATCH')
|
data/slack-ruby-client.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.platform = Gem::Platform::RUBY
|
13
13
|
s.required_ruby_version = '>= 2.7'
|
14
14
|
s.required_rubygems_version = '>= 1.3.6'
|
15
|
-
s.files = `git ls-files`.split("\n")
|
15
|
+
s.files = `git ls-files`.split("\n").grep_v(%r{^spec/})
|
16
16
|
s.require_paths = ['lib']
|
17
17
|
s.homepage = 'http://github.com/slack-ruby/slack-ruby-client'
|
18
18
|
s.licenses = ['MIT']
|
@@ -22,6 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency 'faraday-multipart'
|
23
23
|
s.add_dependency 'gli'
|
24
24
|
s.add_dependency 'hashie'
|
25
|
+
s.add_dependency 'logger'
|
25
26
|
s.metadata['rubygems_mfa_required'] = 'true'
|
26
27
|
s.metadata['changelog_uri'] = 'https://github.com/slack-ruby/slack-ruby-client/blob/master/CHANGELOG.md'
|
27
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: logger
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description:
|
84
98
|
email: dblock@dblock.org
|
85
99
|
executables:
|
@@ -152,6 +166,7 @@ files:
|
|
152
166
|
- bin/commands/apps_datastore.rb
|
153
167
|
- bin/commands/apps_event_authorizations.rb
|
154
168
|
- bin/commands/apps_manifest.rb
|
169
|
+
- bin/commands/assistant_threads.rb
|
155
170
|
- bin/commands/auth.rb
|
156
171
|
- bin/commands/auth_teams.rb
|
157
172
|
- bin/commands/bookmarks.rb
|
@@ -166,6 +181,7 @@ files:
|
|
166
181
|
- bin/commands/conversations.rb
|
167
182
|
- bin/commands/conversations_canvases.rb
|
168
183
|
- bin/commands/conversations_externalInvitePermissions.rb
|
184
|
+
- bin/commands/conversations_requestSharedInvite.rb
|
169
185
|
- bin/commands/dialog.rb
|
170
186
|
- bin/commands/dnd.rb
|
171
187
|
- bin/commands/emoji.rb
|
@@ -203,6 +219,10 @@ files:
|
|
203
219
|
- bin/commands/workflows.rb
|
204
220
|
- bin/commands/workflows_triggers_permissions.rb
|
205
221
|
- bin/slack
|
222
|
+
- examples/files_upload_v2/.env.example
|
223
|
+
- examples/files_upload_v2/Gemfile
|
224
|
+
- examples/files_upload_v2/README.md
|
225
|
+
- examples/files_upload_v2/files_upload_v2.rb
|
206
226
|
- examples/hi_real_time_and_web/Gemfile
|
207
227
|
- examples/hi_real_time_and_web/hi.gif
|
208
228
|
- examples/hi_real_time_and_web/hi.rb
|
@@ -214,6 +234,10 @@ files:
|
|
214
234
|
- examples/hi_web/hi.rb
|
215
235
|
- examples/new_ticket/Gemfile
|
216
236
|
- examples/new_ticket/new_ticket.rb
|
237
|
+
- examples/oauth_v2/.env.example
|
238
|
+
- examples/oauth_v2/Gemfile
|
239
|
+
- examples/oauth_v2/README.md
|
240
|
+
- examples/oauth_v2/oauth_v2.rb
|
217
241
|
- lib/slack-ruby-client.rb
|
218
242
|
- lib/slack.rb
|
219
243
|
- lib/slack/config.rb
|
@@ -287,6 +311,7 @@ files:
|
|
287
311
|
- lib/slack/web/api/endpoints/apps_datastore.rb
|
288
312
|
- lib/slack/web/api/endpoints/apps_event_authorizations.rb
|
289
313
|
- lib/slack/web/api/endpoints/apps_manifest.rb
|
314
|
+
- lib/slack/web/api/endpoints/assistant_threads.rb
|
290
315
|
- lib/slack/web/api/endpoints/auth.rb
|
291
316
|
- lib/slack/web/api/endpoints/auth_teams.rb
|
292
317
|
- lib/slack/web/api/endpoints/bookmarks.rb
|
@@ -301,6 +326,7 @@ files:
|
|
301
326
|
- lib/slack/web/api/endpoints/conversations.rb
|
302
327
|
- lib/slack/web/api/endpoints/conversations_canvases.rb
|
303
328
|
- lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb
|
329
|
+
- lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb
|
304
330
|
- lib/slack/web/api/endpoints/dialog.rb
|
305
331
|
- lib/slack/web/api/endpoints/dnd.rb
|
306
332
|
- lib/slack/web/api/endpoints/emoji.rb
|
@@ -342,6 +368,8 @@ files:
|
|
342
368
|
- lib/slack/web/api/errors/server_error.rb
|
343
369
|
- lib/slack/web/api/errors/slack_error.rb
|
344
370
|
- lib/slack/web/api/errors/too_many_requests_error.rb
|
371
|
+
- lib/slack/web/api/helpers.rb
|
372
|
+
- lib/slack/web/api/helpers/files.rb
|
345
373
|
- lib/slack/web/api/mixins.rb
|
346
374
|
- lib/slack/web/api/mixins/conversations.id.rb
|
347
375
|
- lib/slack/web/api/mixins/ids.id.rb
|
@@ -361,6 +389,7 @@ files:
|
|
361
389
|
- lib/slack/web/client.rb
|
362
390
|
- lib/slack/web/config.rb
|
363
391
|
- lib/slack/web/faraday/connection.rb
|
392
|
+
- lib/slack/web/faraday/options.rb
|
364
393
|
- lib/slack/web/faraday/request.rb
|
365
394
|
- lib/slack/web/faraday/response/raise_error.rb
|
366
395
|
- lib/slack/web/faraday/response/wrap_error.rb
|
@@ -370,159 +399,8 @@ files:
|
|
370
399
|
- lib/tasks/real_time.rake
|
371
400
|
- lib/tasks/update.rake
|
372
401
|
- lib/tasks/web.rake
|
373
|
-
- screenshots/create-app.png
|
374
402
|
- slack-ruby-client.gemspec
|
375
403
|
- slack.png
|
376
|
-
- spec/fixtures/slack/web/429_error.yml
|
377
|
-
- spec/fixtures/slack/web/auth_test_error.yml
|
378
|
-
- spec/fixtures/slack/web/auth_test_success.yml
|
379
|
-
- spec/fixtures/slack/web/conversations_info.yml
|
380
|
-
- spec/fixtures/slack/web/conversations_setTopic.yml
|
381
|
-
- spec/fixtures/slack/web/conversations_setTopic_one_page.yml
|
382
|
-
- spec/fixtures/slack/web/conversations_setTopic_paginated.yml
|
383
|
-
- spec/fixtures/slack/web/paginated_users_list.yml
|
384
|
-
- spec/fixtures/slack/web/rtm_connect.yml
|
385
|
-
- spec/fixtures/slack/web/users_info.yml
|
386
|
-
- spec/fixtures/slack/web/users_list.yml
|
387
|
-
- spec/fixtures/slack/web/views_open_error.yml
|
388
|
-
- spec/integration/integration_spec.rb
|
389
|
-
- spec/slack/config_spec.rb
|
390
|
-
- spec/slack/events/config_spec.rb
|
391
|
-
- spec/slack/events/request_spec.rb
|
392
|
-
- spec/slack/messages/formatting_spec.rb
|
393
|
-
- spec/slack/real_time/api/message_spec.rb
|
394
|
-
- spec/slack/real_time/api/ping_spec.rb
|
395
|
-
- spec/slack/real_time/api/typing_spec.rb
|
396
|
-
- spec/slack/real_time/client_spec.rb
|
397
|
-
- spec/slack/real_time/concurrency/clients/async_spec.rb
|
398
|
-
- spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb
|
399
|
-
- spec/slack/real_time/concurrency/with_concurrency_spec.rb
|
400
|
-
- spec/slack/real_time/concurrency/without_concurrency_spec.rb
|
401
|
-
- spec/slack/real_time/event_handlers/bot_spec.rb
|
402
|
-
- spec/slack/real_time/event_handlers/event_handlers_spec.rb
|
403
|
-
- spec/slack/real_time/event_handlers/im_spec.rb
|
404
|
-
- spec/slack/real_time/event_handlers/private_channel_spec.rb
|
405
|
-
- spec/slack/real_time/event_handlers/public_channel_spec.rb
|
406
|
-
- spec/slack/real_time/event_handlers/team_spec.rb
|
407
|
-
- spec/slack/real_time/event_handlers/user_spec.rb
|
408
|
-
- spec/slack/real_time/rtm_connect_spec.rb
|
409
|
-
- spec/slack/real_time/stores/store_spec.rb
|
410
|
-
- spec/slack/slack_spec.rb
|
411
|
-
- spec/slack/version_spec.rb
|
412
|
-
- spec/slack/web/api/endpoints/admin_analytics_spec.rb
|
413
|
-
- spec/slack/web/api/endpoints/admin_apps_activities_spec.rb
|
414
|
-
- spec/slack/web/api/endpoints/admin_apps_approved_spec.rb
|
415
|
-
- spec/slack/web/api/endpoints/admin_apps_config_spec.rb
|
416
|
-
- spec/slack/web/api/endpoints/admin_apps_requests_spec.rb
|
417
|
-
- spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb
|
418
|
-
- spec/slack/web/api/endpoints/admin_apps_spec.rb
|
419
|
-
- spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb
|
420
|
-
- spec/slack/web/api/endpoints/admin_auth_policy_spec.rb
|
421
|
-
- spec/slack/web/api/endpoints/admin_barriers_spec.rb
|
422
|
-
- spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb
|
423
|
-
- spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb
|
424
|
-
- spec/slack/web/api/endpoints/admin_conversations_spec.rb
|
425
|
-
- spec/slack/web/api/endpoints/admin_emoji_spec.rb
|
426
|
-
- spec/slack/web/api/endpoints/admin_functions_permissions_spec.rb
|
427
|
-
- spec/slack/web/api/endpoints/admin_functions_spec.rb
|
428
|
-
- spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb
|
429
|
-
- spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb
|
430
|
-
- spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb
|
431
|
-
- spec/slack/web/api/endpoints/admin_roles_spec.rb
|
432
|
-
- spec/slack/web/api/endpoints/admin_teams_admins_spec.rb
|
433
|
-
- spec/slack/web/api/endpoints/admin_teams_owners_spec.rb
|
434
|
-
- spec/slack/web/api/endpoints/admin_teams_settings_spec.rb
|
435
|
-
- spec/slack/web/api/endpoints/admin_teams_spec.rb
|
436
|
-
- spec/slack/web/api/endpoints/admin_usergroups_spec.rb
|
437
|
-
- spec/slack/web/api/endpoints/admin_users_session_spec.rb
|
438
|
-
- spec/slack/web/api/endpoints/admin_users_spec.rb
|
439
|
-
- spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb
|
440
|
-
- spec/slack/web/api/endpoints/admin_workflows_collaborators_spec.rb
|
441
|
-
- spec/slack/web/api/endpoints/admin_workflows_permissions_spec.rb
|
442
|
-
- spec/slack/web/api/endpoints/admin_workflows_spec.rb
|
443
|
-
- spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb
|
444
|
-
- spec/slack/web/api/endpoints/api_spec.rb
|
445
|
-
- spec/slack/web/api/endpoints/apps_activities_spec.rb
|
446
|
-
- spec/slack/web/api/endpoints/apps_auth_external_spec.rb
|
447
|
-
- spec/slack/web/api/endpoints/apps_connections_spec.rb
|
448
|
-
- spec/slack/web/api/endpoints/apps_datastore_spec.rb
|
449
|
-
- spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb
|
450
|
-
- spec/slack/web/api/endpoints/apps_manifest_spec.rb
|
451
|
-
- spec/slack/web/api/endpoints/apps_spec.rb
|
452
|
-
- spec/slack/web/api/endpoints/auth_spec.rb
|
453
|
-
- spec/slack/web/api/endpoints/auth_teams_spec.rb
|
454
|
-
- spec/slack/web/api/endpoints/bookmarks_spec.rb
|
455
|
-
- spec/slack/web/api/endpoints/bots_spec.rb
|
456
|
-
- spec/slack/web/api/endpoints/calls_participants_spec.rb
|
457
|
-
- spec/slack/web/api/endpoints/calls_spec.rb
|
458
|
-
- spec/slack/web/api/endpoints/canvases_access_spec.rb
|
459
|
-
- spec/slack/web/api/endpoints/canvases_sections_spec.rb
|
460
|
-
- spec/slack/web/api/endpoints/canvases_spec.rb
|
461
|
-
- spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb
|
462
|
-
- spec/slack/web/api/endpoints/chat_spec.rb
|
463
|
-
- spec/slack/web/api/endpoints/conversations_canvases_spec.rb
|
464
|
-
- spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb
|
465
|
-
- spec/slack/web/api/endpoints/conversations_spec.rb
|
466
|
-
- spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
|
467
|
-
- spec/slack/web/api/endpoints/custom_specs/chat_spec.rb
|
468
|
-
- spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb
|
469
|
-
- spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb
|
470
|
-
- spec/slack/web/api/endpoints/custom_specs/users_spec.rb
|
471
|
-
- spec/slack/web/api/endpoints/custom_specs/views_spec.rb
|
472
|
-
- spec/slack/web/api/endpoints/dialog_spec.rb
|
473
|
-
- spec/slack/web/api/endpoints/dnd_spec.rb
|
474
|
-
- spec/slack/web/api/endpoints/emoji_spec.rb
|
475
|
-
- spec/slack/web/api/endpoints/files_comments_spec.rb
|
476
|
-
- spec/slack/web/api/endpoints/files_remote_spec.rb
|
477
|
-
- spec/slack/web/api/endpoints/files_spec.rb
|
478
|
-
- spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb
|
479
|
-
- spec/slack/web/api/endpoints/functions_spec.rb
|
480
|
-
- spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb
|
481
|
-
- spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb
|
482
|
-
- spec/slack/web/api/endpoints/migration_spec.rb
|
483
|
-
- spec/slack/web/api/endpoints/oauth_spec.rb
|
484
|
-
- spec/slack/web/api/endpoints/oauth_v2_spec.rb
|
485
|
-
- spec/slack/web/api/endpoints/openid_connect_spec.rb
|
486
|
-
- spec/slack/web/api/endpoints/pins_spec.rb
|
487
|
-
- spec/slack/web/api/endpoints/reactions_spec.rb
|
488
|
-
- spec/slack/web/api/endpoints/reminders_spec.rb
|
489
|
-
- spec/slack/web/api/endpoints/rtm_spec.rb
|
490
|
-
- spec/slack/web/api/endpoints/search_spec.rb
|
491
|
-
- spec/slack/web/api/endpoints/stars_spec.rb
|
492
|
-
- spec/slack/web/api/endpoints/team_billing_spec.rb
|
493
|
-
- spec/slack/web/api/endpoints/team_externalTeams_spec.rb
|
494
|
-
- spec/slack/web/api/endpoints/team_preferences_spec.rb
|
495
|
-
- spec/slack/web/api/endpoints/team_profile_spec.rb
|
496
|
-
- spec/slack/web/api/endpoints/team_spec.rb
|
497
|
-
- spec/slack/web/api/endpoints/tooling_tokens_spec.rb
|
498
|
-
- spec/slack/web/api/endpoints/usergroups_spec.rb
|
499
|
-
- spec/slack/web/api/endpoints/usergroups_users_spec.rb
|
500
|
-
- spec/slack/web/api/endpoints/users_admin_spec.rb
|
501
|
-
- spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb
|
502
|
-
- spec/slack/web/api/endpoints/users_prefs_spec.rb
|
503
|
-
- spec/slack/web/api/endpoints/users_profile_spec.rb
|
504
|
-
- spec/slack/web/api/endpoints/users_spec.rb
|
505
|
-
- spec/slack/web/api/endpoints/views_spec.rb
|
506
|
-
- spec/slack/web/api/endpoints/workflows_spec.rb
|
507
|
-
- spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb
|
508
|
-
- spec/slack/web/api/error_spec.rb
|
509
|
-
- spec/slack/web/api/errors/slack_error_spec.rb
|
510
|
-
- spec/slack/web/api/mixins/conversations_list_spec.rb
|
511
|
-
- spec/slack/web/api/mixins/conversations_spec.rb
|
512
|
-
- spec/slack/web/api/mixins/users_spec.rb
|
513
|
-
- spec/slack/web/api/options_spec.rb
|
514
|
-
- spec/slack/web/api/pagination/cursor_spec.rb
|
515
|
-
- spec/slack/web/client_spec.rb
|
516
|
-
- spec/slack/web/faraday/request_spec.rb
|
517
|
-
- spec/slack/web/faraday/response/raise_error_spec.rb
|
518
|
-
- spec/spec_helper.rb
|
519
|
-
- spec/support/queue_with_timeout.rb
|
520
|
-
- spec/support/real_time/concurrency/mock.rb
|
521
|
-
- spec/support/real_time/connected_client.rb
|
522
|
-
- spec/support/real_time/event.rb
|
523
|
-
- spec/support/real_time/loaded_client.rb
|
524
|
-
- spec/support/token.rb
|
525
|
-
- spec/support/vcr.rb
|
526
404
|
homepage: http://github.com/slack-ruby/slack-ruby-client
|
527
405
|
licenses:
|
528
406
|
- MIT
|
@@ -544,7 +422,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
544
422
|
- !ruby/object:Gem::Version
|
545
423
|
version: 1.3.6
|
546
424
|
requirements: []
|
547
|
-
rubygems_version: 3.
|
425
|
+
rubygems_version: 3.5.16
|
548
426
|
signing_key:
|
549
427
|
specification_version: 4
|
550
428
|
summary: Slack Web and RealTime API client.
|
data/screenshots/create-app.png
DELETED
Binary file
|
@@ -1,81 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://slack.com/api/auth.test
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- application/json; charset=utf-8
|
12
|
-
User-Agent:
|
13
|
-
- Slack Ruby Client/0.18.0
|
14
|
-
Authorization:
|
15
|
-
- Bearer <SLACK_API_TOKEN>
|
16
|
-
Content-Type:
|
17
|
-
- application/x-www-form-urlencoded
|
18
|
-
Accept-Encoding:
|
19
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Sat, 04 Dec 2021 20:13:19 GMT
|
27
|
-
Server:
|
28
|
-
- Apache
|
29
|
-
Access-Control-Allow-Origin:
|
30
|
-
- "*"
|
31
|
-
Referrer-Policy:
|
32
|
-
- no-referrer
|
33
|
-
X-Slack-Backend:
|
34
|
-
- r
|
35
|
-
Strict-Transport-Security:
|
36
|
-
- max-age=31536000; includeSubDomains; preload
|
37
|
-
Access-Control-Allow-Headers:
|
38
|
-
- slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid,
|
39
|
-
x-b3-sampled, x-b3-flags
|
40
|
-
Access-Control-Expose-Headers:
|
41
|
-
- x-slack-req-id, retry-after
|
42
|
-
X-Oauth-Scopes:
|
43
|
-
- identify,read,post,client,apps
|
44
|
-
Expires:
|
45
|
-
- Mon, 26 Jul 1997 05:00:00 GMT
|
46
|
-
Cache-Control:
|
47
|
-
- private, no-cache, no-store, must-revalidate
|
48
|
-
Pragma:
|
49
|
-
- no-cache
|
50
|
-
X-Xss-Protection:
|
51
|
-
- '0'
|
52
|
-
X-Content-Type-Options:
|
53
|
-
- nosniff
|
54
|
-
X-Slack-Req-Id:
|
55
|
-
- 19b143ea43a655dcdc6c3debd59c41c0
|
56
|
-
Vary:
|
57
|
-
- Accept-Encoding
|
58
|
-
Content-Length:
|
59
|
-
- '165'
|
60
|
-
Content-Type:
|
61
|
-
- application/json; charset=utf-8
|
62
|
-
X-Envoy-Upstream-Service-Time:
|
63
|
-
- '18'
|
64
|
-
X-Backend:
|
65
|
-
- main_normal main_bedrock_normal_with_overflow main_canary_with_overflow main_bedrock_canary_with_overflow
|
66
|
-
main_control_with_overflow main_bedrock_control_with_overflow
|
67
|
-
X-Server:
|
68
|
-
- slack-www-hhvm-main-iad-d5j5
|
69
|
-
X-Slack-Shared-Secret-Outcome:
|
70
|
-
- no-match
|
71
|
-
Via:
|
72
|
-
- envoy-www-iad-tdcc, envoy-edge-iad-olsk
|
73
|
-
X-Edge-Backend:
|
74
|
-
- envoy-www
|
75
|
-
X-Slack-Edge-Shared-Secret-Outcome:
|
76
|
-
- no-match
|
77
|
-
body:
|
78
|
-
encoding: UTF-8
|
79
|
-
string: '{"ok":true,"url":"https:\/\/dblockdotorg.slack.com\/","team":"dblock","user":"travis-ci","team_id":"T04KB5WQH","user_id":"U0J1GAHN1","bot_id":"B0J1L75DY","is_enterprise_install":false}'
|
80
|
-
recorded_at: Sat, 19 Jan 2019 21:25:48 GMT
|
81
|
-
recorded_with: VCR 6.0.0
|