Skip to main content
Version: 2.1.2

fetchCalendars

fetchCalendars

get all calendars of the passed in CALDAV account

const calendars = await fetchCalendars({
account,
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});

Arguments

  • account DAVAccount
  • header request headers
  • headersToExclude array of keys of the headers you want to exclude
  • fetchOptions options to pass to underlying fetch function
  • props CALDAV prop element in ElementCompact form, overriding default props to fetch
  • projectedProps custom props projection object, used as a map to map fetched custom props to values
    caution

    when overriding props, supported-calendar-component-set and resourcetype are required

Return Value

array of DAVCalendar of the account

Behavior

use PROPFIND to get all the basic info about calendars on certain account