2.0.0 • Published 5 years ago

riotapi v2.0.0

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

RiotAPI

Simple example

const RiotAPI = require('riotapi');

const api = new RiotAPI('api-key-here', { region: RiotAPI.REGION.korea });

api
  .getSummonerV4ByName('Hide on bush')
  .then(console.log)
  .catch(console.error);

Documentation

WORK IN PROGRESS

Champion Mastery V4

api.getChamptionMasteryListV4BySummonerId(id, (data, error) => {
  if (error) {
    // Handle error ...
    return;
  }

  // handler response ...
});

Returns ChampionMasteryV4

api.getChamptionMasteryV4BySummonerIdByChampionId(
  summonerId,
  championId,
  (data, error) => {
    if (error) {
      // Handle error ...
      return;
    }

    // handler response ...
  }
);

Returns ChampionMasteryV4

api.getChamptionMasteryV4ScoreBySummonerId(id, (data, error) => {
  if (error) {
    // Handle error ...
    return;
  }

  // handler response ...
});

Returns Number