Correct way to retrieve events from non-default calendars?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Correct way to retrieve events from non-default calendars?

Josh_A
Hi folks,

So $calendar->getLink()->getHref(
) returns a full url like:

http://www.google.com/calendar/feeds/1bofflqv7fipee5cip4qmdgp40%40group.calendar.google.com

Plugging that into newEventQuery, e.g.:

$query = $service->newEventQuery('http://www.google.com/calendar/feeds/1bofflqv7fipee5cip4qmdgp40%40group.calendar.google.com');

creates a problem, because newEventQuery wants to include /default after it. $query->setUser(''); of course does not work, as any null user is set to "default" automatically.

I can of course strip "http://www.google.com/calendar/feeds/" out from the output of getHref() and feed that to setUser() but that seems a bit silly.

Is that how it's done, or is there something I'm missing?

-Josh