2012-06-12 82 views

回答

4

好吧我終於得到了我自己的答案。努力閱讀這些Google API資源管理器,並將其與google-api-php-client相匹配。無論如何,這裏是更新描述,摘要和事件顏色的簡單代碼。

$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); 

請記住,此代碼需要在驗證後才能運行。 希望它可以幫助別人。它做了我;)