maplestory-openapi 3.4.0 → 3.5.0

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.
Files changed (97) hide show
  1. package/README.md +11 -10
  2. package/dist/cjs/maplestory/api/common/mapleStoryApi.js +25 -0
  3. package/dist/cjs/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
  4. package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +1 -1
  5. package/dist/cjs/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +12 -2
  6. package/dist/cjs/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
  7. package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +96 -11
  8. package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +1 -1
  9. package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +77 -1
  10. package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +1 -1
  11. package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +77 -1
  12. package/dist/esm/maplestory/api/common/mapleStoryApi.js +25 -0
  13. package/dist/esm/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
  14. package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +1 -1
  15. package/dist/esm/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +12 -2
  16. package/dist/esm/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
  17. package/dist/esm/maplestory/api/kms/mapleStoryApi.js +96 -11
  18. package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +1 -1
  19. package/dist/esm/maplestory/api/msea/mapleStoryApi.js +77 -1
  20. package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +1 -1
  21. package/dist/esm/maplestory/api/tms/mapleStoryApi.js +77 -1
  22. package/dist/index.min.js +1 -1
  23. package/package.json +4 -3
  24. package/types/maplestory/api/common/dto/character/characterAbility.d.ts +2 -2
  25. package/types/maplestory/api/common/dto/character/characterBasic.d.ts +1 -1
  26. package/types/maplestory/api/common/dto/character/characterCashItemEquipment.d.ts +3 -3
  27. package/types/maplestory/api/common/dto/character/characterDojang.d.ts +4 -4
  28. package/types/maplestory/api/common/dto/character/characterHexaMatrixStat.d.ts +1 -1
  29. package/types/maplestory/api/common/dto/character/characterHyperStat.d.ts +6 -6
  30. package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +2 -2
  31. package/types/maplestory/api/common/dto/character/characterLinkSkill.d.ts +1 -1
  32. package/types/maplestory/api/common/dto/character/characterPropensity.d.ts +6 -6
  33. package/types/maplestory/api/common/dto/character/characterSkill.d.ts +1 -1
  34. package/types/maplestory/api/common/dto/character/characterStat.d.ts +2 -2
  35. package/types/maplestory/api/common/dto/character/characterSymbolEquipment.d.ts +1 -1
  36. package/types/maplestory/api/common/dto/character/characterVMatrix.d.ts +2 -2
  37. package/types/maplestory/api/common/dto/union/unionRaider.d.ts +1 -1
  38. package/types/maplestory/api/common/mapleStoryApi.d.ts +36 -25
  39. package/types/maplestory/api/kms/dto/character/characterAbility.d.ts +2 -2
  40. package/types/maplestory/api/kms/dto/character/characterAndroidEquipment.d.ts +1 -1
  41. package/types/maplestory/api/kms/dto/character/characterBasic.d.ts +1 -1
  42. package/types/maplestory/api/kms/dto/character/characterCashItemEquipment.d.ts +3 -3
  43. package/types/maplestory/api/kms/dto/character/characterDojang.d.ts +4 -4
  44. package/types/maplestory/api/kms/dto/character/characterHexaMatrixStat.d.ts +1 -1
  45. package/types/maplestory/api/kms/dto/character/characterHyperStat.d.ts +6 -6
  46. package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +2 -2
  47. package/types/maplestory/api/kms/dto/character/characterLinkSkill.d.ts +1 -1
  48. package/types/maplestory/api/kms/dto/character/characterPropensity.d.ts +6 -6
  49. package/types/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.d.ts +8 -0
  50. package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +1 -1
  51. package/types/maplestory/api/kms/dto/character/characterStat.d.ts +2 -2
  52. package/types/maplestory/api/kms/dto/character/characterSymbolEquipment.d.ts +1 -1
  53. package/types/maplestory/api/kms/dto/character/characterVMatrix.d.ts +2 -2
  54. package/types/maplestory/api/kms/dto/history/starforceHistory.d.ts +4 -4
  55. package/types/maplestory/api/kms/dto/union/unionRaider.d.ts +1 -1
  56. package/types/maplestory/api/kms/mapleStoryApi.d.ts +32 -32
  57. package/types/maplestory/api/kms/response/character/characterAndroidEquipmentBody.d.ts +1 -1
  58. package/types/maplestory/api/kms/response/character/characterBasicBody.d.ts +1 -1
  59. package/types/maplestory/api/kms/response/character/characterPopularityBody.d.ts +1 -1
  60. package/types/maplestory/api/kms/response/character/characterRingExchangeSkillEquipmentBody.d.ts +2 -0
  61. package/types/maplestory/api/kms/response/union/unionRaiderBody.d.ts +1 -1
  62. package/types/maplestory/api/msea/dto/character/characterAbility.d.ts +2 -2
  63. package/types/maplestory/api/msea/dto/character/characterBasic.d.ts +1 -1
  64. package/types/maplestory/api/msea/dto/character/characterCashItemEquipment.d.ts +3 -3
  65. package/types/maplestory/api/msea/dto/character/characterDojang.d.ts +4 -4
  66. package/types/maplestory/api/msea/dto/character/characterHexaMatrixStat.d.ts +1 -1
  67. package/types/maplestory/api/msea/dto/character/characterHyperStat.d.ts +6 -6
  68. package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +2 -2
  69. package/types/maplestory/api/msea/dto/character/characterLinkSkill.d.ts +1 -1
  70. package/types/maplestory/api/msea/dto/character/characterPropensity.d.ts +6 -6
  71. package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +1 -1
  72. package/types/maplestory/api/msea/dto/character/characterStat.d.ts +2 -2
  73. package/types/maplestory/api/msea/dto/character/characterSymbolEquipment.d.ts +1 -1
  74. package/types/maplestory/api/msea/dto/character/characterVMatrix.d.ts +2 -2
  75. package/types/maplestory/api/msea/dto/union/unionRaider.d.ts +1 -1
  76. package/types/maplestory/api/msea/mapleStoryApi.d.ts +25 -25
  77. package/types/maplestory/api/msea/response/character/characterBasicBody.d.ts +1 -1
  78. package/types/maplestory/api/msea/response/character/characterPopularityBody.d.ts +1 -1
  79. package/types/maplestory/api/msea/response/union/unionRaiderBody.d.ts +1 -1
  80. package/types/maplestory/api/tms/dto/character/characterAbility.d.ts +2 -2
  81. package/types/maplestory/api/tms/dto/character/characterBasic.d.ts +1 -1
  82. package/types/maplestory/api/tms/dto/character/characterCashItemEquipment.d.ts +3 -3
  83. package/types/maplestory/api/tms/dto/character/characterDojang.d.ts +4 -4
  84. package/types/maplestory/api/tms/dto/character/characterHexaMatrixStat.d.ts +1 -1
  85. package/types/maplestory/api/tms/dto/character/characterHyperStat.d.ts +6 -6
  86. package/types/maplestory/api/tms/dto/character/characterItemEquipment.d.ts +2 -2
  87. package/types/maplestory/api/tms/dto/character/characterLinkSkill.d.ts +1 -1
  88. package/types/maplestory/api/tms/dto/character/characterPropensity.d.ts +6 -6
  89. package/types/maplestory/api/tms/dto/character/characterSkill.d.ts +1 -1
  90. package/types/maplestory/api/tms/dto/character/characterStat.d.ts +2 -2
  91. package/types/maplestory/api/tms/dto/character/characterSymbolEquipment.d.ts +1 -1
  92. package/types/maplestory/api/tms/dto/character/characterVMatrix.d.ts +2 -2
  93. package/types/maplestory/api/tms/dto/union/unionRaider.d.ts +1 -1
  94. package/types/maplestory/api/tms/mapleStoryApi.d.ts +25 -25
  95. package/types/maplestory/api/tms/response/character/characterBasicBody.d.ts +1 -1
  96. package/types/maplestory/api/tms/response/character/characterPopularityBody.d.ts +1 -1
  97. 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
