maplestory-openapi 2.12.1 → 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 -203
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +203 -203
- package/package.json +1 -1
- package/types/maplestory/api/mapleStoryApi.d.ts +13 -35
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,78 +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
|
-
championName;
|
|
7639
|
-
/**
|
|
7640
|
-
* 유니온 챔피언 슬롯
|
|
7641
|
-
*/
|
|
7642
|
-
championSlot;
|
|
7643
|
-
/**
|
|
7644
|
-
* 유니온 챔피언 등급
|
|
7645
|
-
*/
|
|
7646
|
-
championGrade;
|
|
7647
|
-
/**
|
|
7648
|
-
* 유니온 챔피언 캐릭터의 직업
|
|
7649
|
-
*/
|
|
7650
|
-
championClass;
|
|
7651
|
-
/**
|
|
7652
|
-
* 챔피언 휘장 효과
|
|
7653
|
-
*/
|
|
7654
|
-
championBadgeInfo;
|
|
7655
|
-
constructor(obj) {
|
|
7656
|
-
const { champion_name, champion_slot, champion_grade, champion_class, champion_badge_info } = obj;
|
|
7657
|
-
this.championName = champion_name;
|
|
7658
|
-
this.championSlot = champion_slot;
|
|
7659
|
-
this.championGrade = champion_grade;
|
|
7660
|
-
this.championClass = champion_class;
|
|
7661
|
-
this.championBadgeInfo = champion_badge_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7662
|
-
}
|
|
7663
|
-
}
|
|
7664
|
-
|
|
7665
|
-
/**
|
|
7666
|
-
* 유니온 챔피언 정보
|
|
7667
|
-
*/
|
|
7668
|
-
class UnionChampionDto {
|
|
7669
|
-
/**
|
|
7670
|
-
* 조회 기준일
|
|
7671
|
-
*/
|
|
7672
|
-
date;
|
|
7673
|
-
/**
|
|
7674
|
-
* 유니온 챔피언 정보
|
|
7675
|
-
*/
|
|
7676
|
-
unionChampion;
|
|
7677
|
-
/**
|
|
7678
|
-
* 유니온 챔피언 휘장 정보
|
|
7679
|
-
*/
|
|
7680
|
-
championBadgeTotalInfo;
|
|
7681
|
-
constructor(obj) {
|
|
7682
|
-
const { date, union_champion, champion_badge_total_info } = obj;
|
|
7683
|
-
this.date = date ? new Date(date) : null;
|
|
7684
|
-
this.unionChampion = union_champion.map((info) => new UnionChampionInfoDto(info));
|
|
7685
|
-
this.championBadgeTotalInfo = champion_badge_total_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7686
|
-
}
|
|
7687
|
-
}
|
|
7688
|
-
|
|
7689
7689
|
dayjs.extend(timezone);
|
|
7690
7690
|
dayjs.extend(utc);
|
|
7691
7691
|
/**
|
|
@@ -7697,7 +7697,6 @@ class MapleStoryApi {
|
|
|
7697
7697
|
client;
|
|
7698
7698
|
static BASE_URL = 'https://open.api.nexon.com/';
|
|
7699
7699
|
static DEFAULT_TIMEOUT = 5000;
|
|
7700
|
-
static kstOffset = 540;
|
|
7701
7700
|
get timeout() {
|
|
7702
7701
|
return this.client.defaults.timeout;
|
|
7703
7702
|
}
|
|
@@ -7764,11 +7763,11 @@ class MapleStoryApi {
|
|
|
7764
7763
|
async getCharacterBasic(ocid, dateOptions) {
|
|
7765
7764
|
const path = 'maplestory/v1/character/basic';
|
|
7766
7765
|
const date = dateOptions
|
|
7767
|
-
?
|
|
7766
|
+
? toDateString(dateOptions, {
|
|
7768
7767
|
year: 2023,
|
|
7769
7768
|
month: 12,
|
|
7770
7769
|
day: 21,
|
|
7771
|
-
}
|
|
7770
|
+
})
|
|
7772
7771
|
: undefined;
|
|
7773
7772
|
const query = {
|
|
7774
7773
|
ocid: ocid,
|
|
@@ -7852,11 +7851,11 @@ class MapleStoryApi {
|
|
|
7852
7851
|
async getCharacterPopularity(ocid, dateOptions) {
|
|
7853
7852
|
const path = 'maplestory/v1/character/popularity';
|
|
7854
7853
|
const date = dateOptions
|
|
7855
|
-
?
|
|
7854
|
+
? toDateString(dateOptions, {
|
|
7856
7855
|
year: 2023,
|
|
7857
7856
|
month: 12,
|
|
7858
7857
|
day: 21,
|
|
7859
|
-
}
|
|
7858
|
+
})
|
|
7860
7859
|
: undefined;
|
|
7861
7860
|
const query = {
|
|
7862
7861
|
ocid: ocid,
|
|
@@ -7880,11 +7879,11 @@ class MapleStoryApi {
|
|
|
7880
7879
|
async getCharacterStat(ocid, dateOptions) {
|
|
7881
7880
|
const path = 'maplestory/v1/character/stat';
|
|
7882
7881
|
const date = dateOptions
|
|
7883
|
-
?
|
|
7882
|
+
? toDateString(dateOptions, {
|
|
7884
7883
|
year: 2023,
|
|
7885
7884
|
month: 12,
|
|
7886
7885
|
day: 21,
|
|
7887
|
-
}
|
|
7886
|
+
})
|
|
7888
7887
|
: undefined;
|
|
7889
7888
|
const query = {
|
|
7890
7889
|
ocid: ocid,
|
|
@@ -7908,11 +7907,11 @@ class MapleStoryApi {
|
|
|
7908
7907
|
async getCharacterHyperStat(ocid, dateOptions) {
|
|
7909
7908
|
const path = 'maplestory/v1/character/hyper-stat';
|
|
7910
7909
|
const date = dateOptions
|
|
7911
|
-
?
|
|
7910
|
+
? toDateString(dateOptions, {
|
|
7912
7911
|
year: 2023,
|
|
7913
7912
|
month: 12,
|
|
7914
7913
|
day: 21,
|
|
7915
|
-
}
|
|
7914
|
+
})
|
|
7916
7915
|
: undefined;
|
|
7917
7916
|
const query = {
|
|
7918
7917
|
ocid: ocid,
|
|
@@ -7936,11 +7935,11 @@ class MapleStoryApi {
|
|
|
7936
7935
|
async getCharacterPropensity(ocid, dateOptions) {
|
|
7937
7936
|
const path = 'maplestory/v1/character/propensity';
|
|
7938
7937
|
const date = dateOptions
|
|
7939
|
-
?
|
|
7938
|
+
? toDateString(dateOptions, {
|
|
7940
7939
|
year: 2023,
|
|
7941
7940
|
month: 12,
|
|
7942
7941
|
day: 21,
|
|
7943
|
-
}
|
|
7942
|
+
})
|
|
7944
7943
|
: undefined;
|
|
7945
7944
|
const query = {
|
|
7946
7945
|
ocid: ocid,
|
|
@@ -7964,11 +7963,11 @@ class MapleStoryApi {
|
|
|
7964
7963
|
async getCharacterAbility(ocid, dateOptions) {
|
|
7965
7964
|
const path = 'maplestory/v1/character/ability';
|
|
7966
7965
|
const date = dateOptions
|
|
7967
|
-
?
|
|
7966
|
+
? toDateString(dateOptions, {
|
|
7968
7967
|
year: 2023,
|
|
7969
7968
|
month: 12,
|
|
7970
7969
|
day: 21,
|
|
7971
|
-
}
|
|
7970
|
+
})
|
|
7972
7971
|
: undefined;
|
|
7973
7972
|
const query = {
|
|
7974
7973
|
ocid: ocid,
|
|
@@ -7992,11 +7991,11 @@ class MapleStoryApi {
|
|
|
7992
7991
|
async getCharacterItemEquipment(ocid, dateOptions) {
|
|
7993
7992
|
const path = 'maplestory/v1/character/item-equipment';
|
|
7994
7993
|
const date = dateOptions
|
|
7995
|
-
?
|
|
7994
|
+
? toDateString(dateOptions, {
|
|
7996
7995
|
year: 2023,
|
|
7997
7996
|
month: 12,
|
|
7998
7997
|
day: 21,
|
|
7999
|
-
}
|
|
7998
|
+
})
|
|
8000
7999
|
: undefined;
|
|
8001
8000
|
const query = {
|
|
8002
8001
|
ocid: ocid,
|
|
@@ -8020,11 +8019,11 @@ class MapleStoryApi {
|
|
|
8020
8019
|
async getCharacterCashItemEquipment(ocid, dateOptions) {
|
|
8021
8020
|
const path = 'maplestory/v1/character/cashitem-equipment';
|
|
8022
8021
|
const date = dateOptions
|
|
8023
|
-
?
|
|
8022
|
+
? toDateString(dateOptions, {
|
|
8024
8023
|
year: 2023,
|
|
8025
8024
|
month: 12,
|
|
8026
8025
|
day: 21,
|
|
8027
|
-
}
|
|
8026
|
+
})
|
|
8028
8027
|
: undefined;
|
|
8029
8028
|
const query = {
|
|
8030
8029
|
ocid: ocid,
|
|
@@ -8048,11 +8047,11 @@ class MapleStoryApi {
|
|
|
8048
8047
|
async getCharacterSymbolEquipment(ocid, dateOptions) {
|
|
8049
8048
|
const path = 'maplestory/v1/character/symbol-equipment';
|
|
8050
8049
|
const date = dateOptions
|
|
8051
|
-
?
|
|
8050
|
+
? toDateString(dateOptions, {
|
|
8052
8051
|
year: 2023,
|
|
8053
8052
|
month: 12,
|
|
8054
8053
|
day: 21,
|
|
8055
|
-
}
|
|
8054
|
+
})
|
|
8056
8055
|
: undefined;
|
|
8057
8056
|
const query = {
|
|
8058
8057
|
ocid: ocid,
|
|
@@ -8076,11 +8075,11 @@ class MapleStoryApi {
|
|
|
8076
8075
|
async getCharacterSetEffect(ocid, dateOptions) {
|
|
8077
8076
|
const path = 'maplestory/v1/character/set-effect';
|
|
8078
8077
|
const date = dateOptions
|
|
8079
|
-
?
|
|
8078
|
+
? toDateString(dateOptions, {
|
|
8080
8079
|
year: 2023,
|
|
8081
8080
|
month: 12,
|
|
8082
8081
|
day: 21,
|
|
8083
|
-
}
|
|
8082
|
+
})
|
|
8084
8083
|
: undefined;
|
|
8085
8084
|
const query = {
|
|
8086
8085
|
ocid: ocid,
|
|
@@ -8103,13 +8102,16 @@ class MapleStoryApi {
|
|
|
8103
8102
|
*/
|
|
8104
8103
|
async getCharacterBeautyEquipment(ocid, dateOptions) {
|
|
8105
8104
|
const path = 'maplestory/v1/character/beauty-equipment';
|
|
8106
|
-
const
|
|
8107
|
-
|
|
8108
|
-
date: dateOptions ? MapleStoryApi.toDateString({
|
|
8105
|
+
const date = dateOptions
|
|
8106
|
+
? toDateString(dateOptions, {
|
|
8109
8107
|
year: 2023,
|
|
8110
8108
|
month: 12,
|
|
8111
8109
|
day: 21,
|
|
8112
|
-
}
|
|
8110
|
+
})
|
|
8111
|
+
: undefined;
|
|
8112
|
+
const query = {
|
|
8113
|
+
ocid: ocid,
|
|
8114
|
+
date: date,
|
|
8113
8115
|
};
|
|
8114
8116
|
const { data } = await this.client.get(path, {
|
|
8115
8117
|
params: query,
|
|
@@ -8129,11 +8131,11 @@ class MapleStoryApi {
|
|
|
8129
8131
|
async getCharacterAndroidEquipment(ocid, dateOptions) {
|
|
8130
8132
|
const path = 'maplestory/v1/character/android-equipment';
|
|
8131
8133
|
const date = dateOptions
|
|
8132
|
-
?
|
|
8134
|
+
? toDateString(dateOptions, {
|
|
8133
8135
|
year: 2023,
|
|
8134
8136
|
month: 12,
|
|
8135
8137
|
day: 21,
|
|
8136
|
-
}
|
|
8138
|
+
})
|
|
8137
8139
|
: undefined;
|
|
8138
8140
|
const query = {
|
|
8139
8141
|
ocid: ocid,
|
|
@@ -8157,11 +8159,11 @@ class MapleStoryApi {
|
|
|
8157
8159
|
async getCharacterPetEquipment(ocid, dateOptions) {
|
|
8158
8160
|
const path = 'maplestory/v1/character/pet-equipment';
|
|
8159
8161
|
const date = dateOptions
|
|
8160
|
-
?
|
|
8162
|
+
? toDateString(dateOptions, {
|
|
8161
8163
|
year: 2023,
|
|
8162
8164
|
month: 12,
|
|
8163
8165
|
day: 21,
|
|
8164
|
-
}
|
|
8166
|
+
})
|
|
8165
8167
|
: undefined;
|
|
8166
8168
|
const query = {
|
|
8167
8169
|
ocid: ocid,
|
|
@@ -8197,11 +8199,11 @@ class MapleStoryApi {
|
|
|
8197
8199
|
async getCharacterSkill(ocid, characterSkillGrade, dateOptions) {
|
|
8198
8200
|
const path = 'maplestory/v1/character/skill';
|
|
8199
8201
|
const date = dateOptions
|
|
8200
|
-
?
|
|
8202
|
+
? toDateString(dateOptions, {
|
|
8201
8203
|
year: 2023,
|
|
8202
8204
|
month: 12,
|
|
8203
8205
|
day: 21,
|
|
8204
|
-
}
|
|
8206
|
+
})
|
|
8205
8207
|
: undefined;
|
|
8206
8208
|
const query = {
|
|
8207
8209
|
ocid: ocid,
|
|
@@ -8226,11 +8228,11 @@ class MapleStoryApi {
|
|
|
8226
8228
|
async getCharacterLinkSkill(ocid, dateOptions) {
|
|
8227
8229
|
const path = 'maplestory/v1/character/link-skill';
|
|
8228
8230
|
const date = dateOptions
|
|
8229
|
-
?
|
|
8231
|
+
? toDateString(dateOptions, {
|
|
8230
8232
|
year: 2023,
|
|
8231
8233
|
month: 12,
|
|
8232
8234
|
day: 21,
|
|
8233
|
-
}
|
|
8235
|
+
})
|
|
8234
8236
|
: undefined;
|
|
8235
8237
|
const query = {
|
|
8236
8238
|
ocid: ocid,
|
|
@@ -8254,11 +8256,11 @@ class MapleStoryApi {
|
|
|
8254
8256
|
async getCharacterVMatrix(ocid, dateOptions) {
|
|
8255
8257
|
const path = 'maplestory/v1/character/vmatrix';
|
|
8256
8258
|
const date = dateOptions
|
|
8257
|
-
?
|
|
8259
|
+
? toDateString(dateOptions, {
|
|
8258
8260
|
year: 2023,
|
|
8259
8261
|
month: 12,
|
|
8260
8262
|
day: 21,
|
|
8261
|
-
}
|
|
8263
|
+
})
|
|
8262
8264
|
: undefined;
|
|
8263
8265
|
const query = {
|
|
8264
8266
|
ocid: ocid,
|
|
@@ -8282,11 +8284,11 @@ class MapleStoryApi {
|
|
|
8282
8284
|
async getCharacterHexaMatrix(ocid, dateOptions) {
|
|
8283
8285
|
const path = 'maplestory/v1/character/hexamatrix';
|
|
8284
8286
|
const date = dateOptions
|
|
8285
|
-
?
|
|
8287
|
+
? toDateString(dateOptions, {
|
|
8286
8288
|
year: 2023,
|
|
8287
8289
|
month: 12,
|
|
8288
8290
|
day: 21,
|
|
8289
|
-
}
|
|
8291
|
+
})
|
|
8290
8292
|
: undefined;
|
|
8291
8293
|
const query = {
|
|
8292
8294
|
ocid: ocid,
|
|
@@ -8310,11 +8312,11 @@ class MapleStoryApi {
|
|
|
8310
8312
|
async getCharacterHexaMatrixStat(ocid, dateOptions) {
|
|
8311
8313
|
const path = 'maplestory/v1/character/hexamatrix-stat';
|
|
8312
8314
|
const date = dateOptions
|
|
8313
|
-
?
|
|
8315
|
+
? toDateString(dateOptions, {
|
|
8314
8316
|
year: 2023,
|
|
8315
8317
|
month: 12,
|
|
8316
8318
|
day: 21,
|
|
8317
|
-
}
|
|
8319
|
+
})
|
|
8318
8320
|
: undefined;
|
|
8319
8321
|
const query = {
|
|
8320
8322
|
ocid: ocid,
|
|
@@ -8338,11 +8340,11 @@ class MapleStoryApi {
|
|
|
8338
8340
|
async getCharacterDojang(ocid, dateOptions) {
|
|
8339
8341
|
const path = 'maplestory/v1/character/dojang';
|
|
8340
8342
|
const date = dateOptions
|
|
8341
|
-
?
|
|
8343
|
+
? toDateString(dateOptions, {
|
|
8342
8344
|
year: 2023,
|
|
8343
8345
|
month: 12,
|
|
8344
8346
|
day: 21,
|
|
8345
|
-
}
|
|
8347
|
+
})
|
|
8346
8348
|
: undefined;
|
|
8347
8349
|
const query = {
|
|
8348
8350
|
ocid: ocid,
|
|
@@ -8368,11 +8370,11 @@ class MapleStoryApi {
|
|
|
8368
8370
|
async getUnion(ocid, dateOptions) {
|
|
8369
8371
|
const path = 'maplestory/v1/user/union';
|
|
8370
8372
|
const date = dateOptions
|
|
8371
|
-
?
|
|
8373
|
+
? toDateString(dateOptions, {
|
|
8372
8374
|
year: 2023,
|
|
8373
8375
|
month: 12,
|
|
8374
8376
|
day: 21,
|
|
8375
|
-
}
|
|
8377
|
+
})
|
|
8376
8378
|
: undefined;
|
|
8377
8379
|
const query = {
|
|
8378
8380
|
ocid: ocid,
|
|
@@ -8396,11 +8398,11 @@ class MapleStoryApi {
|
|
|
8396
8398
|
async getUnionRaider(ocid, dateOptions) {
|
|
8397
8399
|
const path = 'maplestory/v1/user/union-raider';
|
|
8398
8400
|
const date = dateOptions
|
|
8399
|
-
?
|
|
8401
|
+
? toDateString(dateOptions, {
|
|
8400
8402
|
year: 2023,
|
|
8401
8403
|
month: 12,
|
|
8402
8404
|
day: 21,
|
|
8403
|
-
}
|
|
8405
|
+
})
|
|
8404
8406
|
: undefined;
|
|
8405
8407
|
const query = {
|
|
8406
8408
|
ocid: ocid,
|
|
@@ -8424,11 +8426,11 @@ class MapleStoryApi {
|
|
|
8424
8426
|
async getUnionArtifact(ocid, dateOptions) {
|
|
8425
8427
|
const path = 'maplestory/v1/user/union-artifact';
|
|
8426
8428
|
const date = dateOptions
|
|
8427
|
-
?
|
|
8429
|
+
? toDateString(dateOptions, {
|
|
8428
8430
|
year: 2023,
|
|
8429
8431
|
month: 12,
|
|
8430
8432
|
day: 21,
|
|
8431
|
-
}
|
|
8433
|
+
})
|
|
8432
8434
|
: undefined;
|
|
8433
8435
|
const query = {
|
|
8434
8436
|
ocid: ocid,
|
|
@@ -8453,11 +8455,11 @@ class MapleStoryApi {
|
|
|
8453
8455
|
async getUnionChampion(ocid, dateOptions) {
|
|
8454
8456
|
const path = 'maplestory/v1/user/union-champion';
|
|
8455
8457
|
const date = dateOptions
|
|
8456
|
-
?
|
|
8458
|
+
? toDateString(dateOptions, {
|
|
8457
8459
|
year: 2023,
|
|
8458
8460
|
month: 12,
|
|
8459
8461
|
day: 21,
|
|
8460
|
-
}
|
|
8462
|
+
})
|
|
8461
8463
|
: undefined;
|
|
8462
8464
|
const query = {
|
|
8463
8465
|
ocid: ocid,
|
|
@@ -8503,11 +8505,11 @@ class MapleStoryApi {
|
|
|
8503
8505
|
async getGuildBasic(guildId, dateOptions) {
|
|
8504
8506
|
const path = 'maplestory/v1/guild/basic';
|
|
8505
8507
|
const date = dateOptions
|
|
8506
|
-
?
|
|
8508
|
+
? toDateString(dateOptions, {
|
|
8507
8509
|
year: 2023,
|
|
8508
8510
|
month: 12,
|
|
8509
8511
|
day: 21,
|
|
8510
|
-
}
|
|
8512
|
+
})
|
|
8511
8513
|
: undefined;
|
|
8512
8514
|
const query = {
|
|
8513
8515
|
oguild_id: guildId,
|
|
@@ -8527,16 +8529,16 @@ class MapleStoryApi {
|
|
|
8527
8529
|
query.cursor = parameter;
|
|
8528
8530
|
}
|
|
8529
8531
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8530
|
-
query.date =
|
|
8531
|
-
|
|
8532
|
-
month: 12,
|
|
8533
|
-
day: 27,
|
|
8534
|
-
}, parameter ??
|
|
8535
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8532
|
+
query.date = toDateString(parameter ??
|
|
8533
|
+
getProperDefaultDateOptions({
|
|
8536
8534
|
hour: 0,
|
|
8537
8535
|
minute: 0,
|
|
8538
8536
|
dateOffset: 0,
|
|
8539
|
-
})
|
|
8537
|
+
}), {
|
|
8538
|
+
year: 2023,
|
|
8539
|
+
month: 12,
|
|
8540
|
+
day: 27,
|
|
8541
|
+
});
|
|
8540
8542
|
}
|
|
8541
8543
|
const { data } = await this.client.get(path, {
|
|
8542
8544
|
params: query,
|
|
@@ -8552,15 +8554,11 @@ class MapleStoryApi {
|
|
|
8552
8554
|
query.cursor = parameter;
|
|
8553
8555
|
}
|
|
8554
8556
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8555
|
-
query.date =
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
day: 25,
|
|
8559
|
-
}, parameter ??
|
|
8560
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8561
|
-
hour: 4,
|
|
8557
|
+
query.date = toDateString(parameter ??
|
|
8558
|
+
getProperDefaultDateOptions({
|
|
8559
|
+
hour: 0,
|
|
8562
8560
|
minute: 0,
|
|
8563
|
-
dateOffset:
|
|
8561
|
+
dateOffset: 0,
|
|
8564
8562
|
}));
|
|
8565
8563
|
}
|
|
8566
8564
|
const { data } = await this.client.get(path, {
|
|
@@ -8577,16 +8575,16 @@ class MapleStoryApi {
|
|
|
8577
8575
|
query.cursor = parameter;
|
|
8578
8576
|
}
|
|
8579
8577
|
else if (typeof parameter === 'object' || parameter === undefined) {
|
|
8580
|
-
query.date =
|
|
8578
|
+
query.date = toDateString(parameter ??
|
|
8579
|
+
getProperDefaultDateOptions({
|
|
8580
|
+
hour: 0,
|
|
8581
|
+
minute: 0,
|
|
8582
|
+
dateOffset: 0,
|
|
8583
|
+
}), {
|
|
8581
8584
|
year: 2024,
|
|
8582
8585
|
month: 1,
|
|
8583
8586
|
day: 25,
|
|
8584
|
-
}
|
|
8585
|
-
MapleStoryApi.getProperDefaultDateOptions({
|
|
8586
|
-
hour: 4,
|
|
8587
|
-
minute: 0,
|
|
8588
|
-
dateOffset: 1,
|
|
8589
|
-
}));
|
|
8587
|
+
});
|
|
8590
8588
|
}
|
|
8591
8589
|
const { data } = await this.client.get(path, {
|
|
8592
8590
|
params: query,
|
|
@@ -8605,18 +8603,18 @@ class MapleStoryApi {
|
|
|
8605
8603
|
* @param dateOptions 조회 기준일 (KST).
|
|
8606
8604
|
*
|
|
8607
8605
|
*/
|
|
8608
|
-
async getOverallRanking(filterOptions, dateOptions =
|
|
8606
|
+
async getOverallRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8609
8607
|
hour: 8,
|
|
8610
8608
|
minute: 30,
|
|
8611
8609
|
dateOffset: 0,
|
|
8612
8610
|
})) {
|
|
8613
8611
|
const path = 'maplestory/v1/ranking/overall';
|
|
8614
8612
|
const query = {
|
|
8615
|
-
date:
|
|
8613
|
+
date: toDateString(dateOptions, {
|
|
8616
8614
|
year: 2023,
|
|
8617
8615
|
month: 12,
|
|
8618
8616
|
day: 22,
|
|
8619
|
-
}
|
|
8617
|
+
}),
|
|
8620
8618
|
};
|
|
8621
8619
|
if (filterOptions) {
|
|
8622
8620
|
const { worldName, worldType, characterClass, ocid, page } = filterOptions;
|
|
@@ -8640,18 +8638,18 @@ class MapleStoryApi {
|
|
|
8640
8638
|
* @param filterOptions 검색 기준
|
|
8641
8639
|
* @param dateOptions 조회 기준일 (KST)
|
|
8642
8640
|
*/
|
|
8643
|
-
async getUnionRanking(filterOptions, dateOptions =
|
|
8641
|
+
async getUnionRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8644
8642
|
hour: 8,
|
|
8645
8643
|
minute: 30,
|
|
8646
8644
|
dateOffset: 0,
|
|
8647
8645
|
})) {
|
|
8648
8646
|
const path = 'maplestory/v1/ranking/union';
|
|
8649
8647
|
const query = {
|
|
8650
|
-
date:
|
|
8648
|
+
date: toDateString(dateOptions, {
|
|
8651
8649
|
year: 2023,
|
|
8652
8650
|
month: 12,
|
|
8653
8651
|
day: 22,
|
|
8654
|
-
}
|
|
8652
|
+
}),
|
|
8655
8653
|
};
|
|
8656
8654
|
if (filterOptions) {
|
|
8657
8655
|
const { worldName, ocid, page } = filterOptions;
|
|
@@ -8673,18 +8671,18 @@ class MapleStoryApi {
|
|
|
8673
8671
|
* @param filterOptions 검색 기준
|
|
8674
8672
|
* @param dateOptions 조회 기준일 (KST)
|
|
8675
8673
|
*/
|
|
8676
|
-
async getGuildRanking(filterOptions, dateOptions =
|
|
8674
|
+
async getGuildRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8677
8675
|
hour: 8,
|
|
8678
8676
|
minute: 30,
|
|
8679
8677
|
dateOffset: 0,
|
|
8680
8678
|
})) {
|
|
8681
8679
|
const path = 'maplestory/v1/ranking/guild';
|
|
8682
8680
|
const query = {
|
|
8683
|
-
date:
|
|
8681
|
+
date: toDateString(dateOptions, {
|
|
8684
8682
|
year: 2023,
|
|
8685
8683
|
month: 12,
|
|
8686
8684
|
day: 22,
|
|
8687
|
-
}
|
|
8685
|
+
}),
|
|
8688
8686
|
ranking_type: 0,
|
|
8689
8687
|
};
|
|
8690
8688
|
if (filterOptions) {
|
|
@@ -8708,18 +8706,18 @@ class MapleStoryApi {
|
|
|
8708
8706
|
* @param filterOptions 검색 기준
|
|
8709
8707
|
* @param dateOptions 조회 기준일 (KST)
|
|
8710
8708
|
*/
|
|
8711
|
-
async getDojangRanking(filterOptions, dateOptions =
|
|
8709
|
+
async getDojangRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8712
8710
|
hour: 8,
|
|
8713
8711
|
minute: 30,
|
|
8714
8712
|
dateOffset: 0,
|
|
8715
8713
|
})) {
|
|
8716
8714
|
const path = 'maplestory/v1/ranking/dojang';
|
|
8717
8715
|
const query = {
|
|
8718
|
-
date:
|
|
8716
|
+
date: toDateString(dateOptions, {
|
|
8719
8717
|
year: 2023,
|
|
8720
8718
|
month: 12,
|
|
8721
8719
|
day: 22,
|
|
8722
|
-
}
|
|
8720
|
+
}),
|
|
8723
8721
|
difficulty: 0,
|
|
8724
8722
|
};
|
|
8725
8723
|
if (filterOptions) {
|
|
@@ -8744,18 +8742,18 @@ class MapleStoryApi {
|
|
|
8744
8742
|
* @param filterOptions 검색 기준
|
|
8745
8743
|
* @param dateOptions 조회 기준일 (KST)
|
|
8746
8744
|
*/
|
|
8747
|
-
async getSeedRanking(filterOptions, dateOptions =
|
|
8745
|
+
async getSeedRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8748
8746
|
hour: 8,
|
|
8749
8747
|
minute: 30,
|
|
8750
8748
|
dateOffset: 0,
|
|
8751
8749
|
})) {
|
|
8752
8750
|
const path = 'maplestory/v1/ranking/theseed';
|
|
8753
8751
|
const query = {
|
|
8754
|
-
date:
|
|
8752
|
+
date: toDateString(dateOptions, {
|
|
8755
8753
|
year: 2023,
|
|
8756
8754
|
month: 12,
|
|
8757
8755
|
day: 22,
|
|
8758
|
-
}
|
|
8756
|
+
}),
|
|
8759
8757
|
};
|
|
8760
8758
|
if (filterOptions) {
|
|
8761
8759
|
const { worldName, ocid, page } = filterOptions;
|
|
@@ -8777,18 +8775,18 @@ class MapleStoryApi {
|
|
|
8777
8775
|
* @param filterOptions 검색 기준
|
|
8778
8776
|
* @param dateOptions 조회 기준일 (KST)
|
|
8779
8777
|
*/
|
|
8780
|
-
async getAchievementRanking(filterOptions, dateOptions =
|
|
8778
|
+
async getAchievementRanking(filterOptions, dateOptions = getProperDefaultDateOptions({
|
|
8781
8779
|
hour: 8,
|
|
8782
8780
|
minute: 30,
|
|
8783
8781
|
dateOffset: 0,
|
|
8784
8782
|
})) {
|
|
8785
8783
|
const path = 'maplestory/v1/ranking/achievement';
|
|
8786
8784
|
const query = {
|
|
8787
|
-
date:
|
|
8785
|
+
date: toDateString(dateOptions, {
|
|
8788
8786
|
year: 2023,
|
|
8789
8787
|
month: 12,
|
|
8790
8788
|
day: 22,
|
|
8791
|
-
}
|
|
8789
|
+
}),
|
|
8792
8790
|
};
|
|
8793
8791
|
if (filterOptions) {
|
|
8794
8792
|
const { ocid, page } = filterOptions;
|
|
@@ -8951,52 +8949,54 @@ class MapleStoryApi {
|
|
|
8951
8949
|
const xml = (await xml2js.parseStringPromise(response.data));
|
|
8952
8950
|
return new InspectionInfoDto(xml);
|
|
8953
8951
|
}
|
|
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
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
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) {
|
|
8989
8992
|
const { year: minYear, month: minMonth, day: minDay } = minDateOptions;
|
|
8990
|
-
const { year, month, day } = dateOptions;
|
|
8991
8993
|
if (year < minYear ||
|
|
8992
8994
|
(year === minYear && month < minMonth) ||
|
|
8993
8995
|
(year === minYear && month === minMonth && day < minDay)) {
|
|
8994
8996
|
throw new Error(`You can only retrieve data after ${dayjs(`${minYear}-${minMonth}-${minDay}`).format('YYYY-MM-DD')}.`);
|
|
8995
8997
|
}
|
|
8996
|
-
return dayjs(`${year}-${month}-${day}`)
|
|
8997
|
-
.utcOffset(MapleStoryApi.kstOffset)
|
|
8998
|
-
.format('YYYY-MM-DD');
|
|
8999
8998
|
}
|
|
9000
|
-
|
|
8999
|
+
return str;
|
|
9000
|
+
};
|
|
9001
9001
|
|
|
9002
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 };
|