UNPKG

league-wrapper

Version:

REST API Wrapper for the League of Legends API

27 lines (22 loc) 1.46 kB
'use strict'; const convert = require('../../util/convert.js'); const AggregatedStatsDto = require('./aggregated-stats-dto.js'); /** * @class * @alias module:LeagueWrapper/dto/stats~PlayerStatsSummaryDto * @property {module:LeagueWrapper/dto/stats~AggregatedStatsDto} aggregatedStats - Aggregated stats. * @property {number} losses - Number of losses for this queue type. Returned for ranked queue types only. * @property {number} modifyDate - Date stats were last modified specified as epoch milliseconds. * @property {string} playerStatSummaryType - Player stats summary type. (Legal values: AramUnranked5x5, Ascension, Bilgewater, CAP5x5, CoopVsAI, CoopVsAI3x3, CounterPick, FirstBlood1x1, FirstBlood2x2, Hexakill, KingPoro, NightmareBot, OdinUnranked, OneForAll5x5, RankedPremade3x3, RankedPremade5x5, RankedSolo5x5, RankedTeam3x3, RankedTeam5x5, SummonersRift6x6, Unranked, Unranked3x3, URF, URFBots) // @todo: enum PlayerStatSummaryType * @property {number} wins - Number of wins for this queue type. */ class PlayerStatsSummaryDto { constructor(data) { this.aggregatedStats = convert(data.aggregatedStats, AggregatedStatsDto); this.losses = convert(data.losses, Number); this.modifyDate = convert(data.modifyDate, Number); this.playerStatSummaryType = convert(data.playerStatSummaryType, String); this.wins = convert(data.wins, Number); } } exports = module.exports = PlayerStatsSummaryDto;