createVCard
createVCard
Section titled “createVCard”create one vcard on the target addressBook
const result = await createVCard({ addressBook: addressBooks[0], filename: 'test.vcf' vCardString: 'BEGIN:VCARD\nVERSION:3.0\nN:;Test BBB;;;\nFN:Test BBB\nUID:0976cf06-a0e8-44bd-9217-327f6907242c\nPRODID:-//Apple Inc.//iCloud Web Address Book 2109B35//EN\nREV:2021-06-16T01:28:23Z\nEND:VCARD', headers: { authorization: 'Basic x0C9ueWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”addressBookrequired, DAVAddressBookfilenamerequired, file name of the new vcard, should end in.vcf. It is one path segment inside the address book:?,#,\, a%that does not start a percent-escape, and whitespace are percent-encoded, while existing percent-escapes are kept. Names containing/, or equal to.or.., are rejected.vCardStringrequired, vcard file dataheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch function
Return Value
Section titled “Return Value”Behavior
Section titled “Behavior”use PUT request to create a new vcard