ical-generator - v9.0.0-develop.7
    Preparing search index...

    Class ICalAttendee

    Usually you get an ICalAttendee object like this:

    import ical from 'ical-generator';
    const calendar = ical();
    const event = calendar.createEvent();
    const attendee = event.createAttendee({ email: 'mail@example.com' });

    You can also use the ICalAttendee object directly:

    import ical, {ICalAttendee} from 'ical-generator';
    const attendee = new ICalAttendee({ email: 'mail@example.com' });
    event.attendees([attendee]);
    Index

    Constructors

    Methods

    • Get the attendee's delegated-to value.

      Returns null | ICalAttendee

      0.2.0

    • 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'});

      Parameters

      Returns this

      0.2.0

    • 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'});

      Parameters

      Returns ICalAttendee

      0.2.0

    • 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'});

      Parameters

      Returns ICalAttendee

      0.2.0

    • Get the attendee's email address

      Returns string

      0.2.0

    • Set the attendee's email address

      Parameters

      • email: string

      Returns this

      0.2.0

    • Get the attendee's email address

      Returns null | string

      1.3.0

    • Set the attendee's email address

      Parameters

      • mailto: null | string

      Returns this

      1.3.0

    • Get the attendee's name

      Returns null | string

      0.2.0

    • Set the attendee's name

      Parameters

      • name: null | string

      Returns this

      0.2.0

    • Get attendee's RSVP expectation

      Returns null | boolean

      0.2.1

    • Set the attendee's RSVP expectation

      Parameters

      • rsvp: null | boolean

      Returns this

      0.2.1

    • Get the acting user's email adress

      Returns null | string

      3.3.0

    • Set the acting user's email adress

      Parameters

      • email: null | string

      Returns this

      3.3.0

    • Return generated attendee as a string.

      console.log(attendee.toString()); // → ATTENDEE;ROLE=…
      

      Returns string

    • 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!"
      });

      Parameters

      • keyOrArray: [string, string][] | Record<string, string> | { key: string; value: string }[]

      Returns this

      1.9.0

    • 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!");
      

      Parameters

      • keyOrArray: string
      • value: string

      Returns this

      1.9.0

    • Get all custom X-* attributes.

      Returns { key: string; value: string }[]

      1.9.0