A simplified version of the LoL api, so you don't have to read all the documentation and just simply get all the info from the summoner's name. I made this for my Discord bot TotoBot, whose main feature is the interaction with the league of legend api. You're free to download this and put it into your project. It requires a token from the riot developer portal in order to work. If you want to give some support you can invite TotoBot to your server and i'll be extremely happy. https://kats.uno/totobot
import { lolApi } from "./lolApi/index.js"
const api = new lolApi(api_key):
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
api.getSummonerByName("name", "region");
Parameter | Type | Description |
---|---|---|
name |
string |
Required. Summoner name |
region |
string |
Required. Summoner region |
Requires node-fetch
to work properly
import { lolApi } from "./lolApi/index.js";
const api = new lolApi("YOUR_TOKEN_HERE");
async function getSummoner(){
const summoner = await api.getSummonerByName("Ktsun0","LA2");
return summoner;
}v
const summonerInfo = await getSummoner();
console.log(summonerInfo)