Library referenceClasses
AppSession
the app api bound to one player's access token; made by Krunker.app(accessToken).
each endpoint needs its scope on the token, a missing one is a KrunkerForbiddenError with the code insufficient_scope
Constructors
Constructor
new AppSession(client, accessToken): AppSession;Parameters
| Parameter | Type |
|---|---|
client | KrunkerClient |
accessToken | string |
Returns
AppSession
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
actions | readonly | AppActionsApi | the outcome of a per-action approval |
clan | readonly | AppClanApi | needs clan:read |
dms | readonly | AppDmsApi | needs dms:read |
friends | readonly | AppFriendsApi | needs friends:read |
inventory | readonly | AppInventoryApi | needs inventory:read |
maps | readonly | AppMapsApi | needs maps:read |
market | readonly | AppMarketApi | needs market:read |
notifications | readonly | AppNotificationsApi | needs notifications:read |
player | readonly | AppPlayerApi | profile, on every token |
stats | readonly | AppStatsApi | needs stats:read |
trades | readonly | AppTradesApi | needs trades:read |
Methods
rateLimit()
rateLimit(): RateLimitState;what the last replies said about this player's windows