2 messages in com.googlegroups.google-calendar-help-dataapiReading event date with the java api ...
FromSent OnAttachments
zmajzam21 Jun 2008 07:17 
Austin (Google)23 Jun 2008 09:41 
Subject:Reading event date with the java api fails - javascript works
From:zmajzam (papi@googlemail.com)
Date:06/21/2008 07:17:37 AM
List:com.googlegroups.google-calendar-help-dataapi

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 ?