This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

leagueoflegends-api

1.0.6 • Public • Published

League of Legends API

npm version

Npm package for the official League of Legends API.

Full documentation

Installation

npm i --save leagueoflegends-api

Basic Usage

This is a basic example on how to use the API, soon I will have full documentation covering how to use every function available.

Require the package into your project.

const LeagueofLegends = require('leagueoflegends-api');
// or with ES6
import LeagueofLegends from 'leagueoflegends-api';

Create a new instance of the API with your API_KEY and target region.

const lol = new LeagueofLegends(YOUR_API_KEY, 'na');
 
lol.findSummoner('shp corasan').then((result) => console.log(result));

You will get an object like this:

{
  "shpcorasan": {
    "id": 48641392,
    "name": "SHP CoraSan",
    "profileIconId": 1301,
    "revisionDate": 1477504931000,
    "summonerLevel": 30
  }
}

Note: All functions return a Promise.

Version 1.0.2 supports the following APIs:

  • summoner-v1.4
  • stats-v1.3
  • matchlist-v2.2
  • match v2.2
  • league-v2.5
  • Game
  • champion v1.2

Coming soon:

  • championmastery
  • lol-static-data-v1.2
  • lol-status-v1.0

Dependencies (3)

Dev Dependencies (2)

Package Sidebar

Install

npm i leagueoflegends-api

Weekly Downloads

7

Version

1.0.6

License

MIT

Last publish

Collaborators

  • corasan