GithubHelp home page GithubHelp logo

woxy-sensei / rakan-lol Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8.33 MB

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.

License: MIT License

TypeScript 100.00%
lol riot-api riot-games api

rakan-lol's Introduction

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

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.

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()

License

This project is open-source and licensed under the MIT License. For more details, please see the "LICENSE" file.

Rakan-lol

rakan-lol's People

Contributors

woxy-sensei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.