Skip to content

Latest commit

 

History

History
350 lines (194 loc) · 7.23 KB

client.Client.md

File metadata and controls

350 lines (194 loc) · 7.23 KB

ordr.js - v4.0.0 / client / Client

Class: Client

client.Client

The main client for interacting with the o!rdr API.

Table of contents

Constructors

Methods

Constructors

constructor

new Client(key?): Client

Parameters

Name Type Description
key? string The o!rdr API key

Returns

Client

Defined in

client.ts:29

Methods

emit

emit<EventName>(event, ...args): boolean

Emit an event.

Type parameters

Name Type
EventName extends keyof WebSocketEventsMap

Parameters

Name Type Description
event EventName The event name
...args WebSocketEventsMap[EventName] The arguments to emit

Returns

boolean

true if the event had listeners, false otherwise

Defined in

client.ts:44


generateDownloadLink

generateDownloadLink(id): Promise<DynamicLink>

Generate a temporary video download link for the specified render.

Parameters

Name Type Description
id number The render id

Returns

Promise<DynamicLink>

The download link

See

https://ordr.issou.best/docs/#operation/5

Defined in

client.ts:185


getCustomSkin

getCustomSkin(id): Promise<CustomSkin>

Get a custom skin info.

Parameters

Name Type Description
id number The custom skin id

Returns

Promise<CustomSkin>

The custom skin

See

https://ordr.issou.best/docs/#operation/4

Defined in

client.ts:168


getInfo

getInfo(): Promise<Info>

Get o!rdr info. - UNOFFICIAL

Returns

Promise<Info>

The o!rdr service info

Defined in

client.ts:199


getOnlineServersCount

getOnlineServersCount(params?): Promise<number>

Online servers count. - UNOFFICIAL

Parameters

Name Type
params ServersOnlineCount

Returns

Promise<number>

The online servers count

Defined in

client.ts:249


getRenders

getRenders(params?): Promise<Renders>

List of rendered replays.

Parameters

Name Type
params Renders

Returns

Promise<Renders>

The list of renders.

See

https://ordr.issou.best/docs/#operation/2

Defined in

client.ts:107


getServers

getServers(params?): Promise<Servers>

List of servers. - UNOFFICIAL

Parameters

Name Type
params Servers

Returns

Promise<Servers>

The servers list

Defined in

client.ts:213


getServersLeaderboard

getServersLeaderboard(): Promise<ServersLeaderboard>

Servers leaderboard. - UNOFFICIAL

Returns

Promise<ServersLeaderboard>

The servers leaderboard

Defined in

client.ts:233


getSkins

getSkins(params?): Promise<Skins>

List of available skins.

Parameters

Name Type
params Skins

Returns

Promise<Skins>

The list of skins

See

https://ordr.issou.best/docs/#operation/1

Defined in

client.ts:83


on

on<EventName>(event, handler): this

Listen for an event.

Type parameters

Name Type
EventName extends keyof WebSocketEventsMap

Parameters

Name Type Description
event EventName The event name
handler (...args: WebSocketEventsMap[EventName]) => void The handling function

Returns

this

The client instance

Defined in

client.ts:58


sendRender

sendRender(body): Promise<RenderCreate>

Send a new render.

Parameters

Name Type Description
body RenderCreate The render info

Returns

Promise<RenderCreate>

The render submission status

See

https://ordr.issou.best/docs/#operation/3

Defined in

client.ts:128


start

start(): void

Connect and setup the o!rdr websocket.

Returns

void

Defined in

client.ts:69