VAPIC is a type safe implementation of an api client for VALORANT. It includes functional wrapper to call all community known endpoints provided by valorant-api-types.
Install @tqman/valorant-api-client with npm, pnpm or yarn
npm i @tqman/valorant-api-client@latest
pnpm add @tqman/valorant-api-client@latest
yarn add @tqman/valorant-api-client@latest
ssid
cookie without resending username/password.import { createValorantApiClient } from "@tqman/valorant-api-client";
import { presets } from "@tqman/valorant-api-client/presets";
const vapic = await createValorantApiClient(presets.local);
const puuid = vapic.remote.puuid;
console.log("PUUID", puuid);
const { data: accountAlias } = await vapic.local.getAccountAlias();
console.log("Account Alias", accountAlias);
const { data: compUpdates } = await vapic.remote.getCompetitiveUpdates({
data: {
puuid,
},
});
console.log("Comp Updates", compUpdates);
[!NOTE] VALORANT should be running for lockfile and logfile to be generated.
import { createValorantApiClient } from "@tqman/valorant-api-client";
import { presets } from "@tqman/valorant-api-client/presets";
const RIOT_USERNAME = "YOUR_USERNAME";
const RIOT_PASSWORD = "YOUR_PASSWORD";
const vapic = await createValorantApiClient(
presets.remote.with({
username: RIOT_USERNAME,
password: RIOT_PASSWORD,
}),
);
const puuid = vapic.remote.puuid;
console.log("PUUID", puuid);
const { data: compUpdates } = await vapic.remote.getCompetitiveUpdates({
data: {
puuid,
},
});
console.log("Comp Updates", compUpdates);
Give a βοΈ if this project helped you! \ It will give me motivation for working towards this project.
THIS PROJECT IS NOT ASSOCIATED OR ENDORSED BY RIOT GAMES. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc. Whilst effort has been made to abide by Riot's API rules; you acknowledge that use of this software is done so at your own risk.