Hi there,
I'm trying to retrieve a single CalendarEventEntry from a Google Calendar by the event ID but I can't find the way to do it. It seems that the API doesn't provide a method for this, though it suggests to make a query to the feed calendar using Query. The drawback of this is that the ID is not one of the parameters considered.
I think that a possible way to achieve this would be to get the CalendarEventFeed associated with our calendar and then iterate over the resulting list of events as follows:
CalendarService service = new CalendarService(applicationName);
service.setUserCredentials(userName,password);
CalendarEventFeed myFeed = service.getFeed(feedUrl, CalendarEventFeed.class);
List <CalendarEventEntry> entries = myFeed.getEntries();
for (CalendarEventEntry e : entries){
if (e.getId().equals(id)){
return e;
}
}
Do you know any easier and more straight solution to achieve this ??
Thanks in advance!