Hello Emiliano,
You would need to set the secondary calendar's ID in place of 'default' in:
$query->setUser('default');
You can retrieve the calendar's ID by querying the list of calendars a user
has access to or owns. The calendar's ID is the last part of the calendar
Atom ID:
http://www.google.com/calendar/feeds/default/allcalendars/full/*
c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com*
In this case, you would have to set the user as:
$query->setUser('*c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com
*');
Best,
Alain
On Thu, Jul 21, 2011 at 2:20 AM, Emiliano Jordan
<[email protected]>wrote:
> I'm trying to access a non-default calendar's feed and use the query
> options. Using this (largely example function) I can get the right calendar
> and I can set Query parameters on the user's default calendar but I can't
> seem to get both working. Any ideas?
>
> $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
> $user = "[email protected]";
> $pass = "pa$$";
> $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal);
> $uri = "calendar-url";
>
>
> function outputCalendarByDateRange($client, $startDate, $endDate)
> {
> $gdataCal = new Zend_Gdata_Calendar($client);
> $query = $gdataCal->newEventQuery();
> $query->setUser('default');
> $query->setVisibility('private');
> $query->setProjection('full');
> $query->setOrderby('starttime');
> $query->setStartMin($startDate);
> $query->setStartMax($endDate);
> $eventFeed = $gdataCal->getCalendarEventFeed($query);
>
> --
> 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
>
--
Alain Vongsouvanh
--
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