Module: GoogleAPI::Calendar::Conference
- Included in:
- GoogleAPI::Calendar
- Defined in:
- lib/google_api/calendar/conference.rb
Instance Method Summary collapse
- #add_conference(calendar_id, event_id) ⇒ Object
- #conference_info(calendar_id, event_id = nil, all: false) ⇒ Object
Instance Method Details
#add_conference(calendar_id, event_id) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/google_api/calendar/conference.rb', line 8 def add_conference(calendar_id, event_id) = { conference_data: { create_request: { request_id: "#{Time.now.to_i}-#{SecureRandom.hex(16)}" } } } call(:patch_event, calendar_id, event_id, , conference_data_version: 1) end |
#conference_info(calendar_id, event_id = nil, all: false) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/google_api/calendar/conference.rb', line 18 def conference_info(calendar_id, event_id = nil, all: false) return conference_mock if GoogleAPI.mock raise ArgumentError, 'event_id is required' if event_id.nil? conf = call(:get_event, calendar_id, event_id).conference_data return conf if all || conf.nil? { id: conf.conference_id, signature: conf.signature } end |