Hello,

I am trying to receive the events for multiple calendars, using
different values for the method setUser.

        $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined
service name for calendar
        $client = Zend_Gdata_ClientLogin::getHttpClient($user,$pass,
$service);
        $startDate = date("Y-m-d", strtotime("$year-$month-01"));
        $numberOfDays = date("t", strtotime("$year-$month-01"));
        $endDate = date("Y-m-d", strtotime("$year-$month-$numberOfDays"));
        $final = Array();
        $gdataCal = new Zend_Gdata_Calendar($client);
        $listFeed= $gdataCal->getCalendarListFeed();
        foreach ($listFeed as $calendar) {
                $cntr = 0;
                $calendar_id = $calendar->id->text;
                $user = str_replace(Zend_Gdata_Calendar::CALENDAR_FEED_URI.'/
default/', "", $calendar_id);
                $calendar_title = $calendar->title;
                $gdataCal2 = new Zend_Gdata_Calendar($client);
                $query = $gdataCal2->newEventQuery();
                $query->setUser($user);
                $query->setVisibility('public');
                $query->setProjection('full');
                $query->setOrderby('starttime');
                $query->setStartMin($startDate);
                $query->setStartMax($endDate);
                $eventFeed = $gdataCal2->getCalendarEventFeed($query);
                foreach ($eventFeed as $event) {
                //...
                }
        }

but this will only let me receive the first, default, calendars
events. Could anyone help me out here, as I need to specify start- and
enddates? Thanks a lot.

Best regards,

Christoph





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