valorant-wrapper v1.1.3
valorant-wrapper
A wrapper for the third-party valorant-api
How to Use
All endpoints can be accessed off the ValAPI class.
import { ValAPI } from 'valorant-wrapper'; // TS
const { ValAPI } = require('valorant-wrapper'); // JSThis class is static, and thus does not need to be instantiated to access the endpoints. All individual endpoint classes under ValAPI can be imported. To retrieve data from a specific endpoint, specify the class to fetch from in within ValAPI. Within each class exists the available endpoints to call the API. All methods support an optional language and uuid parameter.
Examples
Get a list of all maps
await ValAPI.maps.get();
// Expected Return: Map ArrayGet a list of all playable agents
await ValAPI.agents.get({ isPlayableCharacter: true });
// Expected Return: Playable Agent ArrayGet a Weapon for a given Weapon UUID
await ValAPI.weapons.get({ uuid: 'WEAPON_UUID' });
// Expected Return: Weapon ObjectGet a list of Weapon Skin Chromas
await ValAPI.weapons.getSkinChromas();
// Expected Return: Weapon Skin Chroma ArrayCheck when a given Event ends
(await ValAPI.get({ uuid: 'EVENT_UUID' })).endTime
// Expected Return: DateDocumentation
Full documentation for the available endpoints and their respective return types can be found on the Valorant API Docs. Type declarations have been included in this package.