/valorant.js

An API Wrapper for valorant with oauth support

Primary LanguageTypeScriptMIT LicenseMIT

valorant.js

An API Wrapper for valorant with oauth support

Notice: I've been working on a different project (a .pak reader written in pure js/ts) so this library may have some issues. I will still update it from time to time though so feel free to create a pr/issue :)

Example

(async () => {
  const { RiotApiClient, Region } = require("valorant.js");
  
  try {
    const client = new RiotApiClient({
      username: "MY_USERNAME", // your username
      password: "MY_PASSWORD", // your password
      region: Region.MY_REGION, // Available regions: EU, NA, AP
    });
    
    await client.login();
    console.log(client.user);
    
    const balance = await client.storeApi.getWallet(client.user.Subject);
    console.log(balance);
  } catch(err) {
    console.error(err);
  }
})();

Support

Installation

npm install valorant.js --save

Credits

  • Sprayxe @MarcelWRLD#0999
  • Speeedyyyy @Pilica#8525
  • RumbleMike @RumbleMike#5406 (API Documentation)
  • A small credit in your project would be appreciated (e.g mentioning lib name would be enough)

Dependencies