maplestory-openapi 3.5.0 → 3.5.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/cjs/maplestory/api/common/lib.js +16 -0
- package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +2 -1
- package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +3 -1
- package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +2 -1
- package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +3 -1
- package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +2 -1
- package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +3 -1
- package/dist/esm/maplestory/api/common/lib.js +16 -1
- package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +2 -1
- package/dist/esm/maplestory/api/kms/mapleStoryApi.js +3 -1
- package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +2 -1
- package/dist/esm/maplestory/api/msea/mapleStoryApi.js +3 -1
- package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +2 -1
- package/dist/esm/maplestory/api/tms/mapleStoryApi.js +3 -1
- package/package.json +1 -1
- package/types/maplestory/api/common/lib.d.ts +9 -0
|
@@ -22,5 +22,21 @@ const potentialOptionGradeFromString = (text) => {
|
|
|
22
22
|
}
|
|
23
23
|
return grade;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* URL에서 Query를 제거합니다.
|
|
27
|
+
* @param url URL
|
|
28
|
+
* @example
|
|
29
|
+
* ```
|
|
30
|
+
* removeQuery('https://example.com/path?query=123&test=abc') // returns 'https://example.com/path'
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
const removeQuery = (url) => {
|
|
34
|
+
if (!url) {
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
const queryIndex = url.indexOf('?');
|
|
38
|
+
return queryIndex >= 0 ? url.substring(0, queryIndex) : url;
|
|
39
|
+
};
|
|
25
40
|
|
|
26
41
|
exports.potentialOptionGradeFromString = potentialOptionGradeFromString;
|
|
42
|
+
exports.removeQuery = removeQuery;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var characterBasic = require('../../../common/dto/character/characterBasic.js');
|
|
6
|
+
var lib = require('../../../common/lib.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* 캐릭터 기본 정보
|
|
@@ -77,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
|
|
|
77
78
|
this.characterExp = character_exp;
|
|
78
79
|
this.characterExpRate = character_exp_rate;
|
|
79
80
|
this.characterGuildName = character_guild_name;
|
|
80
|
-
this.characterImage = character_image;
|
|
81
|
+
this.characterImage = lib.removeQuery(character_image);
|
|
81
82
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
82
83
|
this.accessFlag = access_flag;
|
|
83
84
|
this.liberationQuestClear = liberation_quest_clear;
|
|
@@ -56,6 +56,7 @@ var achievement = require('./dto/user/achievement.js');
|
|
|
56
56
|
var characterList = require('./dto/user/characterList.js');
|
|
57
57
|
var characterImage = require('../common/enum/characterImage.js');
|
|
58
58
|
var mapleStoryApi = require('../common/mapleStoryApi.js');
|
|
59
|
+
var lib = require('../common/lib.js');
|
|
59
60
|
var index = require('../../../_virtual/index.js_commonjs-exports.js');
|
|
60
61
|
|
|
61
62
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -168,7 +169,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
168
169
|
if (!basic) {
|
|
169
170
|
return null;
|
|
170
171
|
}
|
|
171
|
-
const { date, characterImage:
|
|
172
|
+
const { date, characterImage: characterImage$2 } = basic;
|
|
172
173
|
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
|
|
173
174
|
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
|
|
174
175
|
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
|
|
@@ -178,6 +179,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
178
179
|
const height = 300;
|
|
179
180
|
const x = 150;
|
|
180
181
|
const y = 200;
|
|
182
|
+
const path = lib.removeQuery(characterImage$2);
|
|
181
183
|
const query = {
|
|
182
184
|
action: `${action}.${actionFrame}`,
|
|
183
185
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var characterBasic = require('../../../common/dto/character/characterBasic.js');
|
|
6
|
+
var lib = require('../../../common/lib.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Character basic information
|
|
@@ -77,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
|
|
|
77
78
|
this.characterExp = character_exp;
|
|
78
79
|
this.characterExpRate = character_exp_rate;
|
|
79
80
|
this.characterGuildName = character_guild_name;
|
|
80
|
-
this.characterImage = character_image;
|
|
81
|
+
this.characterImage = lib.removeQuery(character_image);
|
|
81
82
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
82
83
|
this.accessFlag = access_flag;
|
|
83
84
|
this.liberationQuestClearFlag = liberation_quest_clear_flag;
|
|
@@ -32,6 +32,7 @@ var unionArtifact = require('./dto/union/unionArtifact.js');
|
|
|
32
32
|
var unionRaider = require('./dto/union/unionRaider.js');
|
|
33
33
|
var characterImage = require('../common/enum/characterImage.js');
|
|
34
34
|
var mapleStoryApi = require('../common/mapleStoryApi.js');
|
|
35
|
+
var lib = require('../common/lib.js');
|
|
35
36
|
var index = require('../../../_virtual/index.js_commonjs-exports.js');
|
|
36
37
|
|
|
37
38
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -114,7 +115,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
114
115
|
if (!basic) {
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
117
|
-
const { date, characterImage:
|
|
118
|
+
const { date, characterImage: characterImage$2 } = basic;
|
|
118
119
|
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
|
|
119
120
|
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
|
|
120
121
|
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
|
|
@@ -124,6 +125,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
124
125
|
const height = 96;
|
|
125
126
|
const x = imageOptions?.x ?? null;
|
|
126
127
|
const y = imageOptions?.y ?? null;
|
|
128
|
+
const path = lib.removeQuery(characterImage$2);
|
|
127
129
|
const query = {
|
|
128
130
|
action: `${action}.${actionFrame}`,
|
|
129
131
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var characterBasic = require('../../../common/dto/character/characterBasic.js');
|
|
6
|
+
var lib = require('../../../common/lib.js');
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* 角色基本資訊
|
|
@@ -77,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
|
|
|
77
78
|
this.characterExp = character_exp;
|
|
78
79
|
this.characterExpRate = character_exp_rate;
|
|
79
80
|
this.characterGuildName = character_guild_name;
|
|
80
|
-
this.characterImage = character_image;
|
|
81
|
+
this.characterImage = lib.removeQuery(character_image);
|
|
81
82
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
82
83
|
this.accessFlag = access_flag;
|
|
83
84
|
this.liberationQuestClear = liberation_quest_clear;
|
|
@@ -32,6 +32,7 @@ var unionArtifact = require('./dto/union/unionArtifact.js');
|
|
|
32
32
|
var unionRaider = require('./dto/union/unionRaider.js');
|
|
33
33
|
var characterImage = require('../common/enum/characterImage.js');
|
|
34
34
|
var mapleStoryApi = require('../common/mapleStoryApi.js');
|
|
35
|
+
var lib = require('../common/lib.js');
|
|
35
36
|
var index = require('../../../_virtual/index.js_commonjs-exports.js');
|
|
36
37
|
|
|
37
38
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -114,7 +115,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
114
115
|
if (!basic) {
|
|
115
116
|
return null;
|
|
116
117
|
}
|
|
117
|
-
const { date, characterImage:
|
|
118
|
+
const { date, characterImage: characterImage$2 } = basic;
|
|
118
119
|
const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
|
|
119
120
|
const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
|
|
120
121
|
const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
|
|
@@ -124,6 +125,7 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
|
|
|
124
125
|
const height = 96;
|
|
125
126
|
const x = imageOptions?.x ?? null;
|
|
126
127
|
const y = imageOptions?.y ?? null;
|
|
128
|
+
const path = lib.removeQuery(characterImage$2);
|
|
127
129
|
const query = {
|
|
128
130
|
action: `${action}.${actionFrame}`,
|
|
129
131
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -18,5 +18,20 @@ const potentialOptionGradeFromString = (text) => {
|
|
|
18
18
|
}
|
|
19
19
|
return grade;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* URL에서 Query를 제거합니다.
|
|
23
|
+
* @param url URL
|
|
24
|
+
* @example
|
|
25
|
+
* ```
|
|
26
|
+
* removeQuery('https://example.com/path?query=123&test=abc') // returns 'https://example.com/path'
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const removeQuery = (url) => {
|
|
30
|
+
if (!url) {
|
|
31
|
+
return url;
|
|
32
|
+
}
|
|
33
|
+
const queryIndex = url.indexOf('?');
|
|
34
|
+
return queryIndex >= 0 ? url.substring(0, queryIndex) : url;
|
|
35
|
+
};
|
|
21
36
|
|
|
22
|
-
export { potentialOptionGradeFromString };
|
|
37
|
+
export { potentialOptionGradeFromString, removeQuery };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CharacterBasicDto as CharacterBasicDto$1 } from '../../../common/dto/character/characterBasic.js';
|
|
2
|
+
import { removeQuery } from '../../../common/lib.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* 캐릭터 기본 정보
|
|
@@ -73,7 +74,7 @@ class CharacterBasicDto extends CharacterBasicDto$1 {
|
|
|
73
74
|
this.characterExp = character_exp;
|
|
74
75
|
this.characterExpRate = character_exp_rate;
|
|
75
76
|
this.characterGuildName = character_guild_name;
|
|
76
|
-
this.characterImage = character_image;
|
|
77
|
+
this.characterImage = removeQuery(character_image);
|
|
77
78
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
78
79
|
this.accessFlag = access_flag;
|
|
79
80
|
this.liberationQuestClear = liberation_quest_clear;
|
|
@@ -52,6 +52,7 @@ import { AchievementDto } from './dto/user/achievement.js';
|
|
|
52
52
|
import { CharacterListDto } from './dto/user/characterList.js';
|
|
53
53
|
import { CharacterImageAction, CharacterImageEmotion, CharacterImageWeaponMotion } from '../common/enum/characterImage.js';
|
|
54
54
|
import { MapleStoryApi as MapleStoryApi$1 } from '../common/mapleStoryApi.js';
|
|
55
|
+
import { removeQuery } from '../common/lib.js';
|
|
55
56
|
import { __exports as buffer } from '../../../_virtual/index.js_commonjs-exports.js';
|
|
56
57
|
|
|
57
58
|
/**
|
|
@@ -159,7 +160,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
159
160
|
if (!basic) {
|
|
160
161
|
return null;
|
|
161
162
|
}
|
|
162
|
-
const { date, characterImage
|
|
163
|
+
const { date, characterImage } = basic;
|
|
163
164
|
const action = imageOptions?.action ?? CharacterImageAction.Stand1;
|
|
164
165
|
const emotion = imageOptions?.emotion ?? CharacterImageEmotion.Default;
|
|
165
166
|
const wmotion = imageOptions?.wmotion ?? CharacterImageWeaponMotion.Default;
|
|
@@ -169,6 +170,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
169
170
|
const height = 300;
|
|
170
171
|
const x = 150;
|
|
171
172
|
const y = 200;
|
|
173
|
+
const path = removeQuery(characterImage);
|
|
172
174
|
const query = {
|
|
173
175
|
action: `${action}.${actionFrame}`,
|
|
174
176
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CharacterBasicDto as CharacterBasicDto$1 } from '../../../common/dto/character/characterBasic.js';
|
|
2
|
+
import { removeQuery } from '../../../common/lib.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Character basic information
|
|
@@ -73,7 +74,7 @@ class CharacterBasicDto extends CharacterBasicDto$1 {
|
|
|
73
74
|
this.characterExp = character_exp;
|
|
74
75
|
this.characterExpRate = character_exp_rate;
|
|
75
76
|
this.characterGuildName = character_guild_name;
|
|
76
|
-
this.characterImage = character_image;
|
|
77
|
+
this.characterImage = removeQuery(character_image);
|
|
77
78
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
78
79
|
this.accessFlag = access_flag;
|
|
79
80
|
this.liberationQuestClearFlag = liberation_quest_clear_flag;
|
|
@@ -28,6 +28,7 @@ import { UnionArtifactDto } from './dto/union/unionArtifact.js';
|
|
|
28
28
|
import { UnionRaiderDto } from './dto/union/unionRaider.js';
|
|
29
29
|
import { CharacterImageAction, CharacterImageEmotion, CharacterImageWeaponMotion } from '../common/enum/characterImage.js';
|
|
30
30
|
import { MapleStoryApi as MapleStoryApi$1 } from '../common/mapleStoryApi.js';
|
|
31
|
+
import { removeQuery } from '../common/lib.js';
|
|
31
32
|
import { __exports as buffer } from '../../../_virtual/index.js_commonjs-exports.js';
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -106,7 +107,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
106
107
|
if (!basic) {
|
|
107
108
|
return null;
|
|
108
109
|
}
|
|
109
|
-
const { date, characterImage
|
|
110
|
+
const { date, characterImage } = basic;
|
|
110
111
|
const action = imageOptions?.action ?? CharacterImageAction.Stand1;
|
|
111
112
|
const emotion = imageOptions?.emotion ?? CharacterImageEmotion.Default;
|
|
112
113
|
const wmotion = imageOptions?.wmotion ?? CharacterImageWeaponMotion.Default;
|
|
@@ -116,6 +117,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
116
117
|
const height = 96;
|
|
117
118
|
const x = imageOptions?.x ?? null;
|
|
118
119
|
const y = imageOptions?.y ?? null;
|
|
120
|
+
const path = removeQuery(characterImage);
|
|
119
121
|
const query = {
|
|
120
122
|
action: `${action}.${actionFrame}`,
|
|
121
123
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CharacterBasicDto as CharacterBasicDto$1 } from '../../../common/dto/character/characterBasic.js';
|
|
2
|
+
import { removeQuery } from '../../../common/lib.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* 角色基本資訊
|
|
@@ -73,7 +74,7 @@ class CharacterBasicDto extends CharacterBasicDto$1 {
|
|
|
73
74
|
this.characterExp = character_exp;
|
|
74
75
|
this.characterExpRate = character_exp_rate;
|
|
75
76
|
this.characterGuildName = character_guild_name;
|
|
76
|
-
this.characterImage = character_image;
|
|
77
|
+
this.characterImage = removeQuery(character_image);
|
|
77
78
|
this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
|
|
78
79
|
this.accessFlag = access_flag;
|
|
79
80
|
this.liberationQuestClear = liberation_quest_clear;
|
|
@@ -28,6 +28,7 @@ import { UnionArtifactDto } from './dto/union/unionArtifact.js';
|
|
|
28
28
|
import { UnionRaiderDto } from './dto/union/unionRaider.js';
|
|
29
29
|
import { CharacterImageAction, CharacterImageEmotion, CharacterImageWeaponMotion } from '../common/enum/characterImage.js';
|
|
30
30
|
import { MapleStoryApi as MapleStoryApi$1 } from '../common/mapleStoryApi.js';
|
|
31
|
+
import { removeQuery } from '../common/lib.js';
|
|
31
32
|
import { __exports as buffer } from '../../../_virtual/index.js_commonjs-exports.js';
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -106,7 +107,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
106
107
|
if (!basic) {
|
|
107
108
|
return null;
|
|
108
109
|
}
|
|
109
|
-
const { date, characterImage
|
|
110
|
+
const { date, characterImage } = basic;
|
|
110
111
|
const action = imageOptions?.action ?? CharacterImageAction.Stand1;
|
|
111
112
|
const emotion = imageOptions?.emotion ?? CharacterImageEmotion.Default;
|
|
112
113
|
const wmotion = imageOptions?.wmotion ?? CharacterImageWeaponMotion.Default;
|
|
@@ -116,6 +117,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
116
117
|
const height = 96;
|
|
117
118
|
const x = imageOptions?.x ?? null;
|
|
118
119
|
const y = imageOptions?.y ?? null;
|
|
120
|
+
const path = removeQuery(characterImage);
|
|
119
121
|
const query = {
|
|
120
122
|
action: `${action}.${actionFrame}`,
|
|
121
123
|
emotion: `${emotion}.${emotionFrame}`,
|
package/package.json
CHANGED
|
@@ -5,3 +5,12 @@ import { PotentialOptionGrade } from './enum/potentialOptionGrade';
|
|
|
5
5
|
* @param text support only "레어", "에픽", "유니크", "레전드리"
|
|
6
6
|
*/
|
|
7
7
|
export declare const potentialOptionGradeFromString: (text: string) => PotentialOptionGrade;
|
|
8
|
+
/**
|
|
9
|
+
* URL에서 Query를 제거합니다.
|
|
10
|
+
* @param url URL
|
|
11
|
+
* @example
|
|
12
|
+
* ```
|
|
13
|
+
* removeQuery('https://example.com/path?query=123&test=abc') // returns 'https://example.com/path'
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const removeQuery: (url: string) => string;
|