Hi,
I see, this is strange, calling getTimes() on an CalendarEventEntry does
return a list of When objects for me.
Maybe you can check to see if the return entry is a recurrence, in which
case there wouldn't be a list of When objects. You can flatten a recurrence
event (then each recurring instance will become an entry in the When object
list) by setting the query parameter for singeevents to be true, you can do
that like -
setStringCustomParameter('singleevents', 'true');
Hope it helps,
Austin
On Sat, Jun 21, 2008 at 7:18 AM, zmajzam <[EMAIL PROTECTED]> wrote:
>
> My problem is that i can't get the events date with jave.
> The entry.getTimes() method always returns a empty List.
> When i do the same with the javascript api it works fine.
>
> Here my sample java code:
> URL feedUrl = new URL("http://www.google.com/calendar/feeds/
> en3cuvpdgraofl6e18m78ksj1c%40group.calendar.google.com/public/full");
> GoogleService myService = new GoogleService(..);
> myService.setUserCredentials("...");
>
> CalendarQuery myQuery = new CalendarQuery(feedUrl);
> myQuery.setMinimumStartTime(DateTime.parseDateTime("2008-01-25T00:00:00"));
> myQuery.setMaximumStartTime(DateTime.parseDateTime("2008-12-31T23:59:59"));
>
> CalendarEventFeed resultFeed = myService.query(myQuery,
> CalendarEventFeed.class);
> for (CalendarEventEntry entry : resultFeed.getEntries()) {
> List<When> times = entry.getTimes();
> System.out.println("SIZE of WHEN:"+times.size());
> for (int i = 0 ; i < times.size(); i++) {
> When w = times.get(i);
>
> System.out.println("START:"+w.getStartTime().toUiString());
> }
> }
>
> times.size is alway 0.
>
> When i do the same with javascript the entry.getTimes function is
> never zero for the entry.
> What can i do ?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---