multiversus.js

multiversus.js

Discord server npm version

About

A simple Node.js module to access the MultiVersus API.

Installation

npm install multiversus.js
yarn add multiversus.js

Example usage

To create a client, an access token and client ID are necessary. To retrieve these values, a tool such as Fiddler is required. The required values can then be retrieved by analyzing the network requests made from MultiVersus.

Initialize the client:

const { Client } = require('multiversus.js');
const client = new Client('accessToken', 'clientId');

To retrieve an access token, alternatively, initialize the client as follows, using your Steam username and password in place of 'username' and 'password':

const { Client } = require('multiversus.js');
const client = new Client('accessToken', 'clientId');
client.login('username', 'password');

Get the MultiVersus 2v2 leaderboard:

const leaderboardData = await client.getLeaderboard('2v2'); // The type of the leaderboard to be retrieved can also be set to '1v1'.
console.log(leaderboardData);

Get a profile by a user's ID:

const userData = await client.getProfile('62e471bc5f77e966a384a570');
console.log(userData);

Search for users:

const searchData = await client.searchByUsername('ElijahPepe'); // A second parameter can also be defined to limit the results returned.
console.log(searchData);

Links

Generated using TypeDoc