Constructor of ICalAttendee. The event reference is required to query the calendar's timezone when required.
Attendee Data
Reference to ICalEvent object
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.
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'});
Set the attendee's role, defaults to REQ
/ REQ-PARTICIPANT
.
Checkout ICalAttendeeRole for available roles.
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.
Return generated attendee as a string.
console.log(attendee.toString()); // → ATTENDEE;ROLE=…
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!"
});
Usually you get an ICalAttendee object like this:
You can also use the ICalAttendee object directly: