0.1.2 • Published 3 years ago

@montejojorge/riot.js v0.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Riot.js

npm version license

A Riot Games API Wrapper for Node.JS

Installation

npm install @montejojorge/riot.js

Usage

const RiotJS = require("@montejojorge/riot.js");
const regions = RiotJS.constants.regions;

RiotJS.setConfig({
    apiKey: "your-api-key"
});

RiotJS.league.summoner.getSummonerByName("TehKeppler", regions.EU_WEST)
    .then(res => console.log(res.data))

You can set up a default region in the config:

RiotJS.setConfig({
    apiKey: "your-api-key",
    defaultRegion: regions.EU_WEST
});

RiotJS.league.summoner.getSummonerByName("TehKeppler")
    .then(res => console.log(res.data))

Endpoints

League

Summoner

  • Get a summoner by account ID
  • Get a summoner by summoner name
  • Get a summoner by PUUID
  • Get a summoner by summoner ID