League of Legends Item Image Parser
🏆
Installation
npm install --save lol-item-image
Modes
- Command Line
node . -i "Boots of Speed"
- Server
node . -s
- Module
🚨 For command line and server modes, set up config.js first.
Command Line
This is for querying single items, use if necessary but every request will count towards your rate limit as there's no permanent storage. Feel free to implement your own storage solution if you'd like to use this feature frequently.
Server
This exposes an endpoint:
serverRoot:port/item/:itemName returns the image URL for the given item
example: http://localhost:1337/item/boots of speed
First request will fetch items' data from the Riot Games API and cache it and subsequent requests will be served from there.
Module
You can use the functionality as part of your own programs. Bluebird promises are in use here, click here for details.
const lolItemImage= ;lolItemImageconfigriotApiKey = 'YOUR_RIOT_API_KEY'; lolItemImage ;
or
const lolItemImage= ; lolItemImage ;
Config
riotApiKey: 'YOUR_RIOT_API_KEY' cacheCollectionName: 'items' //optional, defaults to this dataDragonUrl: 'http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item' //optional, defaults to this URL port: 1337 //optional, defaults to this proxy: 'http://ip:port' //optional alternateItemsUrl: 'http://example.com/items' //optional
ToDo
- Global mode
npm install -g lol-image-parser
lol-image-parser -i "Boots of Speed"
- More ToDo items 😂