fetchCalendarObjects
fetchCalendarObjects
Section titled “fetchCalendarObjects”get all/specified calendarObjects of the passed in calendar
const objects = await fetchCalendarObjects({ calendar: calendars[0], headers: { authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”calendarrequired, DAVCalendar to fetch calendar objects fromobjectUrlscalendar object urls to fetchfiltersCALDAV filter element in ElementCompact formtimeRangetime range in iso formatstartstart time in ISO 8601 format, format that’s not in ISO 8601 will cause an error be thrown.endend time in ISO 8601 format, format that’s not in ISO 8601 will cause an error be thrown.startmust be earlier thanend.
headersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functionfetchcustom fetch implementationurlFilterdefault: function which only keeps.icsobjects predicate function to filter urls from the calendar objects before fetchingexpandwhether to expand recurring components into individual instances. RequirestimeRange; requests without it reject.useMultiGetdefault: true whether to use calendarMultiGet as underlying function to fetch calendar objects; if set tofalse, uses a single calendarQuery request instead.
Return Value
Section titled “Return Value”array of DAVCalendarObject
Behavior
Section titled “Behavior”a mix of calendarMultiGet and calendarQuery, you can specify both filters and objectUrls here.
The default query selects VEVENT resources. For a complete collection snapshot, pass
filters: { "comp-filter": { _attributes: { name: "VCALENDAR" } } } and a urlFilter that
accepts every object URL except the collection URL, including extensionless resources. Built-in
calendar sync and account loading use this complete query.