views:

147

answers:

2

What is the proper way to update all (or a subset) of the instances of a recurring event? Also related: how do you, given the id of the original event, get the instances of that event?

A: 

To update all you just change the relevant properties for the event, leaving the recurrence and recurrence exceptions strings intact. Not sure that you can easily modify a subset, as this would require converting the recurring event into multiple new events depending on the subset.

For the second part or your question, according to the API docs:

Specifically, each recurring event is represented by a element in the result feed, and each of those elements includes a element for each occurrence of that event that falls between the start time and the end time. Looking at elements is much simpler than parsing recurrences and exceptions yourself.

However, I've never been able to find that magic "when"... so I've ended up parsing the recurrence and recurrenceexceptions strings - if you find the answer to that one, let us all know!

A: 

For anyone with this issue I also spent some time trying to figure this out. Basically when you get your CalendarEventEntry list you need to check for each calendarEventEntry if it has an originalEvent (calendarEventEntry.getOriginalEvent()). This basically tells you there is another event (which you may or may not have already processed) that needs to swapped with the information for this current calendarEventEntry.

David Reynolds