sage.js
v1.0.1
Published
A package that helps you build cool things with the official Riot API
Downloads
5
Maintainers
Readme
Sage.js
sage.js is a powerful javascript library to help you build an application based on the official Riotgames Valorant API.
Installation
npm i sage.js
Getting Started
Before you start, please note that the valorant api can only be used with a production api key.
To start, you first have to import the library and init the ValorantAPI class of the api.
const { ValorantAPI, Regions } = require("sage.js");
//init the ValorantAPI class for the region you can use all that are provided by the Regions object of the library
const api = new ValorantAPI("*your api key", Regions.NorthAmerica);
The ValorantAPI class provides functions for all the at Riot Developer Portal (riotgames.com) listed valorant endpoints.
To call an endpoint you can just do:
//returns a object of content that is used by the game
const data = await api.getContent();
To use the match endpoints you have to use the .match prefix:
//returns the data of a match by the id
cost matchData = await api.match.getByID("*matchID*")
A list of all available functions for the ValorantAPI class:
License
MIT
Legal
Riot Games, VALORANT, and any associated logos are trademarks, service marks, and/or registered trademarks of Riot Games, Inc.
This project is in no way affiliated with, authorized, maintained, sponsored or endorsed by Riot Games, Inc or any of its affiliates or subsidiaries.
I, the project owner and creator, am not responsible for any legalities that may arise in the use of this project. Use at your own risk.