Php 谷歌日历API V3更新事件

Php 谷歌日历API V3更新事件,php,google-api,google-calendar-api,Php,Google Api,Google Calendar Api,我可以使用Google Calendar API V3完美地添加事件,如中所述,但我不知道如何开始更新事件过程 我想我必须选择事件(我的数据库中存储了事件ID),然后设置参数并调用更新事件。但是不知道从哪里开始 似乎很少有教程。有什么想法吗?好的,我终于自己找到了答案。努力阅读这些谷歌API浏览器,并与谷歌API php客户端进行匹配。无论如何,这里是一个更新描述、摘要和事件颜色的简单代码 $apiClient = new apiClient(); $apiClient->setUseOb

我可以使用Google Calendar API V3完美地添加事件,如中所述,但我不知道如何开始更新事件过程

我想我必须选择事件(我的数据库中存储了事件ID),然后设置参数并调用更新事件。但是不知道从哪里开始


似乎很少有教程。有什么想法吗?

好的,我终于自己找到了答案。努力阅读这些谷歌API浏览器,并与谷歌API php客户端进行匹配。无论如何,这里是一个更新描述、摘要和事件颜色的简单代码

$apiClient = new apiClient();
$apiClient->setUseObjects(true);
$service   = new apiCalendarService($apiClient);
$events    = $service->events;

$currEvent  = $events->get("primary", $event_id);

$currEvent->setDescription("YOUR FULL DESCRIPTION");
$currEvent->setSummary("YOUR DESIRED SUMMARY - Kind of title");
$currEvent->setColorId(2); // One of the available colors ID

$recurringEvent = $events->update('primary', $event_id, $currEvent);
请记住,此代码只需在身份验证后运行。
希望它能帮助别人。我的确是这样;)

好吧,我终于自己找到了答案。努力阅读这些谷歌API浏览器,并与谷歌API php客户端进行匹配。无论如何,这里是一个更新描述、摘要和事件颜色的简单代码

$apiClient = new apiClient();
$apiClient->setUseObjects(true);
$service   = new apiCalendarService($apiClient);
$events    = $service->events;

$currEvent  = $events->get("primary", $event_id);

$currEvent->setDescription("YOUR FULL DESCRIPTION");
$currEvent->setSummary("YOUR DESIRED SUMMARY - Kind of title");
$currEvent->setColorId(2); // One of the available colors ID

$recurringEvent = $events->update('primary', $event_id, $currEvent);
请记住,此代码只需在身份验证后运行。 希望它能帮助别人。我的确是这样;)