krapio
Library referenceClasses

KrunkerAppApi

the reads of Login with Krunker's app api (gapi.svc.krunker.io/app/v1) with an access token an oauth sign-in gave out. the token is only ever sent as a bearer header, never stored or logged; every write of the app api is left out on purpose

Constructors

Constructor

new KrunkerAppApi(options?): KrunkerAppApi;

Parameters

ParameterType
options?AppApiOptions

Returns

KrunkerAppApi

Methods

as()

as(accessToken): AppSession;

the resources bound to one access token (kat_...); throws KrunkerTokenError before any request when it is empty. the token is opaque and lives an hour, so a session is made per token: refresh with KrunkerOAuth and make a new one. every session tracks its own rate limit windows, the app api counts them per app and player

Parameters

ParameterType
accessTokenstring

Returns

AppSession

On this page