Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetDataDragonSpellArt

Hierarchy

  • (Anonymous class)<(Anonymous class) & Action, this> & (Anonymous class)<Action, this> & Action<Buffer, this>
    • GetDataDragonSpellArt

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

  • exec(): Promise<Buffer>
  • 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<Buffer>

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).

spell

  • spell<K>(this: K, spell: string): Omit<K, "spell">

version

  • version<K>(this: K, version: string): Omit<K, "version">
  • Modifies the version (patch) associated with the Action object it is called from. Tests the provided version against the following regex expressions:

    • /^([0-9]+)\.([0-9]+)\.([0-9]+)$/
    • /^lolpatch_([0-9]+)\.([0-9]+)$/

    If the input fails to match one of the above expressions, an error will be thrown.

    throws

    Will throw an error if the provided locale does not match any of the above regex expressions.

    Type parameters

    Parameters

    • this: K
    • version: string

      The version to update the calling Action object with.

    Returns Omit<K, "version">