Class GlobalCalendarManager

The manager is used to interact with calendars on a server.

Hierarchy

Constructors

Properties

cache: Collection<number, CalendarEvent> = ...
client: Client

Accessors

Methods

  • Delete a calendar event.

    Parameters

    • channelId: string

      The ID of the channel where the calendar event is located.

    • calendarEventId: number

      The ID of the calendar event to delete.

    Returns Promise<null | CalendarEvent>

    A Promise that resolves with the deleted calendar event or undefined if the event was not cached.

  • Deletes an RSVP for a calendar event.

    Parameters

    • channelId: string

      The ID of the channel.

    • calendarEventId: number

      The ID of the calendar event.

    • userId: string

      The ID of the user.

    Returns Promise<void>

    A promise that resolves with the deleted RSVP or void if it was not cached.

  • Fetches a single calendar event.

    Parameters

    • channelId: string

      The ID of the channel in which to fetch the event.

    • calendarEventId: number

      The ID of the event to fetch.

    • Optional force: boolean

      Whether or not to force a fetch instead of using a cached version.

    Returns Promise<CalendarEvent>

    A promise that resolves with the fetched calendar event.

  • Fetches multiple calendar events.

    Parameters

    • channelId: string

      The ID of the channel in which to fetch the events.

    • options: Omit<{}, "channelId">

      The options for the fetch.

    Returns Promise<Collection<number, CalendarEvent>>

    A promise that resolves with a collection of the fetched calendar events.

  • Fetch RSVPs for a calendar event.

    Parameters

    • channelId: string

      The ID of the channel where the calendar event is located.

    • calendarEventId: number

      The ID of the calendar event to fetch RSVPs for.

    Returns Promise<Collection<string, CalendarEventRsvp>>

    A Promise that resolves with a collection of RSVPs.

  • Get a single RSVP from a calendar event.

    Parameters

    • channelId: string

      The ID of the channel where the calendar event is located.

    • calendarEventId: number

      The ID of the calendar event to get the RSVP from.

    • userId: string

      The ID of the user who made the RSVP.

    • Optional force: boolean

      Whether to force a request to the API instead of returning the cached RSVP.

    Returns Promise<CalendarEventRsvp>

    A Promise that resolves with the requested RSVP.

  • Updates a calendar event.

    Parameters

    • channelId: string

      The ID of the channel in which the event exists.

    • calendarEventId: number

      The ID of the event to update.

    • options: {}

      The options for the update.

      Returns Promise<CalendarEvent>

      A promise that resolves with the updated calendar event.

    • Creates or updates multiple RSVPs for a calendar event.

      Parameters

      • channelId: string

        The ID of the channel.

      • calendarEventId: number

        The ID of the calendar event.

      • options: {}

        The options for updating many RSVP.

        Returns Promise<void>

      • Creates or updates an RSVP for a calendar event.

        Parameters

        • channelId: string

          The ID of the channel.

        • calendarEventId: number

          The ID of the calendar event.

        • userId: string

          The ID of the user.

        • options: {}

          The options for updating the RSVP.

          Returns Promise<CalendarEventRsvp>

          A promise that resolves with the updated or created RSVP.

        Generated using TypeDoc