async-riot-api-wrapper

1.0.4 • Public • Published

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 petter@petterk.com

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 }
   * /
}

Readme

Keywords

none

Package Sidebar

Install

npm i async-riot-api-wrapper

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

8.53 kB

Total Files

7

Last publish

Collaborators

  • petter-kaspersen