Welcome to node-of-legends's Promises API

The official API of the unofficial Node.JS wrapper for Riot's League Of Legend's API utilizing Promises!

Installation

npm install node-of-legends

Usage

Just require node-of-legends, set config and you're good to go!

var lol = require('node-of-legends');
lol.setConfig({
    region: lol.REGION.NORTH_AMERICA,
    apikey: '<my-api-key>'
});

That's it. It's all setup now. Want to pull all Champion data?! Super easy:

lol.staticdata.getAllChampData()
    .then(function(data){
        console.log(data);
    })
    .catch(function(error){
        console.log(error);
    });

Want more control directly over the Riot API? That's also available!

var dataTypesToRetrieve = [];
var mapDataById = true;
var locale = 'en_US';
var region = 'NA';
var version = '4.13.1';
lol.staticdata.getChampionList(dataTypesToRetrieve, mapDataById, locale, version, region)
    .then(function(data){
        console.log(data);
    });

Modules

All of the API calls are divided into the same logical groups that Riot has chosen for their modules.


Champion

Not the most thrilling information, but important none-the-less.

var championApi = lol.champion;

Available Data:

  • Free Champions
  • Bot Enhabled
  • Enabled in Ranked

Full Champion API here


Champion Mastery

Hear ye, hear ye! Champion Mastery Information for sale(free).

var championMasteryApi = lol.championmastery;

Available Data:

  • Champion Mastery Data for any Summoner
  • Summoner's Total Mastery Points

Full Champion Mastery API here


Game

Game information contains only one thing...

BUT YOU WANT IT!

Recent game info

var gameApi = lol.game;

Available Data:

  • Recent Game History

Full Game API here


League

Information about Different Leagues around the League of Legends ranked universe

var leagueApi = lol.league;

Available Data:

  • Challenger League info by region
  • Leagues Summoners are in

Full League API here


Match

Now you've got all your match/game IDs.

But you need all the related information for them.

the match API has got you covered.

var matchApi = lol.match;

Available Data:

  • Duration
  • Timeline Information new
  • Summoners
  • Bans
  • Champions
  • Individual counts for: Wards place, wards killed, damage given/takem etc

Full Match API here


Match List

Need longer match history for ranked queues?

The match list API is your ticket. Contains all information from season 3 on for all ranked queues.

var matchListApi = lol.matchlist;

Available Data:

  • Ranked Queue Match Lists

Full Match List API here


Runes

Need Rune Page information for your Favorite Streamoes?

Don't worry, the Runes API is HOT TO TROT Contains all the information you crave to make your rune pages just like the pros

var runesApi = lol.runes;

Available Data:

  • Rune Page Information
  • Current Rune Page Information

Full Runes API here


Spectator

Want to get some specbate information? Then hit up this saaaaweeeet API

var spectatorApi = lol.spectator;

Available Data:

  • Live Game Data (including, but not limited to)
    • Banned/Picked champs
    • General Game information
    • Observer Encryption Key
  • Featured Games by Region
  • Observer Encryption Key

Full Spectator API here


Static

Free static data!

All calls to this API do NOT count against your rate limit

var staticApi = lol.staticdata;

Available Data:

  • Champions (spells, lore, hp/mp, resource type, etc)
  • Items (cost, build trees, stats, etc)
  • Masteries (names, stats, etc)
  • Runes (cost, combines, stats, etc)
  • Summoner Spells (usable maps, cooldowns, etc)
  • Realm Data
  • Version Data

Full Static API here


Stats

Here is it. The big Kahuna.

Stats. 'nuff said.

var statsAPI = lol.stats;

Available Data(Ranked Queues Only)

  • Statistical summary information by Summoner
  • Aggregate ranked stats by Summoner and by Champion

Full Statistical API here


Status

Check on the League Shards' status!

var serverStatus = lol.status;

Available Data:

  • Hostnames
  • Regions
  • Services
  • Status

Full Status API here


Summoner

Need Summoner data?!

Then this is the place for you:

var summonerApi = lol.summoner;

Available Data:

  • Summoner Name/IDs
  • Account IDs

Full Summoner API here