Class AirshipUserService

Provides access to user information.

Methods

  • Gets a single user by their ID.

    Parameters

    • userId: string

      The users ID

    Returns Promise<Result<undefined | PublicUser, undefined>>

    A user object

  • Gets a single user by their username.

    Parameters

    • username: string

      The username of the user.

    Returns Promise<Result<undefined | PublicUser, undefined>>

    A user object

  • Gets multiple users at once. This function will not succeed if it is unable to resolve all provided ids into a user.

    Parameters

    • userIds: string[]

      The userIds to get.

    • strict: boolean = false

      Specifies if all users must be found. If set to false, the function will succeed even if not all userIds resolve to a user.

    Returns Promise<Result<Record<string, undefined | PublicUser>, undefined>>

    An array of user objects.