async-riot-api-wrapper
v1.0.4
Published
A Riot API wrapper for Node.js ES6+
Downloads
8
Readme
async-riot-wrapper
IMPORTANT:
This wrapper is still under heavy construction and only a few endpoints work. Please open an issue at https://github.com/petter-kaspersen/async-riot-wrapper/issues or send me a mail at [email protected]
This wrapper does not yet manage rate limits, caching etc. so please do that yourself for now. I plan to add it in a future update. It does give you the response code back if the response is not 200 OK like this:
{response_code: number, message: string}
How to use:
npm install async-riot-api-wrapper
// Require the initial API
const RiotAPI = require('async-riot-api-wrapper');
// Initialize the API:
const api = new RiotAPI(key, server); // Currently supported servers: EUW, EUNE, NA
// Either use async function or promise
async function awaitTest() {
const summoner = await api.getSummonerByName(summonerName);
/** @returns
*
* { id: Number,
* accountId: Number,
* name: String,
* profileIconId: Number,
* revisionDate: Number,
* summonerLevel: Number }
* /
}