zoom_rb 0.8.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 +7 -0
- data/.circleci/config.yml +64 -0
- data/.gitignore +19 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +91 -0
- data/LICENSE +22 -0
- data/Makefile +5 -0
- data/README.md +51 -0
- data/lib/zoom.rb +49 -0
- data/lib/zoom/actions/account.rb +93 -0
- data/lib/zoom/actions/group.rb +8 -0
- data/lib/zoom/actions/im/chat.rb +29 -0
- data/lib/zoom/actions/im/group.rb +10 -0
- data/lib/zoom/actions/m323_device.rb +8 -0
- data/lib/zoom/actions/meeting.rb +80 -0
- data/lib/zoom/actions/metrics.rb +29 -0
- data/lib/zoom/actions/recording.rb +35 -0
- data/lib/zoom/actions/report.rb +29 -0
- data/lib/zoom/actions/user.rb +146 -0
- data/lib/zoom/actions/webinar.rb +110 -0
- data/lib/zoom/client.rb +36 -0
- data/lib/zoom/defaults.rb +96 -0
- data/lib/zoom/error.rb +9 -0
- data/lib/zoom/interface.rb +6 -0
- data/lib/zoom/params.rb +64 -0
- data/lib/zoom/utils.rb +74 -0
- data/spec/fixtures/chat/get.json +16 -0
- data/spec/fixtures/chat/list.json +16 -0
- data/spec/fixtures/error/validation.json +10 -0
- data/spec/fixtures/mc_recording_list.json +51 -0
- data/spec/fixtures/meeting/create.json +24 -0
- data/spec/fixtures/meeting/delete.json +4 -0
- data/spec/fixtures/meeting/end.json +4 -0
- data/spec/fixtures/meeting/get.json +34 -0
- data/spec/fixtures/meeting/list.json +32 -0
- data/spec/fixtures/meeting/live.json +32 -0
- data/spec/fixtures/meeting/register.json +7 -0
- data/spec/fixtures/meeting/update.json +4 -0
- data/spec/fixtures/metrics_crc.json +105 -0
- data/spec/fixtures/metrics_meetingdetail.json +32 -0
- data/spec/fixtures/metrics_meetings.json +26 -0
- data/spec/fixtures/recording_delete.json +4 -0
- data/spec/fixtures/recording_get.json +37 -0
- data/spec/fixtures/recording_list.json +51 -0
- data/spec/fixtures/report/getaccountreport.json +23 -0
- data/spec/fixtures/report/getaudioreport.json +22 -0
- data/spec/fixtures/report/getdailyreport.json +13 -0
- data/spec/fixtures/report/getuserreport.json +24 -0
- data/spec/fixtures/report_getaccountreport.json +23 -0
- data/spec/fixtures/report_getdailyreport.json +83 -0
- data/spec/fixtures/report_getuserreport.json +24 -0
- data/spec/fixtures/user/assistant/delete.json +5 -0
- data/spec/fixtures/user/assistant/set.json +5 -0
- data/spec/fixtures/user/autocreate.json +51 -0
- data/spec/fixtures/user/autocreate2.json +51 -0
- data/spec/fixtures/user/create.json +7 -0
- data/spec/fixtures/user/custcreate.json +10 -0
- data/spec/fixtures/user/delete.json +0 -0
- data/spec/fixtures/user/get.json +23 -0
- data/spec/fixtures/user/getbyemail.json +8 -0
- data/spec/fixtures/user/list.json +23 -0
- data/spec/fixtures/user/pending.json +56 -0
- data/spec/fixtures/user/permanent_delete.json +4 -0
- data/spec/fixtures/user/update.json +0 -0
- data/spec/fixtures/webinar/create.json +29 -0
- data/spec/fixtures/webinar/delete.json +0 -0
- data/spec/fixtures/webinar/list.json +20 -0
- data/spec/fixtures/webinar/registrant/add.json +7 -0
- data/spec/fixtures/webinar/registrant/list.json +36 -0
- data/spec/fixtures/webinar/update.json +0 -0
- data/spec/fixtures/webinar_delete.json +4 -0
- data/spec/fixtures/webinar_end.json +4 -0
- data/spec/fixtures/webinar_get.json +17 -0
- data/spec/fixtures/webinar_update.json +4 -0
- data/spec/lib/zoom/actions/group/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/edit_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/add_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/group/member/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/chat/get_spec.rb +64 -0
- data/spec/lib/zoom/actions/im/chat/list_spec.rb +58 -0
- data/spec/lib/zoom/actions/im/group/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/edit_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/add_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/im/group/member/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/m323/device/update_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/billing_update_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/create_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/get_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/list_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/plan/add_spec.rb +0 -0
- data/spec/lib/zoom/actions/ma/account/plan/get_spec.rb +0 -0
- data/spec/lib/zoom/actions/ma/account/plan/subscribe_spec.rb +3 -0
- data/spec/lib/zoom/actions/ma/account/plan/update_spec.rb +3 -0
- data/spec/lib/zoom/actions/meeting/create_spec.rb +66 -0
- data/spec/lib/zoom/actions/meeting/delete_spec.rb +55 -0
- data/spec/lib/zoom/actions/meeting/end_spec.rb +55 -0
- data/spec/lib/zoom/actions/meeting/get_spec.rb +59 -0
- data/spec/lib/zoom/actions/meeting/list_spec.rb +48 -0
- data/spec/lib/zoom/actions/meeting/live_spec.rb +43 -0
- data/spec/lib/zoom/actions/meeting/register_spec.rb +45 -0
- data/spec/lib/zoom/actions/meeting/update_spec.rb +53 -0
- data/spec/lib/zoom/actions/metrics/crc_spec.rb +48 -0
- data/spec/lib/zoom/actions/metrics/im_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/meetingdetail_spec.rb +51 -0
- data/spec/lib/zoom/actions/metrics/meetings_spec.rb +61 -0
- data/spec/lib/zoom/actions/metrics/qos_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/webinardetail_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/webinars_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/zoomroomdetail_spec.rb +3 -0
- data/spec/lib/zoom/actions/metrics/zoomrooms_spec.rb +3 -0
- data/spec/lib/zoom/actions/recording/delete_spec.rb +52 -0
- data/spec/lib/zoom/actions/recording/get_spec.rb +66 -0
- data/spec/lib/zoom/actions/recording/list_spec.rb +51 -0
- data/spec/lib/zoom/actions/recording/mc_list_spec.rb +51 -0
- data/spec/lib/zoom/actions/report/getaccountreport_spec.rb +57 -0
- data/spec/lib/zoom/actions/report/getaudioreport_spec.rb +3 -0
- data/spec/lib/zoom/actions/report/getdailyreport_spec.rb +62 -0
- data/spec/lib/zoom/actions/report/getuserreport_spec.rb +67 -0
- data/spec/lib/zoom/actions/user/activate_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/assistant/delete_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/assistant/set_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/autocreate2_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/autocreate_spec.rb +58 -0
- data/spec/lib/zoom/actions/user/checkemail_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/checkzpk_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/create_spec.rb +69 -0
- data/spec/lib/zoom/actions/user/custcreate_spec.rb +59 -0
- data/spec/lib/zoom/actions/user/deactivate_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/delete_spec.rb +40 -0
- data/spec/lib/zoom/actions/user/get_spec.rb +50 -0
- data/spec/lib/zoom/actions/user/getbyemail_spec.rb +54 -0
- data/spec/lib/zoom/actions/user/list_spec.rb +47 -0
- data/spec/lib/zoom/actions/user/revoketoken_spec.rb +3 -0
- data/spec/lib/zoom/actions/user/update_spec.rb +40 -0
- data/spec/lib/zoom/actions/user/updatepassword_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/attendees_list_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/create_spec.rb +52 -0
- data/spec/lib/zoom/actions/webinar/delete_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/end_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/get_spec.rb +65 -0
- data/spec/lib/zoom/actions/webinar/list_registration_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/list_spec.rb +48 -0
- data/spec/lib/zoom/actions/webinar/panelists_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/polls_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/questions_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/register_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registrants/add_spec.rb +60 -0
- data/spec/lib/zoom/actions/webinar/registrants/approve_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registrants/list_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/registration_cancel_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/registration_spec.rb +3 -0
- data/spec/lib/zoom/actions/webinar/update_spec.rb +40 -0
- data/spec/lib/zoom/actions/webinar/uuid_list_spec.rb +3 -0
- data/spec/lib/zoom/client_spec.rb +45 -0
- data/spec/lib/zoom/params_spec.rb +68 -0
- data/spec/lib/zoom/utils_spec.rb +73 -0
- data/spec/spec_helper.rb +35 -0
- data/zoom_rb.gemspec +29 -0
- metadata +483 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module Meeting
|
|
6
|
+
# Create a meeting on Zoom, return the created meeting URL
|
|
7
|
+
def meeting_create(*args)
|
|
8
|
+
options = Utils.extract_options!(args)
|
|
9
|
+
Utils.require_params(%i[host_id topic type], options)
|
|
10
|
+
Utils.process_datetime_params!(:start_time, options)
|
|
11
|
+
Utils.parse_response self.class.post('/meeting/create', query: options)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Delete a meeting on Zoom, return the deleted meeting ID.
|
|
15
|
+
def meeting_delete(*args)
|
|
16
|
+
options = Utils.extract_options!(args)
|
|
17
|
+
Utils.require_params(%i[id host_id], options)
|
|
18
|
+
Utils.parse_response self.class.post('/meeting/delete', query: options)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# End a meeting on Zoom, return the deleted meeting ID.
|
|
22
|
+
def meeting_end(*args)
|
|
23
|
+
options = Utils.extract_options!(args)
|
|
24
|
+
Utils.require_params(%i[id host_id], options)
|
|
25
|
+
Utils.parse_response self.class.post('/meeting/end', query: options)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Get a meeting on Zoom via meeting ID, return the meeting info.
|
|
29
|
+
def meeting_get(*args)
|
|
30
|
+
options = Utils.extract_options!(args)
|
|
31
|
+
Utils.require_params(%i[id host_id], options)
|
|
32
|
+
Utils.parse_response self.class.post('/meeting/get', query: options)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# List all the scheduled meetings on Zoom.
|
|
36
|
+
def meeting_list(*args)
|
|
37
|
+
options = Utils.extract_options!(args)
|
|
38
|
+
Utils.require_params(:host_id, options)
|
|
39
|
+
Utils.process_datetime_params!(:start_time, options)
|
|
40
|
+
# TODO Handle `page_size` attr, Defaults to 30. Max of 300 meetings.
|
|
41
|
+
# TODO Handle `page_number` attr, Defaults to 1.
|
|
42
|
+
Utils.parse_response self.class.post('/meeting/list', query: options)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Lists the live meetings on Zoom.
|
|
46
|
+
def meeting_live(*args)
|
|
47
|
+
options = Utils.extract_options!(args)
|
|
48
|
+
Utils.parse_response self.class.post('/meeting/live', query: options)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Register for a meeting.
|
|
52
|
+
def meeting_register(*args)
|
|
53
|
+
options = Utils.extract_options!(args)
|
|
54
|
+
Utils.require_params(%i[id email first_name last_name], options)
|
|
55
|
+
# TODO Verify country param by referring to the id value in country list JSON file
|
|
56
|
+
# TODO Verify Purchasing Time Frame, should be "Within a month", "1-3 months", "4-6 months", "More than 6 months", "No timeframe".
|
|
57
|
+
# TODO Verify Role in Purchase Process, should be "Decision Maker", "Evaluator/Recommender", "Influencer", "Not involved".
|
|
58
|
+
# TODO Verify Number of Employees, should be "1-20", "21-50", "51-100", "101-250", "251-500", "501-1,000", "1,001-5,000", "5,001-10,000", "More than 10,000".
|
|
59
|
+
# TODO Verify Custom Questions, should be JSON format
|
|
60
|
+
# TODO Verify Language, should be "en-US", "en", "zh-CN", "zh", "en-ES", "es", “fr-FR” or "fr"
|
|
61
|
+
Utils.parse_response self.class.post('/meeting/register', query: options)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Update meeting info on Zoom via meeting ID.
|
|
65
|
+
def meeting_update(*args)
|
|
66
|
+
options = Utils.extract_options!(args)
|
|
67
|
+
Utils.require_params(%i[id host_id type], options)
|
|
68
|
+
Utils.process_datetime_params!(:start_time, options)
|
|
69
|
+
# TODO Handle `topic` attr, Max of 300 characters.
|
|
70
|
+
# TODO Handle `timezone` attr, refer to the id value in timezone list JSON file. like "America/Los_Angeles"
|
|
71
|
+
# TODO Verify `password` attr, may only contain the following characters: a-z A-Z 0-9 @ - _
|
|
72
|
+
# TODO Handle `option_audio` attr, Can be "both", "telephony", "voip".
|
|
73
|
+
# TODO Handle `option_auto_record_type`, Can be "local", “cloud” or "none".
|
|
74
|
+
Utils.parse_response self.class.post('/meeting/update', query: options)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
Utils.define_bang_methods(self)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module Metrics
|
|
6
|
+
def metrics_crc(*args)
|
|
7
|
+
options = Utils.extract_options!(args)
|
|
8
|
+
Utils.require_params(%i[from to], options)
|
|
9
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
10
|
+
Utils.parse_response self.class.post('/metrics/crc', query: options)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def metrics_meetings(*args)
|
|
14
|
+
options = Utils.extract_options!(args)
|
|
15
|
+
Utils.require_params(%i[from to type], options)
|
|
16
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
17
|
+
Utils.parse_response self.class.post('/metrics/meetings', query: options)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def metrics_meetingdetail(*args)
|
|
21
|
+
options = Utils.extract_options!(args)
|
|
22
|
+
Utils.require_params(%i[meeting_id type], options)
|
|
23
|
+
Utils.parse_response self.class.post('/metrics/meetingdetail', query: options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
Utils.define_bang_methods(self)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module Recording
|
|
6
|
+
def recording_list(*args)
|
|
7
|
+
options = Utils.extract_options!(args)
|
|
8
|
+
Utils.require_params([:host_id], options)
|
|
9
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
10
|
+
Utils.parse_response self.class.post('/recording/list', query: options)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def mc_recording_list(*args)
|
|
14
|
+
options = Utils.extract_options!(args)
|
|
15
|
+
Utils.require_params([:host_id], options)
|
|
16
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
17
|
+
Utils.parse_response self.class.post('/mc/recording/list', query: options)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def recording_get(*args)
|
|
21
|
+
options = Utils.extract_options!(args)
|
|
22
|
+
Utils.require_params([:meeting_id], options)
|
|
23
|
+
Utils.parse_response self.class.post('/recording/get', query: options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def recording_delete(*args)
|
|
27
|
+
options = Utils.extract_options!(args)
|
|
28
|
+
Utils.require_params([:meeting_id], options)
|
|
29
|
+
Utils.parse_response self.class.post('/recording/delete', query: options)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Utils.define_bang_methods(self)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module Report
|
|
6
|
+
def report_getaccountreport(*args)
|
|
7
|
+
options = Utils.extract_options!(args)
|
|
8
|
+
Utils.require_params(%i[from to], options)
|
|
9
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
10
|
+
Utils.parse_response self.class.post('/report/getaccountreport', query: options)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def report_getuserreport(*args)
|
|
14
|
+
options = Utils.extract_options!(args)
|
|
15
|
+
Utils.require_params(%i[user_id from to], options)
|
|
16
|
+
Utils.process_datetime_params!(%i[from to], options)
|
|
17
|
+
Utils.parse_response self.class.post('/report/getuserreport', query: options)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def report_getdailyreport(*args)
|
|
21
|
+
options = Utils.extract_options!(args)
|
|
22
|
+
Utils.require_params(%i[year month], options)
|
|
23
|
+
Utils.parse_response self.class.post('/report/getdailyreport', query: options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
Utils.define_bang_methods(self)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module User
|
|
6
|
+
def user_list(*args)
|
|
7
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
8
|
+
params.permit(%i[status page_size page_number])
|
|
9
|
+
response = self.class.get('/users', query: params.merge(access_token: access_token))
|
|
10
|
+
Utils.parse_response(response)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def user_create(*args)
|
|
14
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
15
|
+
params.require(%i[email type first_name last_name password])
|
|
16
|
+
Utils.parse_response self.class.post('/users', body: { action: 'create', user_info: params }, query: { access_token: access_token })
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def user_get(*args)
|
|
20
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
21
|
+
params.require(:id).permit(:login_type)
|
|
22
|
+
Utils.parse_response self.class.get("/users/#{params[:id]}", query: params.except(:id).merge(access_token: access_token))
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def user_update(*args)
|
|
26
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
27
|
+
params.require(:id).permit(%i[first_name last_name type pmi timezone dept vanity_name host_key cms_user_id])
|
|
28
|
+
Utils.parse_response self.class.patch("/users/#{params[:id]}", body: params.except(:id), query: { access_token: access_token })
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def user_delete(*args)
|
|
32
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
33
|
+
params.require(:id).permit(%i[action transfer_email transfer_meeting transfer_webinar transfer_recording])
|
|
34
|
+
Utils.parse_response self.class.delete("/users/#{params[:id]}", query: params.except(:id).merge(access_token: access_token))
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def user_assistants_list(*args)
|
|
38
|
+
raise Zoom::NotImplemented, 'user_assistants_list is not yet implemented'
|
|
39
|
+
# TODO: implement user_assistants_list
|
|
40
|
+
# options = Utils.extract_options!(args)
|
|
41
|
+
# Utils.require_params([:user_id], options)
|
|
42
|
+
Utils.parse_response self.class.get("/users/#{options.slice!(:id)}/assistants", query: options.merge(access_token: access_token))
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def user_assistants_create(*args)
|
|
46
|
+
raise Zoom::NotImplemented, 'user_assistants_create is not yet implemented'
|
|
47
|
+
# TODO: validate body attributes
|
|
48
|
+
options = Utils.extract_options!(args)
|
|
49
|
+
Utils.parse_response self.class.post("/users/#{options.slice!(:id)}/assistants", body: options, query: { access_token: access_token })
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def user_assistants_delete_all(*args)
|
|
53
|
+
raise Zoom::NotImplemented, 'user_assistants_delete_all is not yet implemented'
|
|
54
|
+
# TODO: implement user_assistants_delete_all
|
|
55
|
+
options = Utils.extract_options!(args)
|
|
56
|
+
Utils.parse_response self.class.delete("/users/#{options.slice!(:id)}/assistants", body: options, query: { access_token: access_token })
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def user_assistants_delete(*args)
|
|
60
|
+
# TODO: implement user_assistants_delete
|
|
61
|
+
# options = Utils.extract_options!(args)
|
|
62
|
+
raise Zoom::NotImplemented, 'user_assistants_delete is not yet implemented'
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def user_schedulers_list(*args)
|
|
66
|
+
# TODO: implement user_schedulers_list
|
|
67
|
+
# options = Utils.extract_options!(args)
|
|
68
|
+
raise Zoom::NotImplemented, 'user_schedulers_list is not yet implemented'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def user_schedulers_delete_all(*args)
|
|
72
|
+
# TODO: implement user_schedulers_delete_all
|
|
73
|
+
# options = Utils.extract_options!(args)
|
|
74
|
+
raise Zoom::NotImplemented, 'user_schedulers_delete_all is not yet implemented'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def user_schedulers_delete(*args)
|
|
78
|
+
# TODO: implement user_schedulers_delete
|
|
79
|
+
# options = Utils.extract_options!(args)
|
|
80
|
+
raise Zoom::NotImplemented, 'user_schedulers_delete is not yet implemented'
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def user_upload_picture(*args)
|
|
84
|
+
# TODO: implement user_upload_picture
|
|
85
|
+
# options = Utils.extract_options!(args)
|
|
86
|
+
raise Zoom::NotImplemented, 'user_upload_picture is not yet implemented'
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def user_settings_get(*args)
|
|
90
|
+
# TODO: implement user_settings_get
|
|
91
|
+
# options = Utils.extract_options!(args)
|
|
92
|
+
raise Zoom::NotImplemented, 'user_settings_get is not yet implemented'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def user_settings_update(*args)
|
|
96
|
+
# TODO: implement user_settings_update
|
|
97
|
+
# options = Utils.extract_options!(args)
|
|
98
|
+
raise Zoom::NotImplemented, 'user_settings_update is not yet implemented'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def user_status_update(*args)
|
|
102
|
+
# TODO: implement user_status_update
|
|
103
|
+
# options = Utils.extract_options!(args)
|
|
104
|
+
raise Zoom::NotImplemented, 'user_status_update is not yet implemented'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def user_password_update(*args)
|
|
108
|
+
# TODO: implement user_password_update
|
|
109
|
+
# options = Utils.extract_options!(args)
|
|
110
|
+
raise Zoom::NotImplemented, 'user_password_update is not yet implemented'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def user_permissions_get(*args)
|
|
114
|
+
# TODO: implement user_permissions_get
|
|
115
|
+
# options = Utils.extract_options!(args)
|
|
116
|
+
raise Zoom::NotImplemented, 'user_permissions_get is not yet implemented'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def user_token_get(*args)
|
|
120
|
+
# TODO: implement user_token_get
|
|
121
|
+
# options = Utils.extract_options!(args)
|
|
122
|
+
raise Zoom::NotImplemented, 'user_token_get is not yet implemented'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def user_token_delete(*args)
|
|
126
|
+
# TODO: implement user_token_delete
|
|
127
|
+
# options = Utils.extract_options!(args)
|
|
128
|
+
raise Zoom::NotImplemented, 'user_token_delete is not yet implemented'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def user_email_check(*args)
|
|
132
|
+
# TODO: implement user_email_check
|
|
133
|
+
# options = Utils.extract_options!(args)
|
|
134
|
+
raise Zoom::NotImplemented, 'user_email_check is not yet implemented'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def user_vanity_name_check(*args)
|
|
138
|
+
# TODO: implement user_vanity_name_check
|
|
139
|
+
# options = Utils.extract_options!(args)
|
|
140
|
+
raise Zoom::NotImplemented, 'user_vanity_name_check is not yet implemented'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
Utils.define_bang_methods(self)
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Zoom
|
|
4
|
+
module Actions
|
|
5
|
+
module Webinar
|
|
6
|
+
RECURRENCE_KEYS = %i[type repeat_interval weekly_days monthly_day monthly_week
|
|
7
|
+
monthly_week_day end_times end_date_time].freeze
|
|
8
|
+
SETTINGS_KEYS = %i[panelists_video practice_session hd_video approval_type
|
|
9
|
+
registration_type audio auto_recording enforce_login
|
|
10
|
+
enforce_login_domains alternative_hosts close_registration
|
|
11
|
+
show_share_button allow_multiple_devices].freeze
|
|
12
|
+
def webinar_list(*args)
|
|
13
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
14
|
+
params.require(:host_id).permit(:page_size, :page_number)
|
|
15
|
+
Utils.parse_response self.class.get("/users/#{params[:host_id]}/webinars", query: params.merge(access_token: access_token))
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def webinar_create(*args)
|
|
19
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
20
|
+
params.require(:host_id).permit(:topic, :type, :start_time, :duration,
|
|
21
|
+
:timezone, :password, :agenda,
|
|
22
|
+
recurrence: RECURRENCE_KEYS,
|
|
23
|
+
settings: SETTINGS_KEYS)
|
|
24
|
+
# process recurrence keys based on defaults
|
|
25
|
+
# process settings keys based on defaults
|
|
26
|
+
Utils.parse_response self.class.post("/users/#{params[:host_id]}/webinars", body: params.except(:host_id).to_json, query: { access_token: access_token })
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def webinar_get(*args)
|
|
30
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
31
|
+
params.require(:id)
|
|
32
|
+
Utils.parse_response self.class.get("/webinars/#{params[:id]}", query: { access_token: access_token })
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def webinar_update(*args)
|
|
36
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
37
|
+
params.require(:id).permit(:topic, :type, :start_time, :duration,
|
|
38
|
+
:timezone, :password, :agenda,
|
|
39
|
+
recurrence: RECURRENCE_KEYS,
|
|
40
|
+
settings: SETTINGS_KEYS)
|
|
41
|
+
Utils.parse_response self.class.patch("/webinars/#{params[:id]}", body: params.except(:id).to_json, query: { access_token: access_token })
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def webinar_delete(*args)
|
|
45
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
46
|
+
params.require(:id).permit(:occurrence_id)
|
|
47
|
+
Utils.parse_response self.class.delete("/webinars/#{params[:id]}", query: params.except(:id).merge(access_token: access_token))
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def webinar_status_update(*args)
|
|
51
|
+
# TODO: implement webinar_panelists_list
|
|
52
|
+
# options = Utils.extract_options!(args)
|
|
53
|
+
raise Zoom::NotImplemented, 'webinar_status_update is not yet implemented'
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def webinar_panelists_list(*args)
|
|
57
|
+
# TODO: implement webinar_panelists_list
|
|
58
|
+
# options = Utils.extract_options!(args)
|
|
59
|
+
raise Zoom::NotImplemented, 'webinar_panelists_list is not yet implemented'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def webinar_panelist_add(*args)
|
|
63
|
+
# TODO: implement webinar_panelist_add
|
|
64
|
+
# options = Utils.extract_options!(args)
|
|
65
|
+
raise Zoom::NotImplemented, 'webinar_panelist_add is not yet implemented'
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def webinar_panelists_delete_all(*args)
|
|
69
|
+
# TODO: implement webinar_panelists_delete_all
|
|
70
|
+
# options = Utils.extract_options!(args)
|
|
71
|
+
raise Zoom::NotImplemented, 'webinar_panelists_delete_all is not yet implemented'
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def webinar_panelist_delete(*args)
|
|
75
|
+
# TODO: implement webinar_panelist_delete
|
|
76
|
+
# options = Utils.extract_options!(args)
|
|
77
|
+
raise Zoom::NotImplemented, 'webinar_panelist_delete is not yet implemented'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def webinar_registrants_list(*args)
|
|
81
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
82
|
+
params.require(:id).permit(%i[occurrence_id status page_size page_number])
|
|
83
|
+
Utils.parse_response self.class.get("/webinars/#{params[:id]}/registrants", query: params.except(:id).merge(access_token: access_token))
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def webinar_registrant_add(*args)
|
|
87
|
+
params = Zoom::Params.new(Utils.extract_options!(args))
|
|
88
|
+
params.require(:id, :email, :first_name, :last_name)
|
|
89
|
+
.permit(%i[occurrence_ids address city country zip state phone
|
|
90
|
+
industry org job_title purchasing_time_frame role_in_purchase_process
|
|
91
|
+
no_of_employees comments custom_questions])
|
|
92
|
+
Utils.parse_response self.class.post("/webinars/#{params[:id]}/registrants", body: params.except(:id, :occurrence_ids), query: params.slice(:occurrence_ids).merge(access_token: access_token))
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def webinar_registrants_status_update(*args)
|
|
96
|
+
# TODO: implement webinar_registrants_status_update
|
|
97
|
+
# options = Utils.extract_options!(args)
|
|
98
|
+
raise Zoom::NotImplemented, 'webinar_registrants_status_update is not yet implemented'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def past_webinar_list(*args)
|
|
102
|
+
# TODO: implement past_webinars_list
|
|
103
|
+
# options = Utils.extract_options!(args)
|
|
104
|
+
raise Zoom::NotImplemented, 'past_webinars_list is not yet implemented'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
Utils.define_bang_methods(self)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|