maplestory-openapi
Version:
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
1,322 lines (1,315 loc) • 61.9 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var axios = require('axios');
require('../../../node_modules/buffer/index.js');
var xml2js = require('xml2js');
var character = require('./dto/character/character.js');
var characterAbility = require('./dto/character/characterAbility.js');
var characterAndroidEquipment = require('./dto/character/characterAndroidEquipment.js');
var characterBasic = require('./dto/character/characterBasic.js');
var characterBeautyEquipment = require('./dto/character/characterBeautyEquipment.js');
var characterCashItemEquipment = require('./dto/character/characterCashItemEquipment.js');
var characterDojang = require('./dto/character/characterDojang.js');
var characterHexaMatrix = require('./dto/character/characterHexaMatrix.js');
var characterHexaMatrixStat = require('./dto/character/characterHexaMatrixStat.js');
var characterHyperStat = require('./dto/character/characterHyperStat.js');
var characterImage$1 = require('./dto/character/characterImage.js');
var characterItemEquipment = require('./dto/character/characterItemEquipment.js');
var characterLinkSkill = require('./dto/character/characterLinkSkill.js');
var characterList = require('./dto/character/characterList.js');
var characterPetEquipment = require('./dto/character/characterPetEquipment.js');
var characterPopularity = require('./dto/character/characterPopularity.js');
var characterPropensity = require('./dto/character/characterPropensity.js');
var characterSetEffect = require('./dto/character/characterSetEffect.js');
var characterSkill = require('./dto/character/characterSkill.js');
var characterStat = require('./dto/character/characterStat.js');
var characterSymbolEquipment = require('./dto/character/characterSymbolEquipment.js');
var characterVMatrix = require('./dto/character/characterVMatrix.js');
var guild = require('./dto/guild/guild.js');
var guildBasic = require('./dto/guild/guildBasic.js');
var cubeHistory = require('./dto/history/cubeHistory.js');
var potentialHistory = require('./dto/history/potentialHistory.js');
var starforceHistory = require('./dto/history/starforceHistory.js');
var inspectionInfo = require('./dto/inspectionInfo.js');
var cashshopNoticeDetail = require('./dto/notice/cashshopNoticeDetail.js');
var cashshopNoticeList = require('./dto/notice/cashshopNoticeList.js');
var eventNoticeDetail = require('./dto/notice/eventNoticeDetail.js');
var eventNoticeList = require('./dto/notice/eventNoticeList.js');
var noticeDetail = require('./dto/notice/noticeDetail.js');
var noticeList = require('./dto/notice/noticeList.js');
var updateNoticeDetail = require('./dto/notice/updateNoticeDetail.js');
var updateNoticeList = require('./dto/notice/updateNoticeList.js');
var achievementRanking = require('./dto/ranking/achievementRanking.js');
var dojangRanking = require('./dto/ranking/dojangRanking.js');
var guildRanking = require('./dto/ranking/guildRanking.js');
var overallRanking = require('./dto/ranking/overallRanking.js');
var theSeedRanking = require('./dto/ranking/theSeedRanking.js');
var unionRanking = require('./dto/ranking/unionRanking.js');
var union = require('./dto/union/union.js');
var unionArtifact = require('./dto/union/unionArtifact.js');
var unionChampion = require('./dto/union/unionChampion.js');
var unionRaider = require('./dto/union/unionRaider.js');
var characterImage = require('../common/enum/characterImage.js');
var mapleStoryApi = require('../common/mapleStoryApi.js');
var index = require('../../../_virtual/index.js_commonjs-exports.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
var xml2js__default = /*#__PURE__*/_interopDefaultLegacy(xml2js);
/**
* 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.MapleStoryApi {
subUrl = 'maplestory';
timezoneOffset = 540;
constructor(apiKey) {
super(apiKey);
}
//#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 character.CharacterDto(data);
}
/**
* 계정의 보유 캐릭터 목록을 조회합니다.
* - 메이플스토리 게임 데이터는 평균 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 characterList.CharacterListDto(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,
});
return new characterBasic.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 { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
const actionFrame = imageOptions?.actionFrame ?? 0;
const emotionFrame = imageOptions?.emotionFrame ?? 0;
const width = 96;
const height = 96;
const x = imageOptions?.x ?? null;
const y = imageOptions?.y ?? null;
const query = {
action: `${action}.${actionFrame}`,
emotion: `${emotion}.${emotionFrame}`,
wmotion,
width,
height,
x,
y,
};
const urlImageToBase64 = async (path, query) => {
const { data, headers } = await axios__default["default"].get(path, {
params: query,
responseType: 'arraybuffer',
});
const base64 = index.__exports.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 characterImage$1.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,
});
return new characterPopularity.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,
});
return new characterStat.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,
});
return new characterHyperStat.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,
});
return new characterPropensity.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,
});
return new characterAbility.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,
});
return new characterItemEquipment.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,
});
return new characterCashItemEquipment.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,
});
return new characterSymbolEquipment.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,
});
return new characterSetEffect.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,
});
return new characterBeautyEquipment.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,
});
return new characterAndroidEquipment.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,
});
return new characterPetEquipment.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,
});
return new characterSkill.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,
});
return new characterLinkSkill.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,
});
return new characterVMatrix.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,
});
return new characterHexaMatrix.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,
});
return new characterHexaMatrixStat.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,
});
return new characterDojang.CharacterDojangDto(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,
});
return new union.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,
});
return new unionRaider.UnionRaiderDto(data);
}
/**
* 유니온 아티팩트 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 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: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new unionArtifact.UnionArtifactDto(data);
}
/**
* 유니온 챔피언 정보를 조회합니다.<br>
* 유니온 챔피언 정보는 2025년 2월 20일 메이플스토리 점검 이후 데이터부터 조회 가능합니다.<br>
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 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: 2023,
month: 12,
day: 21,
})
: undefined;
const query = {
ocid: ocid,
date: date,
};
const { data } = await this.client.get(path, {
params: query,
});
return new unionChampion.UnionChampionDto(data);
}
//#endregion
//#region 길드 정보 조회
/**
* 길드 식별자(oguild_id) 정보를 조회합니다.
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
*
* @param guildName 길드 명
* @param worldName 월드 명
*/
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,
},
});
return new guild.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,
});
return new guildBasic.GuildBasicDto(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 starforceHistory.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 cubeHistory.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 potentialHistory.PotentialHistoryResponseDto(data);
}
//#endregion
//#region 랭킹 정보 조회
/**
* 종합 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST).
*
*/
async getOverallRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
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 overallRanking.OverallRankingResponseDto(data);
}
/**
* 유니온 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getUnionRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
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 unionRanking.UnionRankingResponseDto(data);
}
/**
* 길드 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getGuildRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
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, ocid, page } = filterOptions;
query.world_name = worldName;
query.ranking_type = rankingType;
query.ocid = ocid;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new guildRanking.GuildRankingResponseDto(data);
}
/**
* 무릉도장 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getDojangRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
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 dojangRanking.DojangRankingResponseDto(data);
}
/**
* 더 시드 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getSeedRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/theseed`;
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 theSeedRanking.TheSeedRankingResponseDto(data);
}
/**
* 업적 랭킹 정보를 조회합니다.
* - 2023년 12월 22일 데이터부터 조회할 수 있습니다.
* - 오전 8시 30분부터 오늘의 랭킹 정보를 조회할 수 있습니다.
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
*
* @param filterOptions 검색 기준
* @param dateOptions 조회 기준일 (KST)
*/
async getAchievementRanking(filterOptions, dateOptions = this.getProperDefaultDateOptions({
hour: 8,
minute: 30,
dateOffset: 0,
})) {
const path = `${this.subUrl}/v1/ranking/achievement`;
const query = {
date: this.toDateString(dateOptions, {
year: 2023,
month: 12,
day: 22,
}),
};
if (filterOptions) {
const { ocid, page } = filterOptions;
query.ocid = ocid;
query.page = page;
}
const { data } = await this.client.get(path, {
params: query,
});
return new achievementRanking.AchievementRankingResponseDto(data);
}
//#endregion
//#region 공지 정보 조회
/**
* 메이플스토리 공지사항에 최근 등록된 게시글 20개를 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
*/
async getNoticeList() {
const path = `${this.subUrl}/v1/notice`;
const { data } = await this.client.get(path);
return new noticeList.NoticeListDto(data);
}
/**
* 메이플스토리 공지사항 게시글 세부 사항을 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
* @param noticeId 공지 식별자
*/
async getNoticeDetail(noticeId) {
const path = `${this.subUrl}/v1/notice/detail`;
const query = {
notice_id: noticeId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new noticeDetail.NoticeDetailDto(data);
}
/**
* 메이플스토리 업데이트에 최근 등록된 게시글 20개를 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
*/
async getUpdateNoticeList() {
const path = `${this.subUrl}/v1/notice-update`;
const { data } = await this.client.get(path);
return new updateNoticeList.UpdateNoticeListDto(data);
}
/**
* 메이플스토리 업데이트 게시글 세부 사항을 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
* @param noticeId 공지 식별자
*/
async getUpdateNoticeDetail(noticeId) {
const path = `${this.subUrl}/v1/notice-update/detail`;
const query = {
notice_id: noticeId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new updateNoticeDetail.UpdateNoticeDetailDto(data);
}
/**
* 메이플스토리 진행 중 이벤트에 최근 등록된 공지사항 20개를 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
*/
async getEventNoticeList() {
const path = `${this.subUrl}/v1/notice-event`;
const { data } = await this.client.get(path);
return new eventNoticeList.EventNoticeListDto(data);
}
/**
* 메이플스토리 진행 중 이벤트 게시글 세부 사항을 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
* @param noticeId 공지 식별자
*/
async getEventNoticeDetail(noticeId) {
const path = `${this.subUrl}/v1/notice-event/detail`;
const query = {
notice_id: noticeId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new eventNoticeDetail.EventNoticeDetailDto(data);
}
/**
* 메이플스토리 캐시샵 공지에 최근 등록된 공지사항 20개를 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
*/
async getCashshopNoticeList() {
const path = `${this.subUrl}/v1/notice-cashshop`;
const { data } = await this.client.get(path);
return new cashshopNoticeList.CashshopNoticeListDto(data);
}
/**
* 메이플스토리 캐시샵 공지 게시글 세부 사항을 조회합니다.
*
* - 공지 정보 API는 데이터 최신화(공지 내용 수정/ 업데이트 고려)를 위해 실시간 조회 또는 최소 일배치 작업을 권장합니다.
* - 실시간으로 정보를 제공하지 않는 경우, 신규/수정 공지 내용이 반영되지 않을 수 있으니 서비스 이용 유저에게 홈페이지 공지 사항을 확인하라는 가이드를 제공해주세요.
* @param noticeId 공지 식별자
*/
async getCashshopNoticeDetail(noticeId) {
const path = `${this.subUrl}/v1/notice-cashshop/detail`;
const query = {
notice_id: noticeId,
};
const { data } = await this.client.get(path, {
params: query,
});
return new cashshopNoticeDetail.CashshopNoticeDetailDto(data);
}
//#endregion
/**
* 서버 점검 정보를 조회합니다.
*/
async getInspectionInfo() {
const xmlBuilder = new xml2js__default["default"].Builder();
const soapEnvelop = {
'soap:Envelope': {
$: {
'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'xmlns:xsd': 'http://www.w3.org/2001/XMLSchema',
'xmlns:soap': 'http://schemas.xmlsoap.org/soap/envelope/',
},
'soap:Body': {
GetInspectionInfo: {
$: {
xmlns: 'https://api.maplestory.nexon.com/soap/',
},
},
},
},
};
const baseUrl = 'https://api.maplestory.nexon.com/';
const path = 'soap/maplestory.asmx';
const headers = {
SOAPAction: 'https://api.maplestory.nexon.com/soap/GetInspectionInfo',
'Content-Type': 'text/xml; charset=utf-8',
};
const body = xmlBuilder.buildObject(soapEnvelop);
const response = await axios__default["default"].post(path, body, {
baseURL: baseUrl,
timeout: this.timeout,
headers,
});
const xml = (await xml2js__default["default"].parseStringPromise(response.data));
return new inspectionInfo.InspectionInfoDto(xml);
}
}
exports.MapleStoryApi = MapleStoryApi;