0.6.0 • Published 2 years ago
League Of Legends API
This project utilize the Riot Games Official API
To initialize this follow the bellow steps:
Installing
To install utilize this in your terminal:
npm install loldata.js
- Warning: This Project Only Will Work In Node 17 Or Node 18
Initializing The Project
import LolApi from 'loldata.js';
const lolApi = new LolApi(api_key);
Parameter | Type | Required |
---|
api_key | string | True |
Receiving A User
const user = await lolApi.searchUser(nickname);
Parameter | Type | Required |
---|
nickname | string | True |
Receiving The Current Rotation
const rotation = await lolApi.rotation();
Receiving Ranked Informations
const user = await lolApi.rankUser(nickname);
Parameter | Type | Required |
---|
nickname | string | True |
Receiving Last Match Informations
const user = await lolApi.lastMatch(nickname);
Parameter | Type | Required |
---|
nickname | string | True |
Receiving Actual Match Informations
const user = await lolApi.inGame(nickname);
Parameter | Type | Required |
---|
nickname | string | True |