Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LockBlock-dev/ordr.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

o!rdr.js

axios ws

GitHub stars npm

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

Installation

With GitHub:

  • Download or clone the project.
  • Go to the ordr.js folder and run npm install.
  • Require client.js.

With npm:

  • Run npm install ordr.js.
  • Require the library.

Documentation

Example usage

The library can be used in both CommonJS and ES Modules

Using the library - API

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();

Using the library - API key

If you have an API key, you can specify it when initiating the client:

const client = new Client("API_KEY");

Using the library - replayFile

You can send a replay file by doing the following:

const fileBuffer = fs.createReadStream("path/to/your/file.osr");
client.newRender({
    ...
    replayFile: fileBuffer,
    ...
})

Using the library - WebSocket

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

Credits

Copyright

See the license

About

A TypeScript library for interacting with the o!rdr API and WebSocket

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •