Kiai Logo

Kiai Docs

kiai.jsClasses

KiaiClient

Constructors

new KiaiClient()

new KiaiClient(apiKey, options?): KiaiClient

Create a new KiaiClient

Parameters

ParameterTypeDescription
apiKeystringThe API key to use for Kiai's API
options?{ baseURL: string; debug: boolean; fetchFunction: (url, init?) => Promise<Response>; version: `v${number}`; }The options to use to initialize the client
options.baseURL?stringThe base URL to use for Kiai's API
options.debug?booleanWhether to enable debug logging
options.fetchFunction?(url, init?) => Promise<Response>The fetch function to use for Kiai's API If you want to use your own fetch function (e.g. for a custom proxy), you can pass it here
options.version?`v${number}`The version of the API to use

Returns

KiaiClient

Properties

PropertyModifierType
_requestHandlerreadonlyRequestHandler
apiKeyreadonlystring
baseURLreadonlystring
debugreadonlyboolean
denylistreadonlyDenylist
leaderboardRolesreadonlyLeaderboardRoles
levelingreadonlyLeveling
miscreadonlyMisc
multipliersreadonlyMultipliers
rewardsreadonlyRewards
settingsreadonlySettings
versionreadonly`v${string}`

Methods

getRoot()

getRoot(): Promise<RootResponse>

Get information about the API

Returns

Promise<RootResponse>

On this page