league-wrapper
Version:
REST API Wrapper for the League of Legends API
27 lines (22 loc) • 780 B
JavaScript
;
const convert = require('../../util/convert.js');
const ChampionDto = require('./champion-dto.js');
/**
* @class
* @alias module:LeagueWrapper/dto/lolStaticData~ChampionListDto
* @property {Object.<module:LeagueWrapper/dto/lolStaticData~ChampionDto>} data
* @property {string} format
* @property {Object.<string>} keys
* @property {string} type
* @property {string} version
*/
class ChampionListDto {
constructor(data) {
this.data = convert(data.data, [String, ChampionDto]);
this.format = convert(data.format, String);
this.keys = convert(data.keys, [String, String]);
this.type = convert(data.type, String);
this.version = convert(data.version, String);
}
}
exports = module.exports = ChampionListDto;