That's the expected behavior, the sample extracts events from the main
calendar feed (you did NOT mention you had issues to get events from
secondary calendars...).
To fetch events from calendars other than the main one, you have to modify
the feed URL :
// Parameters for ClientAuth authentication
$service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
$user = "[email protected]";
$pass = "yourpassword";
// Create an authenticated HTTP client
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass,
$service);
$agenda = new Zend_Gdata_Calendar($client);
$query = $agenda->newEventQuery();
$query->setUser($user);
$query->setVisibility("private");
$query->setProjection('full');
This piece of code creates an authenticated Gdata Calendar service (use your
gmail credentials), and then builds a feed URL by calling setUser,
setVisibiliy, setProjection (the 3 parts of a calendar feed url, I strongly
advise you to get familiar with the Gdata protocol before going on...).
The $user is a pseudo mail address looking like
[email protected] ; it can be obtained by having a look at
the calendar settings page on the GUI and clicking on the orange "xml
button" ; it shows a feed url where you can extract this ID, to use in place
of "random_id".
--
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://code.google.com/apis/calendar/community/forum.html