A wrapper for PokéRogue session savedata API requests.

Hierarchy (view full)

Constructors

Properties

ERR_GENERIC: string = "There was an error"
base: string

Methods

  • A generic request helper.

    Parameters

    • path: string

      The path to send the request to.

    • config: RequestInit

      The request RequestInit | Configuration.

    Returns Promise<Response>

  • Send a POST request.

    Type Parameters

    • D = undefined

    Parameters

    • path: string

      THe path to send the request to.

    • OptionalbodyData: D

      The body-data to send.

    • dataType: DataType = "json"

      The data-type of the bodyData.

    Returns Promise<Response>

  • Helper to transform data to URLSearchParams Any key with a value of undefined will be ignored. Any key with a value of null will be included.

    Type Parameters

    • D extends Record<string, any>

    Parameters

    • data: D

      the data to transform to URLSearchParams

    Returns URLSearchParams

    a URLSearchParams representaton of data