1.0.10 • Published 4 years ago
venge.io v1.0.10
Information:
This package is an addon to venge.io to help newer developers and older developers access data easily from venge.
To install the package please write this in the console and press enter.
npm i venge.js
Before you use this application please make sure it works.
const Client = require('venge.js');
const client = new Client();
client.on('ready', () => {
console.log('I am ready to be used!');
});
If it logs "I am ready to be used!" then great! Let's go onto the next step.
For all of our functions we use websockets to hide links from the public but this will allow us to send you data. Because of this we use Promises so we can wait for an answer from our server. Whenever you request information from our server you will need to await that function. This is how you would get a users stats!
var account = await client.getStats('meta');
This variable will return an object, this object will contain the users information like their Username, Clan, Experience, Level, Etc. This is how it will look:
{
id: '3',
username: 'Meta',
experience: '71473',
clan: '6346',
rank: '0',
current_rank: '0',
previous_rank: '0',
verified: '1',
level: '0',
coins: '5173865',
kills: '0',
kdr: '0',
deaths: '0',
etc...
}
This is how you would get a leaderboard!
var leaderboard = await client.getLeaderboard(/*(score | daily | weekly | followers | headshots | kills)*/);