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
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Zoom
|
4
|
+
module Actions
|
5
|
+
module Groups
|
6
|
+
def groups_list(*_args)
|
7
|
+
Utils.parse_response self.class.get('/groups', headers: request_headers)
|
8
|
+
end
|
9
|
+
|
10
|
+
def groups_get(*args)
|
11
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
12
|
+
params.require(:group_id)
|
13
|
+
Utils.parse_response self.class.get("/groups/#{params[:group_id]}", headers: request_headers)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/zoom/actions/im/chat.rb
CHANGED
@@ -4,12 +4,24 @@ module Zoom
|
|
4
4
|
module Actions
|
5
5
|
module IM
|
6
6
|
module Chat
|
7
|
+
def get_chat_channels(*args)
|
8
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
9
|
+
params.require(:channel_id)
|
10
|
+
Utils.parse_response self.class.get("/chat/channels/#{params[:channel_id]}", headers: request_headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def get_chat_user_channels(*args)
|
14
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
15
|
+
params.require(:user_id).permit(%i[next_page_token page_size])
|
16
|
+
Utils.parse_response self.class.get("/chat/users/#{params[:user_id]}/channels", query: params.except(:user_id), headers: request_headers)
|
17
|
+
end
|
18
|
+
|
7
19
|
# Get chat messages for a specified period.
|
8
20
|
def chat_get(*args)
|
9
21
|
options = Utils.extract_options!(args)
|
10
22
|
Zoom::Params.new(options).require(:access_token, :session_id, :from, :to)
|
11
|
-
# TODO handle date format for `from` and `to` params
|
12
|
-
# TODO implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
23
|
+
# TODO: handle date format for `from` and `to` params
|
24
|
+
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
13
25
|
Utils.parse_response self.class.post('/chat/get', query: options)
|
14
26
|
end
|
15
27
|
|
@@ -17,8 +29,8 @@ module Zoom
|
|
17
29
|
def chat_list(*args)
|
18
30
|
options = Utils.extract_options!(args)
|
19
31
|
Zoom::Params.new(options).require(:access_token, :from, :to)
|
20
|
-
# TODO handle date format for `from` and `to` params
|
21
|
-
# TODO implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
32
|
+
# TODO: handle date format for `from` and `to` params
|
33
|
+
# TODO: implement `next_page_token`, will be returned whenever the set of available chat history list exceeds 100. The expiration period is 30 minutes.
|
22
34
|
Utils.parse_response self.class.post('/chat/list', query: options)
|
23
35
|
end
|
24
36
|
end
|
data/lib/zoom/actions/meeting.rb
CHANGED
@@ -5,84 +5,92 @@ module Zoom
|
|
5
5
|
module Meeting
|
6
6
|
# List all the scheduled meetings on Zoom.
|
7
7
|
def meeting_list(*args)
|
8
|
-
|
9
|
-
|
10
|
-
Utils.parse_response self.class.get("/users/#{
|
8
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
9
|
+
params.require(:user_id).permit(%i[type page_size next_page_token page_number])
|
10
|
+
Utils.parse_response self.class.get("/users/#{params[:user_id]}/meetings", query: params.except(:user_id), headers: request_headers)
|
11
11
|
end
|
12
12
|
|
13
13
|
# Create a meeting on Zoom, return the created meeting URL
|
14
14
|
def meeting_create(*args)
|
15
|
-
|
16
|
-
|
17
|
-
Utils.process_datetime_params!(:start_time,
|
18
|
-
Utils.parse_response self.class.post("/users/#{
|
15
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
16
|
+
params.require(:user_id).permit(%i[topic type start_time duration schedule_for timezone password agenda tracking_fields recurrence settings])
|
17
|
+
Utils.process_datetime_params!(:start_time, params)
|
18
|
+
Utils.parse_response self.class.post("/users/#{params[:user_id]}/meetings", body: params.except(:user_id).to_json, headers: request_headers)
|
19
19
|
end
|
20
20
|
|
21
21
|
# Get a meeting on Zoom via meeting ID, return the meeting info.
|
22
22
|
def meeting_get(*args)
|
23
|
-
|
24
|
-
|
25
|
-
Utils.parse_response self.class.get("/meetings/#{
|
23
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
24
|
+
params.require(:meeting_id).permit(%i[occurrence_id show_previous_occurrences])
|
25
|
+
Utils.parse_response self.class.get("/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
|
26
26
|
end
|
27
27
|
|
28
28
|
# Update meeting info on Zoom via meeting ID.
|
29
29
|
def meeting_update(*args)
|
30
|
-
|
31
|
-
|
32
|
-
Utils.process_datetime_params!(:start_time,
|
30
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
31
|
+
params.require(:meeting_id)
|
32
|
+
Utils.process_datetime_params!(:start_time, params)
|
33
33
|
# TODO Handle `topic` attr, Max of 300 characters.
|
34
34
|
# TODO Handle `timezone` attr, refer to the id value in timezone list JSON file. like "America/Los_Angeles"
|
35
35
|
# TODO Verify `password` attr, may only contain the following characters: a-z A-Z 0-9 @ - _
|
36
36
|
# TODO Handle `option_audio` attr, Can be "both", "telephony", "voip".
|
37
37
|
# TODO Handle `option_auto_record_type`, Can be "local", “cloud” or "none".
|
38
|
-
Utils.parse_response self.class.patch("/meetings/#{
|
38
|
+
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}", body: params.except(:meeting_id).to_json, headers: request_headers)
|
39
39
|
end
|
40
40
|
|
41
41
|
# Delete a meeting on Zoom, return the deleted meeting ID.
|
42
42
|
def meeting_delete(*args)
|
43
|
-
|
44
|
-
|
45
|
-
Utils.parse_response self.class.delete("/meetings/#{
|
43
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
44
|
+
params.require(:meeting_id)
|
45
|
+
Utils.parse_response self.class.delete("/meetings/#{params[:meeting_id]}", query: params.except(:meeting_id), headers: request_headers)
|
46
46
|
end
|
47
47
|
|
48
48
|
# Update a meeting's status
|
49
49
|
def meeting_update_status(*args)
|
50
|
-
|
51
|
-
|
52
|
-
Utils.parse_response self.class.put("/meetings/#{
|
50
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
51
|
+
params.require(:meeting_id).permit(:action)
|
52
|
+
Utils.parse_response self.class.put("/meetings/#{params[:meeting_id]}/status", body: params.except(:meeting_id).to_json, headers: request_headers)
|
53
53
|
end
|
54
54
|
|
55
|
-
#
|
56
|
-
def
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
# Lists the live meetings on Zoom.
|
62
|
-
def meeting_live(*args)
|
63
|
-
options = Utils.extract_options!(args)
|
64
|
-
meeting_list(options.merge(type: 'live'))
|
55
|
+
# Register for a meeting.
|
56
|
+
def meeting_add_registrant(*args)
|
57
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
58
|
+
params.require(%i[meeting_id email first_name]).permit(%i[last_name address city country zip state phone industry org job_title purchasing_time_frame role_in_purchase_process no_of_employees comments custom_questions language occurrence_ids])
|
59
|
+
Utils.parse_response self.class.post("/meetings/#{params[:meeting_id]}/registrants", query: params.slice(:occurrence_ids), body: params.except(:meeting_id).to_json, headers: request_headers)
|
65
60
|
end
|
66
61
|
|
67
62
|
# Register for a meeting.
|
68
|
-
def
|
69
|
-
|
70
|
-
|
71
|
-
Utils.parse_response self.class.
|
63
|
+
def meeting_registrant_questions(*args)
|
64
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
65
|
+
params.require(:meeting_id)
|
66
|
+
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}/registrants/questions", body: params.except(:meeting_id).to_json, headers: request_headers)
|
72
67
|
end
|
73
68
|
|
74
69
|
# Retrieve ended meeting details
|
75
70
|
def past_meeting_details(*args)
|
76
|
-
|
77
|
-
|
78
|
-
Utils.parse_response self.class.get("/past_meetings/#{
|
71
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
72
|
+
params.require(:meeting_uuid)
|
73
|
+
Utils.parse_response self.class.get("/past_meetings/#{params[:meeting_uuid]}", headers: request_headers)
|
79
74
|
end
|
80
75
|
|
81
76
|
# Retrieve ended meeting participants
|
82
77
|
def past_meeting_participants(*args)
|
83
|
-
|
84
|
-
|
85
|
-
Utils.parse_response self.class.get("/past_meetings/#{
|
78
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
79
|
+
params.require(:meeting_uuid)
|
80
|
+
Utils.parse_response self.class.get("/past_meetings/#{params[:meeting_uuid]}/participants", headers: request_headers)
|
81
|
+
end
|
82
|
+
|
83
|
+
def livestream(*args)
|
84
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
85
|
+
params.require(%i[meeting_id stream_url stream_key]).permit(:page_url)
|
86
|
+
Utils.parse_response self.class.patch("/meetings/#{params[:meeting_id]}/livestream", body: params.except(:meeting_id).to_json, headers: request_headers)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Get a meeting on Zoom via meeting ID, return the meeting info.
|
90
|
+
def meeting_invitation(*args)
|
91
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
92
|
+
params.require(:meeting_id)
|
93
|
+
Utils.parse_response self.class.get("/meetings/#{params[:meeting_id]}/invitation", headers: request_headers)
|
86
94
|
end
|
87
95
|
end
|
88
96
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
module Zoom
|
4
|
+
module Actions
|
5
|
+
module Phone
|
6
|
+
def call_logs(*args)
|
7
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
+
options.require(%i[user_id])
|
9
|
+
response = self.class.get("/phone/users/#{options[:user_id]}/call_logs", query: options.except(:user_id), headers: request_headers)
|
10
|
+
Utils.parse_response(response)
|
11
|
+
end
|
12
|
+
|
13
|
+
def phone_users_list(*args)
|
14
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
15
|
+
response = self.class.get("/phone/users", query: options, headers: request_headers)
|
16
|
+
Utils.parse_response(response)
|
17
|
+
end
|
18
|
+
|
19
|
+
def call_recordings(*args)
|
20
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
21
|
+
options.require(%i[user_id])
|
22
|
+
response = self.class.get("/phone/users/#{options[:user_id]}/recordings", query: options.except(:user_id), headers: request_headers)
|
23
|
+
Utils.parse_response(response)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -3,30 +3,39 @@
|
|
3
3
|
module Zoom
|
4
4
|
module Actions
|
5
5
|
module Recording
|
6
|
+
RECORDING_SETTINGS_KEYS = %i[share_recording recording_authentication
|
7
|
+
authentication_option authentication_domains viewer_download password
|
8
|
+
on_demand approval_type send_email_to_host show_social_share_buttons].freeze
|
9
|
+
|
6
10
|
def recording_list(*args)
|
7
|
-
options = Utils.extract_options!(args)
|
8
|
-
|
11
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
12
|
+
options.require(:user_id)
|
9
13
|
Utils.process_datetime_params!(%i[from to], options)
|
10
|
-
Utils.parse_response self.class.
|
14
|
+
Utils.parse_response self.class.get("/users/#{options[:user_id]}/recordings", query: options.except(:user_id), headers: request_headers)
|
11
15
|
end
|
12
16
|
|
13
|
-
def
|
14
|
-
options = Utils.extract_options!(args)
|
15
|
-
|
16
|
-
Utils.
|
17
|
-
|
17
|
+
def meeting_recording_get(*args)
|
18
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
19
|
+
options.require(:meeting_id)
|
20
|
+
Utils.parse_response self.class.get("/meetings/#{options[:meeting_id]}/recordings/settings", query: options.except(:meeting_id), headers: request_headers)
|
21
|
+
end
|
22
|
+
|
23
|
+
def meeting_recording_settings_get(*args)
|
24
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
25
|
+
options.require(:meeting_id)
|
26
|
+
Utils.parse_response self.class.get("/meetings/#{options[:meeting_id]}/recordings/settings", query: options.except(:meeting_id), headers: request_headers)
|
18
27
|
end
|
19
28
|
|
20
|
-
def
|
21
|
-
options = Utils.extract_options!(args)
|
22
|
-
|
23
|
-
Utils.parse_response self.class.
|
29
|
+
def meeting_recording_settings_update(*args)
|
30
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
31
|
+
options.require(:meeting_id).permit(RECORDING_SETTINGS_KEYS)
|
32
|
+
Utils.parse_response self.class.patch("/meetings/#{options[:meeting_id]}/recordings/settings", body: options.except(:meeting_id).to_json, headers: request_headers)
|
24
33
|
end
|
25
34
|
|
26
|
-
def
|
27
|
-
options = Utils.extract_options!(args)
|
28
|
-
|
29
|
-
Utils.parse_response self.class.
|
35
|
+
def meeting_recording_file_delete(*args)
|
36
|
+
options = Zoom::Params.new(Utils.extract_options!(args))
|
37
|
+
options.require(%i[meeting_id recording_id])
|
38
|
+
Utils.parse_response self.class.delete("/meetings/#{options[:meeting_id]}/recordings/#{options[:recording_id]}", query: options.except(:meeting_id, :recording_id), headers: request_headers)
|
30
39
|
end
|
31
40
|
end
|
32
41
|
end
|
data/lib/zoom/actions/report.rb
CHANGED
@@ -5,50 +5,25 @@ module Zoom
|
|
5
5
|
module Report
|
6
6
|
def daily_report(*args)
|
7
7
|
params = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
-
params.permit(
|
8
|
+
params.permit(%i[year month])
|
9
9
|
Utils.parse_response self.class.get('/report/daily', query: params, headers: request_headers)
|
10
10
|
end
|
11
|
-
|
12
|
-
def hosts_report(*args)
|
13
|
-
# TODO: implement hosts_report
|
14
|
-
end
|
15
|
-
|
16
|
-
def meetings_report(*args)
|
17
|
-
# TODO: implement meetings_report
|
18
|
-
end
|
19
|
-
|
20
11
|
def meeting_details_report(*args)
|
21
|
-
|
12
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
13
|
+
params.require(:id)
|
14
|
+
Utils.parse_response self.class.get("/report/meetings/#{params[:id]}", query: params.except(:id), headers: request_headers)
|
22
15
|
end
|
23
16
|
|
24
17
|
def meeting_participants_report(*args)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
def meeting_polls_report(*args)
|
29
|
-
# TODO: implement meeting_polls_report
|
30
|
-
end
|
31
|
-
|
32
|
-
def webinar_details_report(*args)
|
33
|
-
# TODO: implement webinar_details_report
|
18
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
19
|
+
params.require(:id).permit(%i[page_size next_page_token])
|
20
|
+
Utils.parse_response self.class.get("/report/meetings/#{params[:id]}/participants", query: params.except(:id), headers: request_headers)
|
34
21
|
end
|
35
22
|
|
36
23
|
def webinar_participants_report(*args)
|
37
24
|
params = Zoom::Params.new(Utils.extract_options!(args))
|
38
|
-
params.require(:id).permit(
|
39
|
-
Utils.parse_response self.class.get("/report/webinars/#{params[:id]}/participants", query: params.except(:id)
|
40
|
-
end
|
41
|
-
|
42
|
-
def webinar_polls_report(*args)
|
43
|
-
# TODO: implement report_hosts
|
44
|
-
end
|
45
|
-
|
46
|
-
def webinar_qa_report(*args)
|
47
|
-
# TODO: implement report_hosts
|
48
|
-
end
|
49
|
-
|
50
|
-
def telephone_report(*args)
|
51
|
-
# TODO: implement report_hosts
|
25
|
+
params.require(:id).permit(%i[page_size next_page_token])
|
26
|
+
Utils.parse_response self.class.get("/report/webinars/#{params[:id]}/participants", query: params.except(:id), headers: request_headers)
|
52
27
|
end
|
53
28
|
end
|
54
29
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Zoom
|
4
|
+
module Actions
|
5
|
+
module Roles
|
6
|
+
def roles_list(*_args)
|
7
|
+
Utils.parse_response self.class.get("/roles", headers: request_headers)
|
8
|
+
end
|
9
|
+
|
10
|
+
def roles_create(*args)
|
11
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
12
|
+
params.require(:name).permit(%i[description privileges])
|
13
|
+
Utils.parse_response self.class.post("/roles", body: params.to_json, headers: request_headers)
|
14
|
+
end
|
15
|
+
|
16
|
+
def roles_members(*args)
|
17
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
18
|
+
params.require(:role_id)
|
19
|
+
Utils.parse_response self.class.get("/roles/#{params[:role_id]}/members", headers: request_headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
def roles_assign(*args)
|
23
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
24
|
+
params.require(%i[role_id members])
|
25
|
+
Utils.parse_response self.class.post("/roles/#{params[:role_id]}/members", body: params.except(:role_id).to_json, headers: request_headers)
|
26
|
+
end
|
27
|
+
|
28
|
+
def roles_unassign(*args)
|
29
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
30
|
+
params.require(%i[role_id member_id])
|
31
|
+
Utils.parse_response self.class.delete("/roles/#{params[:role_id]}/members/#{params[:member_id]}", headers: request_headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
def roles_get(*args)
|
35
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
36
|
+
params.require(:role_id)
|
37
|
+
Utils.parse_response self.class.get("/roles/#{params[:role_id]}", headers: request_headers)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Zoom
|
4
|
+
module Actions
|
5
|
+
module SipAudio
|
6
|
+
def sip_trunks_get(*args)
|
7
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
8
|
+
params.require(:account_id)
|
9
|
+
Utils.parse_response self.class.get("/accounts/#{params[:account_id]}/sip_trunk/trunks", headers: request_headers)
|
10
|
+
end
|
11
|
+
|
12
|
+
def sip_trunks_delete(*args)
|
13
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
14
|
+
params.require(:account_id, :trunk_id)
|
15
|
+
Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/trunks/#{params[:trunk_id]}", headers: request_headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def sip_trunk_numbers_delete(*args)
|
19
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
20
|
+
params.require(:account_id)
|
21
|
+
Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/numbers", headers: request_headers)
|
22
|
+
end
|
23
|
+
|
24
|
+
def sip_trunks_internal_numbers_delete(*args)
|
25
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
26
|
+
params.require(%i[account_id number_id])
|
27
|
+
Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers/#{params[:number_id]}", headers: request_headers)
|
28
|
+
end
|
29
|
+
|
30
|
+
def sip_trunks_internal_callout_country_delete(*args)
|
31
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
32
|
+
params.require(%i[account_id country_id])
|
33
|
+
Utils.parse_response self.class.delete("/accounts/#{params[:account_id]}/sip_trunk/callout_countries/#{params[:country_id]}", headers: request_headers)
|
34
|
+
end
|
35
|
+
|
36
|
+
def sip_trunks_internal_numbers_list(*args)
|
37
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
38
|
+
params.require(:account_id).permit(%i[page_size next_page_token])
|
39
|
+
response = self.class.get("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers", query: params, headers: request_headers)
|
40
|
+
Utils.parse_response(response)
|
41
|
+
end
|
42
|
+
|
43
|
+
def sip_trunks_internal_callout_country_list(*args)
|
44
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
45
|
+
params.require(:account_id)
|
46
|
+
response = self.class.get("/accounts/#{params[:account_id]}/sip_trunk/callout_countries", headers: request_headers)
|
47
|
+
Utils.parse_response(response)
|
48
|
+
end
|
49
|
+
|
50
|
+
def sip_trunks_numbers_list(*args)
|
51
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
52
|
+
response = self.class.get("/sip_trunk/numbers", headers: request_headers)
|
53
|
+
Utils.parse_response(response)
|
54
|
+
end
|
55
|
+
|
56
|
+
def sip_trunks_internal_numbers_add(*args)
|
57
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
58
|
+
params.require(:account_id)
|
59
|
+
Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/internal_numbers", headers: request_headers)
|
60
|
+
end
|
61
|
+
|
62
|
+
def sip_trunks_internal_callout_countries_add(*args)
|
63
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
64
|
+
params.require(:account_id)
|
65
|
+
Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/callout_countries", headers: request_headers)
|
66
|
+
end
|
67
|
+
|
68
|
+
def sip_trunks_numbers_assign(*args)
|
69
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
70
|
+
params.require(:account_id)
|
71
|
+
Utils.parse_response self.class.post("/accounts/#{params[:account_id]}/sip_trunk/numbers", headers: request_headers)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|