@blizzard-api/core
Version:
The core helpers used by all @blizzard-api/* packages.
35 lines (34 loc) • 756 B
JavaScript
// src/blizzard-api.ts
var endpoints = {
cn: {
defaultLocale: "zh_CN",
hostname: "https://gateway.battlenet.com.cn"
},
eu: {
defaultLocale: "en_GB",
hostname: "https://eu.api.blizzard.com"
},
kr: {
defaultLocale: "ko_KR",
hostname: "https://kr.api.blizzard.com"
},
tw: {
defaultLocale: "zh_TW",
hostname: "https://tw.api.blizzard.com"
},
us: {
defaultLocale: "en_US",
hostname: "https://us.api.blizzard.com"
}
};
function getBlizzardApi(origin, locale) {
const endpoint = endpoints[origin];
return {
hostname: endpoint.hostname,
locale: locale ?? endpoint.defaultLocale,
origin
};
}
export { getBlizzardApi };
//# sourceMappingURL=index.js.map
//# sourceMappingURL=index.js.map