maplestory-openapi 2.12.0 → 2.13.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/dist/index.js +203 -198
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +203 -198
- package/package.json +1 -1
- package/types/maplestory/api/dto/union/unionChampionInfoDto.d.ts +4 -0
- package/types/maplestory/api/mapleStoryApi.d.ts +13 -35
- package/types/maplestory/api/response/union/unionChampionDtoBody.d.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -7337,6 +7337,78 @@ class UnionArtifactDto {
|
|
|
7337
7337
|
}
|
|
7338
7338
|
}
|
|
7339
7339
|
|
|
7340
|
+
/**
|
|
7341
|
+
* 유니온 챔피언 휘장 정보
|
|
7342
|
+
*/
|
|
7343
|
+
class UnionChampionBadgeInfoDto {
|
|
7344
|
+
/**
|
|
7345
|
+
* 유니온 챔피언 휘장 효과
|
|
7346
|
+
*/
|
|
7347
|
+
stat;
|
|
7348
|
+
constructor(obj) {
|
|
7349
|
+
const { stat } = obj;
|
|
7350
|
+
this.stat = stat;
|
|
7351
|
+
}
|
|
7352
|
+
}
|
|
7353
|
+
|
|
7354
|
+
/**
|
|
7355
|
+
* 유니온 챔피언 상세 정보
|
|
7356
|
+
*/
|
|
7357
|
+
class UnionChampionInfoDto {
|
|
7358
|
+
/**
|
|
7359
|
+
* 유니온 챔피언 캐릭터 명
|
|
7360
|
+
*/
|
|
7361
|
+
championName;
|
|
7362
|
+
/**
|
|
7363
|
+
* 유니온 챔피언 슬롯
|
|
7364
|
+
*/
|
|
7365
|
+
championSlot;
|
|
7366
|
+
/**
|
|
7367
|
+
* 유니온 챔피언 등급
|
|
7368
|
+
*/
|
|
7369
|
+
championGrade;
|
|
7370
|
+
/**
|
|
7371
|
+
* 유니온 챔피언 캐릭터의 직업
|
|
7372
|
+
*/
|
|
7373
|
+
championClass;
|
|
7374
|
+
/**
|
|
7375
|
+
* 챔피언 휘장 효과
|
|
7376
|
+
*/
|
|
7377
|
+
championBadgeInfo;
|
|
7378
|
+
constructor(obj) {
|
|
7379
|
+
const { champion_name, champion_slot, champion_grade, champion_class, champion_badge_info } = obj;
|
|
7380
|
+
this.championName = champion_name;
|
|
7381
|
+
this.championSlot = champion_slot;
|
|
7382
|
+
this.championGrade = champion_grade;
|
|
7383
|
+
this.championClass = champion_class;
|
|
7384
|
+
this.championBadgeInfo = champion_badge_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7385
|
+
}
|
|
7386
|
+
}
|
|
7387
|
+
|
|
7388
|
+
/**
|
|
7389
|
+
* 유니온 챔피언 정보
|
|
7390
|
+
*/
|
|
7391
|
+
class UnionChampionDto {
|
|
7392
|
+
/**
|
|
7393
|
+
* 조회 기준일
|
|
7394
|
+
*/
|
|
7395
|
+
date;
|
|
7396
|
+
/**
|
|
7397
|
+
* 유니온 챔피언 정보
|
|
7398
|
+
*/
|
|
7399
|
+
unionChampion;
|
|
7400
|
+
/**
|
|
7401
|
+
* 유니온 챔피언 휘장 정보
|
|
7402
|
+
*/
|
|
7403
|
+
championBadgeTotalInfo;
|
|
7404
|
+
constructor(obj) {
|
|
7405
|
+
const { date, union_champion, champion_badge_total_info } = obj;
|
|
7406
|
+
this.date = date ? new Date(date) : null;
|
|
7407
|
+
this.unionChampion = union_champion.map((info) => new UnionChampionInfoDto(info));
|
|
7408
|
+
this.championBadgeTotalInfo = champion_badge_total_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7409
|
+
}
|
|
7410
|
+
}
|
|
7411
|
+
|
|
7340
7412
|
/**
|
|
7341
7413
|
* 유니온 정보
|
|
7342
7414
|
*/
|
|
@@ -7614,73 +7686,6 @@ const errorMap = {
|
|
|
7614
7686
|
['OPENAPI00011']: MapleStoryApiErrorCode.OPENAPI00011,
|
|
7615
7687
|
};
|
|
7616
7688
|
|
|
7617
|
-
/**
|
|
7618
|
-
* 유니온 챔피언 휘장 정보
|
|
7619
|
-
*/
|
|
7620
|
-
class UnionChampionBadgeInfoDto {
|
|
7621
|
-
/**
|
|
7622
|
-
* 유니온 챔피언 휘장 효과
|
|
7623
|
-
*/
|
|
7624
|
-
stat;
|
|
7625
|
-
constructor(obj) {
|
|
7626
|
-
const { stat } = obj;
|
|
7627
|
-
this.stat = stat;
|
|
7628
|
-
}
|
|
7629
|
-
}
|
|
7630
|
-
|
|
7631
|
-
/**
|
|
7632
|
-
* 유니온 챔피언 상세 정보
|
|
7633
|
-
*/
|
|
7634
|
-
class UnionChampionInfoDto {
|
|
7635
|
-
/**
|
|
7636
|
-
* 유니온 챔피언 슬롯
|
|
7637
|
-
*/
|
|
7638
|
-
championSlot;
|
|
7639
|
-
/**
|
|
7640
|
-
* 유니온 챔피언 등급
|
|
7641
|
-
*/
|
|
7642
|
-
championGrade;
|
|
7643
|
-
/**
|
|
7644
|
-
* 유니온 챔피언 캐릭터의 직업
|
|
7645
|
-
*/
|
|
7646
|
-
championClass;
|
|
7647
|
-
/**
|
|
7648
|
-
* 챔피언 휘장 효과
|
|
7649
|
-
*/
|
|
7650
|
-
championBadgeInfo;
|
|
7651
|
-
constructor(obj) {
|
|
7652
|
-
const { champion_slot, champion_grade, champion_class, champion_badge_info } = obj;
|
|
7653
|
-
this.championSlot = champion_slot;
|
|
7654
|
-
this.championGrade = champion_grade;
|
|
7655
|
-
this.championClass = champion_class;
|
|
7656
|
-
this.championBadgeInfo = champion_badge_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7657
|
-
}
|
|
7658
|
-
}
|
|
7659
|
-
|
|
7660
|
-
/**
|
|
7661
|
-
* 유니온 챔피언 정보
|
|
7662
|
-
*/
|
|
7663
|
-
class UnionChampionDto {
|
|
7664
|
-
/**
|
|
7665
|
-
* 조회 기준일
|
|
7666
|
-
*/
|
|
7667
|
-
date;
|
|
7668
|
-
/**
|
|
7669
|
-
* 유니온 챔피언 정보
|
|
7670
|
-
*/
|
|
7671
|
-
unionChampion;
|
|
7672
|
-
/**
|
|
7673
|
-
* 유니온 챔피언 휘장 정보
|
|
7674
|
-
*/
|
|
7675
|
-
championBadgeTotalInfo;
|
|
7676
|
-
constructor(obj) {
|
|
7677
|
-
const { date, union_champion, champion_badge_total_info } = obj;
|
|
7678
|
-
this.date = date ? new Date(date) : null;
|
|
7679
|
-
this.unionChampion = union_champion.map((info) => new UnionChampionInfoDto(info));
|
|
7680
|
-
this.championBadgeTotalInfo = champion_badge_total_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7681
|
-
}
|
|
7682
|
-
}
|
|
7683
|
-
|
|
7684
7689
|
dayjs.extend(timezone);
|
|
7685
7690
|
dayjs.extend(utc);
|
|
7686
7691
|
/**
|
|
@@ -7692,7 +7697,6 @@ class MapleStoryApi {
|
|
|
7692
7697
|
client;
|
|
7693
7698
|
static BASE_URL = 'https://open.api.nexon.com/';
|
|
7694
7699
|
static DEFAULT_TIMEOUT = 5000;
|
|
7695
|
-
static kstOffset = 540;
|
|
7696
7700
|
get timeout() {
|
|
7697
7701
|
return this.client.defaults.timeout;
|
|
7698
7702
|
}
|
|
@@ -7759,11 +7763,11 @@ class MapleStoryApi {
|
|
|
7759
7763
|
async getCharacterBasic(ocid, dateOptions) {
|
|
7760
7764
|
const path = 'maplestory/v1/character/basic';
|
|
7761
7765
|
const date = dateOptions
|
|
7762
|
-
?
|
|
7766
|
+
? toDateString(dateOptions, {
|
|
7763
7767
|
year: 2023,
|
|
7764
7768
|
month: 12,
|
|
7765
7769
|
day: 21,
|
|
7766
|
-
}
|
|
7770
|
+
})
|
|
7767
7771
|
: undefined;
|
|
7768
7772
|
const query = {
|
|
7769
7773
|
ocid: ocid,
|
|
@@ -7847,11 +7851,11 @@ class MapleStoryApi {
|
|
|
7847
7851
|
async getCharacterPopularity(ocid, dateOptions) {
|
|
7848
7852
|
const path = 'maplestory/v1/character/popularity';
|
|
7849
7853
|
const date = dateOptions
|
|
7850
|
-
?
|
|
7854
|
+
? toDateString(dateOptions, {
|
|
7851
7855
|
year: 2023,
|
|
7852
7856
|
month: 12,
|
|
7853
7857
|
day: 21,
|
|
7854
|
-
}
|
|
7858
|
+
})
|
|
7855
7859
|
: undefined;
|
|
7856
7860
|
const query = {
|
|
7857
7861
|
ocid: ocid,
|
|
@@ -7875,11 +7879,11 @@ class MapleStoryApi {
|
|
|
7875
7879
|
async getCharacterStat(ocid, dateOptions) {
|
|
7876
7880
|
const path = 'maplestory/v1/character/stat';
|
|
7877
7881
|
const date = dateOptions
|
|
7878
|
-
?
|
|
7882
|
+
? toDateString(dateOptions, {
|
|
7879
7883
|
year: 2023,
|
|
7880
7884
|
month: 12,
|
|
7881
7885
|
day: 21,
|
|
7882
|
-
}
|
|
7886
|
+
})
|
|
7883
7887
|
: undefined;
|
|
7884
7888
|
const query = {
|
|
7885
7889
|
ocid: ocid,
|
|
@@ -7903,11 +7907,11 @@ class MapleStoryApi {
|
|
|
7903
7907
|
async getCharacterHyperStat(ocid, dateOptions) {
|
|
7904
7908
|
const path = 'maplestory/v1/character/hyper-stat';
|
|
7905
7909
|
const date = dateOptions
|
|
7906
|
-
?
|
|
7910
|
+
? toDateString(dateOptions, {
|
|
7907
7911
|
year: 2023,
|
|
7908
7912
|
month: 12,
|
|
7909
7913
|
day: 21,
|
|
7910
|
-
}
|
|
7914
|
+
})
|
|
7911
7915
|
: undefined;
|
|
7912
7916
|
const query = {
|
|
7913
7917
|
ocid: ocid,
|
|
@@ -7931,11 +7935,11 @@ class MapleStoryApi {
|
|
|
7931
7935
|
async getCharacterPropensity(ocid, dateOptions) {
|
|
7932
7936
|
const path = 'maplestory/v1/character/propensity';
|
|
7933
7937
|
const date = dateOptions
|
|
7934
|
-
?
|
|
7938
|
+
? toDateString(dateOptions, {
|
|
7935
7939
|
year: 2023,
|
|
7936
7940
|
month: 12,
|
|
7937
7941
|
day: 21,
|
|
7938
|
-
}
|
|
7942
|
+
})
|
|
7939
7943
|
: undefined;
|
|
7940
7944
|
const query = {
|
|
7941
7945
|
ocid: ocid,
|
|
@@ -7959,11 +7963,11 @@ class MapleStoryApi {
|
|
|
7959
7963
|
async getCharacterAbility(ocid, dateOptions) {
|
|
7960
7964
|
const path = 'maplestory/v1/character/ability';
|
|
7961
7965
|
const date = dateOptions
|
|
7962
|
-
?
|
|
7966
|
+
? toDateString(dateOptions, {
|
|
7963
7967
|
year: 2023,
|
|
7964
7968
|
month: 12,
|
|
7965
7969
|
day: 21,
|
|
7966
|
-
}
|
|
7970
|
+
})
|
|
7967
7971
|
: undefined;
|
|
7968
7972
|
const query = {
|
|
7969
7973
|
ocid: ocid,
|
|
@@ -7987,11 +7991,11 @@ class MapleStoryApi {
|
|
|
7987
7991
|
async getCharacterItemEquipment(ocid, dateOptions) {
|
|
7988
7992
|
const path = 'maplestory/v1/character/item-equipment';
|
|
7989
7993
|
const date = dateOptions
|
|
7990
|
-
?
|
|
7994
|
+
? toDateString(dateOptions, {
|
|
7991
7995
|
year: 2023,
|
|
7992
7996
|
month: 12,
|
|
7993
7997
|
day: 21,
|
|
7994
|
-
}
|
|
7998
|
+
})
|
|
7995
7999
|
: undefined;
|
|
7996
8000
|
const query = {
|
|
7997
8001
|
ocid: ocid,
|
|
@@ -8015,11 +8019,11 @@ class MapleStoryApi {
|
|
|
8015
8019
|
async getCharacterCashItemEquipment(ocid, dateOptions) {
|
|
8016
8020
|
const path = 'maplestory/v1/character/cashitem-equipment';
|
|
8017
8021
|
const date = dateOptions
|
|
8018
|
-
?
|
|
8022
|
+
? toDateString(dateOptions, {
|
|
8019
8023
|
year: 2023,
|
|
8020
8024
|
month: 12,
|
|
8021
8025
|
day: 21,
|
|
8022
|
-
}
|
|
8026
|
+
})
|
|
8023
8027
|
: undefined;
|
|
8024
8028
|
const query = {
|
|
8025
8029
|
ocid: ocid,
|
|
@@ -8043,11 +8047,11 @@ class MapleStoryApi {
|
|
|
8043
8047
|
async getCharacterSymbolEquipment(ocid, dateOptions) {
|
|
8044
8048
|
const path = 'maplestory/v1/character/symbol-equipment';
|
|
8045
8049
|
const date = dateOptions
|
|
8046
|
-
?
|
|
8050
|
+
? toDateString(dateOptions, {
|
|
8047
8051
|
year: 2023,
|
|
8048
8052
|
month: 12,
|
|
8049
8053
|
day: 21,
|
|
8050
|
-
}
|
|
8054
|
+
})
|
|
8051
8055
|
: undefined;
|
|
8052
8056
|
const query = {
|
|
8053
8057
|
ocid: ocid,
|
|
@@ -8071,11 +8075,11 @@ class MapleStoryApi {
|
|
|
8071
8075
|
async getCharacterSetEffect(ocid, dateOptions) {
|
|
8072
8076
|
const path = 'maplestory/v1/character/set-effect';
|
|
8073
8077
|
const date = dateOptions
|
|
8074
|
-
?
|
|
8078
|
+
? toDateString(dateOptions, {
|
|
8075
8079
|
year: 2023,
|
|
8076
8080
|
month: 12,
|
|
8077
8081
|
day: 21,
|
|
8078
|
-
}
|
|
8082
|
+
})
|
|
8079
8083
|
: undefined;
|
|
8080
8084
|
const query = {
|
|
8081
8085
|
ocid: ocid,
|
|
@@ -8098,13 +8102,16 @@ class MapleStoryApi {
|
|
|
8098
8102
|
*/
|
|
8099
8103
|
async getCharacterBeautyEquipment(ocid, dateOptions) {
|
|
8100
8104
|
const path = 'maplestory/v1/character/beauty-equipment';
|
|
8101
|
-
const
|
|
8102
|
-
|
|
8103
|
-
date: dateOptions ? MapleStoryApi.toDateString({
|
|
8105
|
+
const date = dateOptions
|
|
8106
|
+
? toDateString(dateOptions, {
|
|
8104
8107
|
year: 2023,
|
|
8105
8108
|
month: 12,
|
|
8106
8109
|
day: 21,
|
|
8107
|
-
}
|
|
8110
|
+
})
|
|
8111
|
+
: undefined;
|
|
8112
|
+
const query = {
|
|
8113
|
+
ocid: ocid,
|
|
8114
|
+
date: date,
|
|
8108
8115
|
};
|
|
8109
8116
|
const { data } = await this.client.get(path, {
|
|
8110
8117
|
params: query,
|
|
@@ -8124,11 +8131,11 @@ class MapleStoryApi {
|
|
|
8124
8131
|
async getCharacterAndroidEquipment(ocid, dateOptions) {
|
|
8125
8132
|
const path = 'maplestory/v1/character/android-equipment';
|
|
8126
8133
|
const date = dateOptions
|
|
8127
|
-
?
|
|
8134
|
+
? toDateString(dateOptions, {
|
|
8128
8135
|
year: 2023,
|
|
8129
8136
|
month: 12,
|
|
8130
8137
|
day: 21,
|
|
8131
|
-
}
|
|
8138
|
+
})
|
|
8132
8139
|
: undefined;
|
|
8133
8140
|
const query = {
|
|
8134
8141
|
ocid: ocid,
|
|
@@ -8152,11 +8159,11 @@ class MapleStoryApi {
|
|
|
8152
8159
|
async getCharacterPetEquipment(ocid, dateOptions) {
|
|
8153
8160
|
const path = 'maplestory/v1/character/pet-equipment';
|
|
8154
8161
|
const date = dateOptions
|
|
8155
|
-
?
|
|
8162
|
+
? toDateString(dateOptions, {
|
|
8156
8163
|
year: 2023,
|
|
8157
8164
|
month: 12,
|
|
8158
8165
|
day: 21,
|
|
8159
|
-
}
|
|
8166
|
+
})
|
|
8160
8167
|
: undefined;
|
|
8161
8168
|
const query = {
|
|
8162
8169
|
ocid: ocid,
|
|
@@ -8192,11 +8199,11 @@ class MapleStoryApi {
|
|
|
8192
8199
|
async getCharacterSkill(ocid, characterSkillGrade, dateOptions) {
|
|
8193
8200
|
const path = 'maplestory/v1/character/skill';
|
|
8194
8201
|
const date = dateOptions
|
|
8195
|
-
?
|
|
8202
|
+
? toDateString(dateOptions, {
|
|
8196
8203
|
year: 2023,
|
|
8197
8204
|
month: 12,
|
|
8198
8205
|
day: 21,
|
|
8199
|
-
}
|
|
8206
|
+
})
|
|
8200
8207
|
: undefined;
|
|
8201
8208
|
const query = {
|
|
8202
8209
|
ocid: ocid,
|
|
@@ -8221,11 +8228,11 @@ class MapleStoryApi {
|
|
|
8221
8228
|
async getCharacterLinkSkill(ocid, dateOptions) {
|
|
8222
8229
|
const path = 'maplestory/v1/character/link-skill';
|
|
8223
8230
|
const date = dateOptions
|
|
8224
|
-
?
|
|
8231
|
+
? toDateString(dateOptions, {
|
|
8225
8232
|
year: 2023,
|
|
8226
8233
|
month: 12,
|
|
8227
8234
|
day: 21,
|
|
8228
|
-
}
|
|
8235
|
+
})
|
|
8229
8236
|
: undefined;
|
|
8230
8237
|
const query = {
|
|
8231
8238
|
ocid: ocid,
|
|
@@ -8249,11 +8256,11 @@ class MapleStoryApi {
|
|
|
8249
8256
|
async getCharacterVMatrix(ocid, dateOptions) {
|
|
8250
8257
|
const path = 'maplestory/v1/character/vmatrix';
|
|
8251
8258
|
const date = dateOptions
|
|
8252
|
-
?
|
|
8259
|
+
? toDateString(dateOptions, {
|
|
8253
8260
|
year: 2023,
|
|
8254
8261
|
month: 12,
|
|
8255
8262
|
day: 21,
|
|
8256
|
-
}
|
|
8263
|
+
})
|
|
8257
8264
|
: undefined;
|
|
8258
8265
|
const query = {
|
|
8259
8266
|
ocid: ocid,
|
|
@@ -8277,11 +8284,11 @@ class MapleStoryApi {
|
|
|
8277
8284
|
async getCharacterHexaMatrix(ocid, dateOptions) {
|
|
8278
8285
|
const path = 'maplestory/v1/character/hexamatrix';
|
|
8279
8286
|
const date = dateOptions
|
|
8280
|
-
?
|
|
8287
|
+
? toDateString(dateOptions, {
|
|
8281
8288
|
year: 2023,
|
|
8282
8289
|
month: 12,
|
|
8283
8290
|
day: 21,
|
|
8284
|
-
}
|
|
8291
|
+
})
|
|
8285
8292
|
: undefined;
|
|
8286
8293
|
const query = {
|
|
8287
8294
|
ocid: ocid,
|
|
@@ -8305,11 +8312,11 @@ class MapleStoryApi {
|
|
|
8305
8312
|
async getCharacterHexaMatrixStat(ocid, dateOptions) {
|
|
8306
8313
|
const path = 'maplestory/v1/character/hexamatrix-stat';
|
|
8307
8314
|
const date = dateOptions
|
|
8308
|
-
?
|
|
8315
|
+
? toDateString(dateOptions, {
|
|
8309
8316
|
year: 2023,
|
|
8310
8317
|
month: 12,
|
|
8311
8318
|
day: 21,
|
|
8312
|
-
}
|
|
8319
|
+
})
|
|
8313
8320
|
: undefined;
|
|
8314
8321
|
const query = {
|
|
8315
8322
|
ocid: ocid,
|
|
@@ -8333,11 +8340,11 @@ class MapleStoryApi {
|
|
|
8333
8340
|
async getCharacterDojang(ocid, dateOptions) {
|
|
8334
8341
|
const path = 'maplestory/v1/character/dojang';
|
|
8335
8342
|
const date = dateOptions
|
|
8336
|
-
?
|
|
8343
|
+
? toDateString(dateOptions, {
|
|
8337
8344
|
year: 2023,
|
|
8338
8345
|
month: 12,
|
|
8339
8346
|
day: 21,
|
|
8340
|
-
}
|
|
8347
|
+
})
|
|
8341
8348
|
: undefined;
|
|
8342
8349
|
const query = {
|
|
8343
8350
|
ocid: ocid,
|
|
@@ -8363,11 +8370,11 @@ class MapleStoryApi {
|
|
|
8363
8370
|
async getUnion(ocid, dateOptions) {
|
|
8364
8371
|
const path = 'maplestory/v1/user/union';
|
|
8365
8372
|
const date = dateOptions
|
|
8366
|
-
?
|
|
8373
|
+
? toDateString(dateOptions, {
|
|
8367
8374
|
year: 2023,
|
|
8368
8375
|
month: 12,
|
|
8369
8376
|
day: 21,
|
|
8370
|
-
}
|
|
8377
|
+
})
|
|
8371
8378
|
: undefined;
|
|
8372
8379
|
const query = {
|
|
8373
8380
|
ocid: ocid,
|
|
@@ -8391,11 +8398,11 @@ class MapleStoryApi {
|
|
|
8391
8398
|
async getUnionRaider(ocid, dateOptions) {
|
|
8392
8399
|
const path = 'maplestory/v1/user/union-raider';
|
|
8393
8400
|
const date = dateOptions
|
|
8394
|
-
?
|
|
8401
|
+
? toDateString(dateOptions, {
|
|
8395
8402
|
year: 2023,
|
|
8396
8403
|
month: 12,
|
|
8397
8404
|
day: 21,
|
|
8398
|
-
}
|
|
8405
|
+
})
|
|
8399
8406
|
: undefined;
|
|
8400
8407
|
const query = {
|
|
8401
8408
|
ocid: ocid,
|
|
@@ -8419,11 +8426,11 @@ class MapleStoryApi {
|
|
|
8419
8426
|
async getUnionArtifact(ocid, dateOptions) {
|
|
8420
8427
|
const path = 'maplestory/v1/user/union-artifact';
|
|
8421
8428
|
const date = dateOptions
|
|
8422
|
-
?
|
|
8429
|
+
? toDateString(dateOptions, {
|
|
8423
8430
|
year: 2023,
|
|
8424
8431
|
month: 12,
|
|
8425
8432
|
day: 21,
|
|
8426
|
-
}
|
|
8433
|
+
})
|
|
8427
8434
|
: undefined;
|
|
8428
8435
|
const query = {
|
|
8429
8436
|
ocid: ocid,
|
|
@@ -8448,11 +8455,11 @@ class MapleStoryApi {
|
|
|
8448
8455
|
async getUnionChampion(ocid, dateOptions) {
|
|
8449
8456
|
const path = 'maplestory/v1/user/union-champion';
|
|
8450
8457
|
const date = dateOptions
|
|
8451
|
-
?
|
|
8458
|
+
? toDateString(dateOptions, {
|
|
8452
8459
|
year: 2023,
|
|
8453
8460
|
month: 12,
|
|
8454
8461
|
day: 21,
|
|
8455
|
-
}
|
|
8462
|
+
})
|
|
8456
8463
|
: undefined;
|
|
8457
8464
|
const query = {
|
|
8458
8465
|
ocid: ocid,
|
|
@@ -8498,11 +8505,11 @@ class MapleStoryApi {
|
|
|
8498
8505
|
async getGuildBasic(guildId, dateOptions) {
|
|
8499
8506
|
const path = 'maplestory/v1/guild/basic';
|
|
8500
8507
|
const date = dateOptions
|
|
8501
|
-
?
|
|
8508
|
+
? toDateString(dateOptions, {
|
|
8502
8509
|
year: 2023,
|
|
8503
8510
|
month: 12,
|
|
8504
8511
|
day: 21,
|
|
8505
|
-
}
|
|
8512
|
+
})
|
|
8506
8513
|
: undefined;
|
|
8507
8514
|
const query = {
|
|
8508
8515
|
oguild_id: guildId,
|
|
@@ -8522,16 +8529,16 @@ class MapleStoryApi {
|
|
|
8522
8529
|
query.cursor = parameter;
|
|
8523
8530
|
}
|
|
8524
8531
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8525
|
-
query.date =
|
|
8526
|
-
|
|
8527
|
-
month: 12,
|
|
8528
|
-
day: 27,
|
|
8529
|
-
}, parameter ??
|
|
8530
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8532
|
+
query.date = toDateString(parameter ??
|
|
8533
|
+
getProperDefaultDateOptions({
|
|
8531
8534
|
hour: 0,
|
|
8532
8535
|
minute: 0,
|
|
8533
8536
|
dateOffset: 0,
|
|
8534
|
-
})
|
|
8537
|
+
}), {
|
|
8538
|
+
year: 2023,
|
|
8539
|
+
month: 12,
|
|
8540
|
+
day: 27,
|
|
8541
|
+
});
|
|
8535
8542
|
}
|
|
8536
8543
|
const { data } = await this.client.get(path, {
|
|
8537
8544
|
params: query,
|
|
@@ -8547,15 +8554,11 @@ class MapleStoryApi {
|
|
|
8547
8554
|
query.cursor = parameter;
|
|
8548
8555
|
}
|
|
8549
8556
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8550
|
-
query.date =
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
day: 25,
|
|
8554
|
-
}, parameter ??
|
|
8555
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8556
|
-
hour: 4,
|
|
8557
|
+
query.date = toDateString(parameter ??
|
|
8558
|
+
getProperDefaultDateOptions({
|
|
8559
|
+
hour: 0,
|
|
8557
8560
|
minute: 0,
|
|
8558
|
-
dateOffset:
|
|
8561
|
+
dateOffset: 0,
|
|
8559
8562
|
}));
|
|
8560
8563
|
}
|
|
8561
8564
|
const { data } = await this.client.get(path, {
|
|
@@ -8572,16 +8575,16 @@ class MapleStoryApi {
|
|
|
8572
8575
|
query.cursor = parameter;
|
|
8573
8576
|
}
|
|
8574
8577
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8575
|
-
query.date =
|
|
8578
|
+
query.date = toDateString(parameter ??
|
|
8579
|
+
getProperDefaultDateOptions({
|
|
8580
|
+
hour: 0,
|
|
8581
|
+
minute: 0,
|
|
8582
|
+
dateOffset: 0,
|
|
8583
|
+
}), {
|
|
8576
8584
|
year: 2024,
|
|
8577
8585
|
month: 1,
|
|
8578
8586
|
day: 25,
|
|
8579
|
-
}
|
|
8580
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8581
|
-
hour: 4,
|
|
8582
|
-
minute: 0,
|
|
8583
|
-
dateOffset: 1,
|
|
8584
|
-
}));
|
|
8587
|
+
});
|
|
8585
8588
|
}
|
|
8586
8589
|
const { data } = await this.client.get(path, {
|
|
8587
8590
|
params: query,
|
|
@@ -8600,18 +8603,18 @@ class MapleStoryApi {
|
|
|
8600
8603
|
* @param dateOptions 조회 기준일 (KST).
|
|
8601
8604
|
*
|
|
8602
8605
|
*/
|
|
8603
|
-
async getOverallRanking(filterOptions, dateOptions =
|
|
8606
|
+
async getOverallRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8604
8607
|
hour: 8,
|
|
8605
8608
|
minute: 30,
|
|
8606
8609
|
dateOffset: 0,
|
|
8607
8610
|
})) {
|
|
8608
8611
|
const path = 'maplestory/v1/ranking/overall';
|
|
8609
8612
|
const query = {
|
|
8610
|
-
date:
|
|
8613
|
+
date: toDateString(dateOptions, {
|
|
8611
8614
|
year: 2023,
|
|
8612
8615
|
month: 12,
|
|
8613
8616
|
day: 22,
|
|
8614
|
-
}
|
|
8617
|
+
}),
|
|
8615
8618
|
};
|
|
8616
8619
|
if (filterOptions) {
|
|
8617
8620
|
const { worldName, worldType, characterClass, ocid, page } = filterOptions;
|
|
@@ -8635,18 +8638,18 @@ class MapleStoryApi {
|
|
|
8635
8638
|
* @param filterOptions 검색 기준
|
|
8636
8639
|
* @param dateOptions 조회 기준일 (KST)
|
|
8637
8640
|
*/
|
|
8638
|
-
async getUnionRanking(filterOptions, dateOptions =
|
|
8641
|
+
async getUnionRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8639
8642
|
hour: 8,
|
|
8640
8643
|
minute: 30,
|
|
8641
8644
|
dateOffset: 0,
|
|
8642
8645
|
})) {
|
|
8643
8646
|
const path = 'maplestory/v1/ranking/union';
|
|
8644
8647
|
const query = {
|
|
8645
|
-
date:
|
|
8648
|
+
date: toDateString(dateOptions, {
|
|
8646
8649
|
year: 2023,
|
|
8647
8650
|
month: 12,
|
|
8648
8651
|
day: 22,
|
|
8649
|
-
}
|
|
8652
|
+
}),
|
|
8650
8653
|
};
|
|
8651
8654
|
if (filterOptions) {
|
|
8652
8655
|
const { worldName, ocid, page } = filterOptions;
|
|
@@ -8668,18 +8671,18 @@ class MapleStoryApi {
|
|
|
8668
8671
|
* @param filterOptions 검색 기준
|
|
8669
8672
|
* @param dateOptions 조회 기준일 (KST)
|
|
8670
8673
|
*/
|
|
8671
|
-
async getGuildRanking(filterOptions, dateOptions =
|
|
8674
|
+
async getGuildRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8672
8675
|
hour: 8,
|
|
8673
8676
|
minute: 30,
|
|
8674
8677
|
dateOffset: 0,
|
|
8675
8678
|
})) {
|
|
8676
8679
|
const path = 'maplestory/v1/ranking/guild';
|
|
8677
8680
|
const query = {
|
|
8678
|
-
date:
|
|
8681
|
+
date: toDateString(dateOptions, {
|
|
8679
8682
|
year: 2023,
|
|
8680
8683
|
month: 12,
|
|
8681
8684
|
day: 22,
|
|
8682
|
-
}
|
|
8685
|
+
}),
|
|
8683
8686
|
ranking_type: 0,
|
|
8684
8687
|
};
|
|
8685
8688
|
if (filterOptions) {
|
|
@@ -8703,18 +8706,18 @@ class MapleStoryApi {
|
|
|
8703
8706
|
* @param filterOptions 검색 기준
|
|
8704
8707
|
* @param dateOptions 조회 기준일 (KST)
|
|
8705
8708
|
*/
|
|
8706
|
-
async getDojangRanking(filterOptions, dateOptions =
|
|
8709
|
+
async getDojangRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8707
8710
|
hour: 8,
|
|
8708
8711
|
minute: 30,
|
|
8709
8712
|
dateOffset: 0,
|
|
8710
8713
|
})) {
|
|
8711
8714
|
const path = 'maplestory/v1/ranking/dojang';
|
|
8712
8715
|
const query = {
|
|
8713
|
-
date:
|
|
8716
|
+
date: toDateString(dateOptions, {
|
|
8714
8717
|
year: 2023,
|
|
8715
8718
|
month: 12,
|
|
8716
8719
|
day: 22,
|
|
8717
|
-
}
|
|
8720
|
+
}),
|
|
8718
8721
|
difficulty: 0,
|
|
8719
8722
|
};
|
|
8720
8723
|
if (filterOptions) {
|
|
@@ -8739,18 +8742,18 @@ class MapleStoryApi {
|
|
|
8739
8742
|
* @param filterOptions 검색 기준
|
|
8740
8743
|
* @param dateOptions 조회 기준일 (KST)
|
|
8741
8744
|
*/
|
|
8742
|
-
async getSeedRanking(filterOptions, dateOptions =
|
|
8745
|
+
async getSeedRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8743
8746
|
hour: 8,
|
|
8744
8747
|
minute: 30,
|
|
8745
8748
|
dateOffset: 0,
|
|
8746
8749
|
})) {
|
|
8747
8750
|
const path = 'maplestory/v1/ranking/theseed';
|
|
8748
8751
|
const query = {
|
|
8749
|
-
date:
|
|
8752
|
+
date: toDateString(dateOptions, {
|
|
8750
8753
|
year: 2023,
|
|
8751
8754
|
month: 12,
|
|
8752
8755
|
day: 22,
|
|
8753
|
-
}
|
|
8756
|
+
}),
|
|
8754
8757
|
};
|
|
8755
8758
|
if (filterOptions) {
|
|
8756
8759
|
const { worldName, ocid, page } = filterOptions;
|
|
@@ -8772,18 +8775,18 @@ class MapleStoryApi {
|
|
|
8772
8775
|
* @param filterOptions 검색 기준
|
|
8773
8776
|
* @param dateOptions 조회 기준일 (KST)
|
|
8774
8777
|
*/
|
|
8775
|
-
async getAchievementRanking(filterOptions, dateOptions =
|
|
8778
|
+
async getAchievementRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8776
8779
|
hour: 8,
|
|
8777
8780
|
minute: 30,
|
|
8778
8781
|
dateOffset: 0,
|
|
8779
8782
|
})) {
|
|
8780
8783
|
const path = 'maplestory/v1/ranking/achievement';
|
|
8781
8784
|
const query = {
|
|
8782
|
-
date:
|
|
8785
|
+
date: toDateString(dateOptions, {
|
|
8783
8786
|
year: 2023,
|
|
8784
8787
|
month: 12,
|
|
8785
8788
|
day: 22,
|
|
8786
|
-
}
|
|
8789
|
+
}),
|
|
8787
8790
|
};
|
|
8788
8791
|
if (filterOptions) {
|
|
8789
8792
|
const { ocid, page } = filterOptions;
|
|
@@ -8946,52 +8949,54 @@ class MapleStoryApi {
|
|
|
8946
8949
|
const xml = (await xml2js.parseStringPromise(response.data));
|
|
8947
8950
|
return new InspectionInfoDto(xml);
|
|
8948
8951
|
}
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
}
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8952
|
+
}
|
|
8953
|
+
const KST_OFFSET = 540;
|
|
8954
|
+
/**
|
|
8955
|
+
* API 서버의 데이터 갱신 시간에 따라 데이터가 조회 가능한 최신 날짜를 반환합니다.
|
|
8956
|
+
*
|
|
8957
|
+
* @param options
|
|
8958
|
+
*/
|
|
8959
|
+
const getProperDefaultDateOptions = (options) => {
|
|
8960
|
+
const { hour, minute, dateOffset } = options;
|
|
8961
|
+
const kstNow = dayjs().utcOffset(KST_OFFSET);
|
|
8962
|
+
const updateDate = dayjs()
|
|
8963
|
+
.utcOffset(KST_OFFSET)
|
|
8964
|
+
.hour(hour)
|
|
8965
|
+
.minute(minute);
|
|
8966
|
+
let adjustedDate;
|
|
8967
|
+
if (kstNow.isAfter(updateDate)) {
|
|
8968
|
+
adjustedDate = kstNow;
|
|
8969
|
+
}
|
|
8970
|
+
else {
|
|
8971
|
+
adjustedDate = kstNow.subtract(1, 'day');
|
|
8972
|
+
}
|
|
8973
|
+
adjustedDate = adjustedDate.subtract(dateOffset ?? 0, 'day');
|
|
8974
|
+
return {
|
|
8975
|
+
year: adjustedDate.year(),
|
|
8976
|
+
month: adjustedDate.month() + 1,
|
|
8977
|
+
day: adjustedDate.date(),
|
|
8978
|
+
};
|
|
8979
|
+
};
|
|
8980
|
+
/**
|
|
8981
|
+
* 날짜 정보를 API 서버에서 요구하는 포맷으로 변환합니다.
|
|
8982
|
+
*
|
|
8983
|
+
* @param dateOptions 조회 하려는 날짜
|
|
8984
|
+
* @param minDateOptions API 호출 가능한 최소 날짜
|
|
8985
|
+
*/
|
|
8986
|
+
const toDateString = (dateOptions, minDateOptions) => {
|
|
8987
|
+
const { year, month, day } = dateOptions;
|
|
8988
|
+
const str = dayjs(`${year}-${month}-${day}`)
|
|
8989
|
+
.utcOffset(KST_OFFSET)
|
|
8990
|
+
.format('YYYY-MM-DD');
|
|
8991
|
+
if (minDateOptions) {
|
|
8984
8992
|
const { year: minYear, month: minMonth, day: minDay } = minDateOptions;
|
|
8985
|
-
const { year, month, day } = dateOptions;
|
|
8986
8993
|
if (year < minYear ||
|
|
8987
8994
|
(year === minYear && month < minMonth) ||
|
|
8988
8995
|
(year === minYear && month === minMonth && day < minDay)) {
|
|
8989
8996
|
throw new Error(`You can only retrieve data after ${dayjs(`${minYear}-${minMonth}-${minDay}`).format('YYYY-MM-DD')}.`);
|
|
8990
8997
|
}
|
|
8991
|
-
return dayjs(`${year}-${month}-${day}`)
|
|
8992
|
-
.utcOffset(MapleStoryApi.kstOffset)
|
|
8993
|
-
.format('YYYY-MM-DD');
|
|
8994
8998
|
}
|
|
8995
|
-
|
|
8999
|
+
return str;
|
|
9000
|
+
};
|
|
8996
9001
|
|
|
8997
9002
|
export { AchievementRankingDto, AchievementRankingResponseDto, CashshopNoticeDetailDto, CashshopNoticeListDto, CashshopNoticeListItemDto, CharacterAbilityDto, CharacterAbilityInfoDto, CharacterAbilityPresetDto, CharacterAndroidCashItemEquipmentColoringPrismDto, CharacterAndroidCashItemEquipmentDto, CharacterAndroidCashItemEquipmentOptionDto, CharacterAndroidEquipmentDto, CharacterAndroidEquipmentFaceDto, CharacterAndroidEquipmentHairDto, CharacterAndroidEquipmentPresetDto, CharacterBasicDto, CharacterBeautyEquipmentDto, CharacterBeautyEquipmentFaceDto, CharacterBeautyEquipmentHairDto, CharacterCashItemEquipmentColoringPrismDto, CharacterCashItemEquipmentDto, CharacterCashItemEquipmentOptionDto, CharacterCashItemEquipmentPresetDto, CharacterDojangDto, CharacterDto, CharacterHexaMatrixDto, CharacterHexaMatrixEquipmentDto, CharacterHexaMatrixEquipmentLinkedSkillDto, CharacterHexaMatrixStatCoreDto, CharacterHexaMatrixStatDto, CharacterHyperStatDto, CharacterHyperStatPresetDto, CharacterImageAction, CharacterImageDto, CharacterImageEmotion, CharacterImageWeaponMotion, CharacterItemEquipmentAddOptionDto, CharacterItemEquipmentBaseOptionDto, CharacterItemEquipmentDragonInfoDto, CharacterItemEquipmentDto, CharacterItemEquipmentEtcOptionDto, CharacterItemEquipmentExceptionalOptionDto, CharacterItemEquipmentInfoDto, CharacterItemEquipmentMechanicInfoDto, CharacterItemEquipmentStarforceOptionDto, CharacterItemEquipmentTitleDto, CharacterItemEquipmentTotalOptionDto, CharacterLinkSkillDto, CharacterLinkSkillInfoDto, CharacterListAccountCharacterDto, CharacterListAccountDto, CharacterListDto, CharacterPetEquipmentAutoSkillDto, CharacterPetEquipmentDto, CharacterPetEquipmentItemDto, CharacterPetEquipmentItemOptionDto, CharacterPopularityDto, CharacterPropensityDto, CharacterSetEffectDto, CharacterSetEffectInfoDto, CharacterSetEffectOptionFullDto, CharacterSetEffectSetDto, CharacterSkillDto, CharacterSkillInfoDto, CharacterStatDto, CharacterSymbolEquipmentDto, CharacterSymbolEquipmentInfoDto, CharacterVMatrixCodeEquipmentDto, CharacterVMatrixDto, CubeHistoryDto, CubeHistoryResponseDto, CubeResultOptionDto, DojangRankingDto, DojangRankingResponseDto, EventNoticeDetailDto, EventNoticeListDto, EventNoticeListItemDto, GuildBasicDto, GuildDto, GuildRankingDto, GuildRankingResponseDto, GuildSkillDto, InspectionInfoDto, MapleStoryApi, MapleStoryApiError, MapleStoryApiErrorCode, NoticeDetailDto, NoticeListDto, NoticeListItemDto, OverallRankingDto, OverallRankingResponseDto, PotentialHistoryDto, PotentialHistoryResponseDto, PotentialOptionGrade, PotentialResultOptionDto, StarforceEventDto, StarforceHistoryDto, StarforceHistoryResponseDto, TheSeedRankingDto, TheSeedRankingResponseDto, UnionArtifactCrystalDto, UnionArtifactDto, UnionArtifactEffectDto, UnionDto, UnionRaiderBlockControlPointDto, UnionRaiderBlockDto, UnionRaiderBlockPositionDto, UnionRaiderDto, UnionRaiderInnerStatDto, UnionRaiderPresetDto, UnionRankingDto, UnionRankingResponseDto, UpdateNoticeDetailDto, UpdateNoticeListDto, UpdateNoticeListItemDto, potentialOptionGradeFromString };
|