maplestory-openapi 3.4.1 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/dist/cjs/maplestory/api/common/lib.js +16 -0
- package/dist/cjs/maplestory/api/common/mapleStoryApi.js +25 -0
- package/dist/cjs/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
- package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +1 -1
- package/dist/cjs/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
- package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +98 -11
- package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +79 -1
- package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +79 -1
- package/dist/esm/maplestory/api/common/lib.js +16 -1
- package/dist/esm/maplestory/api/common/mapleStoryApi.js +25 -0
- package/dist/esm/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
- package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +1 -1
- package/dist/esm/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
- package/dist/esm/maplestory/api/kms/mapleStoryApi.js +98 -11
- package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/msea/mapleStoryApi.js +79 -1
- package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/tms/mapleStoryApi.js +79 -1
- package/dist/index.min.js +1 -1
- package/package.json +4 -3
- package/types/maplestory/api/common/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/common/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/common/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/common/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/common/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/common/lib.d.ts +9 -0
- package/types/maplestory/api/common/mapleStoryApi.d.ts +36 -25
- package/types/maplestory/api/kms/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterAndroidEquipment.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/kms/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/kms/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/kms/dto/history/starforceHistory.d.ts +4 -4
- package/types/maplestory/api/kms/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/kms/mapleStoryApi.d.ts +32 -32
- package/types/maplestory/api/kms/response/character/characterAndroidEquipmentBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/union/unionRaiderBody.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/msea/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/msea/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/msea/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/msea/mapleStoryApi.d.ts +25 -25
- package/types/maplestory/api/msea/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/msea/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/msea/response/union/unionRaiderBody.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/tms/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/tms/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/tms/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/tms/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/tms/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/tms/mapleStoryApi.d.ts +25 -25
- package/types/maplestory/api/tms/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/tms/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/tms/response/union/unionRaiderBody.d.ts +1 -1
package/README.md
CHANGED
|
@@ -10,12 +10,13 @@ Packages written in other languages can be found [HERE](https://github.com/Spira
|
|
|
10
10
|
English | [한국어](./README-ko.md)
|
|
11
11
|
|
|
12
12
|
## Notice
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
>💡 Notice 1: Migration is required when updating to version 3.5.0. Please refer to the documentation for [Migration](https://github.com/SpiralMoon/maplestory.openapi/tree/master/js/docs/migration-en.md).
|
|
14
|
+
>
|
|
15
|
+
>🌏 Notice 2: Starting from version 3.4.0, support for tms region has been added. You can now retrieve data from [KMS](https://maplestory.nexon.com/), [TMS](https://maplestory.beanfun.com/), [MSEA](http://www.maplesea.com/index/).
|
|
15
16
|
>
|
|
16
|
-
>🌏 Notice
|
|
17
|
+
>🌏 Notice 3: Starting from version 3.0.0, support for msea region has been added.
|
|
17
18
|
>
|
|
18
|
-
>💡 Notice
|
|
19
|
+
>💡 Notice 4: Migration is required when updating from version 2.x.x to 3.0.0. Please refer to the documentation for [Migration](https://github.com/SpiralMoon/maplestory.openapi/tree/master/js/docs/migration-en.md).
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
21
22
|
|
|
@@ -99,12 +100,12 @@ try {
|
|
|
99
100
|
|
|
100
101
|
You can find more examples in the test cases at the following link.
|
|
101
102
|
|
|
102
|
-
- [Character Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/characterApi.test.ts)
|
|
103
|
-
- [Union Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/unionApi.test.ts)
|
|
104
|
-
- [Guild Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/guildApi.test.ts)
|
|
105
|
-
- [History Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/historyApi.test.ts)
|
|
106
|
-
- [Ranking Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/rankingApi.test.ts)
|
|
107
|
-
- [Notice Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/noticeApi.test.ts)
|
|
103
|
+
- [Character Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/characterApi.test.ts)
|
|
104
|
+
- [Union Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/unionApi.test.ts)
|
|
105
|
+
- [Guild Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/guildApi.test.ts)
|
|
106
|
+
- [History Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/historyApi.test.ts)
|
|
107
|
+
- [Ranking Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/rankingApi.test.ts)
|
|
108
|
+
- [Notice Information Retrieval](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/kms/noticeApi.test.ts)
|
|
108
109
|
|
|
109
110
|
### Features
|
|
110
111
|
This library supports all apis published in the MapleStory OpenAPI official docs.
|
|
@@ -22,5 +22,21 @@ const potentialOptionGradeFromString = (text) => {
|
|
|
22
22
|
}
|
|
23
23
|
return grade;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* URL에서 Query를 제거합니다.
|
|
27
|
+
* @param url URL
|
|
28
|
+
* @example
|
|
29
|
+
* ```
|
|
30
|
+
* removeQuery('https://example.com/path?query=123&test=abc') // returns 'https://example.com/path'
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
const removeQuery = (url) => {
|
|
34
|
+
if (!url) {
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
const queryIndex = url.indexOf('?');
|
|
38
|
+
return queryIndex >= 0 ? url.substring(0, queryIndex) : url;
|
|
39
|
+
};
|
|
25
40
|
|
|
26
41
|
exports.potentialOptionGradeFromString = potentialOptionGradeFromString;
|
|
42
|
+
exports.removeQuery = removeQuery;
|
|
@@ -116,6 +116,31 @@ class MapleStoryApi {
|
|
|
116
116
|
return str;
|
|
117
117
|
}
|
|
118
118
|
;
|
|
119
|
+
/**
|
|
120
|
+
* API 응답 데이터가 비어있는지 확인 합니다.<br/>
|
|
121
|
+
* API 요청 시 날짜에 해당하는 데이터가 없을 경우 date 필드만 값이 존재하는 상황을 검증할 때 사용 합니다.<br/>
|
|
122
|
+
* 일반적으로 API 지원 시작일과 캐릭터 생성일 사이의 날짜를 조회할 때 발생 합니다.
|
|
123
|
+
* @example
|
|
124
|
+
* ```
|
|
125
|
+
* isEmptyResponse({ date: '2024-01-01', popularity: null }) // true
|
|
126
|
+
* isEmptyResponse({ date: '2024-01-01', popularity: 10 }) // false
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
isEmptyResponse(body) {
|
|
130
|
+
for (const [key, value] of Object.entries(body)) {
|
|
131
|
+
if (key === 'date') {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (value === null || value === undefined) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
119
144
|
}
|
|
120
145
|
|
|
121
146
|
exports.MapleStoryApi = MapleStoryApi;
|
|
@@ -98,7 +98,7 @@ class CharacterAndroidEquipmentDto extends characterAndroidEquipment.CharacterAn
|
|
|
98
98
|
? new CharacterAndroidEquipmentSkinDto(android_skin)
|
|
99
99
|
: null;
|
|
100
100
|
this.androidCashItemEquipment = android_cash_item_equipment.map((equipment) => new CharacterAndroidCashItemEquipmentDto(equipment));
|
|
101
|
-
this.androidEarSensorClipFlag = android_ear_sensor_clip_flag
|
|
101
|
+
this.androidEarSensorClipFlag = android_ear_sensor_clip_flag;
|
|
102
102
|
this.androidGender = android_gender;
|
|
103
103
|
this.androidGrade = android_grade;
|
|
104
104
|
this.androidNonHumanoidFlag = android_non_humanoid_flag;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var characterBasic = require('../../../common/dto/character/characterBasic.js');
|
|
6
|
+
var lib = require('../../../common/lib.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* 캐릭터 기본 정보
|
|
@@ -77,8 +78,8 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
|
|
|
77
78
|
this.characterExp = character_exp;
|
|
78
79
|
this.characterExpRate = character_exp_rate;
|
|
79
80
|
this.characterGuildName = character_guild_name;
|
|
80
|
-
this.characterImage = character_image;
|
|
81
|
-
this.characterDateCreate = new Date(character_date_create);
|
|
81
|
+
this.characterImage = lib.removeQuery(character_image);
|
|
82
|
+
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
82
83
|
this.accessFlag = access_flag;
|
|
83
84
|
this.liberationQuestClear = liberation_quest_clear;
|
|
84
85
|
}
|
|
@@ -33,7 +33,7 @@ class CharacterRingExchangeSkillEquipmentDto {
|
|
|
33
33
|
constructor(obj) {
|
|
34
34
|
const { date, character_class, special_ring_exchange_name, special_ring_exchange_level, special_ring_exchange_icon, special_ring_exchange_description } = obj;
|
|
35
35
|
this.date = date ? new Date(date) : null;
|
|
36
|
-
this.characterClass = character_class
|
|
36
|
+
this.characterClass = character_class;
|
|
37
37
|
this.specialRingExchangeName = special_ring_exchange_name ?? null;
|
|
38
38
|
this.specialRingExchangeLevel = special_ring_exchange_level ?? null;
|
|
39
39
|
this.specialRingExchangeIcon = special_ring_exchange_icon ?? null;
|
|
@@ -56,6 +56,7 @@ var achievement = require('./dto/user/achievement.js');
|
|
|
56
56
|
var characterList = require('./dto/user/characterList.js');
|
|
57
57
|
var characterImage = require('../common/enum/characterImage.js');
|
|
58
58
|
var mapleStoryApi = require('../common/mapleStoryApi.js');
|
|
59
|
+
var lib = require('../common/lib.js');
|
|
59
60
|
var index = require('../../../_virtual/index.js_commonjs-exports.js');
|
|
60
61
|
|
|
61
62
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -146,6 +147,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
146
147
|
const { data } = await this.client.get(path, {
|
|
147
148
|
params: query,
|
|
148
149
|
});
|
|
150
|
+
if (this.isEmptyResponse(data)) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
149
153
|
return new characterBasic.CharacterBasicDto(data);
|
|
150
154
|
}
|
|
151
155
|
/**
|
|
@@ -161,7 +165,11 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
161
165
|
* @param dateOptions 조회 기준일 (KST)
|
|
162
166
|
*/
|
|
163
167
|
async getCharacterImage(ocid, imageOptions, dateOptions) {
|
|
164
|
-
const
|
|
168
|
+
const basic = await this.getCharacterBasic(ocid, dateOptions);
|
|
169
|
+
if (!basic) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
const { date, characterImage: characterImage$2 } = basic;
|
|
165
173
|
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
|
|
166
174
|
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
|
|
167
175
|
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
|
|
@@ -171,6 +179,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
171
179
|
const height = 300;
|
|
172
180
|
const x = 150;
|
|
173
181
|
const y = 200;
|
|
182
|
+
const path = lib.removeQuery(characterImage$2);
|
|
174
183
|
const query = {
|
|
175
184
|
action: `${action}.${actionFrame}`,
|
|
176
185
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -232,6 +241,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
232
241
|
const { data } = await this.client.get(path, {
|
|
233
242
|
params: query,
|
|
234
243
|
});
|
|
244
|
+
if (this.isEmptyResponse(data)) {
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
235
247
|
return new characterPopularity.CharacterPopularityDto(data);
|
|
236
248
|
}
|
|
237
249
|
/**
|
|
@@ -261,6 +273,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
261
273
|
const { data } = await this.client.get(path, {
|
|
262
274
|
params: query,
|
|
263
275
|
});
|
|
276
|
+
if (this.isEmptyResponse(data)) {
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
264
279
|
return new characterStat.CharacterStatDto(data);
|
|
265
280
|
}
|
|
266
281
|
/**
|
|
@@ -290,6 +305,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
290
305
|
const { data } = await this.client.get(path, {
|
|
291
306
|
params: query,
|
|
292
307
|
});
|
|
308
|
+
if (this.isEmptyResponse(data)) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
293
311
|
return new characterHyperStat.CharacterHyperStatDto(data);
|
|
294
312
|
}
|
|
295
313
|
/**
|
|
@@ -319,6 +337,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
319
337
|
const { data } = await this.client.get(path, {
|
|
320
338
|
params: query,
|
|
321
339
|
});
|
|
340
|
+
if (this.isEmptyResponse(data)) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
322
343
|
return new characterPropensity.CharacterPropensityDto(data);
|
|
323
344
|
}
|
|
324
345
|
/**
|
|
@@ -348,6 +369,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
348
369
|
const { data } = await this.client.get(path, {
|
|
349
370
|
params: query,
|
|
350
371
|
});
|
|
372
|
+
if (this.isEmptyResponse(data)) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
351
375
|
return new characterAbility.CharacterAbilityDto(data);
|
|
352
376
|
}
|
|
353
377
|
/**
|
|
@@ -377,6 +401,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
377
401
|
const { data } = await this.client.get(path, {
|
|
378
402
|
params: query,
|
|
379
403
|
});
|
|
404
|
+
if (this.isEmptyResponse(data)) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
380
407
|
return new characterItemEquipment.CharacterItemEquipmentDto(data);
|
|
381
408
|
}
|
|
382
409
|
/**
|
|
@@ -406,6 +433,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
406
433
|
const { data } = await this.client.get(path, {
|
|
407
434
|
params: query,
|
|
408
435
|
});
|
|
436
|
+
if (this.isEmptyResponse(data)) {
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
409
439
|
return new characterCashItemEquipment.CharacterCashItemEquipmentDto(data);
|
|
410
440
|
}
|
|
411
441
|
/**
|
|
@@ -435,6 +465,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
435
465
|
const { data } = await this.client.get(path, {
|
|
436
466
|
params: query,
|
|
437
467
|
});
|
|
468
|
+
if (this.isEmptyResponse(data)) {
|
|
469
|
+
return null;
|
|
470
|
+
}
|
|
438
471
|
return new characterSymbolEquipment.CharacterSymbolEquipmentDto(data);
|
|
439
472
|
}
|
|
440
473
|
/**
|
|
@@ -464,6 +497,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
464
497
|
const { data } = await this.client.get(path, {
|
|
465
498
|
params: query,
|
|
466
499
|
});
|
|
500
|
+
if (this.isEmptyResponse(data)) {
|
|
501
|
+
return null;
|
|
502
|
+
}
|
|
467
503
|
return new characterSetEffect.CharacterSetEffectDto(data);
|
|
468
504
|
}
|
|
469
505
|
/**
|
|
@@ -493,6 +529,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
493
529
|
const { data } = await this.client.get(path, {
|
|
494
530
|
params: query,
|
|
495
531
|
});
|
|
532
|
+
if (this.isEmptyResponse(data)) {
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
496
535
|
return new characterBeautyEquipment.CharacterBeautyEquipmentDto(data);
|
|
497
536
|
}
|
|
498
537
|
/**
|
|
@@ -522,6 +561,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
522
561
|
const { data } = await this.client.get(path, {
|
|
523
562
|
params: query,
|
|
524
563
|
});
|
|
564
|
+
if (this.isEmptyResponse(data)) {
|
|
565
|
+
return null;
|
|
566
|
+
}
|
|
525
567
|
return new characterAndroidEquipment.CharacterAndroidEquipmentDto(data);
|
|
526
568
|
}
|
|
527
569
|
/**
|
|
@@ -551,6 +593,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
551
593
|
const { data } = await this.client.get(path, {
|
|
552
594
|
params: query,
|
|
553
595
|
});
|
|
596
|
+
if (this.isEmptyResponse(data)) {
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
554
599
|
return new characterPetEquipment.CharacterPetEquipmentDto(data);
|
|
555
600
|
}
|
|
556
601
|
/**
|
|
@@ -582,6 +627,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
582
627
|
const { data } = await this.client.get(path, {
|
|
583
628
|
params: query,
|
|
584
629
|
});
|
|
630
|
+
if (this.isEmptyResponse(data)) {
|
|
631
|
+
return null;
|
|
632
|
+
}
|
|
585
633
|
return new characterSkill.CharacterSkillDto(data);
|
|
586
634
|
}
|
|
587
635
|
/**
|
|
@@ -611,6 +659,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
611
659
|
const { data } = await this.client.get(path, {
|
|
612
660
|
params: query,
|
|
613
661
|
});
|
|
662
|
+
if (this.isEmptyResponse(data)) {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
614
665
|
return new characterLinkSkill.CharacterLinkSkillDto(data);
|
|
615
666
|
}
|
|
616
667
|
/**
|
|
@@ -640,6 +691,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
640
691
|
const { data } = await this.client.get(path, {
|
|
641
692
|
params: query,
|
|
642
693
|
});
|
|
694
|
+
if (this.isEmptyResponse(data)) {
|
|
695
|
+
return null;
|
|
696
|
+
}
|
|
643
697
|
return new characterVMatrix.CharacterVMatrixDto(data);
|
|
644
698
|
}
|
|
645
699
|
/**
|
|
@@ -669,6 +723,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
669
723
|
const { data } = await this.client.get(path, {
|
|
670
724
|
params: query,
|
|
671
725
|
});
|
|
726
|
+
if (this.isEmptyResponse(data)) {
|
|
727
|
+
return null;
|
|
728
|
+
}
|
|
672
729
|
return new characterHexaMatrix.CharacterHexaMatrixDto(data);
|
|
673
730
|
}
|
|
674
731
|
/**
|
|
@@ -698,6 +755,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
698
755
|
const { data } = await this.client.get(path, {
|
|
699
756
|
params: query,
|
|
700
757
|
});
|
|
758
|
+
if (this.isEmptyResponse(data)) {
|
|
759
|
+
return null;
|
|
760
|
+
}
|
|
701
761
|
return new characterHexaMatrixStat.CharacterHexaMatrixStatDto(data);
|
|
702
762
|
}
|
|
703
763
|
/**
|
|
@@ -727,6 +787,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
727
787
|
const { data } = await this.client.get(path, {
|
|
728
788
|
params: query,
|
|
729
789
|
});
|
|
790
|
+
if (this.isEmptyResponse(data)) {
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
730
793
|
return new characterDojang.CharacterDojangDto(data);
|
|
731
794
|
}
|
|
732
795
|
/**
|
|
@@ -756,6 +819,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
756
819
|
const { data } = await this.client.get(path, {
|
|
757
820
|
params: query,
|
|
758
821
|
});
|
|
822
|
+
if (this.isEmptyResponse(data)) {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
759
825
|
return new characterOtherStat.CharacterOtherStatDto(data);
|
|
760
826
|
}
|
|
761
827
|
/**
|
|
@@ -785,6 +851,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
785
851
|
const { data } = await this.client.get(path, {
|
|
786
852
|
params: query,
|
|
787
853
|
});
|
|
854
|
+
if (this.isEmptyResponse(data)) {
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
788
857
|
return new characterRingExchangeSkillEquipment.CharacterRingExchangeSkillEquipmentDto(data);
|
|
789
858
|
}
|
|
790
859
|
//#endregion
|
|
@@ -816,6 +885,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
816
885
|
const { data } = await this.client.get(path, {
|
|
817
886
|
params: query,
|
|
818
887
|
});
|
|
888
|
+
if (this.isEmptyResponse(data)) {
|
|
889
|
+
return null;
|
|
890
|
+
}
|
|
819
891
|
return new union.UnionDto(data);
|
|
820
892
|
}
|
|
821
893
|
/**
|
|
@@ -845,12 +917,15 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
845
917
|
const { data } = await this.client.get(path, {
|
|
846
918
|
params: query,
|
|
847
919
|
});
|
|
920
|
+
if (this.isEmptyResponse(data)) {
|
|
921
|
+
return null;
|
|
922
|
+
}
|
|
848
923
|
return new unionRaider.UnionRaiderDto(data);
|
|
849
924
|
}
|
|
850
925
|
/**
|
|
851
926
|
* 유니온 아티팩트 정보를 조회합니다.
|
|
852
927
|
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
|
|
853
|
-
* -
|
|
928
|
+
* - 2024년 1월 18일 데이터부터 조회할 수 있습니다.
|
|
854
929
|
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
|
|
855
930
|
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
|
|
856
931
|
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
|
|
@@ -862,9 +937,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
862
937
|
const path = `${this.subUrl}/v1/user/union-artifact`;
|
|
863
938
|
const date = dateOptions
|
|
864
939
|
? this.toDateString(dateOptions, {
|
|
865
|
-
year:
|
|
866
|
-
month:
|
|
867
|
-
day:
|
|
940
|
+
year: 2024,
|
|
941
|
+
month: 1,
|
|
942
|
+
day: 18,
|
|
868
943
|
})
|
|
869
944
|
: undefined;
|
|
870
945
|
const query = {
|
|
@@ -874,13 +949,16 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
874
949
|
const { data } = await this.client.get(path, {
|
|
875
950
|
params: query,
|
|
876
951
|
});
|
|
952
|
+
if (this.isEmptyResponse(data)) {
|
|
953
|
+
return null;
|
|
954
|
+
}
|
|
877
955
|
return new unionArtifact.UnionArtifactDto(data);
|
|
878
956
|
}
|
|
879
957
|
/**
|
|
880
958
|
* 유니온 챔피언 정보를 조회합니다.<br>
|
|
881
959
|
* 유니온 챔피언 정보는 2025년 2월 20일 메이플스토리 점검 이후 데이터부터 조회 가능합니다.<br>
|
|
882
960
|
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
|
|
883
|
-
* -
|
|
961
|
+
* - 2025년 2월 20일 데이터부터 조회할 수 있습니다.
|
|
884
962
|
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
|
|
885
963
|
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
|
|
886
964
|
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
|
|
@@ -892,9 +970,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
892
970
|
const path = `${this.subUrl}/v1/user/union-champion`;
|
|
893
971
|
const date = dateOptions
|
|
894
972
|
? this.toDateString(dateOptions, {
|
|
895
|
-
year:
|
|
896
|
-
month:
|
|
897
|
-
day:
|
|
973
|
+
year: 2025,
|
|
974
|
+
month: 2,
|
|
975
|
+
day: 20,
|
|
898
976
|
})
|
|
899
977
|
: undefined;
|
|
900
978
|
const query = {
|
|
@@ -904,6 +982,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
904
982
|
const { data } = await this.client.get(path, {
|
|
905
983
|
params: query,
|
|
906
984
|
});
|
|
985
|
+
if (this.isEmptyResponse(data)) {
|
|
986
|
+
return null;
|
|
987
|
+
}
|
|
907
988
|
return new unionChampion.UnionChampionDto(data);
|
|
908
989
|
}
|
|
909
990
|
//#endregion
|
|
@@ -927,6 +1008,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
927
1008
|
world_name: worldName,
|
|
928
1009
|
},
|
|
929
1010
|
});
|
|
1011
|
+
if (this.isEmptyResponse(data)) {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
930
1014
|
return new guild.GuildDto(data);
|
|
931
1015
|
}
|
|
932
1016
|
/**
|
|
@@ -956,6 +1040,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
956
1040
|
const { data } = await this.client.get(path, {
|
|
957
1041
|
params: query,
|
|
958
1042
|
});
|
|
1043
|
+
if (this.isEmptyResponse(data)) {
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
959
1046
|
return new guildBasic.GuildBasicDto(data);
|
|
960
1047
|
}
|
|
961
1048
|
async getStarforceHistory(count, parameter) {
|
|
@@ -1124,10 +1211,10 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
1124
1211
|
ranking_type: 0,
|
|
1125
1212
|
};
|
|
1126
1213
|
if (filterOptions) {
|
|
1127
|
-
const { worldName, rankingType,
|
|
1214
|
+
const { worldName, rankingType, guildName, page } = filterOptions;
|
|
1128
1215
|
query.world_name = worldName;
|
|
1129
1216
|
query.ranking_type = rankingType;
|
|
1130
|
-
query.
|
|
1217
|
+
query.guild_name = guildName;
|
|
1131
1218
|
query.page = page;
|
|
1132
1219
|
}
|
|
1133
1220
|
const { data } = await this.client.get(path, {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var characterBasic = require('../../../common/dto/character/characterBasic.js');
|
|
6
|
+
var lib = require('../../../common/lib.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Character basic information
|
|
@@ -77,8 +78,8 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
|
|
|
77
78
|
this.characterExp = character_exp;
|
|
78
79
|
this.characterExpRate = character_exp_rate;
|
|
79
80
|
this.characterGuildName = character_guild_name;
|
|
80
|
-
this.characterImage = character_image;
|
|
81
|
-
this.characterDateCreate = new Date(character_date_create);
|
|
81
|
+
this.characterImage = lib.removeQuery(character_image);
|
|
82
|
+
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
82
83
|
this.accessFlag = access_flag;
|
|
83
84
|
this.liberationQuestClearFlag = liberation_quest_clear_flag;
|
|
84
85
|
}
|