Constructors
new KiaiClient()
new KiaiClient(
apiKey,options?):KiaiClient
Create a new KiaiClient
Parameters
| Parameter | Type | Description |
|---|---|---|
apiKey | string | The 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? | string | The base URL to use for Kiai's API |
options.debug? | boolean | Whether 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
Properties
| Property | Modifier | Type |
|---|---|---|
_requestHandler | readonly | RequestHandler |
apiKey | readonly | string |
baseURL | readonly | string |
debug | readonly | boolean |
denylist | readonly | Denylist |
leaderboardRoles | readonly | LeaderboardRoles |
leveling | readonly | Leveling |
misc | readonly | Misc |
multipliers | readonly | Multipliers |
rewards | readonly | Rewards |
settings | readonly | Settings |
version | readonly | `v${string}` |
Methods
getRoot()
getRoot():
Promise<RootResponse>
Get information about the API