- >🌏 Notice 1: 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/).
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 2: Starting from version 3.0.0, support for msea region has been added.
17
+ >🌏 Notice 3: Starting from version 3.0.0, support for msea region has been added.
17
18
  >
18
- >💡 Notice 3: 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
+ >💡 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.
@@ -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 ?? null;
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;
@@ -78,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
78
78
  this.characterExpRate = character_exp_rate;
79
79
  this.characterGuildName = character_guild_name;
80
80
  this.characterImage = character_image;
81
- this.characterDateCreate = new Date(character_date_create);
81
+ this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
82
82
  this.accessFlag = access_flag;
83
83
  this.liberationQuestClear = liberation_quest_clear;
84
84
  }
@@ -22,12 +22,22 @@ class CharacterRingExchangeSkillEquipmentDto {
22
22
  * 링 익스체인지에 등록된 특수 반지 레벨
23
23
  */
24
24
  specialRingExchangeLevel;
25
+ /**
26
+ * 링 익스체인지에 등록된 특수 반지 아이콘
27
+ */
28
+ specialRingExchangeIcon;
29
+ /**
30
+ * 링 익스체인지에 등록된 특수 반지 설명
31
+ */
32
+ specialRingExchangeDescription;
25
33
  constructor(obj) {
26
- const { date, character_class, special_ring_exchange_name, special_ring_exchange_level } = obj;
34
+ const { date, character_class, special_ring_exchange_name, special_ring_exchange_level, special_ring_exchange_icon, special_ring_exchange_description } = obj;
27
35
  this.date = date ? new Date(date) : null;
28
- this.characterClass = character_class ?? '';
36
+ this.characterClass = character_class;
29
37
  this.specialRingExchangeName = special_ring_exchange_name ?? null;
30
38
  this.specialRingExchangeLevel = special_ring_exchange_level ?? null;
39
+ this.specialRingExchangeIcon = special_ring_exchange_icon ?? null;
40
+ this.specialRingExchangeDescription = special_ring_exchange_description ?? null;
31
41
  }
32
42
  }
