I'm working on a React-big-calendar
that use the Google Calendar API to store or retrieve my different events.
My problem is the following: I would like to prevent Events insertion / update / patch if there is already an event on this (or one of the recurrence's instance's) time slot (event if it's just partially).
If the event has recurrence and at least one of the recurrence instances overlap with another event or another event's recurrence instance, I would like to prevent Events insertion / update / patch as well.
The different possibilities left by the Events doc are not enough, I use only one calendar and changing opacity doesn't prevent anything.
The FreeBusy query just help a bit, but not much:
- First it will ask too much logic for the recurrent event (How do I check that the instances of my recurrent event won't overlap an already existing event, or an instance of another existing recurrent event?).
- Worst, it also returns the busyness of the current event, so I may have to remove the current event, call the FreeBusy, and then re-create the event so the FreeBusy doesn't take the current event in consideration.
How can I prevent overlapping in this situation with Google Calendar API? Thanks in advance!