ordr.js is a Node.js module that allows you to easily interact with the o!rdr API and WebSocket.
- Promise-based
- Performant
- 100% coverage of the o!rdr API and WebSocket
- Install NodeJS.
- Download or clone the project.
- Go to the
ordr.jsfolder and runnpm install. - Require
client.js.
- Run
npm install ordr.js. - Require the library.
The library can be used in both CommonJS and ES Modules
The library is async, be sure to use async functions or .then()
const { Client } = require("ordr.js");
// OR
import { Client } from "ordr.js";
const client = new Client();
client.skins().then((data) => {
console.log(data);
});
// OR
const getSkins = async () => {
const data = await client.skins();
console.log(data);
};
getSkins();If you have an API key, you can specify it when initiating the client:
const client = new Client("API_KEY");You can send a replay file by doing the following:
const fileBuffer = fs.createReadStream("path/to/your/file.osr");
client.newRender({
...
replayFile: fileBuffer,
...
})const { Client } = require("ordr.js");
// OR
import { Client } from "ordr.js";
const client = new Client();
client.on("event", (data) => {
console.log(data);
});
client.start();List of events available here
See the license