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.
- package/README.md +20 -15
- package/dist/index.js +4283 -71
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +4211 -72
- package/package.json +4 -3
- package/types/index.d.ts +75 -0
- package/types/maplestory/api/dto/achievementRankingDto.d.ts +40 -0
- package/types/maplestory/api/dto/achievementRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/dto/characterAbilityDto.d.ts +25 -0
- package/types/maplestory/api/dto/characterAbilityInfoDto.d.ts +11 -0
- package/types/maplestory/api/dto/characterAndroidCashItemEquipmentColoringPrismDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterAndroidCashItemEquipmentDto.d.ts +50 -0
- package/types/maplestory/api/dto/characterAndroidCashItemEquipmentOptionDto.d.ts +16 -0
- package/types/maplestory/api/dto/characterAndroidEquipmentDto.d.ts +51 -0
- package/types/maplestory/api/dto/characterAndroidEquipmentFaceDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterAndroidEquipmentHairDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterBasicDto.d.ts +49 -0
- package/types/maplestory/api/dto/characterBeautyEquipmentDto.d.ts +49 -0
- package/types/maplestory/api/dto/characterBeautyEquipmentFaceDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterBeautyEquipmentHairDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterCashItemEquipmentColoringPrismDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterCashItemEquipmentDto.d.ts +49 -0
- package/types/maplestory/api/dto/characterCashItemEquipmentOptionDto.d.ts +16 -0
- package/types/maplestory/api/dto/characterCashItemEquipmentPresetDto.d.ts +54 -0
- package/types/maplestory/api/dto/characterDojangDto.d.ts +32 -0
- package/types/maplestory/api/dto/characterDto.d.ts +12 -0
- package/types/maplestory/api/dto/characterHexaMatrixDto.d.ts +17 -0
- package/types/maplestory/api/dto/characterHexaMatrixEquipmentDto.d.ts +25 -0
- package/types/maplestory/api/dto/characterHexaMatrixEquipmentLinkedSkillDto.d.ts +12 -0
- package/types/maplestory/api/dto/characterHexaMatrixStatCoreDto.d.ts +40 -0
- package/types/maplestory/api/dto/characterHexaMatrixStatDto.d.ts +25 -0
- package/types/maplestory/api/dto/characterHyperStatDto.d.ts +49 -0
- package/types/maplestory/api/dto/characterHyperStatInfoDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterItemEquipmentAddOptionDto.d.ts +68 -0
- package/types/maplestory/api/dto/characterItemEquipmentBaseOptionDto.d.ts +76 -0
- package/types/maplestory/api/dto/characterItemEquipmentDto.d.ts +38 -0
- package/types/maplestory/api/dto/characterItemEquipmentEtcOptionDto.d.ts +52 -0
- package/types/maplestory/api/dto/characterItemEquipmentExceptionalOptionDto.d.ts +40 -0
- package/types/maplestory/api/dto/characterItemEquipmentInfoDto.d.ts +155 -0
- package/types/maplestory/api/dto/characterItemEquipmentStarforceOptionDto.d.ts +52 -0
- package/types/maplestory/api/dto/characterItemEquipmentTitleDto.d.ts +28 -0
- package/types/maplestory/api/dto/characterItemEquipmentTotalOptionDto.d.ts +80 -0
- package/types/maplestory/api/dto/characterLinkSkillDto.d.ts +25 -0
- package/types/maplestory/api/dto/characterLinkSkillInfoDto.d.ts +28 -0
- package/types/maplestory/api/dto/characterPetEquipmentAutoSkillDto.d.ts +24 -0
- package/types/maplestory/api/dto/characterPetEquipmentDto.d.ts +116 -0
- package/types/maplestory/api/dto/characterPetEquipmentItemDto.d.ts +33 -0
- package/types/maplestory/api/dto/characterPetEquipmentItemOptionDto.d.ts +16 -0
- package/types/maplestory/api/dto/characterPopularityDto.d.ts +16 -0
- package/types/maplestory/api/dto/characterPropensityDto.d.ts +33 -0
- package/types/maplestory/api/dto/characterSetEffectDto.d.ts +17 -0
- package/types/maplestory/api/dto/characterSetEffectInfoDto.d.ts +21 -0
- package/types/maplestory/api/dto/characterSetEffectOptionInfoDto.d.ts +16 -0
- package/types/maplestory/api/dto/characterSkillDto.d.ts +25 -0
- package/types/maplestory/api/dto/characterSkillInfoDto.d.ts +28 -0
- package/types/maplestory/api/dto/characterStatDto.d.ts +27 -0
- package/types/maplestory/api/dto/characterSymbolEquipmentDto.d.ts +21 -0
- package/types/maplestory/api/dto/characterSymbolEquipmentInfoDto.d.ts +56 -0
- package/types/maplestory/api/dto/characterVMatrixCoreEquipmentDto.d.ts +40 -0
- package/types/maplestory/api/dto/characterVMatrixDto.d.ts +25 -0
- package/types/maplestory/api/dto/cubeHistoryDto.d.ts +18 -18
- package/types/maplestory/api/dto/cubeHistoryResponseDto.d.ts +2 -2
- package/types/maplestory/api/dto/cubeResultOptionDto.d.ts +1 -1
- package/types/maplestory/api/dto/dojangRankingDto.d.ts +44 -0
- package/types/maplestory/api/dto/dojangRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/dto/guildBasicDto.d.ts +61 -0
- package/types/maplestory/api/dto/guildDto.d.ts +12 -0
- package/types/maplestory/api/dto/guildRankingDto.d.ts +40 -0
- package/types/maplestory/api/dto/guildRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/dto/guildSkillDto.d.ts +28 -0
- package/types/maplestory/api/dto/overallRankingDto.d.ts +48 -0
- package/types/maplestory/api/dto/overallRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/dto/theSeedRankingDto.d.ts +44 -0
- package/types/maplestory/api/dto/theSeedRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/dto/unionDto.d.ts +20 -0
- package/types/maplestory/api/dto/unionRaiderBlockDto.d.ts +30 -0
- package/types/maplestory/api/dto/unionRaiderBlockPositionDto.d.ts +16 -0
- package/types/maplestory/api/dto/unionRaiderControlPointDto.d.ts +16 -0
- package/types/maplestory/api/dto/unionRaiderDto.d.ts +27 -0
- package/types/maplestory/api/dto/unionRaiderInnerStatDto.d.ts +16 -0
- package/types/maplestory/api/dto/unionRankingDto.d.ts +40 -0
- package/types/maplestory/api/dto/unionRankingResponseDto.d.ts +13 -0
- package/types/maplestory/api/mapleStoryApi.d.ts +760 -19
- package/types/maplestory/api/mapleStoryApiError.d.ts +18 -7
- package/types/maplestory/api/response/achievementRankingResponseDtoBody.d.ts +13 -0
- package/types/maplestory/api/response/characterAbilityDtoBody.d.ts +12 -0
- package/types/maplestory/api/response/characterAndroidEquipmentDtoBody.d.ts +47 -0
- package/types/maplestory/api/response/characterBasicDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/characterBeautyEquipmentDtoBody.d.ts +24 -0
- package/types/maplestory/api/response/characterCashItemEquipmentDtoBody.d.ts +36 -0
- package/types/maplestory/api/response/characterDojangDtoBody.d.ts +9 -0
- package/types/maplestory/api/response/characterDtoBody.d.ts +4 -0
- package/types/maplestory/api/response/characterHexaMatrixDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/characterHexaMatrixStatDtoBody.d.ts +17 -0
- package/types/maplestory/api/response/characterHyperStatDtoBody.d.ts +19 -0
- package/types/maplestory/api/response/characterItemEquipmentDtoBody.d.ts +155 -0
- package/types/maplestory/api/response/characterLinkSkillDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/characterPetEquipmentDtoBody.d.ts +49 -0
- package/types/maplestory/api/response/characterPopularityDtoBody.d.ts +5 -0
- package/types/maplestory/api/response/characterPropensityDtoBody.d.ts +10 -0
- package/types/maplestory/api/response/characterSetEffectDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/characterSkillDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/characterStatDtoBody.d.ts +10 -0
- package/types/maplestory/api/response/characterSymbolEquipmentDtoBody.d.ts +20 -0
- package/types/maplestory/api/response/characterVMatrixDtoBody.d.ts +17 -0
- package/types/maplestory/api/response/cubeHistoryDtoBody.d.ts +8 -8
- package/types/maplestory/api/response/cubeHistoryResponseDtoBody.d.ts +1 -1
- package/types/maplestory/api/response/dojangRankingResponseDtoBody.d.ts +14 -0
- package/types/maplestory/api/response/guildBasicDtoBody.d.ts +23 -0
- package/types/maplestory/api/response/guildDtoBody.d.ts +4 -0
- package/types/maplestory/api/response/guildRankingResponseDtoBody.d.ts +13 -0
- package/types/maplestory/api/response/overallRankingResponseDtoBody.d.ts +15 -0
- package/types/maplestory/api/response/rankingResponseDtoBody.d.ts +7 -0
- package/types/maplestory/api/response/theSeedRankingResponseDtoBody.d.ts +15 -0
- package/types/maplestory/api/response/unionDtoBody.d.ts +6 -0
- package/types/maplestory/api/response/unionRaiderDtoBody.d.ts +27 -0
- package/types/maplestory/api/response/unionRankingResponseDtoBody.d.ts +13 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/maplestory-openapi)
|
|
4
4
|
|
|
5
|
-
This JavaScript library enables the use of the MapleStory OpenAPI
|
|
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@
|
|
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.
|
|
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,
|
|
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://
|
|
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
|
|
70
|
-
|
|
71
|
-
|
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
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 |
|