2.1.0 • Published 10 years ago

riot-api-nodejs v2.1.0

Weekly downloads
31
License
MIT
Repository
-
Last release
10 years ago

build download per month version coverage

riot-api-nodejs

V2.1.0

description

A nodeJS library for the Riot Games Api

install

$ npm install riot-api-nodejs

Dev install

// clone
$ git clone https://github.com/ZafixLRP/riot-api-nodejs.git

// install
$ npm run dev-install

// build
$ npm run build

Usage

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
});

Classic API

champion-v1.2
getChampions();

getChampionById(id: number);

getFreeToPlayChampions();
championmastery
getChampionMastery(summonerId: number, championId: number);

getChampionMasteryBySummoner(summonerId: number);

getChampionMasteryScore(summonerId: number);

getTopChampionMastery(summonerId);
current-game-v1.0
getCurrentGame(summonerId: number);
featured-games-v1.0
getFeaturedGame();
game-v1.3
getRecentGames(summonerId: number);
league-v2.5
getLeagueBySummonerId(summonerId: number);

getLeagueBySummonerIdEntry(summonerId: number);

getLeagueByTeamId(teamId: string);

getLeagueByTeamIdEntry(teamId: string);

getChallengers_SOLO();

getChallengers_3x3();

getChallengers_5x5();

getMasters_SOLO();

getMasters_3x3();

getMasters_5x5();
lol-static-data-v1.2
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();
lol-status-v1.0
getStatus();

getStatusByRegion(region: region_e);
match-v2.2
getMatch(matchId: number);

getMatchIdsByTournamentCode(tournamentCode: string);

getMatchForTournament(matchId: number);
matchlist-v2.2
getMatchList(summonerId: number);
stats-v1.3
getStatsRanked(summonerId: number);

getStatsSummary(summonerId: number);
summoner-v1.4
getSummonerByName(summonerName: string);

getSummonerById(summonerId: number);

getSummonerMasteries(summonerId: number);

getSummonerName(summonerId: number);

getSummonerRunes(summonerId: number);
team-v2.4
getTeamsBySummoner(summonerId: number);

getTeamById(teamId: string);

TournamentAPI

tournament-provider-v1

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);

Extends API

var riotApi = require("riot-api-nodejs");

class myNewApi Extends riotApi.classicApi {
    // add your functions
}

let api = myNewApi(...);
api.getSummonerName("Zafix").then((...) => { ... })

Contributor(s)

Made with ♥ by Zafix
2.1.0

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago