valorant-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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'); // JS

This 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 Array

Get a list of all playable agents

await ValAPI.agents.get({ isPlayableCharacter: true });
// Expected Return: Playable Agent Array

Get a Weapon for a given Weapon UUID

await ValAPI.weapons.get({ uuid: 'WEAPON_UUID' });
// Expected Return: Weapon Object

Get a list of Weapon Skin Chromas

await ValAPI.weapons.getSkinChromas();
// Expected Return: Weapon Skin Chroma Array

Check when a given Event ends

(await ValAPI.get({ uuid: 'EVENT_UUID' })).endTime
// Expected Return: Date

Documentation

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.

Package Sidebar

Install

npm i valorant-wrapper

Weekly Downloads

3

Version

1.1.3

License

MIT

Unpacked Size

3.41 MB

Total Files

138

Last publish

Collaborators

  • aircraft_overviewer