I have found out how to do this. You need to use the link of the
calendar you wish to get events for.
public List<CalendarEventEntry> getAllCalendarEvents(CalendarEntry
calendarEntry)
throws MalformedURLException, IOException,
ServiceException
{
List<CalendarEventEntry> calendarEventEntries = null;
String url = null;
for (Link link : calendarEntry.getLinks())
{
if ("alternate".equalsIgnoreCase(link.getRel()))
{
url = link.getHref();
}
}
if (url != null)
{
calendarEventEntries = service.getFeed(new URL(url),
CalendarEventFeed.class).getEntries();
}
return calendarEventEntries;
}
Hopefully this will be helpful to others.
On Apr 3, 8:38 pm, Dave Pederson <[EMAIL PROTECTED]> wrote:
> Hello-
>
> I just started using the google calendar api (Java). It seems easy to
> get a list of my calendars and events individually, but how how I only
> get events for a specific calendar?
>
> It seems like there should be methods such as calendar.getEvents() or
> event.getCalendar(), but I don't see them.
>
> Thanks,
>
> -Dave
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---