The manager of calendar events that belong to a calendar channel.

Example

new CalendarEventManager(channel);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

This cache of the manager.

client: Client

Methods

  • Create a calendar event in the channel.

    Returns

    The created calendar event.

    Example

    calanderEvents.create({ name: 'Event!' });
    

    Parameters

    Returns Promise<CalendarEvent>

  • Delete a calendar event from the channel.

    Example

    calanderEvents.delete(calendarEvent);
    

    Parameters

    • calendarEvent: number | CalendarEvent

      The calendar event to delete.

    Returns Promise<void>

  • Edit a calendar event in the channel.

    Returns

    The edited calendar event.

    Example

    calanderEvents.edit(calendarEvent, { name: 'Event!' });
    

    Parameters

    Returns Promise<CalendarEvent>

  • Fetch a calendar event from the channel, or cache.

    Returns

    The fetched calendar event.

    Example

    calanderEvents.fetch(calendarEvent);
    

    Parameters

    • calendarEvent: number | CalendarEvent

      The calendar event to fetch.

    • Optional options: FetchOptions

      The options to fetch the calendar event with.

    Returns Promise<CalendarEvent>

  • Fetch calendar events from the channel.

    Returns

    The fetched calendar events.

    Example

    calanderEvents.fetch();
    

    Parameters

    Returns Promise<Collection<number, CalendarEvent>>

  • Set the maximum cache size of the manager.

    Returns

    The manager.

    Example

    manager.setMaxCache(100);
    

    Parameters

    • maxSize: number

      The maximum size of the cache.

    Returns CalendarEventManager