wrapper-valorant-api
v1.0.1
Published
A wrapper for the official Valorant Api.
Downloads
14
Maintainers
Readme
wrapper-valorant-api
A NodeJS wrapper for the VALORANT API.
Installation
npm:
npm i wrapper-valorant-api
yarn:
yarn add wrapper-valorant-api
| Method | Description | | ---------------------------------------------------------------------------------------------------- | ------------------------------- | | getContents({locale, region?)} | Get content filtered by locale. |
| Method | Description | | -------------------------------------------------------------------------------------------------------- | --------------------------------------- | | match.getByMatchId({matchid, region?}) | Get match by id | | match.getByPuuid({puuid, region?)} | Get matchlist for games played by puuid | | match.getByQueue({queue, region?}) | Get recent matches |
| Method | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | | getLeaderboard({actId, region?, size?, startIndex?}) | Get leaderboard for the competitive queue |
| Method | Description | | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | | account.getByPuuid({puuid, region?}) | Get account by puuid | | account.getByName({gameName, tagLine, region?}) | Get account by riot id | | account.getMyAccount({authorization, region?}) | Get account by authentication string | | account.getActiveShard({puuid, region?}) | Get active shard for a player |
Supported regions:
Valorant API:
| Region | Endpoint | | ------ | ----------------------- | | APAC | ap.api.riotgames.com | | BR | br.api.riotgames.com | | EU | eu.api.riotgames.com | | KR | kr.api.riotgames.com | | LATAM | latam.api.riotgames.com | | NA | na.api.riotgames.com |
Account API:
| Region | Endpoint | | -------- | -------------------------- | | ASIA | asia.api.riotgames.com | | AMERICAS | americas.api.riotgames.com | | EUROPE | europe.api.riotgames.com |
Usage
JavaScript:
const { ValorantApi } = require("wrapper-valorant-api");
const APIKey = ""; // Your API Key
const ValApi = new ValorantApi(APIKey); // An API instance for Valorant query
// Example usage of the VAL-CONTENT-V1 API
ValApi.getContents({ locale: "en-US" }).then((data) => console.log(data));
// Production API Key
ValApi.match.getByPuuid({ puuid: "" }); // Your puuid
ValApi.match
.getByQueue({ queue: "competetive" })
.then((data) => console.log(data));
Typescript:
import { ValorantApi } from "wrapper-valorant-api";
const APIKey = ""; // Your API Key
const ValApi = new ValorantApi(APIKey); // An API instance for Valorant query
// Example usage of the VAL-CONTENT-V1 API
ValApi.getContents({ locale: "en-US" }).then((data) => console.log(data));
// Production API Key
ValApi.match.getByPuuid({ puuid: "" }); // Your puuid
ValApi.match
.getByQueue({ queue: "competetive" })
.then((data) => console.log(data));
Contact
- GitHub LordPrinz
- Discord Lord Prinz ™ 🔥#6396