Retrieve Google Calendar Events

Posted by Don on Stack Overflow See other posts from Stack Overflow or by Don
Published on 2010-05-15T18:54:31Z Indexed on 2010/05/15 19:04 UTC
Read the original article Hit count: 357

Hi,

I'm using the Java API for Google Calendar. The documents show the following example of how to retrieve events from a calendar:

URL feedUrl = new URL("http://www.google.com/calendar/feeds/[email protected]/private/full");
CalendarService myService = new CalendarService("exampleCo-exampleApp-1");
myService.setUserCredentials("[email protected]", "mypassword");

// Send the request and receive the response:
CalendarEventFeed myFeed = myService.getFeed(feedUrl, CalendarEventFeed.class);

This will retrieve all events from the primary calendar of the [email protected] account. However, I need to retrieve events from a secondary calendar. I already have a reference the CalendarEntry object that represents the secondary calendar, but I still can't figure out how to get events from it.

I suspect I can do this using the same code as above, but I just need to change the URL to something else.

Thanks, Donal

© Stack Overflow or respective owner

Related posts about java

Related posts about google-calendar-api