Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GroupManager

Hierarchy

Implements

  • GroupManagerInterface

Constructors

constructor

Properties

Readonly cache

cache: Collection<string, Group>

Readonly client

client: Client

former

Readonly holds

holds: typeof Group

Methods

_remove

  • _remove(data: Group): boolean
  • Parameters

    Returns boolean

_upsert

create

  • create(options: GroupCreateOptions): Promise<Group>
  • Creates a group.

    Parameters

    • options: GroupCreateOptions

      Options for creating a group.

    Returns Promise<Group>

    The created group.

fetch

  • Fetches groups from the API.

    By default, this method fetches all groups that the client is in.

    Use options.page and options.per_page to specify a paginated section of groups to fetch. Pass in one or an array of string IDs to specify specific group IDs to fetch.

    Returns Promise<Collection<string, Group>>

    A Collection of groups that were fetched, or client.groups.cache if all groups were fetched.

  • Parameters

    • id: string

    Returns Promise<Group>

  • Parameters

    • ids: string[]

    Returns Promise<Collection<string, null | Group>>

  • Parameters

    • options: FetchParams

    Returns Promise<Collection<string, null | Group>>

Private fetchAll

  • Returns Promise<Collection<string, null | Group>>

Private fetchId

  • fetchId(id: string): Promise<Group>
  • Parameters

    • id: string

    Returns Promise<Group>

Private fetchIds

  • Parameters

    • ids: string[]

    Returns Promise<Collection<string, null | Group>>

Private fetchIndex

  • fetchIndex(options: FetchParams): Promise<Collection<string, null | Group>>
  • Parameters

    • options: FetchParams

    Returns Promise<Collection<string, null | Group>>

join

  • join(inviteLink: string): Promise<Group>
  • join(groupID: string, shareToken: string): Promise<Group>
  • Joins a group.

    Parameters

    • inviteLink: string

      The group invite link.

    Returns Promise<Group>

    The joined group.

  • Joins a group.

    Parameters

    • groupID: string

      The group ID.

    • shareToken: string

      The group's share token.

    Returns Promise<Group>

    The joined group.

Private joinWithToken

  • joinWithToken(groupID: string, shareToken: string): Promise<Group>
  • Parameters

    • groupID: string
    • shareToken: string

    Returns Promise<Group>

resolve

  • resolve(data: unknown): null | Group
  • Parameters

    • data: unknown

    Returns null | Group

resolveId

  • resolveId(data: unknown): null | string
  • Parameters

    • data: unknown

    Returns null | string

Generated using TypeDoc