tanishqmanuja / valoffi-api-client

Type-safe API client for valorant-api.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VALOFFI API CLIENT

CI Status downloads npm version MIT license

It is a type safe implementation of an api client for VALORANT-API.com.
VALOFFI is VALORANT + Officer (alias for the developer who made valorant-api.com)

Installation

Install @tqman/valoffi-api-client with npm, pnpm or yarn

npm i @tqman/valoffi-api-client@latest
pnpm add @tqman/valoffi-api-client@lastest
yarn add @tqman/valoffi-api-client@latest

Example

import { OffiApiClient } from "@tqman/valoffi-api-client";

const api = new OffiApiClient();

// or with parsing
// const api = new OffiApiClient({
//   parseResponseData: true,
// });

const {
  data: { riotClientVersion },
} = await api.fetch("version");

console.log(
  "Latest RSO User-Agent\n",
  "->",
  `RiotClient/${riotClientVersion} rso-auth (Windows;10;;Professional, x64)`,
);

Disclaimer

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.

About

Type-safe API client for valorant-api.com

License:MIT License


Languages

Language:TypeScript 98.9%Language:JavaScript 1.1%