Google Official documents don't include how to specify the calendar
from which the events come.
I found out the following solution. Hope it will work for you.

Steps:
1) First you send a GET request to 
http://www.google.com/calendar/feeds/default/owncalendars/full.
    This will return a feed including all your calendars. For each
calendar, there is a corresponding entry within the feed.
2) For each calendar entry, a xml snippet like this exists:
    <link rel="http://schemas.google.com/gCal/2005#eventFeed";
            type="application/atom+xml" href="http://www.google.com/
calendar/feeds/pnk5d66rpmiho3pl4m4t6dnki0%40group.calendar.google.com/
private/full"/>
The address "http://www.google.com/calendar/feeds/
pnk5d66rpmiho3pl4m4t6dnki0%40group.calendar.google.com/private/full"
is where you should send your request to retrieve events of the
corresponding calendar.

I am using Java to access google services.
For your php code, I guess what you should change is
     $query->setUser('default');
Pass the URL obtained in step 2) as the real parameter instead of
"default".
    $query->setUser('http://www.google.com/calendar/feeds/
pnk5d66rpmiho3pl4m4t6dnki0%40group.calendar.google.com/private/full');
It's my wild guess, may or may not work.

Gerald

On Aug 21, 6:29 am, Swen <[email protected]> wrote:
> Hi
>
> i try to show my events on my website. So i have i look at the
> Calender api. Now i found the example:
>
> function outputCalendarByDateRange($client, $startDate='2007-05-01',
>                                    $endDate='2007-08-01')
> {
>   $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);
>   echo "<ul>\n";
>   foreach ($eventFeed as $event) {
>     echo "\t<li>" . $event->title->text .  " (" . $event->id->text . ")
> \n";
>     echo "\t\t<ul>\n";
>     foreach ($event->when as $when) {
>       echo "\t\t\t<li>Starts: " . $when->startTime . "</li>\n";
>     }
>     echo "\t\t</ul>\n";
>     echo "\t</li>\n";
>   }
>   echo "</ul>\n";
>
> }
>
> My question, where can i define from which calender the events come
> from.
>
> Many Thanks
>
> Swen
--~--~---------~--~----~------------~-------~--~----~
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