문제

I am attempting to retrieve events from my calendar, the below function works to a degree but only pulls the events over the first week or so (specifically until the 24th of the first month). I was hoping to find someone to help me figure out why.

Here is my code

$query = $service->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setsingleevents('true');
$query->setStartMin('2013-07-14T00:00:00.000-10:00');
$query->setStartMax('2013-09-15T00:00:00.000-10:00');
$query->setSortOrder("ascending");
$eventFeed = $service->getCalendarEventFeed($query)
도움이 되었습니까?

해결책

In the end I had to set max-results as in $query->setMaxResults('1000'); the reason is because apparently Google limits results to 25.

Here is the documentation:

Note: The max-results query parameter for Calendar is set to 25 by default, so that you won't receive an entire calendar feed by accident. If you want to receive the entire feed, you can specify a very large number for max-results.

Found Here -> http://code.google.com/apis/calendar/data/1.0/reference.html#Parameters

P.S.

After figuring out the problem I further searched this forum with the known answer and found another similar question with the same answer, I'm listing this because honestly finding help for the Zend Framework and Google Calendar Api is not the easiest thing to do. It would be benificial to us all if there were a more stardardize way of refferencing these two libraries-> Google calendar query returns at most 25 entries

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top