This is the base iCalendar object which consists of properties
and child components
.
name
of 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;[email protected]:mailto:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;RSVP=TRUE;CN=Joey Dong;X-NUM-GUESTS=0:mailto:[email protected]
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.
property
to push onto the component. Expects aproperty
object
name
of the property to retrieve- returns an array of
property
objects set forname
,[]
by default
property
to set as a unique property for the component. Expects aproperty
object
name
of the property to retrieveindex
of the property in cases of multiple instances of the property- returns the
property
object at the specifiedname
andindex
,undefined
by default
childComponent
to be pushed onto the component. Expects acomponent
object
name
of 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)
str
String 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)
str
String to be unescaped- returns String unescaped string