Skip to content

Latest commit

 

History

History
60 lines (36 loc) · 1.91 KB

property.md

File metadata and controls

60 lines (36 loc) · 1.91 KB

vobject.property(name, value, parameters)

This is the base structure for an iCalendar vobject.

  • name of the property. Ex: CALSCALE, ORGANIZER, ATTENDEE
  • value of the property. Ex: mailto:[email protected]
  • parameters additional parameters listed after the name and before the value. Ex: CN=Joey Dong, ROLE=REQ-PARTICIPANT, CUTYPE=INDIVIDUAL

Usage:

var property = vobject.property('CALSCALE', 'GREGORIAN');
property.toICS(); // CALSCALE:GREGORIAN

var property = vobject.property('ATTENDEE', 'mailto:[email protected]');
property.setParameter('CUTYPE', 'INDIVIDUAL');
property.toICS(); // ATTENDEE;CUTYPE=INDIVIDUAL:mailto:[email protected]

Examples:

CALSCALE:GREGORIAN

ORGANIZER;[email protected]:mailto:[email protected]

ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Joey Dong;X-NUM

property.setParameter(name, value)
  • name of the parameter. Ex: CUTYPE, ROLE, PARTSTAT
  • value to set for the parameter name. Ex: INDIVIDUAL, REQ-PARTICIPANT, NEEDS-ACTION
property.getParameter(name)
  • name of the parameter. Ex: CUTYPE, ROLE, PARTSTAT
  • returns value of the parameter set with name, undefined by default

property.setValue(value)
property.getValue()
  • returns the value set for the property, undefined by default

property.parseICS(ics)
property.toICS()
  • returns rendered iCalendar string representation of the property, '' by default