A nodeJS library for the Riot Games Api
$ npm install riot-api-nodejs
// clone
$ git clone https://github.com/ZafixLRP/riot-api-nodejs.git
// install
$ npm run dev-install
// build
$ npm run build
var riotApi = require("riot-api-nodejs");
var classicApi = new riotApi.ClassicApi(["API-KEY1", "API-KEY2"], riotApi.region_e.EUW);
var tournamentAPI = new riotApi.TournamentAPI("API_KEY1", "API_KEY2");
classicApi.getSummonerByName("zafix").then((summoner) => {
return classicApi.getChampionMasteryScore(summoner.id);
}).catch(funtion(err){
//error
});
getChampions();
getChampionById(id: number);
getFreeToPlayChampions();
getChampionMastery(summonerId: number, championId: number);
getChampionMasteryBySummoner(summonerId: number);
getChampionMasteryScore(summonerId: number);
getTopChampionMastery(summonerId: number);
getCurrentGame(summonerId: number);
getFeaturedGame();
getRecentGames(summonerId: number);
getLeagueBySummonerId(summonerId: number);
getLeagueBySummonerIdEntry(summonerId: number);
getLeagueByTeamId(teamId: string);
getLeagueByTeamIdEntry(teamId: string);
getChallengers_SOLO();
getChallengers_3x3();
getChallengers_5x5();
getMasters_SOLO();
getMasters_3x3();
getMasters_5x5();
staticDataChampions();
staticDataChampionById(championsId: number);
staticDataItems();
staticDataItemById(itemId: number);
staticDataLanguagesStrings();
staticDataLanguages();
staticDataMap();
staticDataMastery();
staticDataMasteryById(masteryId: number);
staticDataRealm();
staticDataRunes();
staticDataRuneById(runeId: number);
staticDataSummonerSpells();
staticDataSummonSpellById(summonerSpellId: number);
staticDataVersion();
getStatus();
getStatusByRegion(region: region_e);
getMatch(matchId: number);
getMatchIdsByTournamentCode(tournamentCode: string);
getMatchForTournament(matchId: number);
getMatchList(summonerId: number);
getStatsRanked(summonerId: number);
getStatsSummary(summonerId: number);
getSummonerByName(summonerName: string);
getSummonerById(summonerId: number);
getSummonerMasteries(summonerId: number);
getSummonerName(summonerId: number);
getSummonerRunes(summonerId: number);
getTeamsBySummoner(summonerId: number);
getTeamById(teamId: string);
createTournamentCodes(tournamentId: number, count: number, params: TournamentCodeParameters);
getTournamentByCode(tournamentCode: string);
editTournamentByCode(tournamentCode: string, params: TournamentCodeUpdateParameters);
getLobbyEventByCode(tournamentCode: string);
registerProvider(region: region_e, url: string);
registerTournament(name: string, providerId: number);
var riotApi = require("riot-api-nodejs");
class myNewApi Extends riotApi.classicApi {
// add your functions
}
let api = myNewApi(...);
api.getSummonerName("Zafix").then((...) => { ... })