UNPKG

maplestory-openapi

Version:

This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.

63 lines (59 loc) 1.51 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * 캐릭터 기타 능력치 영향 요소 정보 */ class CharacterOtherStatDto { /** * 조회 기준일 (KST, 일 단위 데이터로 시, 분은 일괄 0으로 표기) */ date; /** * 능력치에 영향을 주는 요소 및 스탯 정보 */ otherStat; constructor(obj) { const { date, other_stat } = obj; this.date = date ? new Date(date) : null; this.otherStat = other_stat?.map((stat) => new CharacterOtherStatDetailDto(stat)) ?? []; } } /** * 능력치에 영향을 주는 요소 및 스탯 정보 */ class CharacterOtherStatDetailDto { /** * 스탯 타입 */ otherStatType; /** * 스탯 정보 */ statInfo; constructor(obj) { const { other_stat_type, stat_info } = obj; this.otherStatType = other_stat_type; this.statInfo = stat_info.map((info) => new CharacterOtherStatInfoDto(info)); } } /** * 스탯 정보 */ class CharacterOtherStatInfoDto { /** * 스탯 명 */ statName; /** * 스탯 값 */ statValue; constructor(obj) { const { stat_name, stat_value } = obj; this.statName = stat_name; this.statValue = stat_value; } } exports.CharacterOtherStatDetailDto = CharacterOtherStatDetailDto; exports.CharacterOtherStatDto = CharacterOtherStatDto; exports.CharacterOtherStatInfoDto = CharacterOtherStatInfoDto;