Skip to content

Latest commit

 

History

History
197 lines (110 loc) · 4.27 KB

rtggClient.md

File metadata and controls

197 lines (110 loc) · 4.27 KB

Class: rtggClient

Class representing the API wrapper

Table of contents

Constructors

Methods

Constructors

constructor

new rtggClient()

Creates an API wrapper

Defined in

Client.ts:16

Methods

categoryDetails

categoryDetails(category): Promise<Object>

Fetches details of a category

Parameters

Name Type Description
category string The category shortname

Returns

Promise<Object>

An object representing the category details

Defined in

Client.ts:49


categoryLeaderboards

categoryLeaderboards(category): Promise<Object[]>

Fetches all leaderboards of a category

Parameters

Name Type Description
category string The category shortname

Returns

Promise<Object[]>

An array of objects representing the leaderboards

Defined in

Client.ts:70


categoryRaces

categoryRaces(category, showEntrants?): Promise<Object[]>

Fetches all previous races of a category

Parameters

Name Type Default value Description
category string undefined The category shortname
showEntrants boolean false Whether or not to expand entrant details

Returns

Promise<Object[]>

An array of objects representing the races in the category

Defined in

Client.ts:60


raceDetails

raceDetails(category, room): Promise<Object>

Fetches details of a race

Parameters

Name Type Description
category string The category shortname
room string The room name

Returns

Promise<Object>

An object representing the race

Defined in

Client.ts:90


races

races(): Promise<Object[]>

Fetches all open and ongoing races

Returns

Promise<Object[]>

An array of objects representing the open and ongoing races

Defined in

Client.ts:79


userRaces

userRaces(user, showEntrants?): Promise<Object[]>

Fetches all previous races for a user

Parameters

Name Type Default value Description
user string undefined The ID of the user
showEntrants boolean false Whether or not to expand entrant details

Returns

Promise<Object[]>

An array of objects representing the races for the user

Defined in

Client.ts:112


userSearch

userSearch(query, type): Promise<Object[]>

Fetches users matching a search parameter

Parameters

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)

Returns

Promise<Object[]>

An array of matched users

Defined in

Client.ts:101