33
43
 
@@ -94,7 +94,7 @@ class StarforceHistoryDto {
94
94
  this.dateCreate = new Date(date_create);
95
95
  this.starforceEventList =
96
96
  starforce_event_list?.map((event) => new StarforceEventDto(event)) ??
97
- null;
97
+ [];
98
98
  }
99
99
  }
100
100
  /**
@@ -146,6 +146,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
146
146
  const { data } = await this.client.get(path, {
147
147
  params: query,
148
148
  });
149
+ if (this.isEmptyResponse(data)) {
150
+ return null;
151
+ }
149
152
  return new characterBasic.CharacterBasicDto(data);
150
153
  }
151
154
  /**
@@ -161,7 +164,11 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
161
164
  * @param dateOptions 조회 기준일 (KST)
162
165
  */
163
166
  async getCharacterImage(ocid, imageOptions, dateOptions) {
164
- const { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
167
+ const basic = await this.getCharacterBasic(ocid, dateOptions);
168
+ if (!basic) {
169
+ return null;
170
+ }
171
+ const { date, characterImage: path } = basic;
165
172
  const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
166
173
  const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
167
174
  const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
@@ -232,6 +239,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
232
239
  const { data } = await this.client.get(path, {
233
240
  params: query,
234
241
  });
242
+ if (this.isEmptyResponse(data)) {
243
+ return null;
244
+ }
235
245
  return new characterPopularity.CharacterPopularityDto(data);
236
246
  }
237
247
  /**
@@ -261,6 +271,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
261
271
  const { data } = await this.client.get(path, {
262
272
  params: query,
263
273
  });
274
+ if (this.isEmptyResponse(data)) {
275
+ return null;
276
+ }
264
277
  return new characterStat.CharacterStatDto(data);
265
278
  }
266
279
  /**
@@ -290,6 +303,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
290
303
  const { data } = await this.client.get(path, {
291
304
  params: query,
292
305
  });
306
+ if (this.isEmptyResponse(data)) {
307
+ return null;
308
+ }
293
309
  return new characterHyperStat.CharacterHyperStatDto(data);
294
310
  }
295
311
  /**
@@ -319,6 +335,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
319
335
  const { data } = await this.client.get(path, {
320
336
  params: query,
321
337
  });
338
+ if (this.isEmptyResponse(data)) {
339
+ return null;
340
+ }
322
341
  return new characterPropensity.CharacterPropensityDto(data);
323
342
  }
324
343
  /**
@@ -348,6 +367,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
348
367
  const { data } = await this.client.get(path, {
349
368
  params: query,
350
369
  });
370
+ if (this.isEmptyResponse(data)) {
371
+ return null;
372
+ }
351
373
  return new characterAbility.CharacterAbilityDto(data);
352
374
  }
353
375
  /**
@@ -377,6 +399,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
377
399
  const { data } = await this.client.get(path, {
378
400
  params: query,
379
401
  });
402
+ if (this.isEmptyResponse(data)) {
403
+ return null;
404
+ }
380
405
  return new characterItemEquipment.CharacterItemEquipmentDto(data);
381
406
  }
382
407
  /**
@@ -406,6 +431,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
406
431
  const { data } = await this.client.get(path, {
407
432
  params: query,
408
433
  });
434
+ if (this.isEmptyResponse(data)) {
435
+ return null;
436
+ }
409
437
  return new characterCashItemEquipment.CharacterCashItemEquipmentDto(data);
410
438
  }
411
439
  /**
@@ -435,6 +463,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
435
463
  const { data } = await this.client.get(path, {
436
464
  params: query,
437
465
  });
466
+ if (this.isEmptyResponse(data)) {
467
+ return null;
468
+ }
438
469
  return new characterSymbolEquipment.CharacterSymbolEquipmentDto(data);
439
470
  }
440
471
  /**
@@ -464,6 +495,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
464
495
  const { data } = await this.client.get(path, {
465
496
  params: query,
466
497
  });
498
+ if (this.isEmptyResponse(data)) {
499
+ return null;
500
+ }
467
501
  return new characterSetEffect.CharacterSetEffectDto(data);
468
502
  }
469
503
  /**
@@ -493,6 +527,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
493
527
  const { data } = await this.client.get(path, {
494
528
  params: query,
495
529
  });
530
+ if (this.isEmptyResponse(data)) {
531
+ return null;
532
+ }
496
533
  return new characterBeautyEquipment.CharacterBeautyEquipmentDto(data);
497
534
  }
498
535
  /**
@@ -522,6 +559,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
522
559
  const { data } = await this.client.get(path, {
523
560
  params: query,
524
561
  });
562
+ if (this.isEmptyResponse(data)) {
563
+ return null;
564
+ }
525
565
  return new characterAndroidEquipment.CharacterAndroidEquipmentDto(data);
526
566
  }
527
567
  /**
@@ -551,6 +591,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
551
591
  const { data } = await this.client.get(path, {
552
592
  params: query,
553
593
  });
594
+ if (this.isEmptyResponse(data)) {
595
+ return null;
596
+ }
554
597
  return new characterPetEquipment.CharacterPetEquipmentDto(data);
555
598
  }
556
599
  /**
@@ -582,6 +625,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
582
625
  const { data } = await this.client.get(path, {
583
626
  params: query,
584
627
  });
628
+ if (this.isEmptyResponse(data)) {
629
+ return null;
630
+ }
585
631
  return new characterSkill.CharacterSkillDto(data);
586
632
  }
587
633
  /**
@@ -611,6 +657,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
611
657
  const { data } = await this.client.get(path, {
612
658
  params: query,
613
659
  });
660
+ if (this.isEmptyResponse(data)) {
661
+ return null;
662
+ }
614
663
  return new characterLinkSkill.CharacterLinkSkillDto(data);
615
664
  }
616
665
  /**
@@ -640,6 +689,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
640
689
  const { data } = await this.client.get(path, {
641
690
  params: query,
642
691
  });
692
+ if (this.isEmptyResponse(data)) {
693
+ return null;
694
+ }
643
695
  return new characterVMatrix.CharacterVMatrixDto(data);
644
696
  }
645
697
  /**
@@ -669,6 +721,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
669
721
  const { data } = await this.client.get(path, {
670
722
  params: query,
671
723
  });
724
+ if (this.isEmptyResponse(data)) {
725
+ return null;
726
+ }
672
727
  return new characterHexaMatrix.CharacterHexaMatrixDto(data);
673
728
  }
674
729
  /**
@@ -698,6 +753,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
698
753
  const { data } = await this.client.get(path, {
699
754
  params: query,
700
755
  });
756
+ if (this.isEmptyResponse(data)) {
757
+ return null;
758
+ }
701
759
  return new characterHexaMatrixStat.CharacterHexaMatrixStatDto(data);
702
760
  }
703
761
  /**
@@ -727,6 +785,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
727
785
  const { data } = await this.client.get(path, {
728
786
  params: query,
729
787
  });
788
+ if (this.isEmptyResponse(data)) {
789
+ return null;
790
+ }
730
791
  return new characterDojang.CharacterDojangDto(data);
731
792
  }
732
793
  /**
@@ -756,6 +817,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
756
817
  const { data } = await this.client.get(path, {
757
818
  params: query,
758
819
  });
820
+ if (this.isEmptyResponse(data)) {
821
+ return null;
822
+ }
759
823
  return new characterOtherStat.CharacterOtherStatDto(data);
760
824
  }
761
825
  /**
@@ -785,6 +849,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
785
849
  const { data } = await this.client.get(path, {
786
850
  params: query,
787
851
  });
852
+ if (this.isEmptyResponse(data)) {
853
+ return null;
854
+ }
788
855
  return new characterRingExchangeSkillEquipment.CharacterRingExchangeSkillEquipmentDto(data);
789
856
  }
790
857
  //#endregion
@@ -816,6 +883,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
816
883
  const { data } = await this.client.get(path, {
817
884
  params: query,
818
885
  });
886
+ if (this.isEmptyResponse(data)) {
887
+ return null;
888
+ }
819
889
  return new union.UnionDto(data);
820
890
  }
821
891
  /**
@@ -845,12 +915,15 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
845
915
  const { data } = await this.client.get(path, {
846
916
  params: query,
847
917
  });
918
+ if (this.isEmptyResponse(data)) {
919
+ return null;
920
+ }
848
921
  return new unionRaider.UnionRaiderDto(data);
849
922
  }
850
923
  /**
851
924
  * 유니온 아티팩트 정보를 조회합니다.
852
925
  * - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
853
- * - 20231221일 데이터부터 조회할 수 있습니다.
926
+ * - 2024118일 데이터부터 조회할 수 있습니다.
854
927
  * - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
855
928
  * - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
856
929
  * - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
@@ -862,9 +935,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
862
935
  const path = `${this.subUrl}/v1/user/union-artifact`;
863
936
  const date = dateOptions
864
937
  ? this.toDateString(dateOptions, {
865
- year: 2023,
866
- month: 12,
867
- day: 21,
938
+ year: 2024,
939
+ month: 1,
940
+ day: 18,
868
941
  })
869
942
  : undefined;
870
943
  const query = {
@@ -874,13 +947,16 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
874
947
  const { data } = await this.client.get(path, {
875
948
  params: query,
876
949
  });
950
+ if (this.isEmptyResponse(data)) {
951
+ return null;
952
+ }
877
953
  return new unionArtifact.UnionArtifactDto(data);
878
954
  }
879
955
  /**
880
956
  * 유니온 챔피언 정보를 조회합니다.<br>
881
957
  * 유니온 챔피언 정보는 2025년 2월 20일 메이플스토리 점검 이후 데이터부터 조회 가능합니다.<br>
882
958
  * - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
883
- * - 20231221일 데이터부터 조회할 수 있습니다.
959
+ * - 2025220일 데이터부터 조회할 수 있습니다.
884
960
  * - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
885
961
  * - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
886
962
  * - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
@@ -892,9 +968,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
892
968
  const path = `${this.subUrl}/v1/user/union-champion`;
893
969
  const date = dateOptions
894
970
  ? this.toDateString(dateOptions, {
895
- year: 2023,
896
- month: 12,
897
- day: 21,
971
+ year: 2025,
972
+ month: 2,
973
+ day: 20,
898
974
  })
899
975
  : undefined;
900
976
  const query = {
@@ -904,6 +980,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
904
980
  const { data } = await this.client.get(path, {
905
981
  params: query,
906
982
  });
983
+ if (this.isEmptyResponse(data)) {
984
+ return null;
985
+ }
907
986
  return new unionChampion.UnionChampionDto(data);
908
987
  }
909
988
  //#endregion
@@ -927,6 +1006,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
927
1006
  world_name: worldName,
928
1007
  },
929
1008
  });
1009
+ if (this.isEmptyResponse(data)) {
1010
+ return null;
1011
+ }
930
1012
  return new guild.GuildDto(data);
931
1013
  }
932
1014
  /**
@@ -956,6 +1038,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
956
1038
  const { data } = await this.client.get(path, {
957
1039
  params: query,
958
1040
  });
1041
+ if (this.isEmptyResponse(data)) {
1042
+ return null;
1043
+ }
959
1044
  return new guildBasic.GuildBasicDto(data);
960
1045
  }
961
1046
  async getStarforceHistory(count, parameter) {
@@ -1124,10 +1209,10 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
1124
1209
  ranking_type: 0,
1125
1210
  };
1126
1211
  if (filterOptions) {
1127
- const { worldName, rankingType, ocid, page } = filterOptions;
1212
+ const { worldName, rankingType, guildName, page } = filterOptions;
1128
1213
  query.world_name = worldName;
1129
1214
  query.ranking_type = rankingType;
1130
- query.ocid = ocid;
1215
+ query.guild_name = guildName;
1131
1216
  query.page = page;
1132
1217
  }
1133
1218
  const { data } = await this.client.get(path, {
@@ -78,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
78
78
  this.characterExpRate = character_exp_rate;
79
79
  this.characterGuildName = character_guild_name;
80
80
  this.characterImage = character_image;
81
- this.characterDateCreate = new Date(character_date_create);
81
+ this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
82
82
  this.accessFlag = access_flag;
83
83
  this.liberationQuestClearFlag = liberation_quest_clear_flag;
84
84
  }