Class SimpleUser

Simple user class, typically found in pagination

Hierarchy

Constructors

Properties

#client: Client<boolean>

Client instance attached to the Object

#endpointUrl: string = Endpoints.account

Endpoint url the object will request to

#payload: APISimpleUser

The payload of the object.

#user: null | User = null

Cached user to prevent multiple API calls

Accessors

  • get endpointUrl(): string
  • Endpoint url for requests to update the payload

    Returns string

  • set endpointUrl(value: string): void
  • Parameters

    • value: string

    Returns void

  • get payload(): Payload
  • Get the payload of the object

    Returns Payload

  • set payload(payload: Partial<Payload>): void
  • Updates the payload of the object.

    Returns

    The current instance

    Parameters

    • payload: Partial<Payload>

      The payload to merge into the current instance

    Returns void

Methods

  • When concatenated with a string, this automatically returns the user's nick instead of the User object.

    Example

    console.log(Hello from ${user}!); // Logs: Hello from iFunnyChef

    Returns string

Generated using TypeDoc