fetchCalendarObjects
fetchCalendarObjects
get all/specified calendarObjects of the passed in calendar
const objects = await fetchCalendarObjects({
calendar: calendars[0],
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
Arguments
calendar
required, DAVCalendar to fetch calendar objects fromobjectUrls
calendar object urls to fetchfilters
CALDAV filter element in ElementCompact formtimeRange
time range in iso formatstart
start time in ISO 8601 format, format that's not in ISO 8601 will cause an error be thrown.end
end time in ISO 8601 format, format that's not in ISO 8601 will cause an error be thrown.
headers
request headersheadersToExclude
array of keys of the headers you want to excludefetchOptions
options 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-08806f6796a3
orhttp://api.xx/calobj1.abc
in this case, you need to pass in your own calendar object name filter so that you can have results you need.urlFilter
default: function which only keep .ics objects predicate function to filter urls from the calendar objects before fetchingexpand
whether 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.
useMultiGet
default: 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.