I'm sure the solution is as simple as 1-2-3, but just can't figure it
out...

So I would like to delete an event from a calendar of mine and it just
doesn't work.

I can retrieve the list of calendars, even the list of events from my
non-primary calendar, but when I try to delete it gives me the
following message:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Expected response code 200, got 500' in /home/gkovacsp/
scripts/Zend/Gdata/App.php:581 Stack trace: #0 /home/gkovacsp/scripts/
Zend/Gdata/App/Entry.php(191): Zend_Gdata_App-
>delete(Object(Zend_Gdata_Calendar_EventEntry)) #1 /home/gkovacsp/misc/
epguides/test.php(190): Zend_Gdata_App_Entry->delete() #2 {main}
thrown in /home/gkovacsp/scripts/Zend/Gdata/App.php on line 581

Can anyone help me?

Here is what I do:
<?php
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = 'my email';
$pass = 'my password';
$calendarID="my caendar id"

// Create an authenticated HTTP client
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass,
$service);

// Create an instance of the Calendar service
$service = new Zend_Gdata_Calendar($client);

try {
        $listFeed= $service->getCalendarListFeed();
} catch (Zend_Gdata_App_Exception $e) {
        echo "Error: " . $e->getResponse();
}


echo "<h1>Calendar List Feed</h1>";
echo "<ul>";
foreach ($listFeed as $calendar) {
    echo "<li>" . $calendar->title . " (Event Feed: " . $calendar-
>id . ")</li>";
}
echo "</ul>";

$query = $service->newEventQuery();
$query->setUser($calendarID);
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setFutureevents('true');
$query->setStartMin('2006-11-01');
$query->setStartMax('2006-12-16');

// Retrieve the event list from the calendar server
try {
    $eventFeed = $service->getCalendarEventFeed($query);
} catch (Zend_Gdata_App_Exception $e) {
    echo "Error: " . $e->getResponse();
}

// Iterate through the list of events, outputting them as an HTML list
echo "<ul>";
foreach ($eventFeed as $event) {
    echo "<li>" . $event->title . " (Event ID: " . $event->id . ")</
li>";
}
echo "</ul>";

$event = $eventFeed[0];

// Delete the event
$event->delete();
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to