maplestory-openapi 3.2.1 → 3.4.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 +50 -39
- package/dist/cjs/_virtual/index.js_commonjs-exports2.js +2 -2
- package/dist/cjs/_virtual/index.js_commonjs-exports3.js +2 -2
- package/dist/cjs/maplestory/api/kms/dto/character/characterImage.js +2 -2
- package/dist/cjs/maplestory/api/kms/dto/character/characterItemEquipment.js +11 -1
- package/dist/cjs/maplestory/api/kms/dto/character/characterOtherStat.js +62 -0
- package/dist/cjs/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +34 -0
- package/dist/cjs/maplestory/api/kms/kms.js +4 -0
- package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +66 -10
- package/dist/cjs/maplestory/api/msea/dto/character/characterItemEquipment.js +11 -1
- package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +1 -1
- package/dist/cjs/maplestory/api/tms/dto/character/character.js +22 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterAbility.js +108 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterAndroidEquipment.js +424 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +93 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterBeautyEquipment.js +172 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterCashItemEquipment.js +228 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterDojang.js +49 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterHexaMatrix.js +73 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterHexaMatrixStat.js +113 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterHyperStat.js +97 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterImage.js +81 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterItemEquipment.js +1137 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterLinkSkill.js +115 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterPetEquipment.js +332 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterPopularity.js +27 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterPropensity.js +52 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterSetEffect.js +97 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterSkill.js +77 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterStat.js +57 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterSymbolEquipment.js +119 -0
- package/dist/cjs/maplestory/api/tms/dto/character/characterVMatrix.js +88 -0
- package/dist/cjs/maplestory/api/tms/dto/guild/guild.js +22 -0
- package/dist/cjs/maplestory/api/tms/dto/guild/guildBasic.js +107 -0
- package/dist/cjs/maplestory/api/tms/dto/union/union.js +47 -0
- package/dist/cjs/maplestory/api/tms/dto/union/unionArtifact.js +111 -0
- package/dist/cjs/maplestory/api/tms/dto/union/unionRaider.js +214 -0
- package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +802 -0
- package/dist/cjs/maplestory/api/tms/tms.js +109 -0
- package/dist/cjs/node_modules/base64-js/index.js +1 -1
- package/dist/cjs/node_modules/buffer/index.js +2 -2
- package/dist/cjs/node_modules/dayjs/plugin/utc.js +1 -1
- package/dist/cjs/node_modules/ieee754/index.js +1 -1
- package/dist/esm/_virtual/index.js_commonjs-exports2.js +2 -2
- package/dist/esm/_virtual/index.js_commonjs-exports3.js +2 -2
- package/dist/esm/maplestory/api/kms/dto/character/characterImage.js +2 -2
- package/dist/esm/maplestory/api/kms/dto/character/characterItemEquipment.js +11 -1
- package/dist/esm/maplestory/api/kms/dto/character/characterOtherStat.js +56 -0
- package/dist/esm/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +30 -0
- package/dist/esm/maplestory/api/kms/kms.js +1 -0
- package/dist/esm/maplestory/api/kms/mapleStoryApi.js +66 -10
- package/dist/esm/maplestory/api/msea/dto/character/characterItemEquipment.js +11 -1
- package/dist/esm/maplestory/api/msea/mapleStoryApi.js +1 -1
- package/dist/esm/maplestory/api/tms/dto/character/character.js +18 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterAbility.js +102 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterAndroidEquipment.js +413 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +89 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterBeautyEquipment.js +165 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterCashItemEquipment.js +221 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterDojang.js +45 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterHexaMatrix.js +67 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterHexaMatrixStat.js +108 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterHyperStat.js +92 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterImage.js +77 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterItemEquipment.js +1123 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterLinkSkill.js +110 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterPetEquipment.js +325 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterPopularity.js +23 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterPropensity.js +48 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterSetEffect.js +90 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterSkill.js +72 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterStat.js +52 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterSymbolEquipment.js +114 -0
- package/dist/esm/maplestory/api/tms/dto/character/characterVMatrix.js +83 -0
- package/dist/esm/maplestory/api/tms/dto/guild/guild.js +18 -0
- package/dist/esm/maplestory/api/tms/dto/guild/guildBasic.js +102 -0
- package/dist/esm/maplestory/api/tms/dto/union/union.js +43 -0
- package/dist/esm/maplestory/api/tms/dto/union/unionArtifact.js +105 -0
- package/dist/esm/maplestory/api/tms/dto/union/unionRaider.js +205 -0
- package/dist/esm/maplestory/api/tms/mapleStoryApi.js +794 -0
- package/dist/esm/maplestory/api/tms/tms.js +27 -0
- package/dist/esm/node_modules/base64-js/index.js +2 -2
- package/dist/esm/node_modules/buffer/index.js +2 -2
- package/dist/esm/node_modules/dayjs/plugin/utc.js +1 -1
- package/dist/esm/node_modules/ieee754/index.js +2 -2
- package/dist/index.min.js +1 -1
- package/package.json +6 -1
- package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +2 -0
- package/types/maplestory/api/common/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/common/mapleStoryApi.d.ts +0 -16
- package/types/maplestory/api/kms/dto/character/characterImage.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +8 -0
- package/types/maplestory/api/kms/dto/character/characterOtherStat.d.ts +43 -0
- package/types/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.d.ts +23 -0
- package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/kms/index.d.ts +1 -0
- package/types/maplestory/api/kms/mapleStoryApi.d.ts +27 -17
- package/types/maplestory/api/kms/response/character/characterItemEquipmentBody.d.ts +2 -0
- package/types/maplestory/api/kms/response/character/characterOtherStatBody.d.ts +12 -0
- package/types/maplestory/api/kms/response/character/characterRingExchangeSkillEquipmentBody.d.ts +6 -0
- package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +8 -0
- package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/msea/mapleStoryApi.d.ts +1 -1
- package/types/maplestory/api/msea/response/character/characterItemEquipmentBody.d.ts +2 -0
- package/types/maplestory/api/msea/response/character/characterSkillBody.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/character.d.ts +12 -0
- package/types/maplestory/api/tms/dto/character/characterAbility.d.ts +72 -0
- package/types/maplestory/api/tms/dto/character/characterAndroidEquipment.d.ts +299 -0
- package/types/maplestory/api/tms/dto/character/characterBasic.d.ts +68 -0
- package/types/maplestory/api/tms/dto/character/characterBeautyEquipment.d.ts +117 -0
- package/types/maplestory/api/tms/dto/character/characterCashItemEquipment.d.ts +158 -0
- package/types/maplestory/api/tms/dto/character/characterDojang.d.ts +32 -0
- package/types/maplestory/api/tms/dto/character/characterHexaMatrix.d.ts +48 -0
- package/types/maplestory/api/tms/dto/character/characterHexaMatrixStat.d.ts +78 -0
- package/types/maplestory/api/tms/dto/character/characterHyperStat.d.ts +70 -0
- package/types/maplestory/api/tms/dto/character/characterImage.d.ts +74 -0
- package/types/maplestory/api/tms/dto/character/characterItemEquipment.d.ts +864 -0
- package/types/maplestory/api/tms/dto/character/characterLinkSkill.d.ts +78 -0
- package/types/maplestory/api/tms/dto/character/characterPetEquipment.d.ts +230 -0
- package/types/maplestory/api/tms/dto/character/characterPopularity.d.ts +16 -0
- package/types/maplestory/api/tms/dto/character/characterPropensity.d.ts +36 -0
- package/types/maplestory/api/tms/dto/character/characterSetEffect.d.ts +66 -0
- package/types/maplestory/api/tms/dto/character/characterSkill.d.ts +54 -0
- package/types/maplestory/api/tms/dto/character/characterStat.d.ts +38 -0
- package/types/maplestory/api/tms/dto/character/characterSymbolEquipment.d.ts +86 -0
- package/types/maplestory/api/tms/dto/character/characterVMatrix.d.ts +62 -0
- package/types/maplestory/api/tms/dto/guild/guild.d.ts +12 -0
- package/types/maplestory/api/tms/dto/guild/guildBasic.d.ts +78 -0
- package/types/maplestory/api/tms/dto/union/union.d.ts +32 -0
- package/types/maplestory/api/tms/dto/union/unionArtifact.d.ts +76 -0
- package/types/maplestory/api/tms/dto/union/unionRaider.d.ts +147 -0
- package/types/maplestory/api/tms/index.d.ts +27 -0
- package/types/maplestory/api/tms/mapleStoryApi.d.ts +364 -0
- package/types/maplestory/api/tms/response/character/characterAbilityBody.d.ts +19 -0
- package/types/maplestory/api/tms/response/character/characterAndroidEquipmentBody.d.ts +76 -0
- package/types/maplestory/api/tms/response/character/characterBasicBody.d.ts +16 -0
- package/types/maplestory/api/tms/response/character/characterBeautyEquipmentBody.d.ts +30 -0
- package/types/maplestory/api/tms/response/character/characterBody.d.ts +3 -0
- package/types/maplestory/api/tms/response/character/characterCashItemEquipmentBody.d.ts +39 -0
- package/types/maplestory/api/tms/response/character/characterDojangBody.d.ts +8 -0
- package/types/maplestory/api/tms/response/character/characterHexaMatrixBody.d.ts +13 -0
- package/types/maplestory/api/tms/response/character/characterHexaMatrixStatBody.d.ts +20 -0
- package/types/maplestory/api/tms/response/character/characterHyperStatBody.d.ts +18 -0
- package/types/maplestory/api/tms/response/character/characterItemEquipmentBody.d.ts +195 -0
- package/types/maplestory/api/tms/response/character/characterLinkSkillBody.d.ts +20 -0
- package/types/maplestory/api/tms/response/character/characterPetEquipmentBody.d.ts +56 -0
- package/types/maplestory/api/tms/response/character/characterPopularityBody.d.ts +4 -0
- package/types/maplestory/api/tms/response/character/characterPropensityBody.d.ts +9 -0
- package/types/maplestory/api/tms/response/character/characterSetEffectBody.d.ts +18 -0
- package/types/maplestory/api/tms/response/character/characterSkillBody.d.ts +14 -0
- package/types/maplestory/api/tms/response/character/characterStatBody.d.ts +10 -0
- package/types/maplestory/api/tms/response/character/characterSymbolEquipmentBody.d.ts +22 -0
- package/types/maplestory/api/tms/response/character/characterVMatrixBody.d.ts +16 -0
- package/types/maplestory/api/tms/response/guild/guildBasicBody.d.ts +20 -0
- package/types/maplestory/api/tms/response/guild/guildBody.d.ts +3 -0
- package/types/maplestory/api/tms/response/union/unionArtifactBody.d.ts +19 -0
- package/types/maplestory/api/tms/response/union/unionBody.d.ts +8 -0
- package/types/maplestory/api/tms/response/union/unionRaiderBody.d.ts +38 -0
package/README.md
CHANGED
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/maplestory-openapi)
|
|
4
4
|
[](https://github.com/SpiralMoon/maplestory.openapi/actions/workflows/js_test.yaml)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Packages written in other languages can be found [HERE](https://github.com/SpiralMoon/maplestory.openapi).
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
English | [한국어](./README-ko.md)
|
|
11
11
|
|
|
12
12
|
## Notice
|
|
13
13
|
|
|
14
|
-
>🌏
|
|
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/).
|
|
15
15
|
>
|
|
16
|
-
|
|
16
|
+
>🌏 Notice 2: Starting from version 3.0.0, support for msea region has been added.
|
|
17
|
+
>
|
|
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).
|
|
17
19
|
|
|
18
20
|
## Installation
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Install the latest version of the JavaScript/TypeScript library in your npm project:
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
25
|
npm install maplestory-openapi
|
|
@@ -27,13 +29,13 @@ npm install maplestory-openapi
|
|
|
27
29
|
|
|
28
30
|
### API Key
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
Before using the library, register your application and obtain an **api key** from the [Nexon Open API Console](https://openapi.nexon.com/my-application/).
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
Applications must be registered separately for each region. (For example, an API key issued for KMS cannot be used to request data from MSEA.)
|
|
33
35
|
|
|
34
36
|
### Region
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Currently, this library supports data retrieval from the KMS, TMS, MSEA regions. To access data from a specific region, import the corresponding package path.
|
|
37
39
|
|
|
38
40
|
```typescript
|
|
39
41
|
import { MapleStoryApi } from 'maplestory-openapi/kms'; // data from KMS
|
|
@@ -41,13 +43,13 @@ import { MapleStoryApi } from 'maplestory-openapi/kms'; // data from KMS
|
|
|
41
43
|
import { MapleStoryApi } from 'maplestory-openapi/msea'; // data from MSEA
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
Even though the regions differ, each package inherits the same interface, ensuring a consistent API usage experience across all regions.
|
|
45
47
|
|
|
46
48
|
### Supports
|
|
47
49
|
|
|
48
|
-
1. **TypeScript
|
|
50
|
+
1. **TypeScript Support**: TypeScript is fully supported. Type definitions are included.
|
|
49
51
|
|
|
50
|
-
2. **CommonJS, ESM
|
|
52
|
+
2. **CommonJS, ESM Support**: The library supports both CommonJS and ESM usage.
|
|
51
53
|
|
|
52
54
|
```javascript
|
|
53
55
|
const { MapleStoryApi } = require('maplestory-openapi/kms'); // CommonJS
|
|
@@ -56,7 +58,7 @@ const { MapleStoryApi } = require('maplestory-openapi/kms'); // CommonJS
|
|
|
56
58
|
import { MapleStoryApi } from 'maplestory-openapi/kms'; // ESM
|
|
57
59
|
```
|
|
58
60
|
|
|
59
|
-
3. **TS2307 Cannot find module
|
|
61
|
+
3. **TS2307 Cannot find module**: it may be due to the `moduleResolution` option being set to `node`. In such cases, update it to `node16`, `nodenext`, or `bundler` as shown below
|
|
60
62
|
|
|
61
63
|
```json
|
|
62
64
|
{
|
|
@@ -68,7 +70,7 @@ import { MapleStoryApi } from 'maplestory-openapi/kms'; // ESM
|
|
|
68
70
|
|
|
69
71
|
### Sample Code
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Below is an example that retrieves the identifier of a specific character from the KMS server based on the nickname, and then fetches that character’s basic information.
|
|
72
74
|
|
|
73
75
|
```javascript
|
|
74
76
|
const { MapleStoryApi } = require('maplestory-openapi/kms');
|
|
@@ -79,14 +81,14 @@ const api = new MapleStoryApi(apiKey);
|
|
|
79
81
|
|
|
80
82
|
try {
|
|
81
83
|
// run your code
|
|
82
|
-
|
|
84
|
+
|
|
83
85
|
const character = await api.getCharacter('{Your Character Name}');
|
|
84
86
|
const characterBasic = await api.getCharacterBasic(character.ocid);
|
|
85
|
-
|
|
87
|
+
|
|
86
88
|
console.log(characterBasic);
|
|
87
89
|
} catch (e) {
|
|
88
90
|
// exception handling
|
|
89
|
-
|
|
91
|
+
|
|
90
92
|
if (e instanceof MapleStoryApiError) {
|
|
91
93
|
// handle MapleStoryApiError
|
|
92
94
|
} else {
|
|
@@ -95,32 +97,41 @@ try {
|
|
|
95
97
|
}
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
You can find more examples in the test cases at the following link.
|
|
101
|
+
|
|
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)
|
|
108
|
+
|
|
109
|
+
### Features
|
|
110
|
+
This library supports all apis published in the MapleStory OpenAPI official docs.
|
|
111
|
+
|
|
112
|
+
Some features are supported only in specific regions. Please refer to the official documentation for each region for details.
|
|
99
113
|
|
|
100
|
-
- [
|
|
101
|
-
- [
|
|
102
|
-
- [
|
|
103
|
-
- [확률 정보 조회](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/historyApi.test.ts)
|
|
104
|
-
- [랭킹 정보 조회](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/rankingApi.test.ts)
|
|
105
|
-
- [공지 정보 조회](https://github.com/SpiralMoon/maplestory.openapi/blob/master/js/test/noticeApi.test.ts)
|
|
114
|
+
- KMS: [https://openapi.nexon.com/game/maplestory](https://openapi.nexon.com/game/maplestory)
|
|
115
|
+
- TMS: [https://openapi.nexon.com/game/maplestorytw](https://openapi.nexon.com/game/maplestorytw)
|
|
116
|
+
- MSEA: [https://openapi.nexon.com/game/maplestorysea](https://openapi.nexon.com/game/maplestorysea)
|
|
106
117
|
|
|
107
118
|
### Exception Handling
|
|
108
119
|
|
|
109
|
-
[MapleStory OpenAPI
|
|
120
|
+
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.
|
|
110
121
|
|
|
111
|
-
`MapleStoryApi
|
|
122
|
+
While `MapleStoryApi` is designed to prevent the occurrence of certain Status, exceptions may arise due to developer mistakes.
|
|
112
123
|
|
|
113
|
-
|
|
124
|
+
Therefore, it's recommended to use `MapleStoryApiError` for exception handling based on the `MapleStoryApiErrorCode` list described in the table below.
|
|
114
125
|
|
|
115
|
-
| ErrorCode | Description
|
|
116
|
-
|
|
117
|
-
| OPENAPI00001 |
|
|
118
|
-
| OPENAPI00002 |
|
|
119
|
-
| OPENAPI00003 |
|
|
120
|
-
| OPENAPI00004 |
|
|
121
|
-
| OPENAPI00005 |
|
|
122
|
-
| OPENAPI00006 |
|
|
123
|
-
| OPENAPI00007 |
|
|
124
|
-
| OPENAPI00009 |
|
|
125
|
-
| OPENAPI00010 |
|
|
126
|
-
| OPENAPI00011 | API
|
|
126
|
+
| ErrorCode | Description |
|
|
127
|
+
|--------------|--------------------------------------------------|
|
|
128
|
+
| OPENAPI00001 | Internal server error |
|
|
129
|
+
| OPENAPI00002 | Access denied |
|
|
130
|
+
| OPENAPI00003 | Invalid identifier |
|
|
131
|
+
| OPENAPI00004 | Request format error (incorrect parameter input) |
|
|
132
|
+
| OPENAPI00005 | Invalid api key |
|
|
133
|
+
| OPENAPI00006 | Invalid api path |
|
|
134
|
+
| OPENAPI00007 | Request allowance (Rate Limit) exceeded |
|
|
135
|
+
| OPENAPI00009 | Not prepared data |
|
|
136
|
+
| OPENAPI00010 | Game server maintenance |
|
|
137
|
+
| OPENAPI00011 | API server maintenance |
|
|
@@ -45,11 +45,11 @@ class CharacterImageDto extends characterImage.CharacterImageDto {
|
|
|
45
45
|
*/
|
|
46
46
|
emotionFrame;
|
|
47
47
|
/**
|
|
48
|
-
* 가로 길이. 배경 크기에
|
|
48
|
+
* 가로 길이. 배경 크기에 해당함
|
|
49
49
|
*/
|
|
50
50
|
width;
|
|
51
51
|
/**
|
|
52
|
-
* 세로 길이. 배경 크기에
|
|
52
|
+
* 세로 길이. 배경 크기에 해당함
|
|
53
53
|
*/
|
|
54
54
|
height;
|
|
55
55
|
/**
|
|
@@ -1026,6 +1026,14 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
1026
1026
|
* 장비 기본 옵션
|
|
1027
1027
|
*/
|
|
1028
1028
|
itemBaseOption;
|
|
1029
|
+
/**
|
|
1030
|
+
* 잠재능력 봉인 여부 (true 봉인, false 봉인 없음)
|
|
1031
|
+
*/
|
|
1032
|
+
potentialOptionFlag;
|
|
1033
|
+
/**
|
|
1034
|
+
* 에디셔널 잠재능력 봉인 여부 (true 봉인, false 봉인 없음)
|
|
1035
|
+
*/
|
|
1036
|
+
additionalPotentialOptionFlag;
|
|
1029
1037
|
/**
|
|
1030
1038
|
* 잠재능력 등급
|
|
1031
1039
|
*/
|
|
@@ -1140,7 +1148,7 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
1140
1148
|
freestyleFlag;
|
|
1141
1149
|
constructor(obj) {
|
|
1142
1150
|
super();
|
|
1143
|
-
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, freestyle_flag, } = obj;
|
|
1151
|
+
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_flag, additional_potential_option_flag, 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, freestyle_flag, } = obj;
|
|
1144
1152
|
this.itemEquipmentPart = item_equipment_part;
|
|
1145
1153
|
this.itemEquipmentSlot = item_equipment_slot;
|
|
1146
1154
|
this.itemName = item_name;
|
|
@@ -1151,6 +1159,8 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
1151
1159
|
this.itemGender = item_gender;
|
|
1152
1160
|
this.itemTotalOption = new CharacterItemEquipmentTotalOptionDto(item_total_option);
|
|
1153
1161
|
this.itemBaseOption = new CharacterItemEquipmentBaseOptionDto(item_base_option);
|
|
1162
|
+
this.potentialOptionFlag = potential_option_flag;
|
|
1163
|
+
this.additionalPotentialOptionFlag = additional_potential_option_flag;
|
|
1154
1164
|
this.potentialOptionGrade = potential_option_grade;
|
|
1155
1165
|
this.additionalPotentialOptionGrade = additional_potential_option_grade;
|
|
1156
1166
|
this.potentialOption1 = potential_option_1;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 캐릭터 기타 능력치 영향 요소 정보
|
|
7
|
+
*/
|
|
8
|
+
class CharacterOtherStatDto {
|
|
9
|
+
/**
|
|
10
|
+
* 조회 기준일 (KST, 일 단위 데이터로 시, 분은 일괄 0으로 표기)
|
|
11
|
+
*/
|
|
12
|
+
date;
|
|
13
|
+
/**
|
|
14
|
+
* 능력치에 영향을 주는 요소 및 스탯 정보
|
|
15
|
+
*/
|
|
16
|
+
otherStat;
|
|
17
|
+
constructor(obj) {
|
|
18
|
+
const { date, other_stat } = obj;
|
|
19
|
+
this.date = date ? new Date(date) : null;
|
|
20
|
+
this.otherStat = other_stat?.map((stat) => new CharacterOtherStatDetailDto(stat)) ?? [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 능력치에 영향을 주는 요소 및 스탯 정보
|
|
25
|
+
*/
|
|
26
|
+
class CharacterOtherStatDetailDto {
|
|
27
|
+
/**
|
|
28
|
+
* 스탯 타입
|
|
29
|
+
*/
|
|
30
|
+
otherStatType;
|
|
31
|
+
/**
|
|
32
|
+
* 스탯 정보
|
|
33
|
+
*/
|
|
34
|
+
statInfo;
|
|
35
|
+
constructor(obj) {
|
|
36
|
+
const { other_stat_type, stat_info } = obj;
|
|
37
|
+
this.otherStatType = other_stat_type;
|
|
38
|
+
this.statInfo = stat_info.map((info) => new CharacterOtherStatInfoDto(info));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 스탯 정보
|
|
43
|
+
*/
|
|
44
|
+
class CharacterOtherStatInfoDto {
|
|
45
|
+
/**
|
|
46
|
+
* 스탯 명
|
|
47
|
+
*/
|
|
48
|
+
statName;
|
|
49
|
+
/**
|
|
50
|
+
* 스탯 값
|
|
51
|
+
*/
|
|
52
|
+
statValue;
|
|
53
|
+
constructor(obj) {
|
|
54
|
+
const { stat_name, stat_value } = obj;
|
|
55
|
+
this.statName = stat_name;
|
|
56
|
+
this.statValue = stat_value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.CharacterOtherStatDetailDto = CharacterOtherStatDetailDto;
|
|
61
|
+
exports.CharacterOtherStatDto = CharacterOtherStatDto;
|
|
62
|
+
exports.CharacterOtherStatInfoDto = CharacterOtherStatInfoDto;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 캐릭터 링 익스체인지 스킬 등록 장비 정보
|
|
7
|
+
*/
|
|
8
|
+
class CharacterRingExchangeSkillEquipmentDto {
|
|
9
|
+
/**
|
|
10
|
+
* 조회 기준일 (KST, 일 단위 데이터로 시, 분은 일괄 0으로 표기)
|
|
11
|
+
*/
|
|
12
|
+
date;
|
|
13
|
+
/**
|
|
14
|
+
* 캐릭터 직업
|
|
15
|
+
*/
|
|
16
|
+
characterClass;
|
|
17
|
+
/**
|
|
18
|
+
* 링 익스체인지에 등록된 특수 반지
|
|
19
|
+
*/
|
|
20
|
+
specialRingExchangeName;
|
|
21
|
+
/**
|
|
22
|
+
* 링 익스체인지에 등록된 특수 반지 레벨
|
|
23
|
+
*/
|
|
24
|
+
specialRingExchangeLevel;
|
|
25
|
+
constructor(obj) {
|
|
26
|
+
const { date, character_class, special_ring_exchange_name, special_ring_exchange_level } = obj;
|
|
27
|
+
this.date = date ? new Date(date) : null;
|
|
28
|
+
this.characterClass = character_class ?? '';
|
|
29
|
+
this.specialRingExchangeName = special_ring_exchange_name ?? null;
|
|
30
|
+
this.specialRingExchangeLevel = special_ring_exchange_level ?? null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.CharacterRingExchangeSkillEquipmentDto = CharacterRingExchangeSkillEquipmentDto;
|
|
@@ -16,6 +16,7 @@ var characterHyperStat = require('./dto/character/characterHyperStat.js');
|
|
|
16
16
|
var characterImage = require('./dto/character/characterImage.js');
|
|
17
17
|
var characterItemEquipment = require('./dto/character/characterItemEquipment.js');
|
|
18
18
|
var characterLinkSkill = require('./dto/character/characterLinkSkill.js');
|
|
19
|
+
var characterOtherStat = require('./dto/character/characterOtherStat.js');
|
|
19
20
|
var characterPetEquipment = require('./dto/character/characterPetEquipment.js');
|
|
20
21
|
var characterPopularity = require('./dto/character/characterPopularity.js');
|
|
21
22
|
var characterPropensity = require('./dto/character/characterPropensity.js');
|
|
@@ -98,6 +99,9 @@ exports.CharacterItemEquipmentTitleDto = characterItemEquipment.CharacterItemEqu
|
|
|
98
99
|
exports.CharacterItemEquipmentTotalOptionDto = characterItemEquipment.CharacterItemEquipmentTotalOptionDto;
|
|
99
100
|
exports.CharacterLinkSkillDto = characterLinkSkill.CharacterLinkSkillDto;
|
|
100
101
|
exports.CharacterLinkSkillInfoDto = characterLinkSkill.CharacterLinkSkillInfoDto;
|
|
102
|
+
exports.CharacterOtherStatDetailDto = characterOtherStat.CharacterOtherStatDetailDto;
|
|
103
|
+
exports.CharacterOtherStatDto = characterOtherStat.CharacterOtherStatDto;
|
|
104
|
+
exports.CharacterOtherStatInfoDto = characterOtherStat.CharacterOtherStatInfoDto;
|
|
101
105
|
exports.CharacterPetEquipmentAutoSkillDto = characterPetEquipment.CharacterPetEquipmentAutoSkillDto;
|
|
102
106
|
exports.CharacterPetEquipmentDto = characterPetEquipment.CharacterPetEquipmentDto;
|
|
103
107
|
exports.CharacterPetEquipmentItemDto = characterPetEquipment.CharacterPetEquipmentItemDto;
|
|
@@ -18,9 +18,11 @@ var characterHyperStat = require('./dto/character/characterHyperStat.js');
|
|
|
18
18
|
var characterImage$1 = require('./dto/character/characterImage.js');
|
|
19
19
|
var characterItemEquipment = require('./dto/character/characterItemEquipment.js');
|
|
20
20
|
var characterLinkSkill = require('./dto/character/characterLinkSkill.js');
|
|
21
|
+
var characterOtherStat = require('./dto/character/characterOtherStat.js');
|
|
21
22
|
var characterPetEquipment = require('./dto/character/characterPetEquipment.js');
|
|
22
23
|
var characterPopularity = require('./dto/character/characterPopularity.js');
|
|
23
24
|
var characterPropensity = require('./dto/character/characterPropensity.js');
|
|
25
|
+
var characterRingExchangeSkillEquipment = require('./dto/character/characterRingExchangeSkillEquipment.js');
|
|
24
26
|
var characterSetEffect = require('./dto/character/characterSetEffect.js');
|
|
25
27
|
var characterSkill = require('./dto/character/characterSkill.js');
|
|
26
28
|
var characterStat = require('./dto/character/characterStat.js');
|
|
@@ -96,7 +98,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
96
98
|
const { data } = await this.client.get(path);
|
|
97
99
|
return new achievement.AchievementDto(data);
|
|
98
100
|
}
|
|
99
|
-
//#
|
|
101
|
+
//#endregion
|
|
100
102
|
//#region 캐릭터 정보 조회
|
|
101
103
|
/**
|
|
102
104
|
* 캐릭터 식별자(ocid)를 조회합니다.
|
|
@@ -165,18 +167,14 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
165
167
|
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
|
|
166
168
|
const actionFrame = imageOptions?.actionFrame ?? 0;
|
|
167
169
|
const emotionFrame = imageOptions?.emotionFrame ?? 0;
|
|
168
|
-
const width =
|
|
169
|
-
const height =
|
|
170
|
-
const x =
|
|
171
|
-
const y =
|
|
170
|
+
const width = 300;
|
|
171
|
+
const height = 300;
|
|
172
|
+
const x = 150;
|
|
173
|
+
const y = 200;
|
|
172
174
|
const query = {
|
|
173
175
|
action: `${action}.${actionFrame}`,
|
|
174
176
|
emotion: `${emotion}.${emotionFrame}`,
|
|
175
177
|
wmotion,
|
|
176
|
-
width,
|
|
177
|
-
height,
|
|
178
|
-
x,
|
|
179
|
-
y,
|
|
180
178
|
};
|
|
181
179
|
const urlImageToBase64 = async (path, query) => {
|
|
182
180
|
const { data, headers } = await axios__default["default"].get(path, {
|
|
@@ -731,6 +729,64 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
731
729
|
});
|
|
732
730
|
return new characterDojang.CharacterDojangDto(data);
|
|
733
731
|
}
|
|
732
|
+
/**
|
|
733
|
+
* 능력치에 영향을 주는 요소 중 다른 조회에서 능력치 확인이 어려운 정보를 조회합니다.
|
|
734
|
+
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
|
|
735
|
+
* - 2025년 8월 21일 데이터부터 조회할 수 있습니다.
|
|
736
|
+
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
|
|
737
|
+
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
|
|
738
|
+
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
|
|
739
|
+
*
|
|
740
|
+
* @param ocid 캐릭터 식별자
|
|
741
|
+
* @param dateOptions 조회 기준일 (KST)
|
|
742
|
+
*/
|
|
743
|
+
async getCharacterOtherStat(ocid, dateOptions) {
|
|
744
|
+
const path = `${this.subUrl}/v1/character/other-stat`;
|
|
745
|
+
const date = dateOptions
|
|
746
|
+
? this.toDateString(dateOptions, {
|
|
747
|
+
year: 2025,
|
|
748
|
+
month: 8,
|
|
749
|
+
day: 21,
|
|
750
|
+
})
|
|
751
|
+
: undefined;
|
|
752
|
+
const query = {
|
|
753
|
+
ocid: ocid,
|
|
754
|
+
date: date,
|
|
755
|
+
};
|
|
756
|
+
const { data } = await this.client.get(path, {
|
|
757
|
+
params: query,
|
|
758
|
+
});
|
|
759
|
+
return new characterOtherStat.CharacterOtherStatDto(data);
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* 링 익스체인지 스킬 등록 장비를 조회합니다.
|
|
763
|
+
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
|
|
764
|
+
* - 2025년 8월 21일 데이터부터 조회할 수 있습니다.
|
|
765
|
+
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (8월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
|
|
766
|
+
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
|
|
767
|
+
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
|
|
768
|
+
*
|
|
769
|
+
* @param ocid 캐릭터 식별자
|
|
770
|
+
* @param dateOptions 조회 기준일 (KST)
|
|
771
|
+
*/
|
|
772
|
+
async getCharacterRingExchangeSkillEquipment(ocid, dateOptions) {
|
|
773
|
+
const path = `${this.subUrl}/v1/character/ring-exchange-skill-equipment`;
|
|
774
|
+
const date = dateOptions
|
|
775
|
+
? this.toDateString(dateOptions, {
|
|
776
|
+
year: 2025,
|
|
777
|
+
month: 8,
|
|
778
|
+
day: 21,
|
|
779
|
+
})
|
|
780
|
+
: undefined;
|
|
781
|
+
const query = {
|
|
782
|
+
ocid: ocid,
|
|
783
|
+
date: date,
|
|
784
|
+
};
|
|
785
|
+
const { data } = await this.client.get(path, {
|
|
786
|
+
params: query,
|
|
787
|
+
});
|
|
788
|
+
return new characterRingExchangeSkillEquipment.CharacterRingExchangeSkillEquipmentDto(data);
|
|
789
|
+
}
|
|
734
790
|
//#endregion
|
|
735
791
|
//#region 유니온 정보 조회
|
|
736
792
|
/**
|
|
@@ -861,7 +917,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
861
917
|
* - 해당 API는 메이플스토리 한국의 데이터가 제공됩니다.
|
|
862
918
|
*
|
|
863
919
|
* @param guildName 길드 명
|
|
864
|
-
* @param worldName 월드 명
|
|
920
|
+
* @param worldName 월드 명 <a href="https://openapi.nexon.com/game/maplestory/?id=16">Available values</a>
|
|
865
921
|
*/
|
|
866
922
|
async getGuild(guildName, worldName) {
|
|
867
923
|
const path = `${this.subUrl}/v1/guild/id`;
|
|
@@ -944,6 +944,14 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
944
944
|
* Basic equipment option information
|
|
945
945
|
*/
|
|
946
946
|
itemBaseOption;
|
|
947
|
+
/**
|
|
948
|
+
* Potential seal status (true:sealed, false:not sealed)
|
|
949
|
+
*/
|
|
950
|
+
potentialOptionFlag;
|
|
951
|
+
/**
|
|
952
|
+
* Additional potential seal status (true:sealed, false:not sealed)
|
|
953
|
+
*/
|
|
954
|
+
additionalPotentialOptionFlag;
|
|
947
955
|
/**
|
|
948
956
|
* Potential grade
|
|
949
957
|
*/
|
|
@@ -1054,7 +1062,7 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
1054
1062
|
isExpired = null;
|
|
1055
1063
|
constructor(obj) {
|
|
1056
1064
|
super();
|
|
1057
|
-
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;
|
|
1065
|
+
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_flag, additional_potential_option_flag, 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;
|
|
1058
1066
|
this.itemEquipmentPart = item_equipment_part;
|
|
1059
1067
|
this.itemEquipmentSlot = item_equipment_slot;
|
|
1060
1068
|
this.itemName = item_name;
|
|
@@ -1065,6 +1073,8 @@ class CharacterItemEquipmentInfoDto extends characterItemEquipment.CharacterItem
|
|
|
1065
1073
|
this.itemGender = item_gender;
|
|
1066
1074
|
this.itemTotalOption = new CharacterItemEquipmentTotalOptionDto(item_total_option);
|
|
1067
1075
|
this.itemBaseOption = new CharacterItemEquipmentBaseOptionDto(item_base_option);
|
|
1076
|
+
this.potentialOptionFlag = potential_option_flag;
|
|
1077
|
+
this.additionalPotentialOptionFlag = additional_potential_option_flag;
|
|
1068
1078
|
this.potentialOptionGrade = potential_option_grade;
|
|
1069
1079
|
this.additionalPotentialOptionGrade = additional_potential_option_grade;
|
|
1070
1080
|
this.potentialOption1 = potential_option_1;
|
|
@@ -757,7 +757,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
757
757
|
* - Due to game content changes, the ocid may be updated. Please pay attention to this when updating services based on ocid.
|
|
758
758
|
* - This API provides data for MapleStory SEA.
|
|
759
759
|
* @param guildName Guild name
|
|
760
|
-
* @param worldName World name
|
|
760
|
+
* @param worldName World name <a href="https://openapi.nexon.com/game/maplestorysea/?id=47">Available values</a>
|
|
761
761
|
*/
|
|
762
762
|
async getGuild(guildName, worldName) {
|
|
763
763
|
const path = `${this.subUrl}/v1/guild/id`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var character = require('../../../common/dto/character/character.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 角色辨識器資訊
|
|
9
|
+
*/
|
|
10
|
+
class CharacterDto extends character.CharacterDto {
|
|
11
|
+
/**
|
|
12
|
+
* 角色辨識器
|
|
13
|
+
*/
|
|
14
|
+
ocid;
|
|
15
|
+
constructor(obj) {
|
|
16
|
+
super();
|
|
17
|
+
const { ocid } = obj;
|
|
18
|
+
this.ocid = ocid;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.CharacterDto = CharacterDto;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var characterAbility = require('../../../common/dto/character/characterAbility.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 角色能力資訊
|
|
9
|
+
*/
|
|
10
|
+
class CharacterAbilityDto extends characterAbility.CharacterAbilityDto {
|
|
11
|
+
/**
|
|
12
|
+
* 要搜尋的日期 (TST,每日資料中的小時與分鐘將顯示為 0)
|
|
13
|
+
*/
|
|
14
|
+
date;
|
|
15
|
+
/**
|
|
16
|
+
* 能力階級
|
|
17
|
+
*/
|
|
18
|
+
abilityGrade;
|
|
19
|
+
/**
|
|
20
|
+
* 能力資訊
|
|
21
|
+
*/
|
|
22
|
+
abilityInfo;
|
|
23
|
+
/**
|
|
24
|
+
* 名聲值
|
|
25
|
+
*/
|
|
26
|
+
remainFame;
|
|
27
|
+
/**
|
|
28
|
+
* 目前套用的能力預設編號
|
|
29
|
+
*/
|
|
30
|
+
presetNo;
|
|
31
|
+
/**
|
|
32
|
+
* 能力 1 預設完整資訊
|
|
33
|
+
*/
|
|
34
|
+
abilityPreset1;
|
|
35
|
+
/**
|
|
36
|
+
* 能力 2 預設完整資訊
|
|
37
|
+
*/
|
|
38
|
+
abilityPreset2;
|
|
39
|
+
/**
|
|
40
|
+
* 能力 3 預設完整資訊
|
|
41
|
+
*/
|
|
42
|
+
abilityPreset3;
|
|
43
|
+
constructor(obj) {
|
|
44
|
+
super();
|
|
45
|
+
const { date, ability_grade, ability_info, remain_fame, preset_no, ability_preset_1, ability_preset_2, ability_preset_3, } = obj;
|
|
46
|
+
this.date = date ? new Date(date) : null;
|
|
47
|
+
this.abilityGrade = ability_grade;
|
|
48
|
+
this.abilityInfo = ability_info.map((info) => new CharacterAbilityInfoDto(info));
|
|
49
|
+
this.remainFame = remain_fame;
|
|
50
|
+
this.presetNo = preset_no;
|
|
51
|
+
this.abilityPreset1 = ability_preset_1
|
|
52
|
+
? new CharacterAbilityPresetDto(ability_preset_1)
|
|
53
|
+
: null;
|
|
54
|
+
this.abilityPreset2 = ability_preset_2
|
|
55
|
+
? new CharacterAbilityPresetDto(ability_preset_2)
|
|
56
|
+
: null;
|
|
57
|
+
this.abilityPreset3 = ability_preset_3
|
|
58
|
+
? new CharacterAbilityPresetDto(ability_preset_3)
|
|
59
|
+
: null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 能力資訊
|
|
64
|
+
*/
|
|
65
|
+
class CharacterAbilityInfoDto extends characterAbility.CharacterAbilityInfoDto {
|
|
66
|
+
/**
|
|
67
|
+
* 能力編號
|
|
68
|
+
*/
|
|
69
|
+
abilityNo;
|
|
70
|
+
/**
|
|
71
|
+
* 能力階級
|
|
72
|
+
*/
|
|
73
|
+
abilityGrade;
|
|
74
|
+
/**
|
|
75
|
+
* 能力選項與數值
|
|
76
|
+
*/
|
|
77
|
+
abilityValue;
|
|
78
|
+
constructor(obj) {
|
|
79
|
+
super();
|
|
80
|
+
const { ability_no, ability_grade, ability_value } = obj;
|
|
81
|
+
this.abilityNo = ability_no;
|
|
82
|
+
this.abilityGrade = ability_grade;
|
|
83
|
+
this.abilityValue = ability_value;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* 能力預設完整資訊
|
|
88
|
+
*/
|
|
89
|
+
class CharacterAbilityPresetDto extends characterAbility.CharacterAbilityPresetDto {
|
|
90
|
+
/**
|
|
91
|
+
* 能力預設能力階級
|
|
92
|
+
*/
|
|
93
|
+
abilityPresetGrade;
|
|
94
|
+
/**
|
|
95
|
+
* 能力預設資訊
|
|
96
|
+
*/
|
|
97
|
+
abilityInfo;
|
|
98
|
+
constructor(obj) {
|
|
99
|
+
super();
|
|
100
|
+
const { ability_preset_grade, ability_info } = obj;
|
|
101
|
+
this.abilityPresetGrade = ability_preset_grade;
|
|
102
|
+
this.abilityInfo = ability_info.map((info) => new CharacterAbilityInfoDto(info));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
exports.CharacterAbilityDto = CharacterAbilityDto;
|
|
107
|
+
exports.CharacterAbilityInfoDto = CharacterAbilityInfoDto;
|
|
108
|
+
exports.CharacterAbilityPresetDto = CharacterAbilityPresetDto;
|