galeforce-tmp-sea
Version:
A customizable, promise-based, and command-oriented TypeScript library for the Riot Games API.
15 lines • 692 B
TypeScript
import { Region } from '../../riot-api';
import { ConfigInterface } from '../interfaces/config';
export default abstract class RateLimiter {
readonly config: ConfigInterface['rate-limit'];
constructor(config: ConfigInterface['rate-limit']);
/**
* Schedule a promise through the specified regional rate limiter.
*
* @param request A function returning a request Promise.
* @param region The regional rate limiter to schedule the `request` under.
* @returns Another promise which executes *after* rate limit delays finish.
*/
abstract schedule<T>(request: () => Promise<T>, region?: Region): Promise<T>;
}
//# sourceMappingURL=rate-limiter.d.ts.map