This is the base iCalendar object which consists of properties and child components.
nameof the component. Ex:VCALENDAR,VEVENT
Usage:
var component = vobject.component('VALARM');
component.pushProperty(vobject.property('ACTION', 'DISPLAY'));
component.toICS();Example:
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;CN=jeremy@sunrise.im:mailto:jeremy@sunrise.im
ATTENDEE;CUTYPE=INDIVIDUAL;RSVP=TRUE;CN=Joey Dong;X-NUM-GUESTS=0:mailto:joey@sunrise.am
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Night Photowalk
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
where VCALENDAR is an instance of a vobject.component, PRODID, VERSION, CALSCALE are properties of the component, and VEVENT is a sub-component.
propertyto push onto the component. Expects apropertyobject
nameof the property to retrieve- returns an array of
propertyobjects set forname,[]by default
propertyto set as a unique property for the component. Expects apropertyobject
nameof the property to retrieveindexof the property in cases of multiple instances of the property- returns the
propertyobject at the specifiednameandindex,undefinedby default
childComponentto be pushed onto the component. Expects acomponentobject
nameof the subcomponent- returns an array of subcomponents with specified name,
[]by default
- returns rendered iCalendar representation of the component as an array of lines
- returns rendered iCalendar string representation of the component
component.escape RFC
Escapes TEXT strings according to iCal spec. Characters to be escaped are \n (newline), ; (semicolon), : (colon), and , (comma)
strString to be escaped- returns String escaped string
component.unescape(str) RFC
Unescapes TEXT strings according to iCal spec. Characters to be unescaped are \n (newline), ; (semicolon), : (colon), and , (comma)
strString to be unescaped- returns String unescaped string