Skip to content

ABE General Overview of Events

Emily Lepert edited this page Jul 26, 2017 · 5 revisions

Requesting Events

The frontend makes a GET request to ABE's EventAPI. If no event_id or rec_id is given, ABE returns all events in the date range specified by the frontend. If an event_id or rec_id is given, the frontend is requesting information about a single event. Depending on what is given, a regular event, "dummy" recurring event, or sub_event is returned. * For more information on sub_events and "dummy" events go to recurring events

Creating Events

To create an event and add it to ABE, a POST request is made. To make a repeating event, the 'recurrence' field should be filled with the appropriate fields.

Recurring Events

ABE define events that repeat with the RecurringEventDefinition document. The first event in the series has this document embedded in it. MongoDB stores this first event with the definition. When sending information to the frontend, ABE expands this first event with the definition into every occurrence of the recurrence. These "dummy" events are not saved in mongoDB, simply generated based on the definition stored in the database and created everytime the frontend requests events.

Editing a "dummy" event

If a "dummy" event is edited on the frontend, the frontend sends ABE a PUT request to change the parent event definition. The fields that were changed on the frontend are saved in a RecurringEventExc document or sub event document. The next time the frontend requests an event, these sub events will replace the ocurrence it was originally edited from.

Clone this wiki locally