trailpack-leagueoflegends
📦 Add a Trails service to get data from League Of Legends API.
Install
With yeoman :
npm install -g yo generator-trailsyo trails:trailpack trailpack-leagueoflegends
With npm (you will have to create config file manually) :
$ npm install --save trailpack-leagueoflegends
Configuration
Enable SrcdsRcon
// config/main.jsmoduleexports = packs: // ... other trailpacks
Check that leagueoflegends config is loaded on index.js
// config/index.js...exportssrcds =
Configure
// config/leagueoflegends.js moduleexports = // Your Riot Games Api must me set here apiKey: 'your-league-api-key-here'
Usage
/*** Example of calls possible* First Parameter is the Api Name, the seconde is method name and the third one contrains parameters needed* return a Promise that contains the api datas*/thisappservicesLeagueOfLegendsService;// Example for Get Current Summoner Elolet summonerName = 'WarkAngel'thisappservicesLeagueOfLegendsService;
Methods and API Available
All methods are available, see method Reference for more information about how to use.