https://github.com/woxy-sensei/rakan-lol
Rakan-lol is a TypeScript library designed to streamline the usage of the Riot Games API for League of Legends developers. This library provides easy-to-use functions to interact with the API and retrieve game-related data.
https://github.com/woxy-sensei/rakan-lol
api lol riot-api riot-games
Last synced: 3 months ago
JSON representation
Rakan-lol is a TypeScript library designed to streamline the usage of the Riot Games API for League of Legends developers. This library provides easy-to-use functions to interact with the API and retrieve game-related data.
- Host: GitHub
- URL: https://github.com/woxy-sensei/rakan-lol
- Owner: WoXy-Sensei
- License: mit
- Created: 2023-08-05T19:14:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-13T18:13:15.000Z (almost 2 years ago)
- Last Synced: 2025-03-01T20:24:32.959Z (3 months ago)
- Topics: api, lol, riot-api, riot-games
- Language: TypeScript
- Homepage:
- Size: 8.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Rakan-lol.js
> A TypeScript library to simplify using the Riot Games API.
`Rakan-lol.js` is a TypeScript library designed to streamline the usage of the Riot Games API for League of Legends developers. This library provides easy-to-use functions to interact with the API and retrieve game-related data.
## Features
- Simplified API calls: Easily retrieve game data and statistics.
- Typed responses: TypeScript support for clear and type-safe responses.## Installation
```bash
npm install rakan-lol.js
```##Getting Started
Before using RiotEase, you need to obtain an API key from the Riot Developer Portal. Once you have your API key, you can start using the library.
```ts
import { RiotApi,Regions, Summoner, CahmpionMastery, QueueType,RiotApiConfig,League } from "rakan-lol.js";
RiotApiConfig.setApiKey("Api_Key")const api = new RiotApi();
async function init(){
// To get summoner data by summonername
const summonerByName:Summoner = await api.getSummonerByName("jason dead",Regions.TR);
// To get summoner data by summonerId
const summonerById:Summoner = await api.getSummonerById(summonerByName.summonerId,Regions.TR);
// To get summoner icon from http://ddragon.leagueoflegends.com/cdn
const summonerIcon:string = await summonerById.getIcon();
// To get summoner champion mastery
const summonerChampionMastery:CahmpionMastery[] = await summonerById.getChampionMastery(); // return list
// To get first summoner champion of champion mastery
const summonerChampionMasteryChampion = await summonerChampionMastery[0].getCahmpion(); // return Champion
// To get summoner League
const league:League = await summonerById.getLeague(QueueType.SOLOQUEUE) // OR QueueType.FLEX
// To get summoner League tier frame PNG from CDN
const leagueTierFrame:string = await league.getTierFrame()// To get champion by name
const championByName = await api.getChampionByName("Aatrox");
console.log(championByName);
}
init()
```
## LicenseThis project is open-source and licensed under the MIT License. For more details, please see the "LICENSE" file.
