maplestory-openapi 1.1.0 → 2.1.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 (117) hide show
  1. package/README.md +20 -15
  2. package/dist/index.js +4283 -71
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.mjs +4211 -72
  5. package/package.json +4 -3
  6. package/types/index.d.ts +75 -0
  7. package/types/maplestory/api/dto/achievementRankingDto.d.ts +40 -0
  8. package/types/maplestory/api/dto/achievementRankingResponseDto.d.ts +13 -0
  9. package/types/maplestory/api/dto/characterAbilityDto.d.ts +25 -0
  10. package/types/maplestory/api/dto/characterAbilityInfoDto.d.ts +11 -0
  11. package/types/maplestory/api/dto/characterAndroidCashItemEquipmentColoringPrismDto.d.ts +24 -0
  12. package/types/maplestory/api/dto/characterAndroidCashItemEquipmentDto.d.ts +50 -0
  13. package/types/maplestory/api/dto/characterAndroidCashItemEquipmentOptionDto.d.ts +16 -0
  14. package/types/maplestory/api/dto/characterAndroidEquipmentDto.d.ts +51 -0
  15. package/types/maplestory/api/dto/characterAndroidEquipmentFaceDto.d.ts +24 -0
  16. package/types/maplestory/api/dto/characterAndroidEquipmentHairDto.d.ts +24 -0
  17. package/types/maplestory/api/dto/characterBasicDto.d.ts +49 -0
  18. package/types/maplestory/api/dto/characterBeautyEquipmentDto.d.ts +49 -0
  19. package/types/maplestory/api/dto/characterBeautyEquipmentFaceDto.d.ts +24 -0
  20. package/types/maplestory/api/dto/characterBeautyEquipmentHairDto.d.ts +24 -0
  21. package/types/maplestory/api/dto/characterCashItemEquipmentColoringPrismDto.d.ts +24 -0
  22. package/types/maplestory/api/dto/characterCashItemEquipmentDto.d.ts +49 -0
  23. package/types/maplestory/api/dto/characterCashItemEquipmentOptionDto.d.ts +16 -0
  24. package/types/maplestory/api/dto/characterCashItemEquipmentPresetDto.d.ts +54 -0
  25. package/types/maplestory/api/dto/characterDojangDto.d.ts +32 -0
  26. package/types/maplestory/api/dto/characterDto.d.ts +12 -0
  27. package/types/maplestory/api/dto/characterHexaMatrixDto.d.ts +17 -0
  28. package/types/maplestory/api/dto/characterHexaMatrixEquipmentDto.d.ts +25 -0
  29. package/types/maplestory/api/dto/characterHexaMatrixEquipmentLinkedSkillDto.d.ts +12 -0
  30. package/types/maplestory/api/dto/characterHexaMatrixStatCoreDto.d.ts +40 -0
  31. package/types/maplestory/api/dto/characterHexaMatrixStatDto.d.ts +25 -0
  32. package/types/maplestory/api/dto/characterHyperStatDto.d.ts +49 -0
  33. package/types/maplestory/api/dto/characterHyperStatInfoDto.d.ts +24 -0
  34. package/types/maplestory/api/dto/characterItemEquipmentAddOptionDto.d.ts +68 -0
  35. package/types/maplestory/api/dto/characterItemEquipmentBaseOptionDto.d.ts +76 -0
  36. package/types/maplestory/api/dto/characterItemEquipmentDto.d.ts +38 -0
  37. package/types/maplestory/api/dto/characterItemEquipmentEtcOptionDto.d.ts +52 -0
  38. package/types/maplestory/api/dto/characterItemEquipmentExceptionalOptionDto.d.ts +40 -0
  39. package/types/maplestory/api/dto/characterItemEquipmentInfoDto.d.ts +155 -0
  40. package/types/maplestory/api/dto/characterItemEquipmentStarforceOptionDto.d.ts +52 -0
  41. package/types/maplestory/api/dto/characterItemEquipmentTitleDto.d.ts +28 -0
  42. package/types/maplestory/api/dto/characterItemEquipmentTotalOptionDto.d.ts +80 -0
  43. package/types/maplestory/api/dto/characterLinkSkillDto.d.ts +25 -0
  44. package/types/maplestory/api/dto/characterLinkSkillInfoDto.d.ts +28 -0
  45. package/types/maplestory/api/dto/characterPetEquipmentAutoSkillDto.d.ts +24 -0
  46. package/types/maplestory/api/dto/characterPetEquipmentDto.d.ts +116 -0
  47. package/types/maplestory/api/dto/characterPetEquipmentItemDto.d.ts +33 -0
  48. package/types/maplestory/api/dto/characterPetEquipmentItemOptionDto.d.ts +16 -0
  49. package/types/maplestory/api/dto/characterPopularityDto.d.ts +16 -0
  50. package/types/maplestory/api/dto/characterPropensityDto.d.ts +33 -0
  51. package/types/maplestory/api/dto/characterSetEffectDto.d.ts +17 -0
  52. package/types/maplestory/api/dto/characterSetEffectInfoDto.d.ts +21 -0
  53. package/types/maplestory/api/dto/characterSetEffectOptionInfoDto.d.ts +16 -0
  54. package/types/maplestory/api/dto/characterSkillDto.d.ts +25 -0
  55. package/types/maplestory/api/dto/characterSkillInfoDto.d.ts +28 -0
  56. package/types/maplestory/api/dto/characterStatDto.d.ts +27 -0
  57. package/types/maplestory/api/dto/characterSymbolEquipmentDto.d.ts +21 -0
  58. package/types/maplestory/api/dto/characterSymbolEquipmentInfoDto.d.ts +56 -0
  59. package/types/maplestory/api/dto/characterVMatrixCoreEquipmentDto.d.ts +40 -0
  60. package/types/maplestory/api/dto/characterVMatrixDto.d.ts +25 -0
  61. package/types/maplestory/api/dto/cubeHistoryDto.d.ts +18 -18
  62. package/types/maplestory/api/dto/cubeHistoryResponseDto.d.ts +2 -2
  63. package/types/maplestory/api/dto/cubeResultOptionDto.d.ts +1 -1
  64. package/types/maplestory/api/dto/dojangRankingDto.d.ts +44 -0
  65. package/types/maplestory/api/dto/dojangRankingResponseDto.d.ts +13 -0
  66. package/types/maplestory/api/dto/guildBasicDto.d.ts +61 -0
  67. package/types/maplestory/api/dto/guildDto.d.ts +12 -0
  68. package/types/maplestory/api/dto/guildRankingDto.d.ts +40 -0
  69. package/types/maplestory/api/dto/guildRankingResponseDto.d.ts +13 -0
  70. package/types/maplestory/api/dto/guildSkillDto.d.ts +28 -0
  71. package/types/maplestory/api/dto/overallRankingDto.d.ts +48 -0
  72. package/types/maplestory/api/dto/overallRankingResponseDto.d.ts +13 -0
  73. package/types/maplestory/api/dto/theSeedRankingDto.d.ts +44 -0
  74. package/types/maplestory/api/dto/theSeedRankingResponseDto.d.ts +13 -0
  75. package/types/maplestory/api/dto/unionDto.d.ts +20 -0
  76. package/types/maplestory/api/dto/unionRaiderBlockDto.d.ts +30 -0
  77. package/types/maplestory/api/dto/unionRaiderBlockPositionDto.d.ts +16 -0
  78. package/types/maplestory/api/dto/unionRaiderControlPointDto.d.ts +16 -0
  79. package/types/maplestory/api/dto/unionRaiderDto.d.ts +27 -0
  80. package/types/maplestory/api/dto/unionRaiderInnerStatDto.d.ts +16 -0
  81. package/types/maplestory/api/dto/unionRankingDto.d.ts +40 -0
  82. package/types/maplestory/api/dto/unionRankingResponseDto.d.ts +13 -0
  83. package/types/maplestory/api/mapleStoryApi.d.ts +760 -19
  84. package/types/maplestory/api/mapleStoryApiError.d.ts +18 -7
  85. package/types/maplestory/api/response/achievementRankingResponseDtoBody.d.ts +13 -0
  86. package/types/maplestory/api/response/characterAbilityDtoBody.d.ts +12 -0
  87. package/types/maplestory/api/response/characterAndroidEquipmentDtoBody.d.ts +47 -0
  88. package/types/maplestory/api/response/characterBasicDtoBody.d.ts +14 -0
  89. package/types/maplestory/api/response/characterBeautyEquipmentDtoBody.d.ts +24 -0
  90. package/types/maplestory/api/response/characterCashItemEquipmentDtoBody.d.ts +36 -0
  91. package/types/maplestory/api/response/characterDojangDtoBody.d.ts +9 -0
  92. package/types/maplestory/api/response/characterDtoBody.d.ts +4 -0
  93. package/types/maplestory/api/response/characterHexaMatrixDtoBody.d.ts +14 -0
  94. package/types/maplestory/api/response/characterHexaMatrixStatDtoBody.d.ts +17 -0
  95. package/types/maplestory/api/response/characterHyperStatDtoBody.d.ts +19 -0
  96. package/types/maplestory/api/response/characterItemEquipmentDtoBody.d.ts +155 -0
  97. package/types/maplestory/api/response/characterLinkSkillDtoBody.d.ts +14 -0
  98. package/types/maplestory/api/response/characterPetEquipmentDtoBody.d.ts +49 -0
  99. package/types/maplestory/api/response/characterPopularityDtoBody.d.ts +5 -0
  100. package/types/maplestory/api/response/characterPropensityDtoBody.d.ts +10 -0
  101. package/types/maplestory/api/response/characterSetEffectDtoBody.d.ts +14 -0
  102. package/types/maplestory/api/response/characterSkillDtoBody.d.ts +14 -0
  103. package/types/maplestory/api/response/characterStatDtoBody.d.ts +10 -0
  104. package/types/maplestory/api/response/characterSymbolEquipmentDtoBody.d.ts +20 -0
  105. package/types/maplestory/api/response/characterVMatrixDtoBody.d.ts +17 -0
  106. package/types/maplestory/api/response/cubeHistoryDtoBody.d.ts +8 -8
  107. package/types/maplestory/api/response/cubeHistoryResponseDtoBody.d.ts +1 -1
  108. package/types/maplestory/api/response/dojangRankingResponseDtoBody.d.ts +14 -0
  109. package/types/maplestory/api/response/guildBasicDtoBody.d.ts +23 -0
  110. package/types/maplestory/api/response/guildDtoBody.d.ts +4 -0
  111. package/types/maplestory/api/response/guildRankingResponseDtoBody.d.ts +13 -0
  112. package/types/maplestory/api/response/overallRankingResponseDtoBody.d.ts +15 -0
  113. package/types/maplestory/api/response/rankingResponseDtoBody.d.ts +7 -0
  114. package/types/maplestory/api/response/theSeedRankingResponseDtoBody.d.ts +15 -0
  115. package/types/maplestory/api/response/unionDtoBody.d.ts +6 -0
  116. package/types/maplestory/api/response/unionRaiderDtoBody.d.ts +27 -0
  117. package/types/maplestory/api/response/unionRankingResponseDtoBody.d.ts +13 -0
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/maplestory-openapi)](https://www.npmjs.com/package/maplestory-openapi)
4
4
 
5
- This JavaScript library enables the use of the MapleStory OpenAPI provided by Nexon.
5
+ This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
6
6
 
7
7
  Packages written in other languages can be found [HERE](https://github.com/SpiralMoon/maplestory.openapi).
8
8
 
@@ -13,11 +13,15 @@ Packages written in other languages can be found [HERE](https://github.com/Spira
13
13
  Install the latest version of the JavaScript/TypeScript library in your npm project:
14
14
 
15
15
  ```bash
16
- npm install maplestory-openapi@1.1.0 # Replace with the latest version
16
+ npm install maplestory-openapi@2.1.0 # Replace with the latest version
17
17
  ```
18
18
 
19
19
  ## Usage
20
20
 
21
+ ### API Key
22
+
23
+ Before using the library, register your application and obtain an **api key** from the [Nexon Open API Console](https://openapi.nexon.com/my-application/).
24
+
21
25
  ### Supports
22
26
 
23
27
  1. **CommonJS, ESM Support**: The library supports both CommonJS and ESM usage.
@@ -39,13 +43,13 @@ const {MapleStoryApi, MapleStoryApiError} = require('maplestory-openapi');
39
43
  const apiKey = '{Your API Key}';
40
44
  const api = new MapleStoryApi(apiKey);
41
45
 
42
- api.getCubeResult(1000, {
46
+ api.getCubeHistory(1000, {
43
47
  year: 2023,
44
48
  month: 10,
45
49
  day: 15
46
50
  })
47
51
  .then((dto) => {
48
- const {count, cubeHistories, nextCursor} = dto;
52
+ const {count, cubeHistory, nextCursor} = dto;
49
53
 
50
54
  console.log('You used ' + count + ' cubes.');
51
55
  })
@@ -62,17 +66,18 @@ api.getCubeResult(1000, {
62
66
 
63
67
  ### Exception Handling
64
68
 
65
- Handle `MapleStoryApiError` to safely make calls, ensuring that specific Status defined in the [MapleStory OpenAPI Guide](https://developers.nexon.com/Maplestory/guides) are not encountered.
69
+ Handle `MapleStoryApiError` to safely make calls, ensuring that specific Status defined in the [MapleStory OpenAPI Guide](https://openapi.nexon.com/guide/request-api) are not encountered.
66
70
 
67
71
  While `MapleStoryApi` is designed to prevent the occurrence of certain Status, exceptions may arise due to developer mistakes.
68
72
 
69
- Therefore, it's recommended to use `MapleStoryApiError` for exception handling based on the Status list described in the table below.
70
-
71
- | Status | Message |
72
- |--------|---------------------------------------------------------|
73
- | 400 | Request format error (incorrect parameter input) |
74
- | 401 | Unauthorized service (unsupported service, service type) |
75
- | 403 | Unauthorized AccessToken usage |
76
- | 429 | AccessToken's request allowance (Rate Limit) exceeded |
77
- | 500 | Internal server error |
78
- | 504 | Internal server processing timeout |
73
+ Therefore, it's recommended to use `MapleStoryApiError` for exception handling based on the `MapleStoryApiErrorCode` list described in the table below.
74
+
75
+ | ErrorCode | Description |
76
+ |--------------|-------------------------------------------------|
77
+ | OPENAPI00001 | Internal server error |
78
+ | OPENAPI00002 | Access denied |
79
+ | OPENAPI00003 | Invalid identifier |
80
+ | OPENAPI00004 | Request format error (incorrect parameter input) |
81
+ | OPENAPI00005 | Invalid api key |
82
+ | OPENAPI00006 | Invalid api path |
83
+ | OPENAPI00007 | Request allowance (Rate Limit) exceeded |