ExportICS Method

Generates an event from the properties in the iCal (.ICS) format.

Syntax

caldav.exportICS([callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The ExportICS method is used to create a calendar object and export it in the iCal/ICS format, which can then be saved to disk and imported using any calendar software, even those that do not support CalDAV. The ExportICS method will create the exact same data as the PutCalendarEvent method sends when adding or updating an event to a calendar.

Note that if ExportICS is called immediately after a successful GetCalendarEvent, the unmodified calendar returned from the CalDAV server will be returned. However if any properties are changed between the GetCalendarEvent and ExportICS calls, the class will generate and return a brand new event.

The following properties are used when creating a request with PutCalendarEvent or ExportICS, and will be filled after calling GetCalendarEvent or ImportICS. These will also be available from inside the EventDetails event, which is fired for each event received from the CalDAV server in response to a GetCalendarReport.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Node.js Edition - Version 20.0 [Build 8307]