@dr-fabian/riot_api
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

NPM npm GitHub issues Help contribute

@Dr-Fabian/Riot_API

@Dr-Fabian/Riot_API is a Javascript library written in TypeScript, with the purpose of facilitating the use of RIOT's api.

Installation

Using NPM

npm i @dr-fabian/riot_api

Using yarn

yarn add @dr-fabian/riot_api

Usage

Get Summoner

const Riot = require('@dr-fabian/riot_api');
const RiotAPI = new Riot(/* <token goes here> */);

// Returns informations about the summoner's account.
await RiotAPI.leagueOfLegends.getPlayer(username);

Get Summoner's last matches

const Riot = require('@dr-fabian/riot_api');
const RiotAPI = new Riot(/* <token goes here> */);

// Returns an array of the summoner's last matches, if not specified, the request begins at index 0 and ends at index 1.
await RiotAPI.leagueOfLegends.getPlayerLastMatches(
    accountId,
    beginIndex,
    endIndex
);

Get Match info

const Riot = require('@dr-fabian/riot_api');
const RiotAPI = new Riot(/* <token goes here> */);

// Returns informations about the match.
RiotAPI.leagueOfLegends.getMatchInfo(matchId);

Get Champion Mastery

const Riot = require('@dr-fabian/riot_api');
const RiotAPI = new Riot(/* <token goes here> */);
// Returns array of player's champions info.
RiotAPI.leagueOfLegends.getPlayerChampionsInfo(summonerEncryptedId);

Informations

  • This library only supports League of Legends for now, but I plan on providing a support for Valorant as well in the future, when the API will be public.
  • Anyone can contribute to this library. Feel free to do it.

Package Sidebar

Install

npm i @dr-fabian/riot_api

Weekly Downloads

4

Version

2.0.1

License

MIT

Unpacked Size

25.8 kB

Total Files

75

Last publish

Collaborators

  • dr-fabian