2.0.2 • Published 8 years ago

node-of-legends v2.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

Node-of-Legends

League of Legends API Wrapper for Node.JS utilizing ES6 Promises

A wrapper for the League of Legends API using Promises Completely updated for API v3.

TODO: Tournament End Points

*Note: This is a full breaking change from version 1 of this library

A full API can be found at http://node-of-legends.suds.io/api

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);
	})
	.catch(function(error){
		console.log(error);
	});
2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago