Hello,

I am trying to delete an event based on its (known) eventID.
In the Google PHP API documentation (http://code.google.com/apis/
calendar/developers_guide_php.html#DeletingEvents), I found the
following methods:
- getEvent to fetch the event-object based on an eventID and a client.
- the delete() method, which can be invoked on an event-object.

This is the code I am using:
-----------------------------------------------------------------------------
$gcal_email  = "@gmail.com";
$gcal_passwd = "***";

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');

try {
  $client = Zend_Gdata_ClientLogin::getHttpClient($gcal_email,
$gcal_passwd, 'cl');
} catch (Zend_Gdata_App_CaptchaRequiredException $cre) {
        echo 'Error ivm Captcha!!\n';
        return null;
} catch (Zend_Gdata_App_AuthException $ae) {
        echo 'Problem authenticating: ' . $ae->exception() . "\n";
        return null;
}

// fetch event based on EventID
if ($event=getEvent($client, $eventID){
  $event->delete();
}
-----------------------------------------------------------------------------
When using this error, I get the error "Fatal error: Uncaught
exception 'Zend_Gdata_App_HttpException' with message 'Expected
response code 200, got 400'".

What am I doing wrong? Or is there a better method to do this?

--~--~---------~--~----~------------~-------~--~----~
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