Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetPlayerChallengeData

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

payload

payload: Payload

The payload containing the data (endpoint, request type, parameters, etc.) related to the associated Action. The type guards associated with setting certain properties of the payload are checked at runtime and may throw errors when provided invalid values.

Methods

URL

  • URL(): string
  • Returns the encoded target URL for the action without executing an HTTP request. Useful if the URL string is needed for custom actions outside the scope of the library.

    throws

    Will throw an error if a required payload value (region, body on POST or PUT requests, etc.) is missing.

    Returns string

exec

  • Executes the action, sending an HTTP request to the Riot API servers and retrieving the associated data from the appropriate endpoint.

    throws

    Will throw an error if a required payload value (region, body on POST or PUT requests, etc.) is missing or the HTTP request fails with an error.

    Returns Promise<PlayerInfoDTO>

puuid

  • puuid<K>(this: K, puuid: string): Omit<K, "puuid">
  • Modifies the puuid associated with the Action object it is called from. Note that associated runtime type checks are performed to ensure that the provided PUUID conforms to Riot specifications.

    throws

    Will throw an error if an invalid region is provided or the provided region fails the runtime type check.

    Type parameters

    Parameters

    • this: K
    • puuid: string

      The PUUID to update the calling Action object with.

    Returns Omit<K, "puuid">

region

  • region<K>(this: K, region: TRegion): Omit<K, "region">
  • Modifies the region associated with the Action object it is called from. Note that associated runtime type checks are performed to ensure that the provided region matches one of the expected API regions.

    throws

    Will throw an error if an invalid region is provided or the provided region fails the runtime type check.

    Type parameters

    Parameters

    • this: K
    • region: TRegion

      The region to update the calling Action object with.

    Returns Omit<K, "region">

set

  • Sets multiple values in the Action payload simultaneously.

    Parameters

    • payload: ModifiablePayload

      The payload with which the Action's payload is overwritten

    Returns this

    The current Action (with the updated payload state).