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
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::FilesComments do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'files.comments_delete' do
|
9
|
-
it 'requires file' do
|
10
|
-
expect { client.files_comments_delete(id: %q[Fc1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
11
|
-
end
|
12
|
-
it 'requires id' do
|
13
|
-
expect { client.files_comments_delete(file: %q[F1234567890]) }.to raise_error ArgumentError, /Required arguments :id missing/
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::FilesRemote do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'files.remote_add' do
|
9
|
-
it 'requires external_id' do
|
10
|
-
expect { client.files_remote_add(external_url: %q[http://example.com/my_cloud_service_file/abc123], title: %q[Danger, High Voltage!]) }.to raise_error ArgumentError, /Required arguments :external_id missing/
|
11
|
-
end
|
12
|
-
it 'requires external_url' do
|
13
|
-
expect { client.files_remote_add(external_id: %q[123456], title: %q[Danger, High Voltage!]) }.to raise_error ArgumentError, /Required arguments :external_url missing/
|
14
|
-
end
|
15
|
-
it 'requires title' do
|
16
|
-
expect { client.files_remote_add(external_id: %q[123456], external_url: %q[http://example.com/my_cloud_service_file/abc123]) }.to raise_error ArgumentError, /Required arguments :title missing/
|
17
|
-
end
|
18
|
-
end
|
19
|
-
context 'files.remote_share' do
|
20
|
-
it 'requires channels' do
|
21
|
-
expect { client.files_remote_share }.to raise_error ArgumentError, /Required arguments :channels missing/
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Files do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'files_completeUploadExternal' do
|
9
|
-
it 'requires files' do
|
10
|
-
expect { client.files_completeUploadExternal }.to raise_error ArgumentError, /Required arguments :files missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'files_delete' do
|
14
|
-
it 'requires file' do
|
15
|
-
expect { client.files_delete }.to raise_error ArgumentError, /Required arguments :file missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
context 'files_edit' do
|
19
|
-
it 'requires file' do
|
20
|
-
expect { client.files_edit(title: %q[Brand new title]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
21
|
-
end
|
22
|
-
it 'requires title' do
|
23
|
-
expect { client.files_edit(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :title missing/
|
24
|
-
end
|
25
|
-
end
|
26
|
-
context 'files_getUploadURLExternal' do
|
27
|
-
it 'requires filename' do
|
28
|
-
expect { client.files_getUploadURLExternal(length: %q[53072]) }.to raise_error ArgumentError, /Required arguments :filename missing/
|
29
|
-
end
|
30
|
-
it 'requires length' do
|
31
|
-
expect { client.files_getUploadURLExternal(filename: %q[laughingoutloudcat.jpg]) }.to raise_error ArgumentError, /Required arguments :length missing/
|
32
|
-
end
|
33
|
-
end
|
34
|
-
context 'files_info' do
|
35
|
-
it 'requires file' do
|
36
|
-
expect { client.files_info }.to raise_error ArgumentError, /Required arguments :file missing/
|
37
|
-
end
|
38
|
-
end
|
39
|
-
context 'files_revokePublicURL' do
|
40
|
-
it 'requires file' do
|
41
|
-
expect { client.files_revokePublicURL }.to raise_error ArgumentError, /Required arguments :file missing/
|
42
|
-
end
|
43
|
-
end
|
44
|
-
context 'files_share' do
|
45
|
-
it 'requires file' do
|
46
|
-
expect { client.files_share(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
47
|
-
end
|
48
|
-
it 'requires channel' do
|
49
|
-
expect { client.files_share(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
50
|
-
end
|
51
|
-
end
|
52
|
-
context 'files_sharedPublicURL' do
|
53
|
-
it 'requires file' do
|
54
|
-
expect { client.files_sharedPublicURL }.to raise_error ArgumentError, /Required arguments :file missing/
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::FunctionsDistributionsPermissions do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'functions.distributions.permissions_set' do
|
9
|
-
end
|
10
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Functions do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'functions_completeError' do
|
9
|
-
it 'requires error' do
|
10
|
-
expect { client.functions_completeError(function_execution_id: %q[Fx12345ABCDE]) }.to raise_error ArgumentError, /Required arguments :error missing/
|
11
|
-
end
|
12
|
-
it 'requires function_execution_id' do
|
13
|
-
expect { client.functions_completeError(error: %q[]) }.to raise_error ArgumentError, /Required arguments :function_execution_id missing/
|
14
|
-
end
|
15
|
-
end
|
16
|
-
context 'functions_completeSuccess' do
|
17
|
-
it 'requires function_execution_id' do
|
18
|
-
expect { client.functions_completeSuccess(outputs: %q[{"customer_id": "U0BPQUNTA"}]) }.to raise_error ArgumentError, /Required arguments :function_execution_id missing/
|
19
|
-
end
|
20
|
-
it 'requires outputs' do
|
21
|
-
expect { client.functions_completeSuccess(function_execution_id: %q[Fx12345ABCDE]) }.to raise_error ArgumentError, /Required arguments :outputs missing/
|
22
|
-
end
|
23
|
-
it 'encodes outputs as json' do
|
24
|
-
expect(client).to receive(:post).with('functions.completeSuccess', {function_execution_id: %q[Fx12345ABCDE], outputs: %q[{"data":["data"]}]})
|
25
|
-
client.functions_completeSuccess(function_execution_id: %q[Fx12345ABCDE], outputs: {:data=>["data"]})
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::FunctionsWorkflowsStepsResponses do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'functions.workflows.steps.responses_export' do
|
9
|
-
it 'requires step_id' do
|
10
|
-
expect { client.functions_workflows_steps_responses_export }.to raise_error ArgumentError, /Required arguments :step_id missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::FunctionsWorkflowsSteps do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'functions.workflows.steps_list' do
|
9
|
-
it 'requires function_id' do
|
10
|
-
expect { client.functions_workflows_steps_list }.to raise_error ArgumentError, /Required arguments :function_id missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Migration do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'migration_exchange' do
|
9
|
-
it 'requires users' do
|
10
|
-
expect { client.migration_exchange }.to raise_error ArgumentError, /Required arguments :users missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::OauthV2 do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'oauth.v2_exchange' do
|
9
|
-
it 'requires client_id' do
|
10
|
-
expect { client.oauth_v2_exchange(client_secret: %q[e1b9e11dfcd19c1982d5de12921e17e8c]) }.to raise_error ArgumentError, /Required arguments :client_id missing/
|
11
|
-
end
|
12
|
-
it 'requires client_secret' do
|
13
|
-
expect { client.oauth_v2_exchange(client_id: %q[4123121235.9872358710]) }.to raise_error ArgumentError, /Required arguments :client_secret missing/
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Pins do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'pins_add' do
|
9
|
-
it 'requires channel' do
|
10
|
-
expect { client.pins_add }.to raise_error ArgumentError, /Required arguments :channel missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'pins_list' do
|
14
|
-
it 'requires channel' do
|
15
|
-
expect { client.pins_list }.to raise_error ArgumentError, /Required arguments :channel missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
context 'pins_remove' do
|
19
|
-
it 'requires channel' do
|
20
|
-
expect { client.pins_remove }.to raise_error ArgumentError, /Required arguments :channel missing/
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Reactions do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'reactions_add' do
|
9
|
-
it 'requires channel' do
|
10
|
-
expect { client.reactions_add(name: %q[thumbsup], timestamp: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
11
|
-
end
|
12
|
-
it 'requires name' do
|
13
|
-
expect { client.reactions_add(channel: %q[C1234567890], timestamp: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :name missing/
|
14
|
-
end
|
15
|
-
it 'requires timestamp' do
|
16
|
-
expect { client.reactions_add(channel: %q[C1234567890], name: %q[thumbsup]) }.to raise_error ArgumentError, /Required arguments :timestamp missing/
|
17
|
-
end
|
18
|
-
end
|
19
|
-
context 'reactions_remove' do
|
20
|
-
it 'requires name' do
|
21
|
-
expect { client.reactions_remove }.to raise_error ArgumentError, /Required arguments :name missing/
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Reminders do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'reminders_add' do
|
9
|
-
it 'requires text' do
|
10
|
-
expect { client.reminders_add(time: %q[1602288000]) }.to raise_error ArgumentError, /Required arguments :text missing/
|
11
|
-
end
|
12
|
-
it 'requires time' do
|
13
|
-
expect { client.reminders_add(text: %q[eat a banana]) }.to raise_error ArgumentError, /Required arguments :time missing/
|
14
|
-
end
|
15
|
-
end
|
16
|
-
context 'reminders_complete' do
|
17
|
-
it 'requires reminder' do
|
18
|
-
expect { client.reminders_complete }.to raise_error ArgumentError, /Required arguments :reminder missing/
|
19
|
-
end
|
20
|
-
end
|
21
|
-
context 'reminders_delete' do
|
22
|
-
it 'requires reminder' do
|
23
|
-
expect { client.reminders_delete }.to raise_error ArgumentError, /Required arguments :reminder missing/
|
24
|
-
end
|
25
|
-
end
|
26
|
-
context 'reminders_info' do
|
27
|
-
it 'requires reminder' do
|
28
|
-
expect { client.reminders_info }.to raise_error ArgumentError, /Required arguments :reminder missing/
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Search do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'search_all' do
|
9
|
-
it 'requires query' do
|
10
|
-
expect { client.search_all }.to raise_error ArgumentError, /Required arguments :query missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'search_files' do
|
14
|
-
it 'requires query' do
|
15
|
-
expect { client.search_files }.to raise_error ArgumentError, /Required arguments :query missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
context 'search_messages' do
|
19
|
-
it 'requires query' do
|
20
|
-
expect { client.search_messages }.to raise_error ArgumentError, /Required arguments :query missing/
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::TeamExternalteams do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'team.externalTeams_disconnect' do
|
9
|
-
it 'requires target_team' do
|
10
|
-
expect { client.team_externalTeams_disconnect }.to raise_error ArgumentError, /Required arguments :target_team missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::ToolingTokens do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'tooling.tokens_rotate' do
|
9
|
-
it 'requires refresh_token' do
|
10
|
-
expect { client.tooling_tokens_rotate }.to raise_error ArgumentError, /Required arguments :refresh_token missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Usergroups do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'usergroups_create' do
|
9
|
-
it 'requires name' do
|
10
|
-
expect { client.usergroups_create }.to raise_error ArgumentError, /Required arguments :name missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'usergroups_disable' do
|
14
|
-
it 'requires usergroup' do
|
15
|
-
expect { client.usergroups_disable }.to raise_error ArgumentError, /Required arguments :usergroup missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
context 'usergroups_enable' do
|
19
|
-
it 'requires usergroup' do
|
20
|
-
expect { client.usergroups_enable }.to raise_error ArgumentError, /Required arguments :usergroup missing/
|
21
|
-
end
|
22
|
-
end
|
23
|
-
context 'usergroups_update' do
|
24
|
-
it 'requires usergroup' do
|
25
|
-
expect { client.usergroups_update }.to raise_error ArgumentError, /Required arguments :usergroup missing/
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::UsergroupsUsers do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'usergroups.users_list' do
|
9
|
-
it 'requires usergroup' do
|
10
|
-
expect { client.usergroups_users_list }.to raise_error ArgumentError, /Required arguments :usergroup missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'usergroups.users_update' do
|
14
|
-
it 'requires usergroup' do
|
15
|
-
expect { client.usergroups_users_update(users: %q[U060R4BJ4,U060RNRCZ]) }.to raise_error ArgumentError, /Required arguments :usergroup missing/
|
16
|
-
end
|
17
|
-
it 'requires users' do
|
18
|
-
expect { client.usergroups_users_update(usergroup: %q[S0604QSJC]) }.to raise_error ArgumentError, /Required arguments :users missing/
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::UsersAdmin do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'users.admin_invite' do
|
9
|
-
it 'requires email' do
|
10
|
-
expect { client.users_admin_invite }.to raise_error ArgumentError, /Required arguments :email missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'users.admin_setInactive' do
|
14
|
-
it 'requires user' do
|
15
|
-
expect { client.users_admin_setInactive }.to raise_error ArgumentError, /Required arguments :user missing/
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::UsersDiscoverablecontacts do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'users.discoverableContacts_lookup' do
|
9
|
-
it 'requires email' do
|
10
|
-
expect { client.users_discoverableContacts_lookup }.to raise_error ArgumentError, /Required arguments :email missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::UsersProfile do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'users.profile_set' do
|
9
|
-
it 'encodes profile as json' do
|
10
|
-
expect(client).to receive(:post).with('users.profile.set', {profile: %q[{"data":["data"]}]})
|
11
|
-
client.users_profile_set(profile: {:data=>["data"]})
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Views do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'views_open' do
|
9
|
-
it 'requires one of trigger_id, interactivity_pointer' do
|
10
|
-
expect { client.views_open(view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
11
|
-
|
12
|
-
expect(client).to receive(:post).with('views.open', {trigger_id: %q[12345.98765.abcd2358fdea], view: %q[]})
|
13
|
-
client.views_open(trigger_id: %q[12345.98765.abcd2358fdea], view: %q[])
|
14
|
-
|
15
|
-
expect(client).to receive(:post).with('views.open', {interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[]})
|
16
|
-
client.views_open(interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[])
|
17
|
-
|
18
|
-
expect { client.views_open(trigger_id: %q[12345.98765.abcd2358fdea], interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
19
|
-
end
|
20
|
-
it 'encodes view as json' do
|
21
|
-
expect(client).to receive(:post).with('views.open', {view: %q[{"data":["data"]}], trigger_id: %q[12345.98765.abcd2358fdea]})
|
22
|
-
client.views_open(view: {:data=>["data"]}, trigger_id: %q[12345.98765.abcd2358fdea])
|
23
|
-
end
|
24
|
-
end
|
25
|
-
context 'views_publish' do
|
26
|
-
it 'encodes view as json' do
|
27
|
-
expect(client).to receive(:post).with('views.publish', {user_id: %q[U0BPQUNTA], view: %q[{"data":["data"]}]})
|
28
|
-
client.views_publish(user_id: %q[U0BPQUNTA], view: {:data=>["data"]})
|
29
|
-
end
|
30
|
-
end
|
31
|
-
context 'views_push' do
|
32
|
-
it 'requires one of trigger_id, interactivity_pointer' do
|
33
|
-
expect { client.views_push(view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
34
|
-
|
35
|
-
expect(client).to receive(:post).with('views.push', {trigger_id: %q[12345.98765.abcd2358fdea], view: %q[]})
|
36
|
-
client.views_push(trigger_id: %q[12345.98765.abcd2358fdea], view: %q[])
|
37
|
-
|
38
|
-
expect(client).to receive(:post).with('views.push', {interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[]})
|
39
|
-
client.views_push(interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[])
|
40
|
-
|
41
|
-
expect { client.views_push(trigger_id: %q[12345.98765.abcd2358fdea], interactivity_pointer: %q[12345.98765.abcd2358fdea], view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
42
|
-
end
|
43
|
-
it 'encodes view as json' do
|
44
|
-
expect(client).to receive(:post).with('views.push', {view: %q[{"data":["data"]}], trigger_id: %q[12345.98765.abcd2358fdea]})
|
45
|
-
client.views_push(view: {:data=>["data"]}, trigger_id: %q[12345.98765.abcd2358fdea])
|
46
|
-
end
|
47
|
-
end
|
48
|
-
context 'views_update' do
|
49
|
-
it 'requires one of external_id, view_id' do
|
50
|
-
expect { client.views_update(view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
51
|
-
|
52
|
-
expect(client).to receive(:post).with('views.update', {external_id: %q[bmarley_view2], view: %q[]})
|
53
|
-
client.views_update(external_id: %q[bmarley_view2], view: %q[])
|
54
|
-
|
55
|
-
expect(client).to receive(:post).with('views.update', {view_id: %q[VMM512F2U], view: %q[]})
|
56
|
-
client.views_update(view_id: %q[VMM512F2U], view: %q[])
|
57
|
-
|
58
|
-
expect { client.views_update(external_id: %q[bmarley_view2], view_id: %q[VMM512F2U], view: %q[]) }.to raise_error ArgumentError, /Exactly one of/
|
59
|
-
end
|
60
|
-
it 'encodes view as json' do
|
61
|
-
expect(client).to receive(:post).with('views.update', {view: %q[{"data":["data"]}], external_id: %q[bmarley_view2]})
|
62
|
-
client.views_update(view: {:data=>["data"]}, external_id: %q[bmarley_view2])
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# This file was auto-generated by lib/tasks/web.rake
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
RSpec.describe Slack::Web::Api::Endpoints::Workflows do
|
7
|
-
let(:client) { Slack::Web::Client.new }
|
8
|
-
context 'workflows_stepCompleted' do
|
9
|
-
it 'requires workflow_step_execute_id' do
|
10
|
-
expect { client.workflows_stepCompleted }.to raise_error ArgumentError, /Required arguments :workflow_step_execute_id missing/
|
11
|
-
end
|
12
|
-
end
|
13
|
-
context 'workflows_stepFailed' do
|
14
|
-
it 'requires error' do
|
15
|
-
expect { client.workflows_stepFailed(workflow_step_execute_id: %q[]) }.to raise_error ArgumentError, /Required arguments :error missing/
|
16
|
-
end
|
17
|
-
it 'requires workflow_step_execute_id' do
|
18
|
-
expect { client.workflows_stepFailed(error: %q[]) }.to raise_error ArgumentError, /Required arguments :workflow_step_execute_id missing/
|
19
|
-
end
|
20
|
-
it 'encodes error as json' do
|
21
|
-
expect(client).to receive(:post).with('workflows.stepFailed', {error: %q[{"data":["data"]}], workflow_step_execute_id: %q[]})
|
22
|
-
client.workflows_stepFailed(error: {:data=>["data"]}, workflow_step_execute_id: %q[])
|
23
|
-
end
|
24
|
-
end
|
25
|
-
context 'workflows_updateStep' do
|
26
|
-
it 'requires workflow_step_edit_id' do
|
27
|
-
expect { client.workflows_updateStep }.to raise_error ArgumentError, /Required arguments :workflow_step_edit_id missing/
|
28
|
-
end
|
29
|
-
it 'encodes inputs, outputs as json' do
|
30
|
-
expect(client).to receive(:post).with('workflows.updateStep', {workflow_step_edit_id: %q[], inputs: %q[{"data":["data"]}], outputs: %q[{"data":["data"]}]})
|
31
|
-
client.workflows_updateStep(workflow_step_edit_id: %q[], inputs: {:data=>["data"]}, outputs: {:data=>["data"]})
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|