Options
All
  • Public
  • Public/Protected
  • All
Menu

Usually you get an ICalAttendee object like this:

import ical from 'ical-generator';
const calendar = ical();
const event = calendar.createEvent();
const attendee = event.createAttendee();

You can also use the ICalAttendee object directly:

import ical, {ICalAttendee} from 'ical-generator';
const attendee = new ICalAttendee();
event.attendees([attendee]);

Hierarchy

  • ICalAttendee

Index

Constructors

constructor

Methods

delegatedFrom

delegatedTo

  • Get the attendee's delegated-to value.

    since

    0.2.0

    Returns null | ICalAttendee

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

    0.2.0

    Parameters

    Returns ICalAttendee

delegatesFrom

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

    0.2.0

    Parameters

    Returns ICalAttendee

delegatesTo

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

    0.2.0

    Parameters

    Returns ICalAttendee

email

  • email(): null | string
  • email(email: null | string): ICalAttendee
  • Get the attendee's email address

    since

    0.2.0

    Returns null | string

  • Set the attendee's email address

    since

    0.2.0

    Parameters

    • email: null | string

    Returns ICalAttendee

mailto

  • mailto(): null | string
  • mailto(mailto: null | string): ICalAttendee
  • Get the attendee's email address

    since

    1.3.0

    Returns null | string

  • Set the attendee's email address

    since

    1.3.0

    Parameters

    • mailto: null | string

    Returns ICalAttendee

name

  • name(): null | string
  • name(name: null | string): ICalAttendee

role

rsvp

  • rsvp(): null | boolean
  • rsvp(rsvp: null | boolean): ICalAttendee
  • Get attendee's RSVP expectation

    since

    0.2.1

    Returns null | boolean

  • Set the attendee's RSVP expectation

    since

    0.2.1

    Parameters

    • rsvp: null | boolean

    Returns ICalAttendee

status

toJSON

toString

  • toString(): string
  • Return generated attendee as a string.

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

    Returns string

type

x

  • x(keyOrArray: [string, string][] | Record<string, string> | { key: string; value: string }[]): ICalAttendee
  • x(keyOrArray: string, value: string): ICalAttendee
  • x(): { key: string; value: 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!"
    });
    
    since

    1.9.0

    Parameters

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

    Returns ICalAttendee

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

    1.9.0

    Parameters

    • keyOrArray: string
    • value: string

    Returns ICalAttendee

  • Get all custom X-* attributes.

    since

    1.9.0

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

Legend

  • Constructor
  • Method
  • Property

Generated using TypeDoc