Skip to content
Reference > AmiScript API > Classes

ICalendar

Definition

ICalendar var = .... ;

Extends

Extended By

None

Description

The ICalendar file format (.ics) for creating calendar invites. Known Outlook behavior: when the organizer opens the .ics, the form's send button is labelled "Send Update" (rather than "Send"). This is Outlook's own UI; the button still performs a normal send.

Method Summary

Owner Name Return Type Description
ICalendar constructor() ICalendar Creates an ICalendar
ICalendar addAttendee(eventIndex, mailTo, role, cn) ICalendar Adds an attendee to the specified event
ICalendar addEvent(summary, timezone, start, end, location, description, language, transparency, visibility) Integer Adds an event to the calendar and returns the event's index
ICalendar addOrganizer(eventIndex, mailTo, organizer, sentBy, language, ldap) ICalendar Sets the organizer information for the calendar invite
ICalendar build() String Creates the .ics file content as a string
Object getClassName() String Returns the string name of this object's class type.
ICalendar setEventHtmlDescription(eventIndex, html) ICalendar Sets an HTML description for an event. The build() output will include an X-ALT-DESC;FMTTYPE=text/html block with proper RFC 5545 line folding
ICalendar setEventSequence(eventIndex, sequence) ICalendar Sets the sequence number for an event. Default is 0
ICalendar setEventUid(eventIndex, uid) ICalendar Sets the UID for an event. If not set, a UID is auto-generated
ICalendar setMethod(method) ICalendar Sets the calendar method. REQUEST = standard invitation (opens read-only in Outlook). PUBLISH = opens as an editable meeting form in Outlook so the user can Send. Default is REQUEST.
Object toJson() String Returns a string of a json representation of this object.

Method Definitions


constructor()

ICalendar icalendar = new ICalendar()

Description

Creates an ICalendar


addAttendee(eventIndex,mailTo,role,cn)

ICalendar ICalendar::addAttendee(Integer eventIndex, String mailTo, String role, String cn)

Description

Adds an attendee to the specified event

Parameter Definition

Name Type Description
eventIndex Integer  Index of the event to be used
mailTo String  Email address of the attendee
role String  Role of the attendee, default is REQ-PARTICIPANT, valid options are: REQ-PARTICIPANT, OPT-PARTICIPANT, NON-PARTICIPANT, CHAIR
cn String  Common or displayable name of the attendee

addEvent(summary,timezone,start,end,location,description,language,transparency,visibility)

Integer ICalendar::addEvent(String summary, String timezone, Long start, Long end, String location, String description, String language, String transparency, String visibility)

Description

Adds an event to the calendar and returns the event's index

Parameter Definition

Name Type Description
summary String  Summary of the event
timezone String  Timezone of the event
start Long  Start Timestamp of the event
end Long  End timestamp of the event
location String  Location of the event
description String  Description of the event
language String  Language of the event
transparency String  Transparency of the event. Valid values are: OPAQUE,TRANSPARENT
visibility String  Visibility of the event. Valid values are: PUBLIC,PRIVATE,CONFIDENTIAL

addOrganizer(eventIndex,mailTo,organizer,sentBy,language,ldap)

ICalendar ICalendar::addOrganizer(Integer eventIndex, String mailTo, String organizer, String sentBy, String language, String ldap)

Description

Sets the organizer information for the calendar invite

Parameter Definition

Name Type Description
eventIndex Integer  Index of the event to be used
mailTo String  Required mail to address of the organizer
organizer String  Optional - Name of the organizer
sentBy String  Optional - Sent by email aliase
language String  Optional - Language
ldap String  Optional - LDAP directory of the organizer

build()

String ICalendar::build()

Description

Creates the .ics file content as a string


getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.


setEventHtmlDescription(eventIndex,html)

ICalendar ICalendar::setEventHtmlDescription(Integer eventIndex, String html)

Description

Sets an HTML description for an event. The build() output will include an X-ALT-DESC;FMTTYPE=text/html block with proper RFC 5545 line folding

Parameter Definition

Name Type Description
eventIndex Integer  Index of the event to be used
html String  HTML body for the event (rendered by Outlook as the meeting body)

setEventSequence(eventIndex,sequence)

ICalendar ICalendar::setEventSequence(Integer eventIndex, Integer sequence)

Description

Sets the sequence number for an event. Default is 0

Parameter Definition

Name Type Description
eventIndex Integer  Index of the event to be used
sequence Integer  Sequence number for the event. Must be a non-negative integer. Default is 0

setEventUid(eventIndex,uid)

ICalendar ICalendar::setEventUid(Integer eventIndex, String uid)

Description

Sets the UID for an event. If not set, a UID is auto-generated

Parameter Definition

Name Type Description
eventIndex Integer  Index of the event to be used
uid String  Unique identifier for the event

setMethod(method)

ICalendar ICalendar::setMethod(String method)

Description

Sets the calendar method. REQUEST = standard invitation (opens read-only in Outlook). PUBLISH = opens as an editable meeting form in Outlook so the user can Send. Default is REQUEST.

Parameter Definition

Name Type Description
method String  Calendar method. Valid values are: REQUEST, PUBLISH

toJson()

String Object::toJson()

Description

Returns a string of a json representation of this object.