michos_api
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -28,2 +28,3 @@ "use strict"; | ||
GamesEnum2["HONKAI_STAR_RAIL"] = "hkrpg_global"; | ||
GamesEnum2["ZENLESS_ZONE_ZERO"] = "nap_global"; | ||
return GamesEnum2; | ||
@@ -30,0 +31,0 @@ })(GamesEnum || {}); |
@@ -22,2 +22,3 @@ "use strict"; | ||
__reExport(client_exports, require("./hsr"), module.exports); | ||
__reExport(client_exports, require("./zzz"), module.exports); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -28,3 +29,4 @@ 0 && (module.exports = { | ||
...require("./hoyolab"), | ||
...require("./hsr") | ||
...require("./hsr"), | ||
...require("./zzz") | ||
}); |
@@ -48,2 +48,3 @@ "use strict"; | ||
HK4E_API: () => HK4E_API, | ||
HKRPG_API: () => HKRPG_API, | ||
HSR_RECORD_CHARACTER_API: () => HSR_RECORD_CHARACTER_API, | ||
@@ -53,2 +54,3 @@ HSR_RECORD_FORGOTTEN_HALL_API: () => HSR_RECORD_FORGOTTEN_HALL_API, | ||
HSR_RECORD_NOTE_API: () => HSR_RECORD_NOTE_API, | ||
NAP_API: () => NAP_API, | ||
PUBLIC_API: () => PUBLIC_API, | ||
@@ -63,2 +65,4 @@ REDEEM_CLAIM_API: () => REDEEM_CLAIM_API, | ||
const HK4E_API = "https://sg-hk4e-api.hoyolab.com"; | ||
const HKRPG_API = "https://sg-hkrpg-api.hoyolab.com"; | ||
const NAP_API = "https://sg-act-nap-api.hoyolab.com"; | ||
const PUBLIC_API = "https://sg-public-api.hoyolab.com"; | ||
@@ -75,2 +79,4 @@ const DEFAULT_REFERER = "https://hoyolab.com"; | ||
return "luna/os"; | ||
} else if (game === import_hoyolab.GamesEnum.ZENLESS_ZONE_ZERO) { | ||
return "luna/zzz/os"; | ||
} | ||
@@ -84,2 +90,4 @@ return ""; | ||
return PUBLIC_API; | ||
} else if (game === import_hoyolab.GamesEnum.ZENLESS_ZONE_ZERO) { | ||
return NAP_API; | ||
} | ||
@@ -95,2 +103,4 @@ return ""; | ||
return "e202303301540311"; | ||
} else if (game === import_hoyolab.GamesEnum.ZENLESS_ZONE_ZERO) { | ||
return "e202406031448091"; | ||
} | ||
@@ -120,3 +130,5 @@ return ""; | ||
case import_hoyolab.GamesEnum.HONKAI_STAR_RAIL: | ||
return "https://sg-hkrpg-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey"; | ||
return "".concat(HKRPG_API, "/common/apicdkey/api/webExchangeCdkeyHyl"); | ||
case import_hoyolab.GamesEnum.ZENLESS_ZONE_ZERO: | ||
return "https://public-operation-nap.hoyolab.com/common/apicdkey/api/webExchangeCdkey"; | ||
default: | ||
@@ -178,2 +190,3 @@ return ""; | ||
HK4E_API, | ||
HKRPG_API, | ||
HSR_RECORD_CHARACTER_API, | ||
@@ -183,2 +196,3 @@ HSR_RECORD_FORGOTTEN_HALL_API, | ||
HSR_RECORD_NOTE_API, | ||
NAP_API, | ||
PUBLIC_API, | ||
@@ -185,0 +199,0 @@ REDEEM_CLAIM_API, |
export declare enum GamesEnum { | ||
GENSHIN_IMPACT = "hk4e_global", | ||
HONKAI_IMPACT = "bh3_global", | ||
HONKAI_STAR_RAIL = "hkrpg_global" | ||
HONKAI_STAR_RAIL = "hkrpg_global", | ||
ZENLESS_ZONE_ZERO = "nap_global" | ||
} | ||
@@ -6,0 +7,0 @@ import { ICookie } from '../../cookie'; |
@@ -5,1 +5,2 @@ export * from './gi'; | ||
export * from './hsr'; | ||
export * from './zzz'; |
@@ -108,3 +108,3 @@ /** | ||
/** The status of the claim request. */ | ||
status: string; | ||
status: 'OK' | string; | ||
/** The response code for the claim request. */ | ||
@@ -111,0 +111,0 @@ code: number; |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
message: string; | ||
message: 'OK' | string; | ||
/** | ||
@@ -15,0 +15,0 @@ * The return code from redeeming the code. A non-zero code indicates an error occurred. |
@@ -5,2 +5,4 @@ import { GamesEnum } from '../client/hoyolab'; | ||
export declare const HK4E_API = "https://sg-hk4e-api.hoyolab.com"; | ||
export declare const HKRPG_API = "https://sg-hkrpg-api.hoyolab.com"; | ||
export declare const NAP_API = "https://sg-act-nap-api.hoyolab.com"; | ||
export declare const PUBLIC_API = "https://sg-public-api.hoyolab.com"; | ||
@@ -13,3 +15,3 @@ export declare const DEFAULT_REFERER = "https://hoyolab.com"; | ||
export declare const DAILY_CLAIM_API: (game: GamesEnum) => string; | ||
export declare const REDEEM_CLAIM_API: (game: GamesEnum) => "" | "https://sg-hk4e-api.hoyolab.com/common/apicdkey/api/webExchangeCdkey" | "https://sg-hkrpg-api.hoyoverse.com/common/apicdkey/api/webExchangeCdkey"; | ||
export declare const REDEEM_CLAIM_API: (game: GamesEnum) => "" | "https://sg-hk4e-api.hoyolab.com/common/apicdkey/api/webExchangeCdkey" | "https://sg-hkrpg-api.hoyolab.com/common/apicdkey/api/webExchangeCdkeyHyl" | "https://public-operation-nap.hoyolab.com/common/apicdkey/api/webExchangeCdkey"; | ||
export declare const GENSHIN_RECORD_INDEX_API = "https://bbs-api-os.hoyolab.com/game_record/genshin/api/index"; | ||
@@ -16,0 +18,0 @@ export declare const GENSHIN_RECORD_CHARACTER_API = "https://bbs-api-os.hoyolab.com/game_record/genshin/api/character"; |
{ | ||
"name": "michos_api", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Michos API is an unofficial API Wrapper library developed to facilitate communication with the official HoYoLab API.", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
373472
30
173
11112
2