slack-ruby-client 0.15.1 → 0.16.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/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +0 -14
- data/.travis.yml +1 -4
- data/CHANGELOG.md +8 -0
- data/CONTRIBUTING.md +3 -10
- data/README.md +9 -27
- data/UPGRADING.md +14 -2
- data/bin/commands.rb +7 -0
- data/bin/commands/admin_analytics.rb +15 -0
- data/bin/commands/admin_apps.rb +15 -2
- data/bin/commands/admin_barriers.rb +47 -0
- data/bin/commands/admin_conversations.rb +154 -2
- data/bin/commands/admin_conversations_ekm.rb +17 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +4 -4
- data/bin/commands/admin_conversations_whitelist.rb +1 -1
- data/bin/commands/admin_emoji.rb +1 -1
- data/bin/commands/admin_usergroups.rb +2 -2
- data/bin/commands/admin_users.rb +2 -2
- data/bin/commands/admin_users_session.rb +22 -0
- data/bin/commands/api.rb +0 -1
- data/bin/commands/apps_connections.rb +13 -0
- data/bin/commands/apps_event_authorizations.rb +16 -0
- data/bin/commands/auth_teams.rb +16 -0
- data/bin/commands/bots.rb +1 -0
- data/bin/commands/channels.rb +6 -3
- data/bin/commands/chat.rb +4 -4
- data/bin/commands/chat_scheduledMessages.rb +1 -0
- data/bin/commands/conversations.rb +14 -2
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +6 -5
- data/bin/commands/files_remote.rb +2 -2
- data/bin/commands/groups.rb +5 -3
- data/bin/commands/im.rb +1 -1
- data/bin/commands/migration.rb +1 -0
- data/bin/commands/mpim.rb +3 -3
- data/bin/commands/pins.rb +0 -2
- data/bin/commands/reactions.rb +1 -0
- data/bin/commands/search.rb +4 -1
- data/bin/commands/team.rb +3 -0
- data/bin/commands/usergroups.rb +6 -1
- data/bin/commands/usergroups_users.rb +2 -0
- data/bin/commands/users.rb +5 -3
- data/bin/commands/users_profile.rb +5 -5
- data/bin/commands/views.rb +1 -1
- data/bin/commands/workflows.rb +38 -0
- data/lib/slack-ruby-client.rb +2 -0
- data/lib/slack/events/request.rb +5 -1
- data/lib/slack/real_time/client.rb +0 -1
- data/lib/slack/real_time/concurrency.rb +0 -2
- data/lib/slack/real_time/config.rb +5 -4
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +14 -0
- data/lib/slack/web/api/endpoints/admin_analytics.rb +26 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +22 -2
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +231 -1
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_emoji.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_users.rb +4 -6
- data/lib/slack/web/api/endpoints/admin_users_session.rb +38 -0
- data/lib/slack/web/api/endpoints/api.rb +0 -2
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bots.rb +2 -0
- data/lib/slack/web/api/endpoints/channels.rb +9 -3
- data/lib/slack/web/api/endpoints/chat.rb +3 -3
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +2 -0
- data/lib/slack/web/api/endpoints/conversations.rb +21 -1
- data/lib/slack/web/api/endpoints/files.rb +4 -2
- data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
- data/lib/slack/web/api/endpoints/groups.rb +7 -3
- data/lib/slack/web/api/endpoints/im.rb +1 -1
- data/lib/slack/web/api/endpoints/migration.rb +2 -0
- data/lib/slack/web/api/endpoints/mpim.rb +3 -3
- data/lib/slack/web/api/endpoints/pins.rb +0 -5
- data/lib/slack/web/api/endpoints/reactions.rb +2 -0
- data/lib/slack/web/api/endpoints/search.rb +6 -0
- data/lib/slack/web/api/endpoints/team.rb +6 -0
- 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/users.rb +7 -5
- data/lib/slack/web/api/endpoints/users_profile.rb +3 -3
- data/lib/slack/web/api/endpoints/views.rb +1 -1
- data/lib/slack/web/api/endpoints/workflows.rb +61 -0
- data/lib/slack/web/api/errors.rb +194 -0
- data/lib/slack/web/api/errors/internal_error.rb +14 -0
- data/lib/slack/web/api/templates/endpoints.erb +1 -0
- data/lib/slack/web/api/templates/method_spec.erb +1 -1
- data/lib/slack/web/faraday/connection.rb +1 -1
- data/lib/slack/web/faraday/response/raise_error.rb +16 -1
- data/lib/slack/web/faraday/response/wrap_error.rb +18 -0
- data/lib/tasks/web.rake +7 -3
- data/spec/slack/events/request_spec.rb +7 -3
- data/spec/slack/real_time/client_spec.rb +1 -1
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +5 -5
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +85 -0
- data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +5 -5
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +6 -6
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +10 -10
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +6 -6
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +15 -23
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/apps_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/calls_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/conversations_spec.rb +20 -12
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/files_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/im_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/mpim_spec.rb +4 -4
- data/spec/slack/web/api/endpoints/oauth_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/pins_spec.rb +1 -4
- data/spec/slack/web/api/endpoints/reactions_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/reminders_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
- data/spec/slack/web/client_spec.rb +56 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +7 -6
- metadata +32 -19
- data/examples/hi_real_time/Gemfile +0 -6
- data/examples/hi_real_time/hi.gif +0 -0
- data/examples/hi_real_time/hi.rb +0 -41
- data/examples/hi_real_time_async_celluloid/Gemfile +0 -7
- data/examples/hi_real_time_async_celluloid/Procfile +0 -2
- data/examples/hi_real_time_async_celluloid/hi.rb +0 -39
- data/examples/hi_real_time_async_eventmachine/Gemfile +0 -7
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/examples/hi_real_time_async_eventmachine/hi.rb +0 -39
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -142
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -85
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -116
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -57
- data/spec/slack/web/api/errors/service_unavailable_spec.rb +0 -17
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminTeams do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'admin.teams_create' do
|
9
9
|
it 'requires team_domain' do
|
10
|
-
expect { client.admin_teams_create(team_name:
|
10
|
+
expect { client.admin_teams_create(team_name: %q[]) }.to raise_error ArgumentError, /Required arguments :team_domain missing/
|
11
11
|
end
|
12
12
|
it 'requires team_name' do
|
13
|
-
expect { client.admin_teams_create(team_domain:
|
13
|
+
expect { client.admin_teams_create(team_domain: %q[]) }.to raise_error ArgumentError, /Required arguments :team_name missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -7,18 +7,18 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsergroups do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'admin.usergroups_addChannels' do
|
9
9
|
it 'requires channel_ids' do
|
10
|
-
expect { client.admin_usergroups_addChannels(usergroup_id:
|
10
|
+
expect { client.admin_usergroups_addChannels(usergroup_id: %q[S00000000]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
|
11
11
|
end
|
12
12
|
it 'requires usergroup_id' do
|
13
|
-
expect { client.admin_usergroups_addChannels(channel_ids:
|
13
|
+
expect { client.admin_usergroups_addChannels(channel_ids: %q[C00000000,C00000001]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
context 'admin.usergroups_addTeams' do
|
17
17
|
it 'requires team_ids' do
|
18
|
-
expect { client.admin_usergroups_addTeams(usergroup_id:
|
18
|
+
expect { client.admin_usergroups_addTeams(usergroup_id: %q[S12345678]) }.to raise_error ArgumentError, /Required arguments :team_ids missing/
|
19
19
|
end
|
20
20
|
it 'requires usergroup_id' do
|
21
|
-
expect { client.admin_usergroups_addTeams(team_ids:
|
21
|
+
expect { client.admin_usergroups_addTeams(team_ids: %q[T12345678,T98765432]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
|
22
22
|
end
|
23
23
|
end
|
24
24
|
context 'admin.usergroups_listChannels' do
|
@@ -28,10 +28,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsergroups do
|
|
28
28
|
end
|
29
29
|
context 'admin.usergroups_removeChannels' do
|
30
30
|
it 'requires channel_ids' do
|
31
|
-
expect { client.admin_usergroups_removeChannels(usergroup_id:
|
31
|
+
expect { client.admin_usergroups_removeChannels(usergroup_id: %q[S00000000]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
|
32
32
|
end
|
33
33
|
it 'requires usergroup_id' do
|
34
|
-
expect { client.admin_usergroups_removeChannels(channel_ids:
|
34
|
+
expect { client.admin_usergroups_removeChannels(channel_ids: %q[C00000000,C00000001]) }.to raise_error ArgumentError, /Required arguments :usergroup_id missing/
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -5,6 +5,14 @@ require 'spec_helper'
|
|
5
5
|
|
6
6
|
RSpec.describe Slack::Web::Api::Endpoints::AdminUsersSession do
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
|
+
context 'admin.users.session_invalidate' do
|
9
|
+
it 'requires session_id' do
|
10
|
+
expect { client.admin_users_session_invalidate(team_id: %q[T1234]) }.to raise_error ArgumentError, /Required arguments :session_id missing/
|
11
|
+
end
|
12
|
+
it 'requires team_id' do
|
13
|
+
expect { client.admin_users_session_invalidate(session_id: %q[12345]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
14
|
+
end
|
15
|
+
end
|
8
16
|
context 'admin.users.session_reset' do
|
9
17
|
it 'requires user_id' do
|
10
18
|
expect { client.admin_users_session_reset }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
@@ -7,69 +7,61 @@ RSpec.describe Slack::Web::Api::Endpoints::AdminUsers do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'admin.users_assign' do
|
9
9
|
it 'requires team_id' do
|
10
|
-
expect { client.admin_users_assign(user_id:
|
10
|
+
expect { client.admin_users_assign(user_id: %q[]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
11
11
|
end
|
12
12
|
it 'requires user_id' do
|
13
|
-
expect { client.admin_users_assign(team_id:
|
13
|
+
expect { client.admin_users_assign(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
context 'admin.users_invite' do
|
17
17
|
it 'requires channel_ids' do
|
18
|
-
expect { client.admin_users_invite(email:
|
18
|
+
expect { client.admin_users_invite(email: %q[joe@email.com], team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :channel_ids missing/
|
19
19
|
end
|
20
20
|
it 'requires email' do
|
21
|
-
expect { client.admin_users_invite(channel_ids:
|
21
|
+
expect { client.admin_users_invite(channel_ids: %q[C1A2B3C4D,C26Z25Y24], team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :email missing/
|
22
22
|
end
|
23
23
|
it 'requires team_id' do
|
24
|
-
expect { client.admin_users_invite(channel_ids:
|
25
|
-
end
|
26
|
-
end
|
27
|
-
context 'admin.users_list' do
|
28
|
-
it 'requires team_id' do
|
29
|
-
expect { client.admin_users_list }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
24
|
+
expect { client.admin_users_invite(channel_ids: %q[C1A2B3C4D,C26Z25Y24], email: %q[joe@email.com]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
30
25
|
end
|
31
26
|
end
|
32
27
|
context 'admin.users_remove' do
|
33
28
|
it 'requires team_id' do
|
34
|
-
expect { client.admin_users_remove(user_id:
|
29
|
+
expect { client.admin_users_remove(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
35
30
|
end
|
36
31
|
it 'requires user_id' do
|
37
|
-
expect { client.admin_users_remove(team_id:
|
32
|
+
expect { client.admin_users_remove(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
38
33
|
end
|
39
34
|
end
|
40
35
|
context 'admin.users_setAdmin' do
|
41
36
|
it 'requires team_id' do
|
42
|
-
expect { client.admin_users_setAdmin(user_id:
|
37
|
+
expect { client.admin_users_setAdmin(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
43
38
|
end
|
44
39
|
it 'requires user_id' do
|
45
|
-
expect { client.admin_users_setAdmin(team_id:
|
40
|
+
expect { client.admin_users_setAdmin(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
46
41
|
end
|
47
42
|
end
|
48
43
|
context 'admin.users_setExpiration' do
|
49
44
|
it 'requires expiration_ts' do
|
50
|
-
expect { client.admin_users_setExpiration(
|
51
|
-
end
|
52
|
-
it 'requires team_id' do
|
53
|
-
expect { client.admin_users_setExpiration(expiration_ts: '1234567890', user_id: 'W12345678') }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
45
|
+
expect { client.admin_users_setExpiration(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :expiration_ts missing/
|
54
46
|
end
|
55
47
|
it 'requires user_id' do
|
56
|
-
expect { client.admin_users_setExpiration(expiration_ts:
|
48
|
+
expect { client.admin_users_setExpiration(expiration_ts: %q[1234567890]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
57
49
|
end
|
58
50
|
end
|
59
51
|
context 'admin.users_setOwner' do
|
60
52
|
it 'requires team_id' do
|
61
|
-
expect { client.admin_users_setOwner(user_id:
|
53
|
+
expect { client.admin_users_setOwner(user_id: %q[]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
62
54
|
end
|
63
55
|
it 'requires user_id' do
|
64
|
-
expect { client.admin_users_setOwner(team_id:
|
56
|
+
expect { client.admin_users_setOwner(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
65
57
|
end
|
66
58
|
end
|
67
59
|
context 'admin.users_setRegular' do
|
68
60
|
it 'requires team_id' do
|
69
|
-
expect { client.admin_users_setRegular(user_id:
|
61
|
+
expect { client.admin_users_setRegular(user_id: %q[W12345678]) }.to raise_error ArgumentError, /Required arguments :team_id missing/
|
70
62
|
end
|
71
63
|
it 'requires user_id' do
|
72
|
-
expect { client.admin_users_setRegular(team_id:
|
64
|
+
expect { client.admin_users_setRegular(team_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user_id missing/
|
73
65
|
end
|
74
66
|
end
|
75
67
|
end
|
@@ -0,0 +1,13 @@
|
|
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::AppsEventAuthorizations do
|
7
|
+
let(:client) { Slack::Web::Client.new }
|
8
|
+
context 'apps.event.authorizations_list' do
|
9
|
+
it 'requires event_context' do
|
10
|
+
expect { client.apps_event_authorizations_list }.to raise_error ArgumentError, /Required arguments :event_context missing/
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::AppsPermissions do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'apps.permissions_request' do
|
9
9
|
it 'requires scopes' do
|
10
|
-
expect { client.apps_permissions_request(trigger_id:
|
10
|
+
expect { client.apps_permissions_request(trigger_id: %q[]) }.to raise_error ArgumentError, /Required arguments :scopes missing/
|
11
11
|
end
|
12
12
|
it 'requires trigger_id' do
|
13
|
-
expect { client.apps_permissions_request(scopes:
|
13
|
+
expect { client.apps_permissions_request(scopes: %q[]) }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -7,13 +7,13 @@ RSpec.describe Slack::Web::Api::Endpoints::AppsPermissionsUsers do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'apps.permissions.users_request' do
|
9
9
|
it 'requires scopes' do
|
10
|
-
expect { client.apps_permissions_users_request(trigger_id:
|
10
|
+
expect { client.apps_permissions_users_request(trigger_id: %q[], user: %q[]) }.to raise_error ArgumentError, /Required arguments :scopes missing/
|
11
11
|
end
|
12
12
|
it 'requires trigger_id' do
|
13
|
-
expect { client.apps_permissions_users_request(scopes:
|
13
|
+
expect { client.apps_permissions_users_request(scopes: %q[], user: %q[]) }.to raise_error ArgumentError, /Required arguments :trigger_id missing/
|
14
14
|
end
|
15
15
|
it 'requires user' do
|
16
|
-
expect { client.apps_permissions_users_request(scopes:
|
16
|
+
expect { client.apps_permissions_users_request(scopes: %q[], trigger_id: %q[]) }.to raise_error ArgumentError, /Required arguments :user missing/
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Apps do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'apps_uninstall' do
|
9
9
|
it 'requires client_id' do
|
10
|
-
expect { client.apps_uninstall(client_secret:
|
10
|
+
expect { client.apps_uninstall(client_secret: %q[f25b5ceaf8a3c2a2c4f52bb4f0b0499e]) }.to raise_error ArgumentError, /Required arguments :client_id missing/
|
11
11
|
end
|
12
12
|
it 'requires client_secret' do
|
13
|
-
expect { client.apps_uninstall(client_id:
|
13
|
+
expect { client.apps_uninstall(client_id: %q[56579136444.26251006572]) }.to raise_error ArgumentError, /Required arguments :client_secret missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -7,18 +7,18 @@ RSpec.describe Slack::Web::Api::Endpoints::CallsParticipants do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'calls.participants_add' do
|
9
9
|
it 'requires id' do
|
10
|
-
expect { client.calls_participants_add(users:
|
10
|
+
expect { client.calls_participants_add(users: %q[[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]]) }.to raise_error ArgumentError, /Required arguments :id missing/
|
11
11
|
end
|
12
12
|
it 'requires users' do
|
13
|
-
expect { client.calls_participants_add(id:
|
13
|
+
expect { client.calls_participants_add(id: %q[R0E69JAIF]) }.to raise_error ArgumentError, /Required arguments :users missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
context 'calls.participants_remove' do
|
17
17
|
it 'requires id' do
|
18
|
-
expect { client.calls_participants_remove(users:
|
18
|
+
expect { client.calls_participants_remove(users: %q[[{"slack_id": "U1H77"}, {"external_id": "54321678", "display_name": "External User", "avatar_url": "https://example.com/users/avatar1234.jpg"}]]) }.to raise_error ArgumentError, /Required arguments :id missing/
|
19
19
|
end
|
20
20
|
it 'requires users' do
|
21
|
-
expect { client.calls_participants_remove(id:
|
21
|
+
expect { client.calls_participants_remove(id: %q[R0E69JAIF]) }.to raise_error ArgumentError, /Required arguments :users missing/
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Calls do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'calls_add' do
|
9
9
|
it 'requires external_unique_id' do
|
10
|
-
expect { client.calls_add(join_url:
|
10
|
+
expect { client.calls_add(join_url: %q[https://example.com/calls/1234567890]) }.to raise_error ArgumentError, /Required arguments :external_unique_id missing/
|
11
11
|
end
|
12
12
|
it 'requires join_url' do
|
13
|
-
expect { client.calls_add(external_unique_id:
|
13
|
+
expect { client.calls_add(external_unique_id: %q[025169F6-E37A-4E62-BB54-7F93A0FC4C1F]) }.to raise_error ArgumentError, /Required arguments :join_url missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
context 'calls_end' do
|
@@ -32,10 +32,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
|
|
32
32
|
end
|
33
33
|
context 'conversations_invite' do
|
34
34
|
it 'requires channel' do
|
35
|
-
expect { client.conversations_invite(users:
|
35
|
+
expect { client.conversations_invite(users: %q[W1234567890,U2345678901,U3456789012]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
36
36
|
end
|
37
37
|
it 'requires users' do
|
38
|
-
expect { client.conversations_invite(channel:
|
38
|
+
expect { client.conversations_invite(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :users missing/
|
39
39
|
end
|
40
40
|
end
|
41
41
|
context 'conversations_join' do
|
@@ -45,10 +45,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
|
|
45
45
|
end
|
46
46
|
context 'conversations_kick' do
|
47
47
|
it 'requires channel' do
|
48
|
-
expect { client.conversations_kick(user:
|
48
|
+
expect { client.conversations_kick(user: %q[W1234567890]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
49
49
|
end
|
50
50
|
it 'requires user' do
|
51
|
-
expect { client.conversations_kick(channel:
|
51
|
+
expect { client.conversations_kick(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :user missing/
|
52
52
|
end
|
53
53
|
end
|
54
54
|
context 'conversations_leave' do
|
@@ -56,6 +56,14 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
|
|
56
56
|
expect { client.conversations_leave }.to raise_error ArgumentError, /Required arguments :channel missing/
|
57
57
|
end
|
58
58
|
end
|
59
|
+
context 'conversations_mark' do
|
60
|
+
it 'requires channel' do
|
61
|
+
expect { client.conversations_mark(ts: %q[1593473566.000200]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
62
|
+
end
|
63
|
+
it 'requires ts' do
|
64
|
+
expect { client.conversations_mark(channel: %q[C012345678]) }.to raise_error ArgumentError, /Required arguments :ts missing/
|
65
|
+
end
|
66
|
+
end
|
59
67
|
context 'conversations_members' do
|
60
68
|
it 'requires channel' do
|
61
69
|
expect { client.conversations_members }.to raise_error ArgumentError, /Required arguments :channel missing/
|
@@ -63,34 +71,34 @@ RSpec.describe Slack::Web::Api::Endpoints::Conversations do
|
|
63
71
|
end
|
64
72
|
context 'conversations_rename' do
|
65
73
|
it 'requires channel' do
|
66
|
-
expect { client.conversations_rename(name:
|
74
|
+
expect { client.conversations_rename(name: %q[]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
67
75
|
end
|
68
76
|
it 'requires name' do
|
69
|
-
expect { client.conversations_rename(channel:
|
77
|
+
expect { client.conversations_rename(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :name missing/
|
70
78
|
end
|
71
79
|
end
|
72
80
|
context 'conversations_replies' do
|
73
81
|
it 'requires channel' do
|
74
|
-
expect { client.conversations_replies(ts:
|
82
|
+
expect { client.conversations_replies(ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
75
83
|
end
|
76
84
|
it 'requires ts' do
|
77
|
-
expect { client.conversations_replies(channel:
|
85
|
+
expect { client.conversations_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :ts missing/
|
78
86
|
end
|
79
87
|
end
|
80
88
|
context 'conversations_setPurpose' do
|
81
89
|
it 'requires channel' do
|
82
|
-
expect { client.conversations_setPurpose(purpose:
|
90
|
+
expect { client.conversations_setPurpose(purpose: %q[My More Special Purpose]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
83
91
|
end
|
84
92
|
it 'requires purpose' do
|
85
|
-
expect { client.conversations_setPurpose(channel:
|
93
|
+
expect { client.conversations_setPurpose(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :purpose missing/
|
86
94
|
end
|
87
95
|
end
|
88
96
|
context 'conversations_setTopic' do
|
89
97
|
it 'requires channel' do
|
90
|
-
expect { client.conversations_setTopic(topic:
|
98
|
+
expect { client.conversations_setTopic(topic: %q[Apply topically for best effects]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
91
99
|
end
|
92
100
|
it 'requires topic' do
|
93
|
-
expect { client.conversations_setTopic(channel:
|
101
|
+
expect { client.conversations_setTopic(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :topic missing/
|
94
102
|
end
|
95
103
|
end
|
96
104
|
context 'conversations_unarchive' do
|
@@ -7,10 +7,10 @@ RSpec.describe Slack::Web::Api::Endpoints::FilesComments do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'files.comments_delete' do
|
9
9
|
it 'requires file' do
|
10
|
-
expect { client.files_comments_delete(id:
|
10
|
+
expect { client.files_comments_delete(id: %q[Fc1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
11
11
|
end
|
12
12
|
it 'requires id' do
|
13
|
-
expect { client.files_comments_delete(file:
|
13
|
+
expect { client.files_comments_delete(file: %q[F1234567890]) }.to raise_error ArgumentError, /Required arguments :id missing/
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -7,13 +7,13 @@ RSpec.describe Slack::Web::Api::Endpoints::FilesRemote do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
8
8
|
context 'files.remote_add' do
|
9
9
|
it 'requires external_id' do
|
10
|
-
expect { client.files_remote_add(external_url:
|
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
11
|
end
|
12
12
|
it 'requires external_url' do
|
13
|
-
expect { client.files_remote_add(external_id:
|
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
14
|
end
|
15
15
|
it 'requires title' do
|
16
|
-
expect { client.files_remote_add(external_id:
|
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
17
|
end
|
18
18
|
end
|
19
19
|
context 'files.remote_share' do
|
@@ -12,10 +12,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Files do
|
|
12
12
|
end
|
13
13
|
context 'files_edit' do
|
14
14
|
it 'requires file' do
|
15
|
-
expect { client.files_edit(title:
|
15
|
+
expect { client.files_edit(title: %q[Brand new title]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
16
16
|
end
|
17
17
|
it 'requires title' do
|
18
|
-
expect { client.files_edit(file:
|
18
|
+
expect { client.files_edit(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :title missing/
|
19
19
|
end
|
20
20
|
end
|
21
21
|
context 'files_info' do
|
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Files do
|
|
30
30
|
end
|
31
31
|
context 'files_share' do
|
32
32
|
it 'requires file' do
|
33
|
-
expect { client.files_share(channel:
|
33
|
+
expect { client.files_share(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :file missing/
|
34
34
|
end
|
35
35
|
it 'requires channel' do
|
36
|
-
expect { client.files_share(file:
|
36
|
+
expect { client.files_share(file: %q[F2147483862]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
37
37
|
end
|
38
38
|
end
|
39
39
|
context 'files_sharedPublicURL' do
|
@@ -17,10 +17,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Im do
|
|
17
17
|
end
|
18
18
|
context 'im_mark' do
|
19
19
|
it 'requires channel' do
|
20
|
-
expect { client.im_mark(ts:
|
20
|
+
expect { client.im_mark(ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
21
21
|
end
|
22
22
|
it 'requires ts' do
|
23
|
-
expect { client.im_mark(channel:
|
23
|
+
expect { client.im_mark(channel: %q[D1234567890]) }.to raise_error ArgumentError, /Required arguments :ts missing/
|
24
24
|
end
|
25
25
|
end
|
26
26
|
context 'im_open' do
|
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Im do
|
|
30
30
|
end
|
31
31
|
context 'im_replies' do
|
32
32
|
it 'requires channel' do
|
33
|
-
expect { client.im_replies(thread_ts:
|
33
|
+
expect { client.im_replies(thread_ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
34
34
|
end
|
35
35
|
it 'requires thread_ts' do
|
36
|
-
expect { client.im_replies(channel:
|
36
|
+
expect { client.im_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -17,10 +17,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Mpim do
|
|
17
17
|
end
|
18
18
|
context 'mpim_mark' do
|
19
19
|
it 'requires channel' do
|
20
|
-
expect { client.mpim_mark(ts:
|
20
|
+
expect { client.mpim_mark(ts: %q[1593473566.000200]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
21
21
|
end
|
22
22
|
it 'requires ts' do
|
23
|
-
expect { client.mpim_mark(channel:
|
23
|
+
expect { client.mpim_mark(channel: %q[C012345678]) }.to raise_error ArgumentError, /Required arguments :ts missing/
|
24
24
|
end
|
25
25
|
end
|
26
26
|
context 'mpim_open' do
|
@@ -30,10 +30,10 @@ RSpec.describe Slack::Web::Api::Endpoints::Mpim do
|
|
30
30
|
end
|
31
31
|
context 'mpim_replies' do
|
32
32
|
it 'requires channel' do
|
33
|
-
expect { client.mpim_replies(thread_ts:
|
33
|
+
expect { client.mpim_replies(thread_ts: %q[1234567890.123456]) }.to raise_error ArgumentError, /Required arguments :channel missing/
|
34
34
|
end
|
35
35
|
it 'requires thread_ts' do
|
36
|
-
expect { client.mpim_replies(channel:
|
36
|
+
expect { client.mpim_replies(channel: %q[C1234567890]) }.to raise_error ArgumentError, /Required arguments :thread_ts missing/
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|