brawlhalla-api-ts
Version:
TypeScript wrapper for the Brawlhalla API.
25 lines • 971 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var LegendUtils_1 = require("../../utils/LegendUtils");
var LegendRankedStats = (function () {
function LegendRankedStats(data) {
this.legend = LegendUtils_1.LegendUtils.findLegendById(data.legend_id);
this.rating = data.rating;
this.peakRating = data.peak_rating;
var tierAndDivision = data.tier.split(' ');
this.tier = tierAndDivision[0];
this.division = tierAndDivision.length > 0 ? tierAndDivision[1] : 1;
this.games = data.games;
this.wins = data.wins;
}
Object.defineProperty(LegendRankedStats.prototype, "defeats", {
get: function () {
return this.games - this.wins;
},
enumerable: true,
configurable: true
});
return LegendRankedStats;
}());
exports.LegendRankedStats = LegendRankedStats;
//# sourceMappingURL=legendRankedStats.js.map