我找到了适用于Google Calendar API的简单PHP类(v2.6)。
https://github.com/montania/Google-Calendar-API-PHP-Class
还有函数 updateEvent ($ handle,$ id,$ etag,$ json){...}
/**
* Method to update an event in the calendar.
If $etag is submitted it won't update your event if it has been updated since
you last retreived it
* @param string $handle E-mail or handle to identify the calendar
* @param string $id The id of the event
* @param string $etag The e-tag of the event (optional)
* @param string $json The complete json code from the event that you've
retrieved with the changes that you want
* @return bool|object Returns false on failure and object on success
*/
我应该为 $ json 参数添加什么? 有人可以给我代码示例吗?
谢谢。
答案 0 :(得分:3)
$ json参数应包含JSON格式的已编辑事件,来自您在检索日历事件时获得的响应。
这是您需要采取的步骤,以便能够更新活动
Google Calendar API文档也解释了这一点:http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#UpdatingEvents