getCalendarListFeed();
echo '
' . $calFeed->title->text . '
';
echo '';
foreach ($calFeed as $calendar) {
echo '- ' . $calendar->title->text . '
';
}
echo '
';
//events...
$query = $gdataCal->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setStartMin($startDate);
$query->setStartMax($endDate);
$count = -1;
while($count != 0) {
$count = 0;
echo "Running Again...";
$eventFeed = $gdataCal->getCalendarEventFeed($query);
echo "\n";
foreach ($eventFeed as $event) {
echo "\t- " . $event->title->text . " (" . $event->id->text . ")\n";
echo "\t\t
\n";
foreach ($event->when as $when) {
echo "\t\t\t- Starts: " . $when->startTime . "
\n";
$count++;
$event->delete();
}
echo "\t\t
\n";
echo "\t \n";
}
echo "
\n";
echo "Deleted $count events\n";
}
echo "Nothing left to delete, terminating";
?>