Skip to main content
Version: 2.1.2

fetchAddressBooks

fetchAddressBooks

get all addressBooks of the passed in CARDDAV account

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

Arguments

  • account DAVAccount
  • props CARDDAV prop element in ElementCompact form, overriding default props to fetch.
  • headers request headers
  • headersToExclude array of keys of the headers you want to exclude
  • fetchOptions options to pass to underlying fetch function
caution

when overriding props, resourcetype is required

Return Value

array of DAVAddressBook

Behavior

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