Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RiotAPIModule

Hierarchy

  • RiotAPIModule

Index

Constructors

constructor

  • new RiotAPIModule(options: ConfigInterface["riot-api"]): RiotAPIModule

Methods

bufferRequest

  • bufferRequest(stringTemplate: string, parameters: Record<string, unknown>, query?: object, body?: object): Request
  • Returns a Request object that provides the fetched data as an ArrayBuffer.

    Parameters

    • stringTemplate: string

      The URL string template to substitute parameters into.

    • parameters: Record<string, unknown>

      The parameters to substitute into the URL stringTemplate.

    • Default value query: object = {}

      The query to send along with the request.

    • Default value body: object = {}

      The body of the request.

    Returns Request

    a Request object.

gcRequest

  • gcRequest(stringTemplate: string, parameters: Record<string, unknown>, query?: object, body?: object): Request
  • Returns a Request object with a custom https.Agent containing the Riot Game Client SSL certificate chain.

    Parameters

    • stringTemplate: string

      The URL string template to substitute parameters into.

    • parameters: Record<string, unknown>

      The parameters to substitute into the URL stringTemplate.

    • Default value query: object = {}

      The query to send along with the request.

    • Default value body: object = {}

      The body of the request.

    Returns Request

    a Request object.

request

  • request(stringTemplate: string, parameters: Record<string, unknown>, query?: object, body?: object): Request
  • Returns a general Riot API Request object, with the provided API key as a header.

    Parameters

    • stringTemplate: string

      The URL string template to substitute parameters into.

    • parameters: Record<string, unknown>

      The parameters to substitute into the URL stringTemplate.

    • Default value query: object = {}

      The query to send along with the request.

    • Default value body: object = {}

      The body of the request.

    Returns Request

    a Request object.