krapio
Library referenceClasses

PublicGameApi

the static game data the page loads at start plus the community map and mod records

Constructors

Constructor

new PublicGameApi(gapi): PublicGameApi;

Parameters

ParameterType
gapiKrunkerClient

Returns

PublicGameApi

Methods

creatorEvents()

creatorEvents(): Promise<CreatorEvents>;

GET /creators/events, upcoming events and the running surveys

Returns

Promise<CreatorEvents>


mapByName()

mapByName(mapName): Promise<CommunityMap>;

GET /maps/by-name/:name, the community map record; "Burg" resolves to a community map of that name, not the official one

Parameters

ParameterType
mapNamestring

Returns

Promise<CommunityMap>


mapConfig()

mapConfig(mapId): Promise<MapConfig>;

GET /maps/:id, the whole map file (120 KB for Burg)

Parameters

ParameterType
mapIdnumber

Returns

Promise<MapConfig>


mapLeaderboard()

mapLeaderboard(mapName, query?): Promise<CommunityMapLeaderboard>;

GET /maps/by-name/:name/leaderboard, 25 per page

Parameters

ParameterType
mapNamestring
query?CommunityLeaderboardQuery

Returns

Promise<CommunityMapLeaderboard>


maps()

maps(): Promise<OfficialMap[]>;

GET /maps, the official map list, index = id = preview image number

Returns

Promise<OfficialMap[]>


modByName()

modByName(modName): Promise<ModInfo>;

GET /mods/by-name/:name

Parameters

ParameterType
modNamestring

Returns

Promise<ModInfo>


titles()

titles(): Promise<Title[]>;

GET /titles, every player title with its requirement

Returns

Promise<Title[]>

On this page