fetchCalendarObjects
fetchCalendarObjects
get all/specified calendarObjects of the passed in calendar
const objects = await fetchCalendarObjects({
calendar: calendars[0],
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
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.
headersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functioninfosome calendar providers may return their objects with different suffix than .ics such as
http://api.xx/97ec5f81-5ecc-4505-9621-08806f6796a3orhttp://api.xx/calobj1.abcin this case, you need to pass in your own calendar object name filter so that you can have results you need.urlFilterdefault: function which only keep .ics objects predicate function to filter urls from the calendar objects before fetchingexpandwhether to expand the calendar objects, forcing the server to expand recurring components into individual calendar objects.infosome calendar providers may not support calendarMultiGet, then it's necessary to use calendarQuery to fetch calendar object data.
useMultiGetdefault: true whether to use calendarMultiGet as underlying function to fetch calendar objects, if set to false, it will use calendarQuery to fetch instead.
Return Value
array of DAVCalendarObject
Behavior
a mix of calendarMultiGet and calendarQuery, you can specify both filters and objectUrls here.