zoom_rb 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +83 -53
- data/Makefile +1 -1
- data/README.md +22 -4
- data/lib/zoom/actions/account.rb +33 -58
- data/lib/zoom/actions/billing.rb +38 -0
- data/lib/zoom/actions/dashboard.rb +33 -0
- data/lib/zoom/actions/groups.rb +17 -0
- data/lib/zoom/actions/im/chat.rb +16 -4
- data/lib/zoom/actions/meeting.rb +48 -40
- data/lib/zoom/actions/phone.rb +27 -0
- data/lib/zoom/actions/recording.rb +25 -16
- data/lib/zoom/actions/report.rb +9 -34
- data/lib/zoom/actions/roles.rb +41 -0
- data/lib/zoom/actions/sip_audio.rb +75 -0
- data/lib/zoom/actions/token.rb +35 -0
- data/lib/zoom/actions/user.rb +50 -64
- data/lib/zoom/actions/webinar.rb +33 -40
- data/lib/zoom/client.rb +27 -7
- data/lib/zoom/clients/oauth.rb +46 -3
- data/lib/zoom/constants/account/options/pay_modes.rb +12 -0
- data/lib/zoom/constants/account/settings/permitted_settings.rb +125 -0
- data/lib/zoom/constants/constants.rb +35 -0
- data/lib/zoom/constants/meeting/approval_types.rb +11 -0
- data/lib/zoom/constants/meeting/audio_type.rb +11 -0
- data/lib/zoom/constants/meeting/auto_recording.rb +11 -0
- data/lib/zoom/constants/meeting/registration_types.rb +11 -0
- data/lib/zoom/constants/meeting/types.rb +12 -0
- data/lib/zoom/constants/recurrence/monthly_weeks.rb +13 -0
- data/lib/zoom/constants/recurrence/types.rb +11 -0
- data/lib/zoom/constants/recurrence/weekly_days.rb +15 -0
- data/lib/zoom/constants/user/create_types.rb +12 -0
- data/lib/zoom/constants/user/types.rb +11 -0
- data/lib/zoom/constants/webinar/approval_types.rb +11 -0
- data/lib/zoom/constants/webinar/audio_type.rb +11 -0
- data/lib/zoom/constants/webinar/auto_recording.rb +11 -0
- data/lib/zoom/constants/webinar/registration_types.rb +11 -0
- data/lib/zoom/constants/webinar/types.rb +11 -0
- data/lib/zoom/error.rb +9 -1
- data/lib/zoom/params.rb +51 -12
- data/lib/zoom/utils.rb +13 -8
- data/lib/zoom/version.rb +2 -2
- data/lib/{zoom.rb → zoom_rb.rb} +8 -3
- data/spec/fixtures/account/create.json +6 -0
- data/spec/{lib/zoom/actions/report/hosts_report_spec.rb → fixtures/account/delete.json} +0 -0
- data/spec/fixtures/account/get.json +13 -0
- data/spec/fixtures/account/managed_domains.json +7 -0
- data/spec/fixtures/account/options_update.json +7 -0
- data/spec/fixtures/account/settings_get.json +1 -1
- data/spec/{lib/zoom/actions/report/meeting_polls_report_spec.rb → fixtures/account/settings_update.json} +0 -0
- data/spec/fixtures/account/trusted_domains.json +3 -0
- data/spec/fixtures/billing/get.json +12 -0
- data/spec/fixtures/billing/plans_list.json +44 -0
- data/spec/fixtures/billing/plans_subscribe.json +30 -0
- data/spec/fixtures/billing/plans_usage.json +30 -0
- data/spec/{lib/zoom/actions/report/meetings_report_spec.rb → fixtures/billing/update.json} +0 -0
- data/spec/fixtures/chat/channels/get.json +5 -0
- data/spec/fixtures/chat/users/channels/list.json +17 -0
- data/spec/fixtures/dashboard/crc.json +104 -0
- data/spec/fixtures/dashboard/meeting/detail.json +20 -0
- data/spec/fixtures/dashboard/meeting/participants.json +56 -0
- data/spec/fixtures/{metrics_meetings.json → dashboard/meetings.json} +1 -2
- data/spec/fixtures/error/channel_not_found.json +4 -0
- data/spec/fixtures/error/group_does_not_exist.json +4 -0
- data/spec/fixtures/error/group_not_belong_to_account.json +4 -0
- data/spec/fixtures/error/meeting_not_exist.json +4 -0
- data/spec/fixtures/error/next_page_token_invalid.json +4 -0
- data/spec/fixtures/error/unauthorized_request.json +4 -0
- data/spec/fixtures/error/user_not_exist.json +1 -1
- data/spec/fixtures/groups/get.json +5 -0
- data/spec/fixtures/groups/list.json +15 -0
- data/spec/fixtures/meeting/add_registrant.json +7 -0
- data/spec/fixtures/meeting/create.json +31 -16
- data/spec/fixtures/meeting/get.json +43 -33
- data/spec/fixtures/meeting/invitation.json +3 -0
- data/spec/fixtures/meeting/live_stream/errors/meeting_not_found.json +4 -0
- data/spec/fixtures/meeting/live_stream/errors/missing_field.json +10 -0
- data/spec/fixtures/{recording_get.json → recording/get.json} +17 -6
- data/spec/fixtures/recording/list.json +53 -0
- data/spec/fixtures/recording/settings/get.json +7 -0
- data/spec/fixtures/report/meeting.json +19 -0
- data/spec/fixtures/report/meeting/participants.json +17 -0
- data/spec/fixtures/roles/assign.json +4 -0
- data/spec/fixtures/roles/create.json +9 -0
- data/spec/fixtures/roles/get.json +11 -0
- data/spec/fixtures/roles/list.json +29 -0
- data/spec/fixtures/roles/members.json +15 -0
- data/spec/fixtures/sip_audio/sip_trunks_get.json +19 -0
- data/spec/fixtures/sip_audio/sip_trunks_internal_callout_countries_add.json +10 -0
- data/spec/fixtures/sip_audio/sip_trunks_internal_callout_country_list.json +15 -0
- data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_add.json +14 -0
- data/spec/fixtures/sip_audio/sip_trunks_internal_numbers_list.json +16 -0
- data/spec/fixtures/sip_audio/sip_trunks_numbers_assign.json +7 -0
- data/spec/fixtures/sip_audio/sip_trunks_numbers_list.json +9 -0
- data/spec/fixtures/token/access_token.json +7 -0
- data/spec/fixtures/token/data_compliance.json +8 -0
- data/spec/fixtures/token/refresh_token.json +7 -0
- data/spec/fixtures/user/assistant/create.json +4 -0
- data/spec/fixtures/user/assistant/list.json +8 -0
- data/spec/fixtures/user/email_check.json +3 -0
- data/spec/fixtures/user/get.json +35 -21
- data/spec/fixtures/user/list.json +17 -13
- data/spec/fixtures/user/permissions.json +65 -0
- data/spec/fixtures/user/recording/list.json +50 -0
- data/spec/fixtures/user/scheduler/list.json +12 -0
- data/spec/fixtures/user/token.json +3 -0
- data/spec/{lib/zoom/actions/report/telephone_report_spec.rb → fixtures/user/update_password.json} +0 -0
- data/spec/fixtures/user/vanity_name.json +3 -0
- data/spec/fixtures/webinar/panelist_list.json +12 -0
- data/spec/fixtures/webinar/poll_get.json +13 -0
- data/spec/fixtures/webinar/polls_list.json +16 -0
- data/spec/lib/zoom/actions/account/create_spec.rb +68 -0
- data/spec/lib/zoom/actions/account/delete_spec.rb +44 -0
- data/spec/lib/zoom/actions/account/get_locked_settings_spec.rb +43 -0
- data/spec/lib/zoom/actions/account/get_spec.rb +43 -0
- data/spec/lib/zoom/actions/account/managed_domains_spec.rb +43 -0
- data/spec/lib/zoom/actions/account/options_update_spec.rb +58 -0
- data/spec/lib/zoom/actions/account/settings_get_spec.rb +5 -5
- data/spec/lib/zoom/actions/account/settings_update_spec.rb +55 -0
- data/spec/lib/zoom/actions/account/trusted_domains_spec.rb +43 -0
- data/spec/lib/zoom/actions/billing/get_spec.rb +48 -0
- data/spec/lib/zoom/actions/billing/plans_list_spec.rb +48 -0
- data/spec/lib/zoom/actions/billing/plans_subscribe_spec.rb +69 -0
- data/spec/lib/zoom/actions/billing/plans_usage_spec.rb +48 -0
- data/spec/lib/zoom/actions/billing/update_spec.rb +64 -0
- data/spec/lib/zoom/actions/dashboard/crc_spec.rb +33 -0
- data/spec/lib/zoom/actions/dashboard/meeting_details_spec.rb +62 -0
- data/spec/lib/zoom/actions/dashboard/meeting_participants_spec.rb +74 -0
- data/spec/lib/zoom/actions/dashboard/meetings_spec.rb +63 -0
- data/spec/lib/zoom/actions/{group → groups}/create_spec.rb +0 -0
- data/spec/lib/zoom/actions/{group → groups}/delete_spec.rb +0 -0
- data/spec/lib/zoom/actions/{group → groups}/edit_spec.rb +0 -0
- data/spec/lib/zoom/actions/groups/get_spec.rb +62 -0
- data/spec/lib/zoom/actions/groups/list_spec.rb +47 -0
- data/spec/lib/zoom/actions/{group → groups}/member/add_spec.rb +0 -0
- data/spec/lib/zoom/actions/{group → groups}/member/delete_spec.rb +0 -0
- data/spec/lib/zoom/actions/{group → groups/member}/list_spec.rb +0 -0
- data/spec/lib/zoom/actions/im/chat/channels/get_spec.rb +64 -0
- data/spec/lib/zoom/actions/im/chat/users/channels/get_spec.rb +45 -0
- data/spec/lib/zoom/actions/meeting/add_registrant_spec.rb +30 -0
- data/spec/lib/zoom/actions/meeting/create_spec.rb +13 -13
- data/spec/lib/zoom/actions/meeting/delete_spec.rb +17 -34
- data/spec/lib/zoom/actions/meeting/get_spec.rb +21 -31
- data/spec/lib/zoom/actions/meeting/invitation_spec.rb +48 -0
- data/spec/lib/zoom/actions/meeting/livestream_spec.rb +61 -0
- data/spec/lib/zoom/actions/meeting/update_spec.rb +48 -42
- data/spec/lib/zoom/actions/recording/file_delete_spec.rb +33 -0
- data/spec/lib/zoom/actions/recording/get_spec.rb +19 -35
- data/spec/lib/zoom/actions/recording/list_spec.rb +20 -26
- data/spec/lib/zoom/actions/recording/settings/get_spec.rb +42 -0
- data/spec/lib/zoom/actions/recording/settings/update_spec.rb +32 -0
- data/spec/lib/zoom/actions/report/meeting_details_report_spec.rb +44 -0
- data/spec/lib/zoom/actions/report/meeting_participants_report_spec.rb +44 -0
- data/spec/lib/zoom/actions/roles/assign_spec.rb +25 -0
- data/spec/lib/zoom/actions/roles/create_spec.rb +55 -0
- data/spec/lib/zoom/actions/roles/get_spec.rb +37 -0
- data/spec/lib/zoom/actions/roles/list_spec.rb +28 -0
- data/spec/lib/zoom/actions/roles/members_spec.rb +35 -0
- data/spec/lib/zoom/actions/roles/unassign_spec.rb +34 -0
- data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_callout_countries_spec.rb +25 -0
- data/spec/lib/zoom/actions/sip_audio/add_trunks_internal_numbers_spec.rb +25 -0
- data/spec/lib/zoom/actions/sip_audio/assign_numbers_spec.rb +29 -0
- data/spec/lib/zoom/actions/sip_audio/delete_internal_callout_countries_spec.rb +44 -0
- data/spec/lib/zoom/actions/sip_audio/delete_trunk_internal_numbers_spec.rb +44 -0
- data/spec/lib/zoom/actions/sip_audio/delete_trunk_numbers_spec.rb +44 -0
- data/spec/lib/zoom/actions/sip_audio/delete_trunks_spec.rb +44 -0
- data/spec/lib/zoom/actions/sip_audio/get_trunks_spec.rb +50 -0
- data/spec/lib/zoom/actions/sip_audio/list_trunk_numbers_spec.rb +46 -0
- data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_callout_country_spec.rb +53 -0
- data/spec/lib/zoom/actions/sip_audio/list_trunks_internal_numbers_spec.rb +53 -0
- data/spec/lib/zoom/actions/token/access_token_spec.rb +26 -0
- data/spec/lib/zoom/actions/token/data_compliance_spec.rb +41 -0
- data/spec/lib/zoom/actions/token/refresh_token_spec.rb +26 -0
- data/spec/lib/zoom/actions/user/assistant/create_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/assistant/delete_all_spec.rb +44 -0
- data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +48 -1
- data/spec/lib/zoom/actions/user/assistant/list_spec.rb +53 -0
- data/spec/lib/zoom/actions/user/email_check_spec.rb +43 -0
- data/spec/lib/zoom/actions/user/get_spec.rb +10 -1
- data/spec/lib/zoom/actions/user/list_recordings_spec.rb +57 -0
- data/spec/lib/zoom/actions/user/list_spec.rb +32 -1
- data/spec/lib/zoom/actions/user/permissions_spec.rb +52 -0
- data/spec/lib/zoom/actions/user/scheduler/delete_all_spec.rb +44 -0
- data/spec/lib/zoom/actions/user/scheduler/delete_spec.rb +50 -0
- data/spec/lib/zoom/actions/user/scheduler/list_spec.rb +53 -0
- data/spec/lib/zoom/actions/user/settings_update_spec.rb +50 -0
- data/spec/lib/zoom/actions/user/token_spec.rb +61 -0
- data/spec/lib/zoom/actions/user/update_password_spec.rb +29 -0
- data/spec/lib/zoom/actions/user/vanity_name_spec.rb +51 -0
- data/spec/lib/zoom/actions/webinar/panelist_list_spec.rb +44 -0
- data/spec/lib/zoom/actions/webinar/poll_get_spec.rb +47 -0
- data/spec/lib/zoom/actions/webinar/polls_list_spec.rb +44 -0
- data/spec/lib/zoom/client_spec.rb +48 -1
- data/spec/lib/zoom/params_spec.rb +23 -3
- data/spec/lib/zoom/utils_spec.rb +12 -7
- data/spec/spec_helper.rb +15 -2
- data/zoom_rb.gemspec +1 -1
- metadata +295 -108
- data/lib/zoom/actions/group.rb +0 -8
- data/lib/zoom/actions/metrics.rb +0 -27
- data/lib/zoom/constants.rb +0 -103
- data/spec/fixtures/meeting/delete.json +0 -4
- data/spec/fixtures/meeting/end.json +0 -4
- data/spec/fixtures/meeting/live.json +0 -32
- data/spec/fixtures/meeting/register.json +0 -7
- data/spec/fixtures/meeting/update.json +0 -4
- data/spec/fixtures/metrics_crc.json +0 -105
- data/spec/fixtures/metrics_meetingdetail.json +0 -32
- data/spec/fixtures/recording_delete.json +0 -4
- data/spec/fixtures/recording_list.json +0 -51
- data/spec/fixtures/user/assistant/delete.json +0 -5
- data/spec/lib/zoom/actions/group/get_spec.rb +0 -3
- data/spec/lib/zoom/actions/group/member/list_spec.rb +0 -3
- data/spec/lib/zoom/actions/meeting/end_spec.rb +0 -55
- data/spec/lib/zoom/actions/meeting/live_spec.rb +0 -43
- data/spec/lib/zoom/actions/meeting/register_spec.rb +0 -45
- data/spec/lib/zoom/actions/metrics/crc_spec.rb +0 -48
- data/spec/lib/zoom/actions/metrics/im_spec.rb +0 -3
- data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +0 -51
- data/spec/lib/zoom/actions/metrics/meetings_spec.rb +0 -61
- data/spec/lib/zoom/actions/metrics/qos_spec.rb +0 -3
- data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +0 -3
- data/spec/lib/zoom/actions/metrics/webinars_spec.rb +0 -3
- data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +0 -3
- data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +0 -3
- data/spec/lib/zoom/actions/recording/delete_spec.rb +0 -52
- data/spec/lib/zoom/actions/recording/mc_list_spec.rb +0 -51
- data/spec/lib/zoom/actions/report/webinar_details_report_spec.rb +0 -0
- data/spec/lib/zoom/actions/report/webinar_polls_report_spec.rb +0 -0
- data/spec/lib/zoom/actions/report/webinar_qa_report_spec.rb +0 -0
- data/spec/lib/zoom/actions/user/activate_spec.rb +0 -3
- data/spec/lib/zoom/actions/user/checkemail_spec.rb +0 -3
- data/spec/lib/zoom/actions/user/checkzpk_spec.rb +0 -3
- data/spec/lib/zoom/actions/user/deactivate_spec.rb +0 -3
- data/spec/lib/zoom/actions/user/revoketoken_spec.rb +0 -3
- data/spec/lib/zoom/actions/user/updatepassword_spec.rb +0 -3
- data/spec/lib/zoom/actions/webinar/panelists_spec.rb +0 -3
- data/spec/lib/zoom/actions/webinar/polls_spec.rb +0 -3
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Meeting do
|
6
|
-
let(:zc) { zoom_client }
|
7
|
-
|
8
|
-
xdescribe '#meeting_live action' do
|
9
|
-
before :each do
|
10
|
-
stub_request(
|
11
|
-
:post,
|
12
|
-
zoom_url('/meeting/live')
|
13
|
-
).to_return(body: json_response('meeting', 'live'))
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'returns a hash' do
|
17
|
-
expect(zc.meeting_live({})).to be_kind_of(Hash)
|
18
|
-
end
|
19
|
-
|
20
|
-
it "returns 'total_records'" do
|
21
|
-
expect(zc.meeting_live({})['total_records']).to eq(235)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "returns 'meetings' Array" do
|
25
|
-
expect(zc.meeting_live({})['meetings']).to be_kind_of(Array)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
xdescribe '#meeting_live! action' do
|
30
|
-
before :each do
|
31
|
-
stub_request(
|
32
|
-
:post,
|
33
|
-
zoom_url('/meeting/live')
|
34
|
-
).to_return(body: json_response('error'))
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'raises Zoom::Error exception' do
|
38
|
-
expect {
|
39
|
-
zc.meeting_live!({})
|
40
|
-
}.to raise_error(Zoom::Error)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Meeting do
|
6
|
-
let(:zc) { zoom_client }
|
7
|
-
let(:args) { { id: 1, email: 'foo@bar.com', first_name: 'Foo', last_name: 'Bar' } }
|
8
|
-
let(:join_url) { 'https://www.zoom.us/w/869275230?tk=2DsQiu6nZVsZVATrPLvXgqPvw8mmKyxgAGaDMizLv34.DQEAAAAAM9AWXhZ2Nm5vRjIyMlRoUzE3ZktWM3l4cHVRAA' }
|
9
|
-
|
10
|
-
xdescribe '#meeting_register action' do
|
11
|
-
before :each do
|
12
|
-
stub_request(
|
13
|
-
:post,
|
14
|
-
zoom_url('/meeting/register')
|
15
|
-
).to_return(body: json_response('meeting', 'register'))
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'returns a hash' do
|
19
|
-
expect(zc.meeting_register(args)).to be_kind_of(Hash)
|
20
|
-
end
|
21
|
-
|
22
|
-
it "returns the created user's unique registrant_id" do
|
23
|
-
expect(zc.meeting_register(args)['registrant_id']).to eql('555')
|
24
|
-
end
|
25
|
-
|
26
|
-
it 'returns a join_url' do
|
27
|
-
expect(zc.meeting_register(args)['join_url']).to eql(join_url)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
xdescribe '#meeting_register! action' do
|
32
|
-
before :each do
|
33
|
-
stub_request(
|
34
|
-
:post,
|
35
|
-
zoom_url('/meeting/register')
|
36
|
-
).to_return(body: json_response('error'))
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'raises Zoom::Error exception' do
|
40
|
-
expect {
|
41
|
-
zc.meeting_register!(args)
|
42
|
-
}.to raise_error(Zoom::Error)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Metrics do
|
6
|
-
|
7
|
-
before :all do
|
8
|
-
@zc = zoom_client
|
9
|
-
@args = { from: '2013-04-05T15:50:47Z',
|
10
|
-
to: '2013-04-09T19:00:00Z' }
|
11
|
-
end
|
12
|
-
|
13
|
-
xdescribe '#metrics_crc action' do
|
14
|
-
before :each do
|
15
|
-
stub_request(
|
16
|
-
:post,
|
17
|
-
zoom_url('/metrics/crc')
|
18
|
-
).to_return(body: json_response('metrics_crc'))
|
19
|
-
end
|
20
|
-
|
21
|
-
it "requires a 'from' argument" do
|
22
|
-
expect { @zc.metrics_crc(filter_key(@args, :from)) }.to raise_error(ArgumentError)
|
23
|
-
end
|
24
|
-
|
25
|
-
it "requires a 'to' argument" do
|
26
|
-
expect { @zc.metrics_crc(filter_key(@args, :to)) }.to raise_error(ArgumentError)
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'returns a hash' do
|
30
|
-
expect(@zc.metrics_crc(@args)).to be_kind_of(Hash)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
xdescribe '#metrics_crc! action' do
|
35
|
-
before :each do
|
36
|
-
stub_request(
|
37
|
-
:post,
|
38
|
-
zoom_url('/metrics/crc')
|
39
|
-
).to_return(body: json_response('error'))
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'raises Zoom::Error exception' do
|
43
|
-
expect {
|
44
|
-
@zc.metrics_crc!(@args)
|
45
|
-
}.to raise_error(Zoom::Error)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Metrics do
|
6
|
-
|
7
|
-
before :all do
|
8
|
-
@zc = zoom_client
|
9
|
-
@args = { meeting_id: 't13b6hjVQXybvGKyeHC96w==', type: 1 }
|
10
|
-
end
|
11
|
-
|
12
|
-
xdescribe '#metrics_meetingdetail action' do
|
13
|
-
before :each do
|
14
|
-
stub_request(
|
15
|
-
:post,
|
16
|
-
zoom_url('/metrics/meetingdetail')
|
17
|
-
).to_return(body: json_response('metrics_meetingdetail'))
|
18
|
-
end
|
19
|
-
|
20
|
-
it "requires a 'meeting_id' argument" do
|
21
|
-
expect { @zc.metrics_meetingdetail(filter_key(@args, :meeting_id)) }.to raise_error(ArgumentError)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "requires a 'type' argument" do
|
25
|
-
expect { @zc.metrics_meetingdetail(filter_key(@args, :type)) }.to raise_error(ArgumentError)
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'returns a hash' do
|
29
|
-
expect(@zc.metrics_meetingdetail(@args)).to be_kind_of(Hash)
|
30
|
-
end
|
31
|
-
|
32
|
-
it "returns 'participants' Array" do
|
33
|
-
expect(@zc.metrics_meetingdetail(@args)['participants']).to be_kind_of(Array)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
xdescribe '#metrics_meetingdetail! action' do
|
38
|
-
before :each do
|
39
|
-
stub_request(
|
40
|
-
:post,
|
41
|
-
zoom_url('/metrics/meetingdetail')
|
42
|
-
).to_return(body: json_response('error'))
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'raises Zoom::Error exception' do
|
46
|
-
expect {
|
47
|
-
@zc.metrics_meetingdetail!(@args)
|
48
|
-
}.to raise_error(Zoom::Error)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Metrics do
|
6
|
-
|
7
|
-
before :all do
|
8
|
-
@zc = zoom_client
|
9
|
-
@args = { type: 1,
|
10
|
-
from: '2013-04-05T15:50:47Z',
|
11
|
-
to: '2013-04-09T19:00:00Z' }
|
12
|
-
end
|
13
|
-
|
14
|
-
xdescribe '#metrics_meetings action' do
|
15
|
-
before :each do
|
16
|
-
stub_request(
|
17
|
-
:post,
|
18
|
-
zoom_url('/metrics/meetings')
|
19
|
-
).to_return(body: json_response('metrics_meetings'))
|
20
|
-
end
|
21
|
-
|
22
|
-
it "requires a 'type' argument" do
|
23
|
-
expect { @zc.metrics_meetings(filter_key(@args, :type)) }.to raise_error(ArgumentError)
|
24
|
-
end
|
25
|
-
|
26
|
-
it "requires a 'from' argument" do
|
27
|
-
expect { @zc.metrics_meetings(filter_key(@args, :from)) }.to raise_error(ArgumentError)
|
28
|
-
end
|
29
|
-
|
30
|
-
it "requires a 'to' argument" do
|
31
|
-
expect { @zc.metrics_meetings(filter_key(@args, :to)) }.to raise_error(ArgumentError)
|
32
|
-
end
|
33
|
-
|
34
|
-
it 'returns a hash' do
|
35
|
-
expect(@zc.metrics_meetings(@args)).to be_kind_of(Hash)
|
36
|
-
end
|
37
|
-
|
38
|
-
it "returns 'total_records'" do
|
39
|
-
expect(@zc.metrics_meetings(@args)['total_records']).to eq(1)
|
40
|
-
end
|
41
|
-
|
42
|
-
it "returns 'meetings' Array" do
|
43
|
-
expect(@zc.metrics_meetings(@args)['meetings']).to be_kind_of(Array)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
xdescribe '#metrics_meetings! action' do
|
48
|
-
before :each do
|
49
|
-
stub_request(
|
50
|
-
:post,
|
51
|
-
zoom_url('/metrics/meetings')
|
52
|
-
).to_return(body: json_response('error'))
|
53
|
-
end
|
54
|
-
|
55
|
-
it 'raises Zoom::Error exception' do
|
56
|
-
expect {
|
57
|
-
@zc.metrics_meetings!(@args)
|
58
|
-
}.to raise_error(Zoom::Error)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Recording do
|
6
|
-
|
7
|
-
before :all do
|
8
|
-
@zc = zoom_client
|
9
|
-
@args = { meeting_id: 'ucc69C82Q5mTNyCRWE29Aw==' }
|
10
|
-
end
|
11
|
-
|
12
|
-
xdescribe '#recording_delete action' do
|
13
|
-
before :each do
|
14
|
-
stub_request(
|
15
|
-
:post,
|
16
|
-
zoom_url('/recording/delete')
|
17
|
-
).to_return(body: json_response('recording_delete'))
|
18
|
-
end
|
19
|
-
|
20
|
-
it "requires a 'meeting_id' argument" do
|
21
|
-
expect {
|
22
|
-
@zc.recording_delete(filter_key(@args, :meeting_id))
|
23
|
-
}.to raise_error(ArgumentError)
|
24
|
-
end
|
25
|
-
|
26
|
-
it 'returns a hash' do
|
27
|
-
expect(@zc.recording_delete(@args)).to be_kind_of(Hash)
|
28
|
-
end
|
29
|
-
|
30
|
-
it 'returns id and deleted at attributes' do
|
31
|
-
res = @zc.recording_delete(@args)
|
32
|
-
|
33
|
-
expect(res['id']).to eq(@args[:meeting_id])
|
34
|
-
expect(res['deleted_at']).to eq('2012-11-25T12:00:00Z')
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
xdescribe '#recording_delete! action' do
|
39
|
-
before :each do
|
40
|
-
stub_request(
|
41
|
-
:post,
|
42
|
-
zoom_url('/recording/delete')
|
43
|
-
).to_return(body: json_response('error'))
|
44
|
-
end
|
45
|
-
|
46
|
-
it 'raises Zoom::Error exception' do
|
47
|
-
expect {
|
48
|
-
@zc.recording_delete!(@args)
|
49
|
-
}.to raise_error(Zoom::Error)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
xdescribe Zoom::Actions::Recording do
|
6
|
-
|
7
|
-
before :all do
|
8
|
-
@zc = zoom_client
|
9
|
-
@args = { host_id: 'kEFomHcIRgqxZT8D086O6A' }
|
10
|
-
end
|
11
|
-
|
12
|
-
xdescribe '#mc_recording_list action' do
|
13
|
-
before :each do
|
14
|
-
stub_request(
|
15
|
-
:post,
|
16
|
-
zoom_url('/mc/recording/list')
|
17
|
-
).to_return(body: json_response('mc_recording_list'))
|
18
|
-
end
|
19
|
-
|
20
|
-
it "requires a 'host_id' argument" do
|
21
|
-
expect { @zc.mc_recording_list }.to raise_error(ArgumentError)
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'returns a hash' do
|
25
|
-
expect(@zc.mc_recording_list(@args)).to be_kind_of(Hash)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "returns 'total_records'" do
|
29
|
-
expect(@zc.mc_recording_list(@args)['total_records']).to eq(1)
|
30
|
-
end
|
31
|
-
|
32
|
-
it "returns 'meetings' Array" do
|
33
|
-
expect(@zc.mc_recording_list(@args)['meetings']).to be_kind_of(Array)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
xdescribe '#mc_recording_list! action' do
|
38
|
-
before :each do
|
39
|
-
stub_request(
|
40
|
-
:post,
|
41
|
-
zoom_url('/mc/recording/list')
|
42
|
-
).to_return(body: json_response('error'))
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'raises Zoom::Error exception' do
|
46
|
-
expect {
|
47
|
-
@zc.mc_recording_list!(@args)
|
48
|
-
}.to raise_error(Zoom::Error)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
File without changes
|
File without changes
|
File without changes
|