galeforce-tmp-sea
Version:
A customizable, promise-based, and command-oriented TypeScript library for the Riot Games API.
52 lines • 2.73 kB
TypeScript
import * as ENDPOINTS from './enums/endpoints';
import { Region, LeagueRegion, RiotRegion, ValorantRegion, DataDragonRegion, LorRegion } from './enums/regions';
import { Queue, LeagueQueue, ValorantQueue } from './enums/queues';
import Tier from './enums/tiers';
import Division from './enums/divisions';
import Game from './enums/games';
import Request from './requests';
import { ConfigInterface } from '../galeforce/interfaces/config';
export declare class RiotAPIModule {
private key?;
constructor(options: ConfigInterface['riot-api']);
/**
* @private
*
* @param template A list of string templates that are filled in with parameters.
* @param match Parameters to fill in variables for the string templates.
* @returns Substituted version of template with parameter values from match.
*/
private static generateTemplateString;
/**
* Returns a general Riot API `Request` object, with the provided API key as a header.
*
* @param stringTemplate The URL string template to substitute `parameters` into.
* @param parameters The parameters to substitute into the URL `stringTemplate`.
* @param query The query to send along with the request.
* @param body The body of the request.
* @returns a `Request` object.
*/
request(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.
*
* @param stringTemplate The URL string template to substitute `parameters` into.
* @param parameters The parameters to substitute into the URL `stringTemplate`.
* @param query The query to send along with the request.
* @param body The body of the request.
* @returns a `Request` object.
*/
gcRequest(stringTemplate: string, parameters: Record<string, unknown>, query?: object, body?: object): Request;
/**
* Returns a `Request` object that provides the fetched data as an `ArrayBuffer`.
*
* @param stringTemplate The URL string template to substitute `parameters` into.
* @param parameters The parameters to substitute into the URL `stringTemplate`.
* @param query The query to send along with the request.
* @param body The body of the request.
* @returns a `Request` object.
*/
bufferRequest(stringTemplate: string, parameters: Record<string, unknown>, query?: object, body?: object): Request;
}
export { ENDPOINTS, Region, LeagueRegion, RiotRegion, ValorantRegion, DataDragonRegion, LorRegion, Queue, LeagueQueue, ValorantQueue, Tier, Division, Game, };
//# sourceMappingURL=index.d.ts.map