Module: Zoom::Actions::Webinar
- Included in:
- Client
- Defined in:
- lib/zoom/actions/webinar.rb
Constant Summary collapse
- RECURRENCE_KEYS =
%i[type repeat_interval weekly_days monthly_day monthly_week monthly_week_day end_times end_date_time].freeze
- SETTINGS_KEYS =
%i[host_video panelists_video practice_session hd_video approval_type registration_type audio auto_recording enforce_login enforce_login_domains alternative_hosts close_registration show_share_button allow_multiple_devices on_demand request_permission_to_unmute_participants global_dial_in_countries contact_name contact_email registrants_restrict_number post_webinar_survey survey_url registrants_email_notification meeting_authentication authentication_option authentication_domains registrants_confirmation_email question_answer].freeze
Instance Method Summary collapse
- #past_webinar_list(*args) ⇒ Object
- #webinar_create(*args) ⇒ Object
- #webinar_delete(*args) ⇒ Object
- #webinar_get(*args) ⇒ Object
- #webinar_list(*args) ⇒ Object
- #webinar_panelist_list(*args) ⇒ Object
- #webinar_poll_get(*args) ⇒ Object
- #webinar_polls_list(*args) ⇒ Object
- #webinar_registrant_add(*args) ⇒ Object
- #webinar_registrant_get(*args) ⇒ Object
- #webinar_registrants_list(*args) ⇒ Object
- #webinar_registrants_status_update(*args) ⇒ Object
- #webinar_update(*args) ⇒ Object
Instance Method Details
#past_webinar_list(*args) ⇒ Object
77 78 79 80 81 |
# File 'lib/zoom/actions/webinar.rb', line 77 def past_webinar_list(*args) params = Zoom::Params.new(Utils.(args)) params.require(:id) Utils.parse_response self.class.get("/past_webinars/#{params[:id]}/instances", headers: request_headers) end |
#webinar_create(*args) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/zoom/actions/webinar.rb', line 23 def webinar_create(*args) params = Zoom::Params.new(Utils.(args)) params.require(:host_id).permit(:topic, :type, :start_time, :duration, :timezone, :password, :agenda, recurrence: RECURRENCE_KEYS, settings: SETTINGS_KEYS) # TODO: process recurrence keys based on constants # TODO: process settings keys based on constants Utils.parse_response self.class.post("/users/#{params[:host_id]}/webinars", body: params.except(:host_id).to_json, headers: request_headers) end |
#webinar_delete(*args) ⇒ Object
49 50 51 52 53 |
# File 'lib/zoom/actions/webinar.rb', line 49 def webinar_delete(*args) params = Zoom::Params.new(Utils.(args)) params.require(:id).permit(:occurrence_id) Utils.parse_response self.class.delete("/webinars/#{params[:id]}", query: params.except(:id), headers: request_headers) end |
#webinar_get(*args) ⇒ Object
34 35 36 37 38 |
# File 'lib/zoom/actions/webinar.rb', line 34 def webinar_get(*args) params = Zoom::Params.new(Utils.(args)) params.require(:id) Utils.parse_response self.class.get("/webinars/#{params[:id]}", headers: request_headers) end |
#webinar_list(*args) ⇒ Object
17 18 19 20 21 |
# File 'lib/zoom/actions/webinar.rb', line 17 def webinar_list(*args) params = Zoom::Params.new(Utils.(args)) params.require(:host_id).permit(%i[page_size page_number]) Utils.parse_response self.class.get("/users/#{params[:host_id]}/webinars", query: params.except(:host_id), headers: request_headers) end |
#webinar_panelist_list(*args) ⇒ Object
101 102 103 104 105 |
# File 'lib/zoom/actions/webinar.rb', line 101 def webinar_panelist_list(*args) params = Zoom::Params.new(Utils.(args)) params.require(:webinar_id) Utils.parse_response self.class.get("/webinars/#{params[:webinar_id]}/panelists", headers: request_headers) end |
#webinar_poll_get(*args) ⇒ Object
95 96 97 98 99 |
# File 'lib/zoom/actions/webinar.rb', line 95 def webinar_poll_get(*args) params = Zoom::Params.new(Utils.(args)) params.require(%i[webinar_id poll_id]) Utils.parse_response self.class.get("/webinars/#{params[:webinar_id]}/polls/#{params[:poll_id]}", headers: request_headers) end |
#webinar_polls_list(*args) ⇒ Object
89 90 91 92 93 |
# File 'lib/zoom/actions/webinar.rb', line 89 def webinar_polls_list(*args) params = Zoom::Params.new(Utils.(args)) params.require(:webinar_id) Utils.parse_response self.class.get("/webinars/#{params[:webinar_id]}/polls", headers: request_headers) end |
#webinar_registrant_add(*args) ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/zoom/actions/webinar.rb', line 61 def webinar_registrant_add(*args) params = Zoom::Params.new(Utils.(args)) params.require(%i[id email first_name last_name]) .permit(%i[occurrence_ids address city country zip state phone industry org job_title purchasing_time_frame role_in_purchase_process no_of_employees comments custom_questions]) Utils.parse_response self.class.post("/webinars/#{params[:id]}/registrants", body: params.except(:id, :occurrence_ids).to_json, query: params.slice(:occurrence_ids), headers: request_headers) end |
#webinar_registrant_get(*args) ⇒ Object
83 84 85 86 87 |
# File 'lib/zoom/actions/webinar.rb', line 83 def webinar_registrant_get(*args) params = Zoom::Params.new(Utils.(args)) params.require(%i[webinar_id id]).permit(:occurrence_id) Utils.parse_response self.class.get("/webinars/#{params[:webinar_id]}/registrants/#{params[:id]}", query: params.except(:webinar_id, :id), headers: request_headers) end |
#webinar_registrants_list(*args) ⇒ Object
55 56 57 58 59 |
# File 'lib/zoom/actions/webinar.rb', line 55 def webinar_registrants_list(*args) params = Zoom::Params.new(Utils.(args)) params.require(:id).permit(%i[occurrence_id status page_size page_number]) Utils.parse_response self.class.get("/webinars/#{params[:id]}/registrants", query: params.except(:id), headers: request_headers) end |
#webinar_registrants_status_update(*args) ⇒ Object
70 71 72 73 74 75 |
# File 'lib/zoom/actions/webinar.rb', line 70 def webinar_registrants_status_update(*args) params = Zoom::Params.new(Utils.(args)) params.require(%i[id action]) .permit(:occurrence_id, registrants: []) Utils.parse_response self.class.put("/webinars/#{params[:id]}/registrants/status", body: params.except(:id, :occurrence_id).to_json, query: params.slice(:occurrence_id), headers: request_headers) end |
#webinar_update(*args) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/zoom/actions/webinar.rb', line 40 def webinar_update(*args) params = Zoom::Params.new(Utils.(args)) params.require(:id).permit(:topic, :type, :start_time, :duration, :timezone, :password, :agenda, recurrence: RECURRENCE_KEYS, settings: SETTINGS_KEYS) Utils.parse_response self.class.patch("/webinars/#{params[:id]}", body: params.except(:id).to_json, headers: request_headers) end |