A simple Node.js module to access the MultiVersus API.
npm install multiversus.js
yarn add multiversus.js
Initialize the client using your Steam username and password (if your account doesn't have Steam Guard):
const { Client } = require('multiversus.js');
const client = new Client();
client.login('username', 'password'); // You can initialize the client by supplying your Steam username and password
Alternatively, initialize the client as follows, using a pre-existing access token. Access tokens can be obtained by analyzing the network requests made by MultiVersus using a tool such as Fiddler (if using Fiddler, make sure HTTPS traffic is decrypted):
const { Client } = require('multiversus.js');
const client = new Client('accessToken');
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);
Generated using TypeDoc