maplestory-openapi 2.4.0 → 2.4.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/dist/index.js CHANGED
@@ -1569,9 +1569,9 @@ class CharacterItemEquipmentTotalOptionDto {
1569
1569
  }
1570
1570
 
1571
1571
  /**
1572
- * 캐릭터 장비 아이템 상세 정보
1572
+ * 에반 드래곤 장비 정보
1573
1573
  */
1574
- class CharacterItemEquipmentInfoDto {
1574
+ class CharacterItemEquipmentDragonInfoDto {
1575
1575
  /**
1576
1576
  * 장비 부위 명
1577
1577
  */
@@ -1612,38 +1612,6 @@ class CharacterItemEquipmentInfoDto {
1612
1612
  * 장비 기본 옵션
1613
1613
  */
1614
1614
  itemBaseOption;
1615
- /**
1616
- * 잠재능력 등급
1617
- */
1618
- potentialOptionGrade;
1619
- /**
1620
- * 에디셔널 잠재능력 등급
1621
- */
1622
- additionalPotentialOptionGrade;
1623
- /**
1624
- * 잠재능력 첫 번째 옵션
1625
- */
1626
- potentialOption1;
1627
- /**
1628
- * 잠재능력 두 번째 옵션
1629
- */
1630
- potentialOption2;
1631
- /**
1632
- * 잠재능력 세 번째 옵션
1633
- */
1634
- potentialOption3;
1635
- /**
1636
- * 에디셔널 잠재능력 첫 번째 옵션
1637
- */
1638
- additionalPotentialOption1;
1639
- /**
1640
- * 에디셔널 잠재능력 두 번째 옵션
1641
- */
1642
- additionalPotentialOption2;
1643
- /**
1644
- * 에디셔널 잠재능력 세 번째 옵션
1645
- */
1646
- additionalPotentialOption3;
1647
1615
  /**
1648
1616
  * 착용 레벨 증가
1649
1617
  */
@@ -1717,7 +1685,7 @@ class CharacterItemEquipmentInfoDto {
1717
1685
  */
1718
1686
  dateExpire;
1719
1687
  constructor(obj) {
1720
- const { item_equipment_part, item_equipment_slot, item_name, item_icon, item_description, item_shape_name, item_shape_icon, item_gender, item_total_option, item_base_option, potential_option_grade, additional_potential_option_grade, potential_option_1, potential_option_2, potential_option_3, additional_potential_option_1, additional_potential_option_2, additional_potential_option_3, equipment_level_increase, item_exceptional_option, item_add_option, growth_exp, growth_level, scroll_upgrade, cuttable_count, golden_hammer_flag, scroll_resilience_count, scroll_upgradeable_count, soul_name, soul_option, item_etc_option, starforce, starforce_scroll_flag, item_starforce_option, special_ring_level, date_expire, } = obj;
1688
+ const { item_equipment_part, item_equipment_slot, item_name, item_icon, item_description, item_shape_name, item_shape_icon, item_gender, item_total_option, item_base_option, equipment_level_increase, item_exceptional_option, item_add_option, growth_exp, growth_level, scroll_upgrade, cuttable_count, golden_hammer_flag, scroll_resilience_count, scroll_upgradeable_count, soul_name, soul_option, item_etc_option, starforce, starforce_scroll_flag, item_starforce_option, special_ring_level, date_expire, } = obj;
1721
1689
  this.itemEquipmentPart = item_equipment_part;
1722
1690
  this.itemEquipmentSlot = item_equipment_slot;
1723
1691
  this.itemName = item_name;
@@ -1728,14 +1696,6 @@ class CharacterItemEquipmentInfoDto {
1728
1696
  this.itemGender = item_gender;
1729
1697
  this.itemTotalOption = new CharacterItemEquipmentTotalOptionDto(item_total_option);
1730
1698
  this.itemBaseOption = new CharacterItemEquipmentBaseOptionDto(item_base_option);
1731
- this.potentialOptionGrade = potential_option_grade;
1732
- this.additionalPotentialOptionGrade = additional_potential_option_grade;
1733
- this.potentialOption1 = potential_option_1;
1734
- this.potentialOption2 = potential_option_2;
1735
- this.potentialOption3 = potential_option_3;
1736
- this.additionalPotentialOption1 = additional_potential_option_1;
1737
- this.additionalPotentialOption2 = additional_potential_option_2;
1738
- this.additionalPotentialOption3 = additional_potential_option_3;
1739
1699
  this.equipmentLevelIncrease = equipment_level_increase;
1740
1700
  this.itemExceptionalOption = new CharacterItemEquipmentExceptionalOptionDto(item_exceptional_option);
1741
1701
  this.itemAddOption = new CharacterItemEquipmentAddOptionDto(item_add_option);
@@ -1758,54 +1718,9 @@ class CharacterItemEquipmentInfoDto {
1758
1718
  }
1759
1719
 
1760
1720
  /**
1761
- * 캐릭터 칭호 아이템 정보
1762
- */
1763
- class CharacterItemEquipmentTitleDto {
1764
- /**
1765
- * 칭호 장비 명
1766
- */
1767
- titleName;
1768
- /**
1769
- * 칭호 아이콘
1770
- */
1771
- titleIcon;
1772
- /**
1773
- * 칭호 설명
1774
- */
1775
- titleDescription;
1776
- /**
1777
- * 칭호 유효 기간
1778
- */
1779
- dateExpire;
1780
- /**
1781
- * 칭호 옵션 유효 기간
1782
- */
1783
- dateOptionExpire = null;
1784
- /**
1785
- * 칭호 옵션 유효 기간 만료 여부
1786
- */
1787
- isOptionExpired = null;
1788
- constructor(obj) {
1789
- const { title_name, title_icon, title_description, date_expire, date_option_expire, } = obj;
1790
- this.titleName = title_name;
1791
- this.titleIcon = title_icon;
1792
- this.titleDescription = title_description;
1793
- this.dateExpire = date_expire ? new Date(date_expire) : null;
1794
- if (date_option_expire === 'expired') {
1795
- this.isOptionExpired = true;
1796
- }
1797
- else if (typeof date_option_expire === 'string') {
1798
- this.dateOptionExpire = date_option_expire
1799
- ? new Date(date_option_expire)
1800
- : null;
1801
- }
1802
- }
1803
- }
1804
-
1805
- /**
1806
- * 에반 드래곤 장비 정보
1721
+ * 캐릭터 장비 아이템 상세 정보
1807
1722
  */
1808
- class CharacterItemEquipmentDragonInfoDto {
1723
+ class CharacterItemEquipmentInfoDto {
1809
1724
  /**
1810
1725
  * 장비 부위 명
1811
1726
  */
@@ -1846,6 +1761,38 @@ class CharacterItemEquipmentDragonInfoDto {
1846
1761
  * 장비 기본 옵션
1847
1762
  */
1848
1763
  itemBaseOption;
1764
+ /**
1765
+ * 잠재능력 등급
1766
+ */
1767
+ potentialOptionGrade;
1768
+ /**
1769
+ * 에디셔널 잠재능력 등급
1770
+ */
1771
+ additionalPotentialOptionGrade;
1772
+ /**
1773
+ * 잠재능력 첫 번째 옵션
1774
+ */
1775
+ potentialOption1;
1776
+ /**
1777
+ * 잠재능력 두 번째 옵션
1778
+ */
1779
+ potentialOption2;
1780
+ /**
1781
+ * 잠재능력 세 번째 옵션
1782
+ */
1783
+ potentialOption3;
1784
+ /**
1785
+ * 에디셔널 잠재능력 첫 번째 옵션
1786
+ */
1787
+ additionalPotentialOption1;
1788
+ /**
1789
+ * 에디셔널 잠재능력 두 번째 옵션
1790
+ */
1791
+ additionalPotentialOption2;
1792
+ /**
1793
+ * 에디셔널 잠재능력 세 번째 옵션
1794
+ */
1795
+ additionalPotentialOption3;
1849
1796
  /**
1850
1797
  * 착용 레벨 증가
1851
1798
  */
@@ -1919,7 +1866,7 @@ class CharacterItemEquipmentDragonInfoDto {
1919
1866
  */
1920
1867
  dateExpire;
1921
1868
  constructor(obj) {
1922
- const { item_equipment_part, item_equipment_slot, item_name, item_icon, item_description, item_shape_name, item_shape_icon, item_gender, item_total_option, item_base_option, equipment_level_increase, item_exceptional_option, item_add_option, growth_exp, growth_level, scroll_upgrade, cuttable_count, golden_hammer_flag, scroll_resilience_count, scroll_upgradeable_count, soul_name, soul_option, item_etc_option, starforce, starforce_scroll_flag, item_starforce_option, special_ring_level, date_expire, } = obj;
1869
+ const { item_equipment_part, item_equipment_slot, item_name, item_icon, item_description, item_shape_name, item_shape_icon, item_gender, item_total_option, item_base_option, potential_option_grade, additional_potential_option_grade, potential_option_1, potential_option_2, potential_option_3, additional_potential_option_1, additional_potential_option_2, additional_potential_option_3, equipment_level_increase, item_exceptional_option, item_add_option, growth_exp, growth_level, scroll_upgrade, cuttable_count, golden_hammer_flag, scroll_resilience_count, scroll_upgradeable_count, soul_name, soul_option, item_etc_option, starforce, starforce_scroll_flag, item_starforce_option, special_ring_level, date_expire, } = obj;
1923
1870
  this.itemEquipmentPart = item_equipment_part;
1924
1871
  this.itemEquipmentSlot = item_equipment_slot;
1925
1872
  this.itemName = item_name;
@@ -1930,6 +1877,14 @@ class CharacterItemEquipmentDragonInfoDto {
1930
1877
  this.itemGender = item_gender;
1931
1878
  this.itemTotalOption = new CharacterItemEquipmentTotalOptionDto(item_total_option);
1932
1879
  this.itemBaseOption = new CharacterItemEquipmentBaseOptionDto(item_base_option);
1880
+ this.potentialOptionGrade = potential_option_grade;
1881
+ this.additionalPotentialOptionGrade = additional_potential_option_grade;
1882
+ this.potentialOption1 = potential_option_1;
1883
+ this.potentialOption2 = potential_option_2;
1884
+ this.potentialOption3 = potential_option_3;
1885
+ this.additionalPotentialOption1 = additional_potential_option_1;
1886
+ this.additionalPotentialOption2 = additional_potential_option_2;
1887
+ this.additionalPotentialOption3 = additional_potential_option_3;
1933
1888
  this.equipmentLevelIncrease = equipment_level_increase;
1934
1889
  this.itemExceptionalOption = new CharacterItemEquipmentExceptionalOptionDto(item_exceptional_option);
1935
1890
  this.itemAddOption = new CharacterItemEquipmentAddOptionDto(item_add_option);
@@ -2100,6 +2055,51 @@ class CharacterItemEquipmentMechanicInfoDto {
2100
2055
  }
2101
2056
  }
2102
2057
 
2058
+ /**
2059
+ * 캐릭터 칭호 아이템 정보
2060
+ */
2061
+ class CharacterItemEquipmentTitleDto {
2062
+ /**
2063
+ * 칭호 장비 명
2064
+ */
2065
+ titleName;
2066
+ /**
2067
+ * 칭호 아이콘
2068
+ */
2069
+ titleIcon;
2070
+ /**
2071
+ * 칭호 설명
2072
+ */
2073
+ titleDescription;
2074
+ /**
2075
+ * 칭호 유효 기간
2076
+ */
2077
+ dateExpire;
2078
+ /**
2079
+ * 칭호 옵션 유효 기간
2080
+ */
2081
+ dateOptionExpire = null;
2082
+ /**
2083
+ * 칭호 옵션 유효 기간 만료 여부
2084
+ */
2085
+ isOptionExpired = null;
2086
+ constructor(obj) {
2087
+ const { title_name, title_icon, title_description, date_expire, date_option_expire, } = obj;
2088
+ this.titleName = title_name;
2089
+ this.titleIcon = title_icon;
2090
+ this.titleDescription = title_description;
2091
+ this.dateExpire = date_expire ? new Date(date_expire) : null;
2092
+ if (date_option_expire === 'expired') {
2093
+ this.isOptionExpired = true;
2094
+ }
2095
+ else if (typeof date_option_expire === 'string') {
2096
+ this.dateOptionExpire = date_option_expire
2097
+ ? new Date(date_option_expire)
2098
+ : null;
2099
+ }
2100
+ }
2101
+ }
2102
+
2103
2103
  /**
2104
2104
  * 캐릭터 장비 아이템 정보
2105
2105
  */
@@ -3231,80 +3231,233 @@ class CubeHistoryResponseDto {
3231
3231
  }
3232
3232
 
3233
3233
  /**
3234
- * 스타포스 강화 이벤트 정보
3234
+ * 잠재능력 재설정 결과 옵션 정보
3235
3235
  */
3236
- class StarforceEventDto {
3237
- /**
3238
- * 이벤트 성공 확률
3239
- */
3240
- successRate;
3241
- /**
3242
- * 이벤트 비용 할인율
3243
- */
3244
- costDiscountRate;
3236
+ class PotentialResultOptionDto {
3245
3237
  /**
3246
- * 이벤트 강화 수치 가중값
3238
+ * 옵션
3247
3239
  */
3248
- plusValue;
3240
+ value;
3249
3241
  /**
3250
- * 이벤트 적용 강화 시도 가능한 n성 범위
3242
+ * 옵션 등급
3251
3243
  */
3252
- starforceEventRange;
3244
+ grade;
3253
3245
  constructor(obj) {
3254
- const { success_rate, cost_discount_rate, plus_value, starforce_event_range, } = obj;
3255
- this.successRate = success_rate;
3256
- this.costDiscountRate = cost_discount_rate;
3257
- this.plusValue = plus_value;
3258
- this.starforceEventRange = starforce_event_range;
3246
+ const { value, grade } = obj;
3247
+ this.value = value;
3248
+ this.grade = grade;
3249
+ }
3250
+ get gradeEnum() {
3251
+ return potentialOptionGradeFromString(this.grade);
3259
3252
  }
3260
3253
  }
3261
3254
 
3262
3255
  /**
3263
- * 스타포스 히스토리
3256
+ * 잠재능력 재설정 히스토리
3264
3257
  */
3265
- class StarforceHistoryDto {
3258
+ class PotentialHistoryDto {
3266
3259
  /**
3267
- *스타포스 히스토리 식별자
3260
+ * 잠재능력 재설정 히스토리 식별자
3268
3261
  */
3269
3262
  id;
3270
3263
  /**
3271
- *강화 시도 결과
3264
+ * 캐릭터
3272
3265
  */
3273
- itemUpgradeResult;
3266
+ characterName;
3274
3267
  /**
3275
- *강화 시도 전 스타포스 수치
3268
+ * 사용 일시
3276
3269
  */
3277
- beforeStarforceCount;
3270
+ dateCreate;
3278
3271
  /**
3279
- *강화 시도 스타포스 수치
3272
+ * 대상 잠재능력 타입 (잠재능력, 에디셔널 잠재능력)
3280
3273
  */
3281
- afterStarforceCount;
3274
+ potentialType;
3282
3275
  /**
3283
- *스타 캐치
3276
+ * 사용 결과
3284
3277
  */
3285
- starCatchResult;
3278
+ itemUpgradeResult;
3286
3279
  /**
3287
- *슈페리얼 장비
3280
+ * 미라클 타임 적용 여부
3288
3281
  */
3289
- superiorItemFlag;
3282
+ miracleTimeFlag;
3290
3283
  /**
3291
- *파괴 방지
3284
+ * 장비 분류
3292
3285
  */
3293
- destroyDefence;
3286
+ itemEquipmentPart;
3294
3287
  /**
3295
- *찬스 타임
3288
+ * 장비 레벨
3296
3289
  */
3297
- chanceTime;
3290
+ itemLevel;
3298
3291
  /**
3299
- *파괴 방지 필드 이벤트
3292
+ * 잠재능력 재설정 장비 명
3300
3293
  */
3301
- eventFieldFlag;
3294
+ targetItem;
3302
3295
  /**
3303
- *사용 주문서
3296
+ * 잠재능력 등급
3304
3297
  */
3305
- upgradeItem;
3298
+ potentialOptionGrade;
3306
3299
  /**
3307
- *프로텍트 실드
3300
+ * 에디셔널 잠재능력 등급
3301
+ */
3302
+ additionalPotentialOptionGrade;
3303
+ /**
3304
+ * 천장에 도달하여 확정 등급 상승한 여부
3305
+ */
3306
+ upgradeGuarantee;
3307
+ /**
3308
+ * 현재까지 쌓은 스택
3309
+ */
3310
+ upgradeGuaranteeCount;
3311
+ /**
3312
+ * 사용 전 잠재능력 옵션
3313
+ */
3314
+ beforePotentialOption;
3315
+ /**
3316
+ * 사용 전 에디셔널 잠재능력 옵션
3317
+ */
3318
+ beforeAdditionalPotentialOption;
3319
+ /**
3320
+ * 사용 후 잠재능력 옵션
3321
+ */
3322
+ afterPotentialOption;
3323
+ /**
3324
+ * 사용 후 에디셔널 잠재능력 옵션
3325
+ */
3326
+ afterAdditionalPotentialOption;
3327
+ constructor(obj) {
3328
+ const { id, character_name, date_create, potential_type, item_upgrade_result, miracle_time_flag, item_equipment_part, item_level, target_item, potential_option_grade, additional_potential_option_grade, upgrade_guarantee, upgrade_guarantee_count, before_potential_option, before_additional_potential_option, after_potential_option, after_additional_potential_option, } = obj;
3329
+ this.id = id;
3330
+ this.characterName = character_name;
3331
+ this.dateCreate = new Date(date_create);
3332
+ this.potentialType = potential_type;
3333
+ this.itemUpgradeResult = item_upgrade_result;
3334
+ this.miracleTimeFlag = miracle_time_flag;
3335
+ this.itemEquipmentPart = item_equipment_part;
3336
+ this.itemLevel = item_level;
3337
+ this.targetItem = target_item;
3338
+ this.potentialOptionGrade = potential_option_grade;
3339
+ this.additionalPotentialOptionGrade = additional_potential_option_grade;
3340
+ this.upgradeGuarantee = upgrade_guarantee;
3341
+ this.upgradeGuaranteeCount = upgrade_guarantee_count;
3342
+ this.beforePotentialOption = before_potential_option.map((origin) => new PotentialResultOptionDto(origin));
3343
+ this.beforeAdditionalPotentialOption =
3344
+ before_additional_potential_option.map((origin) => new PotentialResultOptionDto(origin));
3345
+ this.afterPotentialOption = after_potential_option.map((origin) => new PotentialResultOptionDto(origin));
3346
+ this.afterAdditionalPotentialOption = after_additional_potential_option.map((origin) => new PotentialResultOptionDto(origin));
3347
+ }
3348
+ get isItemUpgrade() {
3349
+ return this.itemUpgradeResult === '성공';
3350
+ }
3351
+ get isMiracleTimeFlag() {
3352
+ return this.miracleTimeFlag !== '이벤트 적용되지 않음';
3353
+ }
3354
+ get potentialOptionGradeEnum() {
3355
+ return potentialOptionGradeFromString(this.potentialOptionGrade);
3356
+ }
3357
+ get additionalPotentialOptionGradeEnum() {
3358
+ return potentialOptionGradeFromString(this.additionalPotentialOptionGrade);
3359
+ }
3360
+ }
3361
+
3362
+ /**
3363
+ * 잠재능력 재설정 히스토리 응답 정보
3364
+ */
3365
+ class PotentialHistoryResponseDto {
3366
+ /**
3367
+ * 결과 건 수
3368
+ */
3369
+ count;
3370
+ /**
3371
+ * 잠재능력 재설정 히스토리
3372
+ */
3373
+ potentialHistory;
3374
+ /**
3375
+ * 페이징 처리를 위한 cursor
3376
+ */
3377
+ nextCursor;
3378
+ constructor(obj) {
3379
+ const { count, potential_history, next_cursor } = obj;
3380
+ this.count = count;
3381
+ this.potentialHistory = potential_history.map((origin) => new PotentialHistoryDto(origin));
3382
+ this.nextCursor = next_cursor;
3383
+ }
3384
+ }
3385
+
3386
+ /**
3387
+ * 스타포스 강화 이벤트 정보
3388
+ */
3389
+ class StarforceEventDto {
3390
+ /**
3391
+ * 이벤트 성공 확률
3392
+ */
3393
+ successRate;
3394
+ /**
3395
+ * 이벤트 비용 할인율
3396
+ */
3397
+ costDiscountRate;
3398
+ /**
3399
+ * 이벤트 강화 수치 가중값
3400
+ */
3401
+ plusValue;
3402
+ /**
3403
+ * 이벤트 적용 강화 시도 가능한 n성 범위
3404
+ */
3405
+ starforceEventRange;
3406
+ constructor(obj) {
3407
+ const { success_rate, cost_discount_rate, plus_value, starforce_event_range, } = obj;
3408
+ this.successRate = success_rate;
3409
+ this.costDiscountRate = cost_discount_rate;
3410
+ this.plusValue = plus_value;
3411
+ this.starforceEventRange = starforce_event_range;
3412
+ }
3413
+ }
3414
+
3415
+ /**
3416
+ * 스타포스 히스토리
3417
+ */
3418
+ class StarforceHistoryDto {
3419
+ /**
3420
+ *스타포스 히스토리 식별자
3421
+ */
3422
+ id;
3423
+ /**
3424
+ *강화 시도 결과
3425
+ */
3426
+ itemUpgradeResult;
3427
+ /**
3428
+ *강화 시도 전 스타포스 수치
3429
+ */
3430
+ beforeStarforceCount;
3431
+ /**
3432
+ *강화 시도 후 스타포스 수치
3433
+ */
3434
+ afterStarforceCount;
3435
+ /**
3436
+ *스타 캐치
3437
+ */
3438
+ starCatchResult;
3439
+ /**
3440
+ *슈페리얼 장비
3441
+ */
3442
+ superiorItemFlag;
3443
+ /**
3444
+ *파괴 방지
3445
+ */
3446
+ destroyDefence;
3447
+ /**
3448
+ *찬스 타임
3449
+ */
3450
+ chanceTime;
3451
+ /**
3452
+ *파괴 방지 필드 이벤트
3453
+ */
3454
+ eventFieldFlag;
3455
+ /**
3456
+ *사용 주문서 명
3457
+ */
3458
+ upgradeItem;
3459
+ /**
3460
+ *프로텍트 실드
3308
3461
  */
3309
3462
  protectShield;
3310
3463
  /**
@@ -3912,11 +4065,26 @@ class UnionDto {
3912
4065
  * 유니온 등급
3913
4066
  */
3914
4067
  unionGrade;
4068
+ /**
4069
+ * 아티팩트 레벨
4070
+ */
4071
+ unionArtifactLevel;
4072
+ /**
4073
+ * 보유 아티팩트 경험치
4074
+ */
4075
+ unionArtifactExp;
4076
+ /**
4077
+ * 보유 아티팩트 포인트
4078
+ */
4079
+ unionArtifactPoint;
3915
4080
  constructor(obj) {
3916
- const { date, union_level, union_grade } = obj;
4081
+ const { date, union_level, union_grade, union_artifact_level, union_artifact_exp, union_artifact_point } = obj;
3917
4082
  this.date = new Date(date);
3918
4083
  this.unionLevel = union_level;
3919
4084
  this.unionGrade = union_grade;
4085
+ this.unionArtifactLevel = union_artifact_level;
4086
+ this.unionArtifactExp = union_artifact_exp;
4087
+ this.unionArtifactPoint = union_artifact_point;
3920
4088
  }
3921
4089
  }
3922
4090
 
@@ -4072,6 +4240,8 @@ exports.MapleStoryApiErrorCode = void 0;
4072
4240
  MapleStoryApiErrorCode[MapleStoryApiErrorCode["OPENAPI00005"] = 4] = "OPENAPI00005";
4073
4241
  MapleStoryApiErrorCode[MapleStoryApiErrorCode["OPENAPI00006"] = 5] = "OPENAPI00006";
4074
4242
  MapleStoryApiErrorCode[MapleStoryApiErrorCode["OPENAPI00007"] = 6] = "OPENAPI00007";
4243
+ MapleStoryApiErrorCode[MapleStoryApiErrorCode["OPENAPI00009"] = 7] = "OPENAPI00009";
4244
+ MapleStoryApiErrorCode[MapleStoryApiErrorCode["OPENAPI00010"] = 8] = "OPENAPI00010";
4075
4245
  })(exports.MapleStoryApiErrorCode || (exports.MapleStoryApiErrorCode = {}));
4076
4246
  const errorMap = {
4077
4247
  ['OPENAPI00001']: exports.MapleStoryApiErrorCode.OPENAPI00001,
@@ -4081,161 +4251,10 @@ const errorMap = {
4081
4251
  ['OPENAPI00005']: exports.MapleStoryApiErrorCode.OPENAPI00005,
4082
4252
  ['OPENAPI00006']: exports.MapleStoryApiErrorCode.OPENAPI00006,
4083
4253
  ['OPENAPI00007']: exports.MapleStoryApiErrorCode.OPENAPI00007,
4254
+ ['OPENAPI00009']: exports.MapleStoryApiErrorCode.OPENAPI00009,
4255
+ ['OPENAPI00010']: exports.MapleStoryApiErrorCode.OPENAPI00010,
4084
4256
  };
4085
4257
 
4086
- /**
4087
- * 잠재능력 재설정 결과 옵션 정보
4088
- */
4089
- class PotentialResultOptionDto {
4090
- /**
4091
- * 옵션 명
4092
- */
4093
- value;
4094
- /**
4095
- * 옵션 등급
4096
- */
4097
- grade;
4098
- constructor(obj) {
4099
- const { value, grade } = obj;
4100
- this.value = value;
4101
- this.grade = grade;
4102
- }
4103
- get gradeEnum() {
4104
- return potentialOptionGradeFromString(this.grade);
4105
- }
4106
- }
4107
-
4108
- /**
4109
- * 잠재능력 재설정 히스토리
4110
- */
4111
- class PotentialHistoryDto {
4112
- /**
4113
- * 잠재능력 재설정 히스토리 식별자
4114
- */
4115
- id;
4116
- /**
4117
- * 캐릭터 명
4118
- */
4119
- characterName;
4120
- /**
4121
- * 사용 일시
4122
- */
4123
- dateCreate;
4124
- /**
4125
- * 대상 잠재능력 타입 (잠재능력, 에디셔널 잠재능력)
4126
- */
4127
- potentialType;
4128
- /**
4129
- * 사용 결과
4130
- */
4131
- itemUpgradeResult;
4132
- /**
4133
- * 미라클 타임 적용 여부
4134
- */
4135
- miracleTimeFlag;
4136
- /**
4137
- * 장비 분류
4138
- */
4139
- itemEquipmentPart;
4140
- /**
4141
- * 장비 레벨
4142
- */
4143
- itemLevel;
4144
- /**
4145
- * 잠재능력 재설정 장비 명
4146
- */
4147
- targetItem;
4148
- /**
4149
- * 잠재능력 등급
4150
- */
4151
- potentialOptionGrade;
4152
- /**
4153
- * 에디셔널 잠재능력 등급
4154
- */
4155
- additionalPotentialOptionGrade;
4156
- /**
4157
- * 천장에 도달하여 확정 등급 상승한 여부
4158
- */
4159
- upgradeGuarantee;
4160
- /**
4161
- * 현재까지 쌓은 스택
4162
- */
4163
- upgradeGuaranteeCount;
4164
- /**
4165
- * 사용 전 잠재능력 옵션
4166
- */
4167
- beforePotentialOption;
4168
- /**
4169
- * 사용 전 에디셔널 잠재능력 옵션
4170
- */
4171
- beforeAdditionalPotentialOption;
4172
- /**
4173
- * 사용 후 잠재능력 옵션
4174
- */
4175
- afterPotentialOption;
4176
- /**
4177
- * 사용 후 에디셔널 잠재능력 옵션
4178
- */
4179
- afterAdditionalPotentialOption;
4180
- constructor(obj) {
4181
- const { id, character_name, date_create, potential_type, item_upgrade_result, miracle_time_flag, item_equipment_part, item_level, target_item, potential_option_grade, additional_potential_option_grade, upgrade_guarantee, upgrade_guarantee_count, before_potential_option, before_additional_potential_option, after_potential_option, after_additional_potential_option, } = obj;
4182
- this.id = id;
4183
- this.characterName = character_name;
4184
- this.dateCreate = new Date(date_create);
4185
- this.potentialType = potential_type;
4186
- this.itemUpgradeResult = item_upgrade_result;
4187
- this.miracleTimeFlag = miracle_time_flag;
4188
- this.itemEquipmentPart = item_equipment_part;
4189
- this.itemLevel = item_level;
4190
- this.targetItem = target_item;
4191
- this.potentialOptionGrade = potential_option_grade;
4192
- this.additionalPotentialOptionGrade = additional_potential_option_grade;
4193
- this.upgradeGuarantee = upgrade_guarantee;
4194
- this.upgradeGuaranteeCount = upgrade_guarantee_count;
4195
- this.beforePotentialOption = before_potential_option.map((origin) => new PotentialResultOptionDto(origin));
4196
- this.beforeAdditionalPotentialOption =
4197
- before_additional_potential_option.map((origin) => new PotentialResultOptionDto(origin));
4198
- this.afterPotentialOption = after_potential_option.map((origin) => new PotentialResultOptionDto(origin));
4199
- this.afterAdditionalPotentialOption = after_additional_potential_option.map((origin) => new PotentialResultOptionDto(origin));
4200
- }
4201
- get isItemUpgrade() {
4202
- return this.itemUpgradeResult === '성공';
4203
- }
4204
- get isMiracleTimeFlag() {
4205
- return this.miracleTimeFlag !== '이벤트 적용되지 않음';
4206
- }
4207
- get potentialOptionGradeEnum() {
4208
- return potentialOptionGradeFromString(this.potentialOptionGrade);
4209
- }
4210
- get additionalPotentialOptionGradeEnum() {
4211
- return potentialOptionGradeFromString(this.additionalPotentialOptionGrade);
4212
- }
4213
- }
4214
-
4215
- /**
4216
- * 잠재능력 재설정 히스토리 응답 정보
4217
- */
4218
- class PotentialHistoryResponseDto {
4219
- /**
4220
- * 결과 건 수
4221
- */
4222
- count;
4223
- /**
4224
- * 잠재능력 재설정 히스토리
4225
- */
4226
- potentialHistory;
4227
- /**
4228
- * 페이징 처리를 위한 cursor
4229
- */
4230
- nextCursor;
4231
- constructor(obj) {
4232
- const { count, potential_history, next_cursor } = obj;
4233
- this.count = count;
4234
- this.potentialHistory = potential_history.map((origin) => new PotentialHistoryDto(origin));
4235
- this.nextCursor = next_cursor;
4236
- }
4237
- }
4238
-
4239
4258
  dayjs__default["default"].extend(timezone);
4240
4259
  dayjs__default["default"].extend(utc);
4241
4260
  /**
@@ -4244,12 +4263,32 @@ dayjs__default["default"].extend(utc);
4244
4263
  */
4245
4264
  class MapleStoryApi {
4246
4265
  apiKey;
4266
+ client;
4247
4267
  static BASE_URL = 'https://open.api.nexon.com/';
4268
+ static DEFAULT_TIMEOUT = 5000;
4248
4269
  static kstOffset = 540;
4249
- timeout;
4270
+ get timeout() {
4271
+ return this.client.defaults.timeout;
4272
+ }
4273
+ set timeout(value) {
4274
+ this.client.defaults.timeout = value;
4275
+ }
4250
4276
  constructor(apiKey) {
4251
4277
  this.apiKey = apiKey;
4252
- this.timeout = 5000;
4278
+ this.client = axios__default["default"].create({
4279
+ baseURL: MapleStoryApi.BASE_URL,
4280
+ timeout: MapleStoryApi.DEFAULT_TIMEOUT,
4281
+ headers: {
4282
+ 'x-nxopen-api-key': this.apiKey,
4283
+ },
4284
+ });
4285
+ this.client.interceptors.response.use((response) => response, (error) => {
4286
+ if (error instanceof axios.AxiosError) {
4287
+ const errorBody = error.response.data;
4288
+ throw new MapleStoryApiError(errorBody);
4289
+ }
4290
+ throw error;
4291
+ });
4253
4292
  }
4254
4293
  //#region 캐릭터 정보 조회
4255
4294
  /**
@@ -4261,25 +4300,13 @@ class MapleStoryApi {
4261
4300
  * @param characterName 캐릭터 명
4262
4301
  */
4263
4302
  async getCharacter(characterName) {
4264
- try {
4265
- const path = 'maplestory/v1/id';
4266
- const response = await axios__default["default"].get(path, {
4267
- baseURL: MapleStoryApi.BASE_URL,
4268
- timeout: this.timeout,
4269
- headers: this.buildHeaders(),
4270
- params: {
4271
- character_name: characterName,
4272
- },
4273
- });
4274
- return new CharacterDto(response.data);
4275
- }
4276
- catch (e) {
4277
- if (e instanceof axios.AxiosError) {
4278
- const errorBody = e.response.data;
4279
- throw new MapleStoryApiError(errorBody);
4280
- }
4281
- throw e;
4282
- }
4303
+ const path = 'maplestory/v1/id';
4304
+ const { data } = await this.client.get(path, {
4305
+ params: {
4306
+ character_name: characterName,
4307
+ },
4308
+ });
4309
+ return new CharacterDto(data);
4283
4310
  }
4284
4311
  /**
4285
4312
  * 기본 정보를 조회합니다.
@@ -4295,6 +4322,7 @@ class MapleStoryApi {
4295
4322
  minute: 0,
4296
4323
  dateOffset: 1,
4297
4324
  })) {
4325
+ const path = 'maplestory/v1/character/basic';
4298
4326
  const query = {
4299
4327
  ocid: ocid,
4300
4328
  date: MapleStoryApi.toDateString({
@@ -4303,23 +4331,10 @@ class MapleStoryApi {
4303
4331
  day: 21,
4304
4332
  }, dateOptions),
4305
4333
  };
4306
- try {
4307
- const path = 'maplestory/v1/character/basic';
4308
- const response = await axios__default["default"].get(path, {
4309
- baseURL: MapleStoryApi.BASE_URL,
4310
- timeout: this.timeout,
4311
- headers: this.buildHeaders(),
4312
- params: query,
4313
- });
4314
- return new CharacterBasicDto(response.data);
4315
- }
4316
- catch (e) {
4317
- if (e instanceof axios.AxiosError) {
4318
- const errorBody = e.response.data;
4319
- throw new MapleStoryApiError(errorBody);
4320
- }
4321
- throw e;
4322
- }
4334
+ const { data } = await this.client.get(path, {
4335
+ params: query,
4336
+ });
4337
+ return new CharacterBasicDto(data);
4323
4338
  }
4324
4339
  /**
4325
4340
  * 인기도 정보를 조회합니다.
@@ -4335,6 +4350,7 @@ class MapleStoryApi {
4335
4350
  minute: 0,
4336
4351
  dateOffset: 1,
4337
4352
  })) {
4353
+ const path = 'maplestory/v1/character/popularity';
4338
4354
  const query = {
4339
4355
  ocid: ocid,
4340
4356
  date: MapleStoryApi.toDateString({
@@ -4343,23 +4359,10 @@ class MapleStoryApi {
4343
4359
  day: 21,
4344
4360
  }, dateOptions),
4345
4361
  };
4346
- try {
4347
- const path = 'maplestory/v1/character/popularity';
4348
- const response = await axios__default["default"].get(path, {
4349
- baseURL: MapleStoryApi.BASE_URL,
4350
- timeout: this.timeout,
4351
- headers: this.buildHeaders(),
4352
- params: query,
4353
- });
4354
- return new CharacterPopularityDto(response.data);
4355
- }
4356
- catch (e) {
4357
- if (e instanceof axios.AxiosError) {
4358
- const errorBody = e.response.data;
4359
- throw new MapleStoryApiError(errorBody);
4360
- }
4361
- throw e;
4362
- }
4362
+ const { data } = await this.client.get(path, {
4363
+ params: query,
4364
+ });
4365
+ return new CharacterPopularityDto(data);
4363
4366
  }
4364
4367
  /**
4365
4368
  * 종합 능력치 정보를 조회합니다.
@@ -4375,6 +4378,7 @@ class MapleStoryApi {
4375
4378
  minute: 0,
4376
4379
  dateOffset: 1,
4377
4380
  })) {
4381
+ const path = 'maplestory/v1/character/stat';
4378
4382
  const query = {
4379
4383
  ocid: ocid,
4380
4384
  date: MapleStoryApi.toDateString({
@@ -4383,23 +4387,10 @@ class MapleStoryApi {
4383
4387
  day: 21,
4384
4388
  }, dateOptions),
4385
4389
  };
4386
- try {
4387
- const path = 'maplestory/v1/character/stat';
4388
- const response = await axios__default["default"].get(path, {
4389
- baseURL: MapleStoryApi.BASE_URL,
4390
- timeout: this.timeout,
4391
- headers: this.buildHeaders(),
4392
- params: query,
4393
- });
4394
- return new CharacterStatDto(response.data);
4395
- }
4396
- catch (e) {
4397
- if (e instanceof axios.AxiosError) {
4398
- const errorBody = e.response.data;
4399
- throw new MapleStoryApiError(errorBody);
4400
- }
4401
- throw e;
4402
- }
4390
+ const { data } = await this.client.get(path, {
4391
+ params: query,
4392
+ });
4393
+ return new CharacterStatDto(data);
4403
4394
  }
4404
4395
  /**
4405
4396
  * 하이퍼스탯 정보를 조회합니다.
@@ -4415,6 +4406,7 @@ class MapleStoryApi {
4415
4406
  minute: 0,
4416
4407
  dateOffset: 1,
4417
4408
  })) {
4409
+ const path = 'maplestory/v1/character/hyper-stat';
4418
4410
  const query = {
4419
4411
  ocid: ocid,
4420
4412
  date: MapleStoryApi.toDateString({
@@ -4423,23 +4415,10 @@ class MapleStoryApi {
4423
4415
  day: 21,
4424
4416
  }, dateOptions),
4425
4417
  };
4426
- try {
4427
- const path = 'maplestory/v1/character/hyper-stat';
4428
- const response = await axios__default["default"].get(path, {
4429
- baseURL: MapleStoryApi.BASE_URL,
4430
- timeout: this.timeout,
4431
- headers: this.buildHeaders(),
4432
- params: query,
4433
- });
4434
- return new CharacterHyperStatDto(response.data);
4435
- }
4436
- catch (e) {
4437
- if (e instanceof axios.AxiosError) {
4438
- const errorBody = e.response.data;
4439
- throw new MapleStoryApiError(errorBody);
4440
- }
4441
- throw e;
4442
- }
4418
+ const { data } = await this.client.get(path, {
4419
+ params: query,
4420
+ });
4421
+ return new CharacterHyperStatDto(data);
4443
4422
  }
4444
4423
  /**
4445
4424
  * 성향 정보를 조회합니다.
@@ -4455,6 +4434,7 @@ class MapleStoryApi {
4455
4434
  minute: 0,
4456
4435
  dateOffset: 1,
4457
4436
  })) {
4437
+ const path = 'maplestory/v1/character/propensity';
4458
4438
  const query = {
4459
4439
  ocid: ocid,
4460
4440
  date: MapleStoryApi.toDateString({
@@ -4463,23 +4443,10 @@ class MapleStoryApi {
4463
4443
  day: 21,
4464
4444
  }, dateOptions),
4465
4445
  };
4466
- try {
4467
- const path = 'maplestory/v1/character/propensity';
4468
- const response = await axios__default["default"].get(path, {
4469
- baseURL: MapleStoryApi.BASE_URL,
4470
- timeout: this.timeout,
4471
- headers: this.buildHeaders(),
4472
- params: query,
4473
- });
4474
- return new CharacterPropensityDto(response.data);
4475
- }
4476
- catch (e) {
4477
- if (e instanceof axios.AxiosError) {
4478
- const errorBody = e.response.data;
4479
- throw new MapleStoryApiError(errorBody);
4480
- }
4481
- throw e;
4482
- }
4446
+ const { data } = await this.client.get(path, {
4447
+ params: query,
4448
+ });
4449
+ return new CharacterPropensityDto(data);
4483
4450
  }
4484
4451
  /**
4485
4452
  * 어빌리티 정보를 조회합니다.
@@ -4495,6 +4462,7 @@ class MapleStoryApi {
4495
4462
  minute: 0,
4496
4463
  dateOffset: 1,
4497
4464
  })) {
4465
+ const path = 'maplestory/v1/character/ability';
4498
4466
  const query = {
4499
4467
  ocid: ocid,
4500
4468
  date: MapleStoryApi.toDateString({
@@ -4503,23 +4471,10 @@ class MapleStoryApi {
4503
4471
  day: 21,
4504
4472
  }, dateOptions),
4505
4473
  };
4506
- try {
4507
- const path = 'maplestory/v1/character/ability';
4508
- const response = await axios__default["default"].get(path, {
4509
- baseURL: MapleStoryApi.BASE_URL,
4510
- timeout: this.timeout,
4511
- headers: this.buildHeaders(),
4512
- params: query,
4513
- });
4514
- return new CharacterAbilityDto(response.data);
4515
- }
4516
- catch (e) {
4517
- if (e instanceof axios.AxiosError) {
4518
- const errorBody = e.response.data;
4519
- throw new MapleStoryApiError(errorBody);
4520
- }
4521
- throw e;
4522
- }
4474
+ const { data } = await this.client.get(path, {
4475
+ params: query,
4476
+ });
4477
+ return new CharacterAbilityDto(data);
4523
4478
  }
4524
4479
  /**
4525
4480
  * 장착한 장비 중 캐시 장비를 제외한 나머지 장비 정보를 조회합니다.
@@ -4535,6 +4490,7 @@ class MapleStoryApi {
4535
4490
  minute: 0,
4536
4491
  dateOffset: 1,
4537
4492
  })) {
4493
+ const path = 'maplestory/v1/character/item-equipment';
4538
4494
  const query = {
4539
4495
  ocid: ocid,
4540
4496
  date: MapleStoryApi.toDateString({
@@ -4543,23 +4499,10 @@ class MapleStoryApi {
4543
4499
  day: 21,
4544
4500
  }, dateOptions),
4545
4501
  };
4546
- try {
4547
- const path = 'maplestory/v1/character/item-equipment';
4548
- const response = await axios__default["default"].get(path, {
4549
- baseURL: MapleStoryApi.BASE_URL,
4550
- timeout: this.timeout,
4551
- headers: this.buildHeaders(),
4552
- params: query,
4553
- });
4554
- return new CharacterItemEquipmentDto(response.data);
4555
- }
4556
- catch (e) {
4557
- if (e instanceof axios.AxiosError) {
4558
- const errorBody = e.response.data;
4559
- throw new MapleStoryApiError(errorBody);
4560
- }
4561
- throw e;
4562
- }
4502
+ const { data } = await this.client.get(path, {
4503
+ params: query,
4504
+ });
4505
+ return new CharacterItemEquipmentDto(data);
4563
4506
  }
4564
4507
  /**
4565
4508
  * 장착한 캐시 장비 정보를 조회합니다.
@@ -4575,6 +4518,7 @@ class MapleStoryApi {
4575
4518
  minute: 0,
4576
4519
  dateOffset: 1,
4577
4520
  })) {
4521
+ const path = 'maplestory/v1/character/cashitem-equipment';
4578
4522
  const query = {
4579
4523
  ocid: ocid,
4580
4524
  date: MapleStoryApi.toDateString({
@@ -4583,23 +4527,10 @@ class MapleStoryApi {
4583
4527
  day: 21,
4584
4528
  }, dateOptions),
4585
4529
  };
4586
- try {
4587
- const path = 'maplestory/v1/character/cashitem-equipment';
4588
- const response = await axios__default["default"].get(path, {
4589
- baseURL: MapleStoryApi.BASE_URL,
4590
- timeout: this.timeout,
4591
- headers: this.buildHeaders(),
4592
- params: query,
4593
- });
4594
- return new CharacterCashItemEquipmentDto(response.data);
4595
- }
4596
- catch (e) {
4597
- if (e instanceof axios.AxiosError) {
4598
- const errorBody = e.response.data;
4599
- throw new MapleStoryApiError(errorBody);
4600
- }
4601
- throw e;
4602
- }
4530
+ const { data } = await this.client.get(path, {
4531
+ params: query,
4532
+ });
4533
+ return new CharacterCashItemEquipmentDto(data);
4603
4534
  }
4604
4535
  /**
4605
4536
  * 장착한 심볼 정보를 조회합니다.
@@ -4615,6 +4546,7 @@ class MapleStoryApi {
4615
4546
  minute: 0,
4616
4547
  dateOffset: 1,
4617
4548
  })) {
4549
+ const path = 'maplestory/v1/character/symbol-equipment';
4618
4550
  const query = {
4619
4551
  ocid: ocid,
4620
4552
  date: MapleStoryApi.toDateString({
@@ -4623,23 +4555,10 @@ class MapleStoryApi {
4623
4555
  day: 21,
4624
4556
  }, dateOptions),
4625
4557
  };
4626
- try {
4627
- const path = 'maplestory/v1/character/symbol-equipment';
4628
- const response = await axios__default["default"].get(path, {
4629
- baseURL: MapleStoryApi.BASE_URL,
4630
- timeout: this.timeout,
4631
- headers: this.buildHeaders(),
4632
- params: query,
4633
- });
4634
- return new CharacterSymbolEquipmentDto(response.data);
4635
- }
4636
- catch (e) {
4637
- if (e instanceof axios.AxiosError) {
4638
- const errorBody = e.response.data;
4639
- throw new MapleStoryApiError(errorBody);
4640
- }
4641
- throw e;
4642
- }
4558
+ const { data } = await this.client.get(path, {
4559
+ params: query,
4560
+ });
4561
+ return new CharacterSymbolEquipmentDto(data);
4643
4562
  }
4644
4563
  /**
4645
4564
  * 적용받고 있는 세트 효과 정보를 조회합니다.
@@ -4655,6 +4574,7 @@ class MapleStoryApi {
4655
4574
  minute: 0,
4656
4575
  dateOffset: 1,
4657
4576
  })) {
4577
+ const path = 'maplestory/v1/character/set-effect';
4658
4578
  const query = {
4659
4579
  ocid: ocid,
4660
4580
  date: MapleStoryApi.toDateString({
@@ -4663,23 +4583,10 @@ class MapleStoryApi {
4663
4583
  day: 21,
4664
4584
  }, dateOptions),
4665
4585
  };
4666
- try {
4667
- const path = 'maplestory/v1/character/set-effect';
4668
- const response = await axios__default["default"].get(path, {
4669
- baseURL: MapleStoryApi.BASE_URL,
4670
- timeout: this.timeout,
4671
- headers: this.buildHeaders(),
4672
- params: query,
4673
- });
4674
- return new CharacterSetEffectDto(response.data);
4675
- }
4676
- catch (e) {
4677
- if (e instanceof axios.AxiosError) {
4678
- const errorBody = e.response.data;
4679
- throw new MapleStoryApiError(errorBody);
4680
- }
4681
- throw e;
4682
- }
4586
+ const { data } = await this.client.get(path, {
4587
+ params: query,
4588
+ });
4589
+ return new CharacterSetEffectDto(data);
4683
4590
  }
4684
4591
  /**
4685
4592
  * 장착 중인 헤어, 성형, 피부 정보를 조회합니다.
@@ -4695,6 +4602,7 @@ class MapleStoryApi {
4695
4602
  minute: 0,
4696
4603
  dateOffset: 1,
4697
4604
  })) {
4605
+ const path = 'maplestory/v1/character/beauty-equipment';
4698
4606
  const query = {
4699
4607
  ocid: ocid,
4700
4608
  date: MapleStoryApi.toDateString({
@@ -4703,23 +4611,10 @@ class MapleStoryApi {
4703
4611
  day: 21,
4704
4612
  }, dateOptions),
4705
4613
  };
4706
- try {
4707
- const path = 'maplestory/v1/character/beauty-equipment';
4708
- const response = await axios__default["default"].get(path, {
4709
- baseURL: MapleStoryApi.BASE_URL,
4710
- timeout: this.timeout,
4711
- headers: this.buildHeaders(),
4712
- params: query,
4713
- });
4714
- return new CharacterBeautyEquipmentDto(response.data);
4715
- }
4716
- catch (e) {
4717
- if (e instanceof axios.AxiosError) {
4718
- const errorBody = e.response.data;
4719
- throw new MapleStoryApiError(errorBody);
4720
- }
4721
- throw e;
4722
- }
4614
+ const { data } = await this.client.get(path, {
4615
+ params: query,
4616
+ });
4617
+ return new CharacterBeautyEquipmentDto(data);
4723
4618
  }
4724
4619
  /**
4725
4620
  * 장착한 안드로이드 정보를 조회합니다.
@@ -4735,6 +4630,7 @@ class MapleStoryApi {
4735
4630
  minute: 0,
4736
4631
  dateOffset: 1,
4737
4632
  })) {
4633
+ const path = 'maplestory/v1/character/android-equipment';
4738
4634
  const query = {
4739
4635
  ocid: ocid,
4740
4636
  date: MapleStoryApi.toDateString({
@@ -4743,23 +4639,10 @@ class MapleStoryApi {
4743
4639
  day: 21,
4744
4640
  }, dateOptions),
4745
4641
  };
4746
- try {
4747
- const path = 'maplestory/v1/character/android-equipment';
4748
- const response = await axios__default["default"].get(path, {
4749
- baseURL: MapleStoryApi.BASE_URL,
4750
- timeout: this.timeout,
4751
- headers: this.buildHeaders(),
4752
- params: query,
4753
- });
4754
- return new CharacterAndroidEquipmentDto(response.data);
4755
- }
4756
- catch (e) {
4757
- if (e instanceof axios.AxiosError) {
4758
- const errorBody = e.response.data;
4759
- throw new MapleStoryApiError(errorBody);
4760
- }
4761
- throw e;
4762
- }
4642
+ const { data } = await this.client.get(path, {
4643
+ params: query,
4644
+ });
4645
+ return new CharacterAndroidEquipmentDto(data);
4763
4646
  }
4764
4647
  /**
4765
4648
  * 장착한 펫 및 펫 스킬, 장비 정보를 조회합니다.
@@ -4775,6 +4658,7 @@ class MapleStoryApi {
4775
4658
  minute: 0,
4776
4659
  dateOffset: 1,
4777
4660
  })) {
4661
+ const path = 'maplestory/v1/character/pet-equipment';
4778
4662
  const query = {
4779
4663
  ocid: ocid,
4780
4664
  date: MapleStoryApi.toDateString({
@@ -4783,23 +4667,10 @@ class MapleStoryApi {
4783
4667
  day: 21,
4784
4668
  }, dateOptions),
4785
4669
  };
4786
- try {
4787
- const path = 'maplestory/v1/character/pet-equipment';
4788
- const response = await axios__default["default"].get(path, {
4789
- baseURL: MapleStoryApi.BASE_URL,
4790
- timeout: this.timeout,
4791
- headers: this.buildHeaders(),
4792
- params: query,
4793
- });
4794
- return new CharacterPetEquipmentDto(response.data);
4795
- }
4796
- catch (e) {
4797
- if (e instanceof axios.AxiosError) {
4798
- const errorBody = e.response.data;
4799
- throw new MapleStoryApiError(errorBody);
4800
- }
4801
- throw e;
4802
- }
4670
+ const { data } = await this.client.get(path, {
4671
+ params: query,
4672
+ });
4673
+ return new CharacterPetEquipmentDto(data);
4803
4674
  }
4804
4675
  /**
4805
4676
  * 캐릭터 스킬과 하이퍼 스킬 정보를 조회합니다.
@@ -4827,6 +4698,7 @@ class MapleStoryApi {
4827
4698
  minute: 0,
4828
4699
  dateOffset: 1,
4829
4700
  })) {
4701
+ const path = 'maplestory/v1/character/skill';
4830
4702
  const query = {
4831
4703
  ocid: ocid,
4832
4704
  character_skill_grade: characterSkillGrade,
@@ -4836,23 +4708,10 @@ class MapleStoryApi {
4836
4708
  day: 21,
4837
4709
  }, dateOptions),
4838
4710
  };
4839
- try {
4840
- const path = 'maplestory/v1/character/skill';
4841
- const response = await axios__default["default"].get(path, {
4842
- baseURL: MapleStoryApi.BASE_URL,
4843
- timeout: this.timeout,
4844
- headers: this.buildHeaders(),
4845
- params: query,
4846
- });
4847
- return new CharacterSkillDto(response.data);
4848
- }
4849
- catch (e) {
4850
- if (e instanceof axios.AxiosError) {
4851
- const errorBody = e.response.data;
4852
- throw new MapleStoryApiError(errorBody);
4853
- }
4854
- throw e;
4855
- }
4711
+ const { data } = await this.client.get(path, {
4712
+ params: query,
4713
+ });
4714
+ return new CharacterSkillDto(data);
4856
4715
  }
4857
4716
  /**
4858
4717
  * 장착 링크 스킬 정보를 조회합니다.
@@ -4868,6 +4727,7 @@ class MapleStoryApi {
4868
4727
  minute: 0,
4869
4728
  dateOffset: 1,
4870
4729
  })) {
4730
+ const path = 'maplestory/v1/character/link-skill';
4871
4731
  const query = {
4872
4732
  ocid: ocid,
4873
4733
  date: MapleStoryApi.toDateString({
@@ -4876,23 +4736,10 @@ class MapleStoryApi {
4876
4736
  day: 21,
4877
4737
  }, dateOptions),
4878
4738
  };
4879
- try {
4880
- const path = 'maplestory/v1/character/link-skill';
4881
- const response = await axios__default["default"].get(path, {
4882
- baseURL: MapleStoryApi.BASE_URL,
4883
- timeout: this.timeout,
4884
- headers: this.buildHeaders(),
4885
- params: query,
4886
- });
4887
- return new CharacterLinkSkillDto(response.data);
4888
- }
4889
- catch (e) {
4890
- if (e instanceof axios.AxiosError) {
4891
- const errorBody = e.response.data;
4892
- throw new MapleStoryApiError(errorBody);
4893
- }
4894
- throw e;
4895
- }
4739
+ const { data } = await this.client.get(path, {
4740
+ params: query,
4741
+ });
4742
+ return new CharacterLinkSkillDto(data);
4896
4743
  }
4897
4744
  /**
4898
4745
  * V매트릭스 슬롯 정보와 장착한 V코어 정보를 조회합니다.
@@ -4908,6 +4755,7 @@ class MapleStoryApi {
4908
4755
  minute: 0,
4909
4756
  dateOffset: 1,
4910
4757
  })) {
4758
+ const path = 'maplestory/v1/character/vmatrix';
4911
4759
  const query = {
4912
4760
  ocid: ocid,
4913
4761
  date: MapleStoryApi.toDateString({
@@ -4916,23 +4764,10 @@ class MapleStoryApi {
4916
4764
  day: 21,
4917
4765
  }, dateOptions),
4918
4766
  };
4919
- try {
4920
- const path = 'maplestory/v1/character/vmatrix';
4921
- const response = await axios__default["default"].get(path, {
4922
- baseURL: MapleStoryApi.BASE_URL,
4923
- timeout: this.timeout,
4924
- headers: this.buildHeaders(),
4925
- params: query,
4926
- });
4927
- return new CharacterVMatrixDto(response.data);
4928
- }
4929
- catch (e) {
4930
- if (e instanceof axios.AxiosError) {
4931
- const errorBody = e.response.data;
4932
- throw new MapleStoryApiError(errorBody);
4933
- }
4934
- throw e;
4935
- }
4767
+ const { data } = await this.client.get(path, {
4768
+ params: query,
4769
+ });
4770
+ return new CharacterVMatrixDto(data);
4936
4771
  }
4937
4772
  /**
4938
4773
  * HEXA 매트릭스에 장착한 HEXA 코어 정보를 조회합니다.
@@ -4948,6 +4783,7 @@ class MapleStoryApi {
4948
4783
  minute: 0,
4949
4784
  dateOffset: 1,
4950
4785
  })) {
4786
+ const path = 'maplestory/v1/character/hexamatrix';
4951
4787
  const query = {
4952
4788
  ocid: ocid,
4953
4789
  date: MapleStoryApi.toDateString({
@@ -4956,23 +4792,10 @@ class MapleStoryApi {
4956
4792
  day: 21,
4957
4793
  }, dateOptions),
4958
4794
  };
4959
- try {
4960
- const path = 'maplestory/v1/character/hexamatrix';
4961
- const response = await axios__default["default"].get(path, {
4962
- baseURL: MapleStoryApi.BASE_URL,
4963
- timeout: this.timeout,
4964
- headers: this.buildHeaders(),
4965
- params: query,
4966
- });
4967
- return new CharacterHexaMatrixDto(response.data);
4968
- }
4969
- catch (e) {
4970
- if (e instanceof axios.AxiosError) {
4971
- const errorBody = e.response.data;
4972
- throw new MapleStoryApiError(errorBody);
4973
- }
4974
- throw e;
4975
- }
4795
+ const { data } = await this.client.get(path, {
4796
+ params: query,
4797
+ });
4798
+ return new CharacterHexaMatrixDto(data);
4976
4799
  }
4977
4800
  /**
4978
4801
  * HEXA 매트릭스에 설정한 HEXA 스탯 정보를 조회합니다.
@@ -4988,6 +4811,7 @@ class MapleStoryApi {
4988
4811
  minute: 0,
4989
4812
  dateOffset: 1,
4990
4813
  })) {
4814
+ const path = 'maplestory/v1/character/hexamatrix-stat';
4991
4815
  const query = {
4992
4816
  ocid: ocid,
4993
4817
  date: MapleStoryApi.toDateString({
@@ -4996,23 +4820,10 @@ class MapleStoryApi {
4996
4820
  day: 21,
4997
4821
  }, dateOptions),
4998
4822
  };
4999
- try {
5000
- const path = 'maplestory/v1/character/hexamatrix-stat';
5001
- const response = await axios__default["default"].get(path, {
5002
- baseURL: MapleStoryApi.BASE_URL,
5003
- timeout: this.timeout,
5004
- headers: this.buildHeaders(),
5005
- params: query,
5006
- });
5007
- return new CharacterHexaMatrixStatDto(response.data);
5008
- }
5009
- catch (e) {
5010
- if (e instanceof axios.AxiosError) {
5011
- const errorBody = e.response.data;
5012
- throw new MapleStoryApiError(errorBody);
5013
- }
5014
- throw e;
5015
- }
4823
+ const { data } = await this.client.get(path, {
4824
+ params: query,
4825
+ });
4826
+ return new CharacterHexaMatrixStatDto(data);
5016
4827
  }
5017
4828
  /**
5018
4829
  * 캐릭터 무릉도장 최고 기록 정보를 조회합니다.
@@ -5028,6 +4839,7 @@ class MapleStoryApi {
5028
4839
  minute: 0,
5029
4840
  dateOffset: 1,
5030
4841
  })) {
4842
+ const path = 'maplestory/v1/character/dojang';
5031
4843
  const query = {
5032
4844
  ocid: ocid,
5033
4845
  date: MapleStoryApi.toDateString({
@@ -5036,23 +4848,10 @@ class MapleStoryApi {
5036
4848
  day: 21,
5037
4849
  }, dateOptions),
5038
4850
  };
5039
- try {
5040
- const path = 'maplestory/v1/character/dojang';
5041
- const response = await axios__default["default"].get(path, {
5042
- baseURL: MapleStoryApi.BASE_URL,
5043
- timeout: this.timeout,
5044
- headers: this.buildHeaders(),
5045
- params: query,
5046
- });
5047
- return new CharacterDojangDto(response.data);
5048
- }
5049
- catch (e) {
5050
- if (e instanceof axios.AxiosError) {
5051
- const errorBody = e.response.data;
5052
- throw new MapleStoryApiError(errorBody);
5053
- }
5054
- throw e;
5055
- }
4851
+ const { data } = await this.client.get(path, {
4852
+ params: query,
4853
+ });
4854
+ return new CharacterDojangDto(data);
5056
4855
  }
5057
4856
  //#endregion
5058
4857
  //#region 유니온 정보 조회
@@ -5070,6 +4869,7 @@ class MapleStoryApi {
5070
4869
  minute: 0,
5071
4870
  dateOffset: 1,
5072
4871
  })) {
4872
+ const path = 'maplestory/v1/user/union';
5073
4873
  const query = {
5074
4874
  ocid: ocid,
5075
4875
  date: MapleStoryApi.toDateString({
@@ -5078,23 +4878,10 @@ class MapleStoryApi {
5078
4878
  day: 21,
5079
4879
  }, dateOptions),
5080
4880
  };
5081
- try {
5082
- const path = 'maplestory/v1/user/union';
5083
- const response = await axios__default["default"].get(path, {
5084
- baseURL: MapleStoryApi.BASE_URL,
5085
- timeout: this.timeout,
5086
- headers: this.buildHeaders(),
5087
- params: query,
5088
- });
5089
- return new UnionDto(response.data);
5090
- }
5091
- catch (e) {
5092
- if (e instanceof axios.AxiosError) {
5093
- const errorBody = e.response.data;
5094
- throw new MapleStoryApiError(errorBody);
5095
- }
5096
- throw e;
5097
- }
4881
+ const { data } = await this.client.get(path, {
4882
+ params: query,
4883
+ });
4884
+ return new UnionDto(data);
5098
4885
  }
5099
4886
  /**
5100
4887
  * 유니온 공격대 정보를 조회합니다.
@@ -5110,6 +4897,7 @@ class MapleStoryApi {
5110
4897
  minute: 0,
5111
4898
  dateOffset: 1,
5112
4899
  })) {
4900
+ const path = 'maplestory/v1/user/union-raider';
5113
4901
  const query = {
5114
4902
  ocid: ocid,
5115
4903
  date: MapleStoryApi.toDateString({
@@ -5118,23 +4906,10 @@ class MapleStoryApi {
5118
4906
  day: 21,
5119
4907
  }, dateOptions),
5120
4908
  };
5121
- try {
5122
- const path = 'maplestory/v1/user/union-raider';
5123
- const response = await axios__default["default"].get(path, {
5124
- baseURL: MapleStoryApi.BASE_URL,
5125
- timeout: this.timeout,
5126
- headers: this.buildHeaders(),
5127
- params: query,
5128
- });
5129
- return new UnionRaiderDto(response.data);
5130
- }
5131
- catch (e) {
5132
- if (e instanceof axios.AxiosError) {
5133
- const errorBody = e.response.data;
5134
- throw new MapleStoryApiError(errorBody);
5135
- }
5136
- throw e;
5137
- }
4909
+ const { data } = await this.client.get(path, {
4910
+ params: query,
4911
+ });
4912
+ return new UnionRaiderDto(data);
5138
4913
  }
5139
4914
  /**
5140
4915
  * 유니온 아티팩트 정보를 조회합니다.
@@ -5150,6 +4925,7 @@ class MapleStoryApi {
5150
4925
  minute: 0,
5151
4926
  dateOffset: 1,
5152
4927
  })) {
4928
+ const path = 'maplestory/v1/user/union-artifact';
5153
4929
  const query = {
5154
4930
  ocid: ocid,
5155
4931
  date: MapleStoryApi.toDateString({
@@ -5158,23 +4934,10 @@ class MapleStoryApi {
5158
4934
  day: 21,
5159
4935
  }, dateOptions),
5160
4936
  };
5161
- try {
5162
- const path = 'maplestory/v1/user/union-artifact';
5163
- const response = await axios__default["default"].get(path, {
5164
- baseURL: MapleStoryApi.BASE_URL,
5165
- timeout: this.timeout,
5166
- headers: this.buildHeaders(),
5167
- params: query,
5168
- });
5169
- return new UnionArtifactDto(response.data);
5170
- }
5171
- catch (e) {
5172
- if (e instanceof axios.AxiosError) {
5173
- const errorBody = e.response.data;
5174
- throw new MapleStoryApiError(errorBody);
5175
- }
5176
- throw e;
5177
- }
4937
+ const { data } = await this.client.get(path, {
4938
+ params: query,
4939
+ });
4940
+ return new UnionArtifactDto(data);
5178
4941
  }
5179
4942
  //#endregion
5180
4943
  //#region 길드 정보 조회
@@ -5188,26 +4951,14 @@ class MapleStoryApi {
5188
4951
  * @param worldName 월드 명
5189
4952
  */
5190
4953
  async getGuild(guildName, worldName) {
5191
- try {
5192
- const path = 'maplestory/v1/guild/id';
5193
- const response = await axios__default["default"].get(path, {
5194
- baseURL: MapleStoryApi.BASE_URL,
5195
- timeout: this.timeout,
5196
- headers: this.buildHeaders(),
5197
- params: {
5198
- guild_name: guildName,
5199
- world_name: worldName,
5200
- },
5201
- });
5202
- return new GuildDto(response.data);
5203
- }
5204
- catch (e) {
5205
- if (e instanceof axios.AxiosError) {
5206
- const errorBody = e.response.data;
5207
- throw new MapleStoryApiError(errorBody);
5208
- }
5209
- throw e;
5210
- }
4954
+ const path = 'maplestory/v1/guild/id';
4955
+ const { data } = await this.client.get(path, {
4956
+ params: {
4957
+ guild_name: guildName,
4958
+ world_name: worldName,
4959
+ },
4960
+ });
4961
+ return new GuildDto(data);
5211
4962
  }
5212
4963
  /**
5213
4964
  * 길드 기본 정보를 조회합니다.
@@ -5223,6 +4974,7 @@ class MapleStoryApi {
5223
4974
  minute: 0,
5224
4975
  dateOffset: 1,
5225
4976
  })) {
4977
+ const path = 'maplestory/v1/guild/basic';
5226
4978
  const query = {
5227
4979
  oguild_id: guildId,
5228
4980
  date: MapleStoryApi.toDateString({
@@ -5231,25 +4983,13 @@ class MapleStoryApi {
5231
4983
  day: 21,
5232
4984
  }, dateOptions),
5233
4985
  };
5234
- try {
5235
- const path = 'maplestory/v1/guild/basic';
5236
- const response = await axios__default["default"].get(path, {
5237
- baseURL: MapleStoryApi.BASE_URL,
5238
- timeout: this.timeout,
5239
- headers: this.buildHeaders(),
5240
- params: query,
5241
- });
5242
- return new GuildBasicDto(response.data);
5243
- }
5244
- catch (e) {
5245
- if (e instanceof axios.AxiosError) {
5246
- const errorBody = e.response.data;
5247
- throw new MapleStoryApiError(errorBody);
5248
- }
5249
- throw e;
5250
- }
4986
+ const { data } = await this.client.get(path, {
4987
+ params: query,
4988
+ });
4989
+ return new GuildBasicDto(data);
5251
4990
  }
5252
4991
  async getStarforceHistory(count, parameter) {
4992
+ const path = 'maplestory/v1/history/starforce';
5253
4993
  const query = {
5254
4994
  count,
5255
4995
  };
@@ -5268,25 +5008,13 @@ class MapleStoryApi {
5268
5008
  dateOffset: 0,
5269
5009
  }));
5270
5010
  }
5271
- try {
5272
- const path = 'maplestory/v1/history/starforce';
5273
- const response = await axios__default["default"].get(path, {
5274
- baseURL: MapleStoryApi.BASE_URL,
5275
- timeout: this.timeout,
5276
- headers: this.buildHeaders(),
5277
- params: query,
5278
- });
5279
- return new StarforceHistoryResponseDto(response.data);
5280
- }
5281
- catch (e) {
5282
- if (e instanceof axios.AxiosError) {
5283
- const errorBody = e.response.data;
5284
- throw new MapleStoryApiError(errorBody);
5285
- }
5286
- throw e;
5287
- }
5011
+ const { data } = await this.client.get(path, {
5012
+ params: query,
5013
+ });
5014
+ return new StarforceHistoryResponseDto(data);
5288
5015
  }
5289
5016
  async getCubeHistory(count, parameter) {
5017
+ const path = 'maplestory/v1/history/cube';
5290
5018
  const query = {
5291
5019
  count,
5292
5020
  };
@@ -5305,25 +5033,13 @@ class MapleStoryApi {
5305
5033
  dateOffset: 1,
5306
5034
  }));
5307
5035
  }
5308
- try {
5309
- const path = 'maplestory/v1/history/cube';
5310
- const response = await axios__default["default"].get(path, {
5311
- baseURL: MapleStoryApi.BASE_URL,
5312
- timeout: this.timeout,
5313
- headers: this.buildHeaders(),
5314
- params: query,
5315
- });
5316
- return new CubeHistoryResponseDto(response.data);
5317
- }
5318
- catch (e) {
5319
- if (e instanceof axios.AxiosError) {
5320
- const errorBody = e.response.data;
5321
- throw new MapleStoryApiError(errorBody);
5322
- }
5323
- throw e;
5324
- }
5036
+ const { data } = await this.client.get(path, {
5037
+ params: query,
5038
+ });
5039
+ return new CubeHistoryResponseDto(data);
5325
5040
  }
5326
5041
  async getPotentialHistory(count, parameter) {
5042
+ const path = 'maplestory/v1/history/potential';
5327
5043
  const query = {
5328
5044
  count,
5329
5045
  };
@@ -5342,23 +5058,10 @@ class MapleStoryApi {
5342
5058
  dateOffset: 1,
5343
5059
  }));
5344
5060
  }
5345
- try {
5346
- const path = 'maplestory/v1/history/potential';
5347
- const response = await axios__default["default"].get(path, {
5348
- baseURL: MapleStoryApi.BASE_URL,
5349
- timeout: this.timeout,
5350
- headers: this.buildHeaders(),
5351
- params: query,
5352
- });
5353
- return new PotentialHistoryResponseDto(response.data);
5354
- }
5355
- catch (e) {
5356
- if (e instanceof axios.AxiosError) {
5357
- const errorBody = e.response.data;
5358
- throw new MapleStoryApiError(errorBody);
5359
- }
5360
- throw e;
5361
- }
5061
+ const { data } = await this.client.get(path, {
5062
+ params: query,
5063
+ });
5064
+ return new PotentialHistoryResponseDto(data);
5362
5065
  }
5363
5066
  //#endregion
5364
5067
  //#region 랭킹 정보 조회
@@ -5377,6 +5080,7 @@ class MapleStoryApi {
5377
5080
  minute: 30,
5378
5081
  dateOffset: 0,
5379
5082
  })) {
5083
+ const path = 'maplestory/v1/ranking/overall';
5380
5084
  const query = {
5381
5085
  date: MapleStoryApi.toDateString({
5382
5086
  year: 2023,
@@ -5392,23 +5096,10 @@ class MapleStoryApi {
5392
5096
  query.ocid = ocid;
5393
5097
  query.page = page;
5394
5098
  }
5395
- try {
5396
- const path = 'maplestory/v1/ranking/overall';
5397
- const response = await axios__default["default"].get(path, {
5398
- baseURL: MapleStoryApi.BASE_URL,
5399
- timeout: this.timeout,
5400
- headers: this.buildHeaders(),
5401
- params: query,
5402
- });
5403
- return new OverallRankingResponseDto(response.data);
5404
- }
5405
- catch (e) {
5406
- if (e instanceof axios.AxiosError) {
5407
- const errorBody = e.response.data;
5408
- throw new MapleStoryApiError(errorBody);
5409
- }
5410
- throw e;
5411
- }
5099
+ const { data } = await this.client.get(path, {
5100
+ params: query,
5101
+ });
5102
+ return new OverallRankingResponseDto(data);
5412
5103
  }
5413
5104
  /**
5414
5105
  * 유니온 랭킹 정보를 조회합니다.
@@ -5424,6 +5115,7 @@ class MapleStoryApi {
5424
5115
  minute: 30,
5425
5116
  dateOffset: 0,
5426
5117
  })) {
5118
+ const path = 'maplestory/v1/ranking/union';
5427
5119
  const query = {
5428
5120
  date: MapleStoryApi.toDateString({
5429
5121
  year: 2023,
@@ -5437,23 +5129,10 @@ class MapleStoryApi {
5437
5129
  query.ocid = ocid;
5438
5130
  query.page = page;
5439
5131
  }
5440
- try {
5441
- const path = 'maplestory/v1/ranking/union';
5442
- const response = await axios__default["default"].get(path, {
5443
- baseURL: MapleStoryApi.BASE_URL,
5444
- timeout: this.timeout,
5445
- headers: this.buildHeaders(),
5446
- params: query,
5447
- });
5448
- return new UnionRankingResponseDto(response.data);
5449
- }
5450
- catch (e) {
5451
- if (e instanceof axios.AxiosError) {
5452
- const errorBody = e.response.data;
5453
- throw new MapleStoryApiError(errorBody);
5454
- }
5455
- throw e;
5456
- }
5132
+ const { data } = await this.client.get(path, {
5133
+ params: query,
5134
+ });
5135
+ return new UnionRankingResponseDto(data);
5457
5136
  }
5458
5137
  /**
5459
5138
  * 길드 랭킹 정보를 조회합니다.
@@ -5469,6 +5148,7 @@ class MapleStoryApi {
5469
5148
  minute: 30,
5470
5149
  dateOffset: 0,
5471
5150
  })) {
5151
+ const path = 'maplestory/v1/ranking/guild';
5472
5152
  const query = {
5473
5153
  date: MapleStoryApi.toDateString({
5474
5154
  year: 2023,
@@ -5484,23 +5164,10 @@ class MapleStoryApi {
5484
5164
  query.ocid = ocid;
5485
5165
  query.page = page;
5486
5166
  }
5487
- try {
5488
- const path = 'maplestory/v1/ranking/guild';
5489
- const response = await axios__default["default"].get(path, {
5490
- baseURL: MapleStoryApi.BASE_URL,
5491
- timeout: this.timeout,
5492
- headers: this.buildHeaders(),
5493
- params: query,
5494
- });
5495
- return new GuildRankingResponseDto(response.data);
5496
- }
5497
- catch (e) {
5498
- if (e instanceof axios.AxiosError) {
5499
- const errorBody = e.response.data;
5500
- throw new MapleStoryApiError(errorBody);
5501
- }
5502
- throw e;
5503
- }
5167
+ const { data } = await this.client.get(path, {
5168
+ params: query,
5169
+ });
5170
+ return new GuildRankingResponseDto(data);
5504
5171
  }
5505
5172
  /**
5506
5173
  * 무릉도장 랭킹 정보를 조회합니다.
@@ -5516,6 +5183,7 @@ class MapleStoryApi {
5516
5183
  minute: 30,
5517
5184
  dateOffset: 0,
5518
5185
  })) {
5186
+ const path = 'maplestory/v1/ranking/dojang';
5519
5187
  const query = {
5520
5188
  date: MapleStoryApi.toDateString({
5521
5189
  year: 2023,
@@ -5532,23 +5200,10 @@ class MapleStoryApi {
5532
5200
  query.ocid = ocid;
5533
5201
  query.page = page;
5534
5202
  }
5535
- try {
5536
- const path = 'maplestory/v1/ranking/dojang';
5537
- const response = await axios__default["default"].get(path, {
5538
- baseURL: MapleStoryApi.BASE_URL,
5539
- timeout: this.timeout,
5540
- headers: this.buildHeaders(),
5541
- params: query,
5542
- });
5543
- return new DojangRankingResponseDto(response.data);
5544
- }
5545
- catch (e) {
5546
- if (e instanceof axios.AxiosError) {
5547
- const errorBody = e.response.data;
5548
- throw new MapleStoryApiError(errorBody);
5549
- }
5550
- throw e;
5551
- }
5203
+ const { data } = await this.client.get(path, {
5204
+ params: query,
5205
+ });
5206
+ return new DojangRankingResponseDto(data);
5552
5207
  }
5553
5208
  /**
5554
5209
  * 더 시드 랭킹 정보를 조회합니다.
@@ -5564,6 +5219,7 @@ class MapleStoryApi {
5564
5219
  minute: 30,
5565
5220
  dateOffset: 0,
5566
5221
  })) {
5222
+ const path = 'maplestory/v1/ranking/theseed';
5567
5223
  const query = {
5568
5224
  date: MapleStoryApi.toDateString({
5569
5225
  year: 2023,
@@ -5577,23 +5233,10 @@ class MapleStoryApi {
5577
5233
  query.ocid = ocid;
5578
5234
  query.page = page;
5579
5235
  }
5580
- try {
5581
- const path = 'maplestory/v1/ranking/theseed';
5582
- const response = await axios__default["default"].get(path, {
5583
- baseURL: MapleStoryApi.BASE_URL,
5584
- timeout: this.timeout,
5585
- headers: this.buildHeaders(),
5586
- params: query,
5587
- });
5588
- return new TheSeedRankingResponseDto(response.data);
5589
- }
5590
- catch (e) {
5591
- if (e instanceof axios.AxiosError) {
5592
- const errorBody = e.response.data;
5593
- throw new MapleStoryApiError(errorBody);
5594
- }
5595
- throw e;
5596
- }
5236
+ const { data } = await this.client.get(path, {
5237
+ params: query,
5238
+ });
5239
+ return new TheSeedRankingResponseDto(data);
5597
5240
  }
5598
5241
  /**
5599
5242
  * 업적 랭킹 정보를 조회합니다.
@@ -5609,6 +5252,7 @@ class MapleStoryApi {
5609
5252
  minute: 30,
5610
5253
  dateOffset: 0,
5611
5254
  })) {
5255
+ const path = 'maplestory/v1/ranking/achievement';
5612
5256
  const query = {
5613
5257
  date: MapleStoryApi.toDateString({
5614
5258
  year: 2023,
@@ -5621,23 +5265,10 @@ class MapleStoryApi {
5621
5265
  query.ocid = ocid;
5622
5266
  query.page = page;
5623
5267
  }
5624
- try {
5625
- const path = 'maplestory/v1/ranking/achievement';
5626
- const response = await axios__default["default"].get(path, {
5627
- baseURL: MapleStoryApi.BASE_URL,
5628
- timeout: this.timeout,
5629
- headers: this.buildHeaders(),
5630
- params: query,
5631
- });
5632
- return new AchievementRankingResponseDto(response.data);
5633
- }
5634
- catch (e) {
5635
- if (e instanceof axios.AxiosError) {
5636
- const errorBody = e.response.data;
5637
- throw new MapleStoryApiError(errorBody);
5638
- }
5639
- throw e;
5640
- }
5268
+ const { data } = await this.client.get(path, {
5269
+ params: query,
5270
+ });
5271
+ return new AchievementRankingResponseDto(data);
5641
5272
  }
5642
5273
  //#endregion
5643
5274
  /**
@@ -5676,11 +5307,6 @@ class MapleStoryApi {
5676
5307
  const xml = (await xml2js__default["default"].parseStringPromise(response.data));
5677
5308
  return new InspectionInfoDto(xml);
5678
5309
  }
5679
- buildHeaders() {
5680
- return {
5681
- 'x-nxopen-api-key': this.apiKey,
5682
- };
5683
- }
5684
5310
  /**
5685
5311
  * API 서버의 데이터 갱신 시간에 따라 데이터가 조회 가능한 최신 날짜를 반환합니다.
5686
5312
  *