freeBusyQuery
freeBusyQuery
query free busy data on calendar
caution
a lot of caldav providers do not support this method like google, apple. use with caution.
const freeBusyQuery = await freeBusyQuery({
url: 'https://caldav.icloud.com/123456/calendars/A5639426-B73B-4F90-86AB-D70F7F603E75/',
timeRange: {
start: '2022-01-28T16:25:33.125Z',
end: '2022-02-28T16:25:33.125Z',
},
depth: '0',
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
Arguments
urlrequired, collection urltimeRangerequired time 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.
depthDAVDepthheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch function
Return Value
Behavior
send free-busy-query REPORT request to caldav server.