嗨,伙计们,我正在尝试从 Google Calendar API(从日期范围)中删除多个事件。我得到了正确的提要,这不是问题。问题是删除功能。我收到此错误:“错误:您必须指定要发布到的 URI。”
有人能帮帮我吗!
谢谢你
$service = new Zend_Gdata_Calendar($client);
$query = $service->newEventQuery();
$query->setUser('XXXXX');
$query->setVisibility('private-XXXX');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setStartMin('2010-01-20');
$query->setStartMax('2010-01-28');
// Retrieve the event list from the calendar server
try {
$eventFeed = $service->getCalendarEventFeed($query);
} catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getMessage();
}
// Iterate through the list of events, deleting them //
foreach ($eventFeed as $event) {
try{
$event->delete();
}
catch (Zend_Gdata_App_Exception $e) {
echo "Error: " . $e->getMessage();
}
}