@survfate/valorant.js
TypeScript icon, indicating that this package has built-in type declarations

1.6.11 • Public • Published

@survfate/valorant.js

An API Wrapper for valorant with oauth support

Notice: This fork is just my personal implementation for fixing the outdated Content API & Cloudflare bypass

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

    const { featured, bonus, skins } = await client.storeApi.getStorefront(
      client.user.Subject,
      true,
      "MY_LOCALE" // Available locales: ar-AE / de-DE / en-US / es-ES / es-MX / fr-FR / id-ID / it-IT / ja-JP / ko-KR / pl-PL / pt-BR / ru-RU / th-TH / tr-TR / vi-VN / zh-CN / zh-TW
    );
    console.log(skins);
  } catch(err) {
    console.error(err);
  }
})();

Support

Installation

npm install @survfate/valorant.js --save

Credits

Dependencies

Readme

Keywords

none

Package Sidebar

Install

npm i @survfate/valorant.js

Weekly Downloads

3

Version

1.6.11

License

MIT

Unpacked Size

146 kB

Total Files

117

Last publish

Collaborators

  • survfate