Module installation
npm i rocketleaguetrackerapi
Using the module
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username");
let userSteam = new RLUser(trackerapi.Steam, "username");
let userPsn = new RLUser(trackerapi.PlaystationNetwork, "username");
let userXbl = new RLUser(trackerapi.XboxLive, "username");
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username"); //Or other userType
let data = await userEpic.getData(); // --> Map
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username");
let data = await userEpic.getRankData(<your_rank_id_on_the_map>); // --> Gives the rank's name, the elo and the icon
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username");
let one = await userEpic.getOneVersusOne(); // --> one versus one data
let two = await userEpic.getTwoVersusTwo(); // --> two versus two data
let three = await userEpic.getThreeVersusThree(); // --> three versus three data
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username");
let imageBuffer = await userEpic.getImage(<users_avatar_URL>); // --> give a buffer that has the image's data
const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username");
let imageBuffer = await userEpic.getImage(await <your_discordjs_user_object>.avatarURL());
await <your_discordjs_channel>.send({files: [
{
attachment: imageBuffer,
name: "customimagename" // --> the image's name when downloaded from discord
}
]});