0

我试图通过使用Google的Calendar API的Ruby包装来更新事件对象上的字段(date_time)。 Source hereGoogle日历中的更新事件

documentation对方法,这样的信息:

update_event(calendar_id, event_id, event_object = nil, always_include_email: nil, max_attendees: nil, send_notifications: nil, supports_attachments: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) 

我不明白的第三个参数 - 我应该实例化更新领域一个新的事件对象?试过,但只是得到一个错误响应和“无效请求”。

任何提示如何前进将不胜感激。

回答

0

Found an example

event = client.get_event('primary', 'eventId') 
event.summary = 'Appointment at Somewhere' 
result = client.update_event('primary', event.id, event) 
print result.updated