Class representing the API wrapper
• new rtggClient()
Creates an API wrapper
Client.ts:16
▸ categoryDetails(category
): Promise
<Object
>
Fetches details of a category
Name | Type | Description |
---|---|---|
category |
string |
The category shortname |
Promise
<Object
>
An object representing the category details
Client.ts:49
▸ categoryLeaderboards(category
): Promise
<Object
[]>
Fetches all leaderboards of a category
Name | Type | Description |
---|---|---|
category |
string |
The category shortname |
Promise
<Object
[]>
An array of objects representing the leaderboards
Client.ts:70
▸ categoryRaces(category
, showEntrants?
): Promise
<Object
[]>
Fetches all previous races of a category
Name | Type | Default value | Description |
---|---|---|---|
category |
string |
undefined |
The category shortname |
showEntrants |
boolean |
false |
Whether or not to expand entrant details |
Promise
<Object
[]>
An array of objects representing the races in the category
Client.ts:60
▸ raceDetails(category
, room
): Promise
<Object
>
Fetches details of a race
Name | Type | Description |
---|---|---|
category |
string |
The category shortname |
room |
string |
The room name |
Promise
<Object
>
An object representing the race
Client.ts:90
▸ races(): Promise
<Object
[]>
Fetches all open and ongoing races
Promise
<Object
[]>
An array of objects representing the open and ongoing races
Client.ts:79
▸ userRaces(user
, showEntrants?
): Promise
<Object
[]>
Fetches all previous races for a user
Name | Type | Default value | Description |
---|---|---|---|
user |
string |
undefined |
The ID of the user |
showEntrants |
boolean |
false |
Whether or not to expand entrant details |
Promise
<Object
[]>
An array of objects representing the races for the user
Client.ts:112
▸ userSearch(query
, type
): Promise
<Object
[]>
Fetches users matching a search parameter
Name | Type | Description |
---|---|---|
query |
string |
The name, partial name, discriminator, or name and discriminator to search for |
type |
"name" | "scrim" | "term" |
One of three types of searches (more information) |
Promise
<Object
[]>
An array of matched users
Client.ts:101