UNPKG

maplestory-openapi

Version:

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

178 lines (174 loc) 4.24 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * 캐릭터 스케줄러 정보 */ class SchedulerCharacterStateDto { /** * 조회 기준일 (YYYY-MM-DD) */ date; /** * 캐릭터 명 */ characterName; /** * 월드 명 */ worldName; /** * 캐릭터 레벨 */ characterLevel; /** * 캐릭터 직업 */ characterClass; /** * 일일 콘텐츠 정보 */ dailyContents; /** * 주간 콘텐츠 정보 */ weeklyContents; /** * 보스 콘텐츠 정보 */ bossContents; /** * 주간 보스 처치 완료 횟수 */ weeklyBossClearCount; /** * 주간 보스 처치 제한 횟수 */ weeklyBossClearLimitCount; constructor(obj) { this.date = obj.date ? new Date(obj.date) : null; this.characterName = obj.character_name; this.worldName = obj.world_name; this.characterLevel = obj.character_level; this.characterClass = obj.character_class; this.dailyContents = (obj.daily_contents ?? []).map((item) => new SchedulerDailyContentDto(item)); this.weeklyContents = (obj.weekly_contents ?? []).map((item) => new SchedulerWeeklyContentDto(item)); this.bossContents = (obj.boss_contents ?? []).map((item) => new SchedulerBossContentDto(item)); this.weeklyBossClearCount = obj.weekly_boss_clear_count; this.weeklyBossClearLimitCount = obj.weekly_boss_clear_limit_count; } } /** * 스케줄러 일일 콘텐츠 정보 */ class SchedulerDailyContentDto { /** * 콘텐츠/퀘스트 명 */ contentName; /** * 타입 ('contents', 'quest') */ type; /** * 인게임 스케줄러 등록 여부 (true/false) */ registrationFlag; /** * 현재 완료 횟수/점수 */ nowCount; /** * 최대 완료 가능 횟수/점수 */ maxCount; /** * 퀘스트인 경우 진행 상태 ("0":기타, "1":진행 중, "2":완료) */ questState; constructor(obj) { this.contentName = obj.content_name; this.type = obj.type; this.registrationFlag = obj.registration_flag; this.nowCount = obj.now_count; this.maxCount = obj.max_count; this.questState = obj.quest_state; } } /** * 스케줄러 주간 콘텐츠 정보 */ class SchedulerWeeklyContentDto { /** * 콘텐츠 명 */ contentName; /** * 콘텐츠 종류 ('contents', 'quest') */ type; /** * 인게임 스케줄러 등록 여부 (true/false) */ registrationFlag; /** * 현재 완료 횟수/점수 */ nowCount; /** * 최대 완료 가능 횟수/점수 */ maxCount; /** * 퀘스트인 경우 진행 상태 ("0":기타, "1":진행 중, "2":완료) */ questState; constructor(obj) { this.contentName = obj.content_name; this.type = obj.type; this.registrationFlag = obj.registration_flag; this.nowCount = obj.now_count; this.maxCount = obj.max_count; this.questState = obj.quest_state; } } /** * 스케줄러 보스 콘텐츠 정보 */ class SchedulerBossContentDto { /** * 보스 명 */ contentName; /** * 보스 난이도 */ difficulty; /** * 보스 초기화 주기 */ cycle; /** * 리스트 순서 */ listOrderNo; /** * 인게임 스케줄러 등록 여부 (true/false) */ registrationFlag; /** * 완료 여부 (true/false) */ completeFlag; constructor(obj) { this.contentName = obj.content_name; this.difficulty = obj.difficulty; this.cycle = obj.cycle; this.listOrderNo = obj.list_order_no; this.registrationFlag = obj.registration_flag; this.completeFlag = obj.complete_flag; } } exports.SchedulerBossContentDto = SchedulerBossContentDto; exports.SchedulerCharacterStateDto = SchedulerCharacterStateDto; exports.SchedulerDailyContentDto = SchedulerDailyContentDto; exports.SchedulerWeeklyContentDto = SchedulerWeeklyContentDto;