Module: Zoom::Actions::Meeting

Included in:
Client
Defined in:
lib/zoom/actions/meeting.rb

Instance Method Summary collapse

Instance Method Details

#meeting_create(*args) ⇒ Object

Create a meeting on Zoom, return the created meeting URL



14
15
16
17
18
19
# File 'lib/zoom/actions/meeting.rb', line 14

def meeting_create(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[user_id])
  Utils.process_datetime_params!(:start_time, options)
  Utils.parse_response self.class.post("/users/#{options[:user_id]}/meetings", body: options.except(:user_id).to_json, headers: request_headers)
end

#meeting_delete(*args) ⇒ Object

Delete a meeting on Zoom, return the deleted meeting ID.



42
43
44
45
46
# File 'lib/zoom/actions/meeting.rb', line 42

def meeting_delete(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_id])
  Utils.parse_response self.class.delete("/meetings/#{options[:meeting_id]}", query: options.except(:meeting_id), headers: request_headers)
end

#meeting_end(*args) ⇒ Object

End a meeting on Zoom, return the deleted meeting ID.



56
57
58
59
# File 'lib/zoom/actions/meeting.rb', line 56

def meeting_end(*args)
  options = Utils.extract_options!(args)
  meeting_update_status(options.merge(action: 'end'))
end

#meeting_get(*args) ⇒ Object

Get a meeting on Zoom via meeting ID, return the meeting info.



22
23
24
25
26
# File 'lib/zoom/actions/meeting.rb', line 22

def meeting_get(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_id])
  Utils.parse_response self.class.get("/meetings/#{options[:meeting_id]}", headers: request_headers)
end

#meeting_list(*args) ⇒ Object

List all the scheduled meetings on Zoom.



7
8
9
10
11
# File 'lib/zoom/actions/meeting.rb', line 7

def meeting_list(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[user_id])
  Utils.parse_response self.class.get("/users/#{options[:user_id]}/meetings", query: options.except(:user_id), headers: request_headers)
end

#meeting_live(*args) ⇒ Object

Lists the live meetings on Zoom.



62
63
64
65
# File 'lib/zoom/actions/meeting.rb', line 62

def meeting_live(*args)
  options = Utils.extract_options!(args)
  meeting_list(options.merge(type: 'live'))
end

#meeting_register(*args) ⇒ Object

Register for a meeting.



68
69
70
71
72
# File 'lib/zoom/actions/meeting.rb', line 68

def meeting_register(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_id email first_name last_name])
  Utils.parse_response self.class.post("/meetings/#{options[:meeting_id]}/registrants", body: options.except(:meeting_id).to_json, headers: request_headers)
end

#meeting_update(*args) ⇒ Object

Update meeting info on Zoom via meeting ID.



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/zoom/actions/meeting.rb', line 29

def meeting_update(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_id])
  Utils.process_datetime_params!(:start_time, options)
  # TODO Handle `topic` attr, Max of 300 characters.
  # TODO Handle `timezone` attr, refer to the id value in timezone list JSON file. like "America/Los_Angeles"
  # TODO Verify `password` attr, may only contain the following characters: a-z A-Z 0-9 @ - _
  # TODO Handle `option_audio` attr, Can be "both", "telephony", "voip".
  # TODO Handle `option_auto_record_type`, Can be "local", “cloud” or "none".
  Utils.parse_response self.class.patch("/meetings/#{options[:meeting_id]}", body: options.except(:meeting_id).to_json, headers: request_headers)
end

#meeting_update_status(*args) ⇒ Object

Update a meeting’s status



49
50
51
52
53
# File 'lib/zoom/actions/meeting.rb', line 49

def meeting_update_status(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_id])
  Utils.parse_response self.class.put("/meetings/#{options[:meeting_id]}/status", body: options.except(:meeting_id).to_json, headers: request_headers)
end

#past_meeting_details(*args) ⇒ Object

Retrieve ended meeting details



75
76
77
78
79
# File 'lib/zoom/actions/meeting.rb', line 75

def past_meeting_details(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_uuid])
  Utils.parse_response self.class.get("/past_meetings/#{options[:meeting_uuid]}", headers: request_headers)
end

#past_meeting_participants(*args) ⇒ Object

Retrieve ended meeting participants



82
83
84
85
86
# File 'lib/zoom/actions/meeting.rb', line 82

def past_meeting_participants(*args)
  options = Zoom::Params.new(Utils.extract_options!(args))
  options.require(%i[meeting_uuid])
  Utils.parse_response self.class.get("/past_meetings/#{options[:meeting_uuid]}/participants", headers: request_headers)
end