Skip to content

Commit

Permalink
Add the function getPlayerSummaries to get the player information by …
Browse files Browse the repository at this point in the history
…dota2 account id
  • Loading branch information
susufqx committed Aug 25, 2017
1 parent 7be54f8 commit bb830ba
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/registeredApiMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ exports.getItemIconPath = getItemIconPath;
exports.getRarities = getRarities;
exports.getHeroes = getHeroes;
exports.getTournamentPrizePool = getTournamentPrizePool;
exports.getPlayerSummaries = getPlayerSummaries;

function getLeagueListing(options) {
var validOptionKeys = ['language'];
var path = 'IDOTA2Match_' + this.ID + '/GetLeagueListing/v1';
Expand Down Expand Up @@ -117,6 +119,14 @@ function getTournamentPrizePool(options) {
return this._request(path, validOptionKeys, options);
}

function getPlayerSummaries(options) {
options.steamids = (parseInt(options.steamids) + 76561197960265728).toString();
var validOptionKeys = ['steamids'];
var path = 'ISteamUser'+ '/GetPlayerSummaries/v0002';

return this._request(path, validOptionKeys, options);
}

exports.default = {
getLeagueListing: getLeagueListing,
getLiveLeagueGames: getLiveLeagueGames,
Expand All @@ -131,5 +141,6 @@ exports.default = {
getItemIconPath: getItemIconPath,
getRarities: getRarities,
getHeroes: getHeroes,
getTournamentPrizePool: getTournamentPrizePool
};
getTournamentPrizePool: getTournamentPrizePool,
getPlayerSummaries: getPlayerSummaries
};

0 comments on commit bb830ba

Please sign in to comment.