Skip to main content
Version: 2.1.2

makeCalendar

makeCalendar

create a new calendar on target account

const result = await makeCalendar({
url: 'https://caldav.icloud.com/12345676/calendars/c623f6be-a2d4-4c60-932a-043e67025dde/',
props: {
displayname: 'personal calendar',
[`${DAVNamespaceShort.CALDAV}:calendar-description`]: 'calendar description',
},
headers: {
authorization: 'Basic x0C9ueWd9Vz8OwS0DEAtkAlj',
},
});

Arguments

  • url required, the target url
  • props required, CALDAV prop element in ElementCompact form
  • depth DAVDepth
  • headers request headers
  • headersToExclude array of keys of the headers you want to exclude
  • fetchOptions options to pass to underlying fetch function

Return Value

array of DAVResponse

Behavior

send a MKCALENDAR request and calendar data that creates a new calendar