Constructor of ICalAttendee. The event reference is required to query the calendar's timezone when required.
Attendee Data
Reference to ICalEvent object
Get the attendee's delegated-from field
Set the attendee's delegated-from field
Creates a new Attendee if the passed object is not already a
ICalAttendee object. Will set the delegatedTo
and
delegatedFrom
attributes.
Get the attendee's delegated-to value.
Set the attendee's delegated-to field.
Creates a new Attendee if the passed object is not already a
ICalAttendee object. Will set the delegatedTo
and
delegatedFrom
attributes.
Will also set the status
to DELEGATED
, if attribute is set.
const cal = ical();
const event = cal.createEvent();
const attendee = cal.createAttendee();
attendee.delegatesTo({email: 'foo@bar.com', name: 'Foo'});
Create a new attendee this attendee delegates from and returns this new attendee. Creates a new attendee if the passed object is not already an ICalAttendee.
const cal = ical();
const event = cal.createEvent();
const attendee = cal.createAttendee();
attendee.delegatesFrom({email: 'foo@bar.com', name: 'Foo'});
Create a new attendee this attendee delegates to and returns this new attendee. Creates a new attendee if the passed object is not already an ICalAttendee.
const cal = ical();
const event = cal.createEvent();
const attendee = cal.createAttendee();
attendee.delegatesTo({email: 'foo@bar.com', name: 'Foo'});
Get attendee's role
Set the attendee's role, defaults to REQ
/ REQ-PARTICIPANT
.
Checkout ICalAttendeeRole for available roles.
Get attendee's status
Set the attendee's status. See ICalAttendeeStatus for available status options.
Return a shallow copy of the attendee's options for JSON stringification. Can be used for persistence.
Get attendee's type (a.k.a. CUTYPE)
Set attendee's type (a.k.a. CUTYPE). See ICalAttendeeType for available status options.
Set X-* attributes. Woun't filter double attributes, which are also added by another method (e.g. status), so these attributes may be inserted twice.
attendee.x([
{
key: "X-MY-CUSTOM-ATTR",
value: "1337!"
}
]);
attendee.x([
["X-MY-CUSTOM-ATTR", "1337!"]
]);
attendee.x({
"X-MY-CUSTOM-ATTR": "1337!"
});
Set a X-* attribute. Woun't filter double attributes, which are also added by another method (e.g. status), so these attributes may be inserted twice.
attendee.x("X-MY-CUSTOM-ATTR", "1337!");
Get all custom X-* attributes.
Usually you get an ICalAttendee object like this:
You can also use the ICalAttendee object directly: