maplestory-openapi
Version:
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
1,409 lines (1,408 loc) • 74.5 kB
JavaScript
import axios from 'axios';
import '../../../node_modules/buffer/index.js';
import xml2js from 'xml2js';
import { BattlePracticeCharacterInfoDto } from './dto/battlePractice/battlePracticeCharacterInfo.js';
import { BattlePracticeReplayIdDto } from './dto/battlePractice/battlePracticeReplayId.js';
import { BattlePracticeResultDto } from './dto/battlePractice/battlePracticeResult.js';
import { BattlePracticeSkillTimelineDto } from './dto/battlePractice/battlePracticeSkillTimeline.js';
import { CharacterDto } from './dto/character/character.js';
import { CharacterAbilityDto } from './dto/character/characterAbility.js';
import { CharacterAndroidEquipmentDto } from './dto/character/characterAndroidEquipment.js';
import { CharacterBasicDto } from './dto/character/characterBasic.js';
import { CharacterBeautyEquipmentDto } from './dto/character/characterBeautyEquipment.js';
import { CharacterCashItemEquipmentDto } from './dto/character/characterCashItemEquipment.js';
import { CharacterDojangDto } from './dto/character/characterDojang.js';
import { CharacterHexaMatrixDto } from './dto/character/characterHexaMatrix.js';
import { CharacterHexaMatrixStatDto } from './dto/character/characterHexaMatrixStat.js';
import { CharacterHyperStatDto } from './dto/character/characterHyperStat.js';
import { CharacterImageDto } from './dto/character/characterImage.js';
import { CharacterItemEquipmentDto } from './dto/character/characterItemEquipment.js';
import { CharacterLinkSkillDto } from './dto/character/characterLinkSkill.js';
import { CharacterOtherStatDto } from './dto/character/characterOtherStat.js';
import { CharacterPetEquipmentDto } from './dto/character/characterPetEquipment.js';
import { CharacterPopularityDto } from './dto/character/characterPopularity.js';
import { CharacterPropensityDto } from './dto/character/characterPropensity.js';
import { CharacterRingExchangeSkillEquipmentDto } from './dto/character/characterRingExchangeSkillEquipment.js';
import { CharacterRingReserveSkillEquipmentDto } from './dto/character/characterRingReserveSkillEquipment.js';
import { CharacterSetEffectDto } from './dto/character/characterSetEffect.js';
import { CharacterSkillDto } from './dto/character/characterSkill.js';
import { CharacterStatDto } from './dto/character/characterStat.js';
import { CharacterSymbolEquipmentDto } from './dto/character/characterSymbolEquipment.js';
import { CharacterVMatrixDto } from './dto/character/characterVMatrix.js';
import { GuildDto } from './dto/guild/guild.js';
import { GuildBasicDto } from './dto/guild/guildBasic.js';
import { CubeHistoryResponseDto } from './dto/history/cubeHistory.js';
import { PotentialHistoryResponseDto } from './dto/history/potentialHistory.js';
import { StarforceHistoryResponseDto } from './dto/history/starforceHistory.js';
import { InspectionInfoDto } from './dto/inspectionInfo.js';
import { removeQuery } from '../common/lib.js';
import { MapleStoryApi as MapleStoryApi$1 } from '../common/mapleStoryApi.js';
import { CashshopNoticeDetailDto } from './dto/notice/cashshopNoticeDetail.js';
import { CashshopNoticeListDto } from './dto/notice/cashshopNoticeList.js';
import { EventNoticeDetailDto } from './dto/notice/eventNoticeDetail.js';
import { EventNoticeListDto } from './dto/notice/eventNoticeList.js';
import { NoticeDetailDto } from './dto/notice/noticeDetail.js';
import { NoticeListDto } from './dto/notice/noticeList.js';
import { UpdateNoticeDetailDto } from './dto/notice/updateNoticeDetail.js';
import { UpdateNoticeListDto } from './dto/notice/updateNoticeList.js';
import { AchievementRankingResponseDto } from './dto/ranking/achievementRanking.js';
import { DojangRankingResponseDto } from './dto/ranking/dojangRanking.js';
import { GuildRankingResponseDto } from './dto/ranking/guildRanking.js';
import { OverallRankingResponseDto } from './dto/ranking/overallRanking.js';
import { TheSeedRankingResponseDto } from './dto/ranking/theSeedRanking.js';
import { UnionRankingResponseDto } from './dto/ranking/unionRanking.js';
import { SchedulerCharacterStateDto } from './dto/scheduler/schedulerCharacterState.js';
import { UnionDto } from './dto/union/union.js';
import { UnionArtifactDto } from './dto/union/unionArtifact.js';
import { UnionChampionDto } from './dto/union/unionChampion.js';
import { UnionRaiderDto } from './dto/union/unionRaider.js';
import { AchievementDto } from './dto/user/achievement.js';
import { CharacterListDto } from './dto/user/characterList.js';
import { CharacterImageAction, CharacterImageEmotion, CharacterImageWeaponMotion } from '../common/enum/characterImage.js';
import { __exports as buffer } from '../../../_virtual/index.js_commonjs-exports.js';
/**
* MapleStory OpenAPI client for KMS.<br>
* This is an implementation of <a href="https://openapi.nexon.com/game/maplestory">MapleStory API</a>
*/
class MapleStoryApi extends MapleStoryApi$1 {
subUrl = 'maplestory';
timezoneOffset = 540;
constructor(apiKey) {
super(apiKey);
}
//#region 계정 정보 조회
/**
* 계정의 보유 캐릭터 목록을 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*/
async getCharacterList() {
const path = `${this.subUrl}/v1/character/list`;
const { data } = await this.client.get(path);
return new CharacterListDto(data);
}
/**
* 계정의 업적 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*/
async getAchievement() {
const path = `${this.subUrl}/v1/user/achievement`;
const { data } = await this.client.get(path);
return new AchievementDto(data);
}
//#endregion
//#region 캐릭터 정보 조회
/**
* 캐릭터 식별자(ocid)를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param characterName 캐릭터 명
*/
async getCharacter(characterName) {
const path = `${this.subUrl}/v1/id`;
const { data } = await this.client.get(path, {
params: {
character_name: characterName,
},
});
return new CharacterDto(data);
}
/**
* 기본 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterBasic(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/basic`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterBasicDto(data);
}
/**
* 캐릭터 외형 이미지 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param imageOptions 캐릭터 외형 파라미터
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterImage(ocid, imageOptions, dateOptions) {
const basic = await this.getCharacterBasic(ocid, dateOptions);
if (!basic) {
return null;
}
const { date, characterImage } = basic;
const action = imageOptions?.action ?? CharacterImageAction.Stand1;
const emotion = imageOptions?.emotion ?? CharacterImageEmotion.Default;
const wmotion = imageOptions?.wmotion ?? CharacterImageWeaponMotion.Default;
const actionFrame = imageOptions?.actionFrame ?? 0;
const emotionFrame = imageOptions?.emotionFrame ?? 0;
const width = 300;
const height = 300;
const x = 150;
const y = 200;
const path = removeQuery(characterImage);
const query = {
action: `${action}.${actionFrame}`,
emotion: `${emotion}.${emotionFrame}`,
wmotion,
};
const urlImageToBase64 = async (path, query) => {
const { data, headers } = await axios.get(path, {
params: query,
responseType: 'arraybuffer',
});
const base64 = buffer.Buffer.from(data, 'binary').toString('base64');
const mimeType = headers['content-type'];
return `data:${mimeType};base64,${base64}`;
};
const [originImage, image] = await Promise.all([
urlImageToBase64(path),
urlImageToBase64(path, query),
]);
return new CharacterImageDto({
date,
originUrl: path,
originImage,
image,
action,
emotion,
wmotion,
actionFrame,
emotionFrame,
width,
height,
x,
y,
});
}
/**
* 인기도 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterPopularity(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/popularity`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterPopularityDto(data);
}
/**
* 종합 능력치 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterStatDto(data);
}
/**
* 하이퍼스탯 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterHyperStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hyper-stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterHyperStatDto(data);
}
/**
* 성향 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterPropensity(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/propensity`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterPropensityDto(data);
}
/**
* 어빌리티 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterAbility(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/ability`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterAbilityDto(data);
}
/**
* 장착한 장비 중 캐시 장비를 제외한 나머지 장비 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterItemEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/item-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterItemEquipmentDto(data);
}
/**
* 장착한 캐시 장비 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterCashItemEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/cashitem-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterCashItemEquipmentDto(data);
}
/**
* 장착한 심볼 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterSymbolEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/symbol-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterSymbolEquipmentDto(data);
}
/**
* 적용받고 있는 세트 효과 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterSetEffect(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/set-effect`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterSetEffectDto(data);
}
/**
* 장착 중인 헤어, 성형, 피부 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterBeautyEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/beauty-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterBeautyEquipmentDto(data);
}
/**
* 장착한 안드로이드 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterAndroidEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/android-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterAndroidEquipmentDto(data);
}
/**
* 장착한 펫 및 펫 스킬, 장비 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterPetEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/pet-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterPetEquipmentDto(data);
}
/**
* 캐릭터 스킬과 하이퍼 스킬 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param characterSkillGrade 조회하고자 하는 전직 차수 <a href="https://openapi.nexon.com/ko/game/maplestory/?id=14">Available values</a>
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterSkill(ocid, characterSkillGrade, dateOptions) {
const path = `${this.subUrl}/v1/character/skill`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
character_skill_grade: characterSkillGrade,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterSkillDto(data);
}
/**
* 장착 링크 스킬 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterLinkSkill(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/link-skill`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterLinkSkillDto(data);
}
/**
* V매트릭스 슬롯 정보와 장착한 V코어 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterVMatrix(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/vmatrix`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterVMatrixDto(data);
}
/**
* HEXA 매트릭스에 장착한 HEXA 코어 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterHexaMatrix(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hexamatrix`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterHexaMatrixDto(data);
}
/**
* HEXA 매트릭스에 설정한 HEXA 스탯 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterHexaMatrixStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/hexamatrix-stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterHexaMatrixStatDto(data);
}
/**
* 캐릭터 무릉도장 최고 기록 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterDojang(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/dojang`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterDojangDto(data);
}
/**
* 능력치에 영향을 주는 요소 중 다른 조회에서 능력치 확인이 어려운 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2025년 8월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterOtherStat(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/other-stat`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 8,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterOtherStatDto(data);
}
/**
* 링 익스체인지 스킬 등록 장비를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2025년 08월 21일부터 2026년 3월 18일까지의 데이터를 조회할 수 있습니다.
* - 2026년 3월 19일부터는 예비 특수 반지 장착 정보 조회를 사용해주세요.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (8월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterRingExchangeSkillEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/ring-exchange-skill-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 8,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterRingExchangeSkillEquipmentDto(data);
}
/**
* 예비 특수 반지 장착 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2026년 3월 19일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (3월 20일 데이터 조회 시, 20일 00시부터 21일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getCharacterRingReserveSkillEquipment(ocid, dateOptions) {
const path = `${this.subUrl}/v1/character/ring-reserve-skill-equipment`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2026,
month: 3,
day: 19,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new CharacterRingReserveSkillEquipmentDto(data);
}
//#endregion
//#region 유니온 정보 조회
/**
* 유니온 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getUnion(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new UnionDto(data);
}
/**
* 유니온 공격대 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getUnionRaider(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union-raider`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new UnionRaiderDto(data);
}
/**
* 유니온 아티팩트 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2024년 1월 18일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getUnionArtifact(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union-artifact`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2024,
month: 1,
day: 18,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new UnionArtifactDto(data);
}
/**
* 유니온 챔피언 정보를 조회합니다.<br>
* 유니온 챔피언 정보는 2025년 2월 20일 메이플스토리 점검 이후 데이터부터 조회 가능합니다.<br>
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2025년 2월 20일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getUnionChampion(ocid, dateOptions) {
const path = `${this.subUrl}/v1/user/union-champion`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2025,
month: 2,
day: 20,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new UnionChampionDto(data);
}
//#endregion
//#region 길드 정보 조회
/**
* 길드 식별자(oguild_id) 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param guildName 길드 명
* @param worldName 월드 명 <a href="https://openapi.nexon.com/game/maplestory/?id=16">Available values</a>
*/
async getGuild(guildName, worldName) {
const path = `${this.subUrl}/v1/guild/id`;
const { data } = await this.client.get(path, {
params: {
guild_name: guildName,
world_name: worldName,
},
});
if (this.isEmptyResponse(data)) {
return null;
}
return new GuildDto(data);
}
/**
* 길드 기본 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param guildId 길드 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getGuildBasic(guildId, dateOptions) {
const path = `${this.subUrl}/v1/guild/basic`;
const date = dateOptions
? this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
oguild_id: guildId,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new GuildBasicDto(data);
}
//#endregion
//#region 연무장 정보 조회
/**
* 캐릭터의 연무장 리플레이 식별자를 조회합니다. 리플레이를 등록한 캐릭터에 대해서만 조회가 가능합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param ocid 캐릭터 식별자
*/
async getBattlePracticeReplayId(ocid) {
const path = `${this.subUrl}/v1/battle-practice/replay-id`;
const query = {
ocid: ocid,
};
const { data } = await this.client.get(path, {
params: query,
});
return new BattlePracticeReplayIdDto(data);
}
/**
* 연무장 측정 결과 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param replayId 연무장 리플레이 고유 식별자
*/
async getBattlePracticeResult(replayId) {
const path = `${this.subUrl}/v1/battle-practice/result`;
const query = {
replay_id: replayId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new BattlePracticeResultDto(data);
}
/**
* 연무장 진행 간 스킬 사용 내역을 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param replayId 연무장 리플레이 고유 식별자
* @param pageNo 페이지 번호 (미입력 시 1페이지 조회)
*/
async getBattlePracticeSkillTimeline(replayId, pageNo) {
const path = `${this.subUrl}/v1/battle-practice/skill-timeline`;
const query = {
replay_id: replayId,
page_no: pageNo,
};
const { data } = await this.client.get(path, {
params: query,
});
return new BattlePracticeSkillTimelineDto(data);
}
/**
* 연무장 입장 시의 캐릭터 능력치 관련 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param replayId 연무장 리플레이 고유 식별자
*/
async getBattlePracticeCharacterInfo(replayId) {
const path = `${this.subUrl}/v1/battle-practice/character-info`;
const query = {
replay_id: replayId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new BattlePracticeCharacterInfoDto(data);
}
//#endregion
//#region 스케줄러 정보 조회
/**
* 캐릭터에 대한 스케줄러의 수행 현황 정보를 조회하는 API입니다.
*
* @param ocid 캐릭터 식별자
* @param dateOptions 조회 기준일 (KST)
*/
async getSchedulerCharacterState(ocid, dateOptions) {
const path = `${this.subUrl}/v1/scheduler/character-state`;
const date = dateOptions ? this.toDateString(dateOptions) : undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
if (this.isEmptyResponse(data)) {
return null;
}
return new SchedulerCharacterStateDto(data);
}
async getStarforceHistory(count, parameter) {
const path = `${this.subUrl}/v1/history/starforce`;
const query = {
count,
};
if (typeof parameter === 'string') {
query.cursor = parameter;
}
else if (typeof parameter === 'object' || parameter === undefined) {
query.date = this.toDateString(parameter ??
this.getProperDefaultDateOptions({
hour: 0,
minute: 0,
dateOffset: 0,
}), {
year: 2023,
month: 12,
day: 27,
});
}
const { data } = await this.client.get(path, {
params: query,
});
return new StarforceHistoryResponseDto(data);
}
async getCubeHistory(count, parameter) {
const path = `${this.subUrl}/v1/history/cube`;
const query = {
count,
};
if (typeof parameter === 'string') {
query.cursor = parameter;
}
else if (typeof parameter === 'object' || parameter === undefined) {
query.date = this.toDateString(parameter ??
this.getProperDefaultDateOptions({
hour: 0,
minute: 0,
dateOffset: 0,
}));
}
const { data } = await this.client.get(path, {
params: query,
});
return new CubeHistoryResponseDto(data);
}
async getPotentialHistory(count, parameter) {
const path = `${this.subUrl}/v1/history/potential`;
const query = {
count,
};
if (typeof parameter === 'string') {
query.cursor = parameter;
}
else if (typeof parameter === 'object' || parameter === undefined) {
query.date = this.toDateString(parameter ??
this.getProperDefaultDateOptions({
hour: 0,
minute: 0,
dateOffset: 0,
}), {
year: 2024,
month: 1,
day: 25,
});
}
const { data } = await this.client.get(path, {
params: query,
});
return new PotentialHistoryResponseDto(data);
}
//#endregion
//#region 랭킹 정보 조회
/**
* 종합 랭킹 정보를 조회합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 오늘의 랭킹 정보는 오전 9시 30분 경부터 조회가 가능합니다. 상황에 따라 시간이 더 소요될 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST).
*
*/
async getOverallRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 9,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/overall`;
const query = {
date: this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 22,
}),
};
if (filterOptions) {
const { worldName, worldType, characterClass, ocid, page } = filterOptions;
query.world_name = worldName;
query.world_type = worldType;
query.class = characterClass;
query.ocid = ocid;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new OverallRankingResponseDto(data);
}
/**
* 유니온 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오늘의 랭킹 정보는 오전 9시 30분 경부터 조회가 가능합니다. 상황에 따라 시간이 더 소요될 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getUnionRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 9,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/union`;
const query = {
date: this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 22,
}),
};
if (filterOptions) {
const { worldName, ocid, page } = filterOptions;
query.world_name = worldName;
query.ocid = ocid;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new UnionRankingResponseDto(data);
}
/**
* 길드 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오늘의 랭킹 정보는 오전 9시 30분 경부터 조회가 가능합니다. 상황에 따라 시간이 더 소요될 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getGuildRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 9,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/guild`;
const query = {
date: this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 22,
}),
ranking_type: 0,
};
if (filterOptions) {
const { worldName, rankingType, guildName, page } = filterOptions;
query.world_name = worldName;
query.ranking_type = rankingType;
query.guild_name = guildName;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new GuildRankingResponseDto(data);
}
/**
* 무릉도장 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오늘의 랭킹 정보는 오전 9시 30분 경부터 조회가 가능합니다. 상황에 따라 시간이 더 소요될 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getDojangRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 9,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/dojang`;
const query = {
date: this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 22,
}),
difficulty: 0,
};
if (filterOptions) {
const { worldName, difficulty, characterClass, ocid, page } = filterOptions;
query.world_name = worldName;
query.difficulty = difficulty;
query.class = characterClass;
query.ocid = ocid;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new DojangRankingResponseDto(data);
}
/**
* 더 시드 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오늘의 랭킹 정보는 오전 9시 30분 경부터 조회가 가능합니다. 상황에 따라 시간이 더 소요될 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getSeedRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 9,
minute: 30,
dateOffset: 0,
})) {
const path =