createAccount
createAccount
Section titled “createAccount”construct webdav account information need to requests
const account = await createAccount({ account: { serverUrl: 'https://caldav.icloud.com/', accountType: 'caldav', }, headers: { authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”accountrequired, account withserverUrlandaccountTypeheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functionfetchcustom fetch implementationloadCollectionsdefaults to false, whether to load all collections of the accountloadObjectsdefaults to false, whether to load all objects of collections as well, must be used withloadCollectionsset totrue
Return Value
Section titled “Return Value”created DAVAccount
Behavior
Section titled “Behavior”perform serviceDiscovery,fetchHomeUrl, fetchPrincipalUrl for account information gathering. make fetch collections & fetch objects requests depend on options.