UNPKG

maplestory-openapi

Version:

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

73 lines (69 loc) 1.68 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * 계정의 보유 캐릭터 목록 */ class CharacterListDto { /** * 메이플스토리 계정 목록 */ accountList; constructor(obj) { const { account_list } = obj; this.accountList = account_list.map((account) => new CharacterListAccountDto(account)); } } /** * 캐릭터 정보 */ class CharacterListAccountCharacterDto { /** * 캐릭터 식별자 */ ocid; /** * 캐릭터 명 */ characterName; /** * 월드 명 */ worldName; /** * 캐릭터 직업 */ characterClass; /** * 캐릭터 레벨 */ characterLevel; constructor(obj) { const { ocid, character_name, world_name, character_class, character_level, } = obj; this.ocid = ocid; this.characterName = character_name; this.worldName = world_name; this.characterClass = character_class; this.characterLevel = character_level; } } /** * 메이플스토리 계정 */ class CharacterListAccountDto { /** * 메이플스토리 계정 식별자 */ accountId; /** * 캐릭터 목록 */ characterList; constructor(obj) { const { account_id, character_list } = obj; this.accountId = account_id; this.characterList = character_list.map((character) => new CharacterListAccountCharacterDto(character)); } } exports.CharacterListAccountCharacterDto = CharacterListAccountCharacterDto; exports.CharacterListAccountDto = CharacterListAccountDto; exports.CharacterListDto = CharacterListDto;