Skip to content

Freddiiy/reksai

Repository files navigation

Reksai

A typescript Node wrapper for the League of Legends api. Please expect a lot of breaking changes while I develop the architecture of the package :)

Eksamples.

DDragon wrapper.

import reksai from "reksai";

const reksai = new Reksai();
const main = async() => {
	const ekko = await reksai.ddragon.champion.get("eKKo"); //Typesafe Ekko object
	const ekkoImage = await reksai.ddragon.asset.champion(ekko.image.full)	//Get ekko image url returned

	console.log(ekko.name); //returns Ekko.
	console.log(ekkoImage) // Returns url for ekkos image

}
main();

Summoner client

import reksai from "reksai";

const reksai = new Reksai("your-api-key");
const main = async() => {
    const summoner = await reksai.summoner.bySummonerName("Thiccikyu"); //Get typesafe// summoner object back
    const summonerName = summoner.name;
    const summonerLevel = summoner.summonerLevel;

    console.log(summonerName);
    console.log(summonerLevel)
}
main();

Match client

import reksai from "reksai";

const reksai = new Reksai(process.env.RIOT_API_KEY);
const main = async() => {
    const summoner = await reksai.summoner.bySummonerName("Thiccikyu", "euw1");
    console.log(summoner.name + " " + summoner.summonerLevel);
    const matchIds = await reksai.match.idsByPuuid(summoner.puuid, "europe");
    console.log(matchIds);
}
main();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published