Events Endpoint

This endpoint returns the user's events in a JSON format. Some CaulfieldLife timetable entries are not a part of the regular timetable, but are instead special events, and this returns a JSON of those to be handled.

/api/events/{token}/{?userID}

Params

keyrequireddefault valuedatatypedescription
dayMinus/dayPlusfalse0Int / StringThese values expand the date range of the request by the given days, by default the JSON returned is only that of today.

These values can also alternatively just be ISO 8601 Extended format datetime values, allowing you to set a start and end time for your request.
📝️

Please Note: the userID parameter is optional. Internally, if it is not provided, the API will call the userInfo endpoint for you, but if you provide it, it will just skip this section making it a bit faster for optimisation purposes.

The times from the events endpoint are in GMT time, which might be why they appear offset from the real time. For example, in Melbourne (GMT+10), the time would look 10 hours behind.

Example

https://caulfieldsync.vercel.app/api/events/sampleToken?dayMinus=5&dayPlus=100&shorten=true

It's basically the same as the timetable endpoint