Git Product home page Git Product logo

rocketleaguetrackerapi's Introduction

Rocket League Tracker.gg API

Usage

Setup

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

Getting the user's raw data

const trackerapi = require("rocketleaguetrackerapi");
let userEpic = new RLUser(trackerapi.Epic, "username"); //Or other userType

let data = await userEpic.getData(); // --> Map

Getting a specific rank's data

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

Prebuild rank's functions

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

Prebuilt image processing with canvas

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

Sending the prebuilt processed image with discord.js v13

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
    }
]});

Check the jsdocs to better understanding

Copyright DrasticLp

rocketleaguetrackerapi's People

Contributors

drasticlp avatar

Stargazers

Abdlmu'tii avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.