Dav
WebDAV, CalDAV, and CardDAV client for nodejs and the browser.
Install / Use
/learn @lambdabaa/DavREADME
dav
WebDAV, CalDAV, and CardDAV client for nodejs and the browser.
<!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->Table of Contents generated with DocToc
<!-- END doctoc generated TOC please keep comment here to allow auto update -->API
accounts
dav.createAccount(options)
Perform an initial download of a caldav or carddav account's data. Returns a Promise which will be fulfilled with a dav.Account object.
Options:
(String) accountType - one of 'caldav' or 'carddav'. Defaults to 'caldav'.
(Array.<Object>) filters - list of caldav filters to send with request.
(Boolean) loadCollections - whether or not to load dav collections.
(Boolean) loadObjects - whether or not to load dav objects.
(dav.Sandbox) sandbox - optional request sandbox.
(String) server - some url for server (needn't be base url).
(String) timezone - VTIMEZONE calendar object.
(dav.Transport) xhr - request sender.
calendars
dav.createCalendarObject(calendar, options)
Create a calendar object on the parameter calendar. Returns a Promise which will be fulfilled when the calendar has been created.
@param {dav.Calendar} calendar the calendar to put the object on.
Options:
(String) data - rfc 5545 VCALENDAR object.
(String) filename - name for the calendar ics file.
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.updateCalendarObject(calendarObject, options)
Persist updates to the parameter calendar object to the server. Returns a Promise which will be fulfilled when the calendar has been updated.
@param {dav.CalendarObject} calendarObject updated calendar object.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.deleteCalendarObject(calendarObject, options)
Delete the parameter calendar object on the server. Returns a Promise which will be fulfilled when the calendar has been deleted.
@param {dav.CalendarObject} calendarObject target calendar object.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.syncCalendar(calendar, options)
Fetch changes from the remote server to the parameter calendar. Returns a Promise which will be fulfilled with an updated dav.Calendar object once sync is complete.
@param {dav.Calendar} calendar the calendar to fetch changes for.
Options:
(Array.<Object>) filters - list of caldav filters to send with request.
(dav.Sandbox) sandbox - optional request sandbox.
(String) syncMethod - either 'basic' or 'webdav'. If unspecified, will
try to do webdav sync and failover to basic sync if rfc 6578 is not
supported by the server.
(String) timezone - VTIMEZONE calendar object.
(dav.Transport) xhr - request sender.
dav.syncCaldavAccount(account, options)
Fetch changes from the remote server to the account's calendars. Returns a Promise which will be fulfilled with an updated dav.Account object once sync is complete.
@param {dav.Account} account the calendar account to sync.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
contacts
dav.createCard(addressBook, options)
Create a vcard object on the parameter address book. Returns a Promise which will be fulfilled when the vcard has been created.
@param {dav.AddressBook} addressBook the address book to put the object on.
Options:
(String) data - VCARD object.
(String) filename - name for the vcard vcf file.
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.updateCard(card, options)
Persist updates to the parameter vcard object to the server. Returns a Promise which will be fulfilled when the vcard has been updated.
@param {dav.VCard} card updated vcard object.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.deleteCard(card, options)
Delete the parameter vcard object on the server. Returns a Promise which will be fulfilled when the vcard has been deleted.
@param {dav.VCard} card target vcard object.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
dav.syncAddressBook(addressBook, options)
Fetch changes from the remote server to the parameter address books. Returns a Promise which will be fulfilled with an updated dav.AddressBook object once sync is complete.
@param {dav.AddressBook} addressBook the address book to fetch changes for.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(String) syncMethod - either 'basic' or 'webdav'. If unspecified, will
try to do webdav sync and failover to basic sync if rfc 6578 is not
supported by the server.
(dav.Transport) xhr - request sender.
dav.syncCarddavAccount(account, options)
Fetch changes from the remote server to the account's address books. Returns a Promise which will be fulfilled with an updated dav.Account object once sync is complete.
@param {dav.Account} account the address book account to sync.
Options:
(dav.Sandbox) sandbox - optional request sandbox.
(dav.Transport) xhr - request sender.
sandbox
dav.Sandbox()
Create a request sandbox. There is also a deprecated interface
dav.createSandbox(). Add requests to the sandbox like so:
var sandbox = new dav.Sandbox();
// sandbox instanceof Sandbox
dav.createAccount({
username: 'Yoshi',
password: 'babybowsersoscaryomg',
server: 'https://caldav.yoshisstory.com',
sandbox: sandbox // <- Insert sandbox here!
})
.then(function(calendars) {
// etc, etc.
});
And abort sandboxed requests as a group with sandbox.abort().
transport
dav.transport.Basic(credentials)
Create a new dav.transport.Basic object. This sends dav requests using http basic authentication.
@param {dav.Credentials} credentials user authorization.
dav.transport.Basic.send(request, options)
@param {dav.Request} request object with request info.
@return {Promise} a promise that will be resolved with an xhr request after its readyState is 4 or the result of applying an optional request `transformResponse`
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR

