ordr.js - v4.0.0 / client / Client
client.Client
The main client for interacting with the o!rdr API.
- emit
- generateDownloadLink
- getCustomSkin
- getInfo
- getOnlineServersCount
- getRenders
- getServers
- getServersLeaderboard
- getSkins
- on
- sendRender
- start
• new Client(key?
): Client
Name | Type | Description |
---|---|---|
key? |
string |
The o!rdr API key |
▸ emit<EventName
>(event
, ...args
): boolean
Emit an event.
Name | Type |
---|---|
EventName |
extends keyof WebSocketEventsMap |
Name | Type | Description |
---|---|---|
event |
EventName |
The event name |
...args |
WebSocketEventsMap [EventName ] |
The arguments to emit |
boolean
true if the event had listeners, false otherwise
▸ generateDownloadLink(id
): Promise
<DynamicLink
>
Generate a temporary video download link for the specified render.
Name | Type | Description |
---|---|---|
id |
number |
The render id |
Promise
<DynamicLink
>
The download link
See
https://ordr.issou.best/docs/#operation/5
▸ getCustomSkin(id
): Promise
<CustomSkin
>
Get a custom skin info.
Name | Type | Description |
---|---|---|
id |
number |
The custom skin id |
Promise
<CustomSkin
>
The custom skin
See
https://ordr.issou.best/docs/#operation/4
▸ getInfo(): Promise
<Info
>
Get o!rdr info. - UNOFFICIAL
Promise
<Info
>
The o!rdr service info
▸ getOnlineServersCount(params?
): Promise
<number
>
Online servers count. - UNOFFICIAL
Name | Type |
---|---|
params |
ServersOnlineCount |
Promise
<number
>
The online servers count
▸ getRenders(params?
): Promise
<Renders
>
List of rendered replays.
Name | Type |
---|---|
params |
Renders |
Promise
<Renders
>
The list of renders.
See
https://ordr.issou.best/docs/#operation/2
▸ getServers(params?
): Promise
<Servers
>
List of servers. - UNOFFICIAL
Name | Type |
---|---|
params |
Servers |
Promise
<Servers
>
The servers list
▸ getServersLeaderboard(): Promise
<ServersLeaderboard
>
Servers leaderboard. - UNOFFICIAL
Promise
<ServersLeaderboard
>
The servers leaderboard
▸ getSkins(params?
): Promise
<Skins
>
List of available skins.
Name | Type |
---|---|
params |
Skins |
Promise
<Skins
>
The list of skins
See
https://ordr.issou.best/docs/#operation/1
▸ on<EventName
>(event
, handler
): this
Listen for an event.
Name | Type |
---|---|
EventName |
extends keyof WebSocketEventsMap |
Name | Type | Description |
---|---|---|
event |
EventName |
The event name |
handler |
(...args : WebSocketEventsMap [EventName ]) => void |
The handling function |
this
The client instance
▸ sendRender(body
): Promise
<RenderCreate
>
Send a new render.
Name | Type | Description |
---|---|---|
body |
RenderCreate |
The render info |
Promise
<RenderCreate
>
The render submission status
See
https://ordr.issou.best/docs/#operation/3
▸ start(): void
Connect and setup the o!rdr websocket.
void