Sprayxe / valorant.js

An API Wrapper for valorant with oauth support
MIT License
18 stars 6 forks source link
api npm valorant valorantjs

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

Dependencies