Documentation / @blizzard-api/core
@blizzard-api/core
This package provides core functionality to the other @blizzard-api/* packages.
Installation
npm i @blizzard-api/coreUsage
The package includes a series of types that define values that are allowed to be passed to Battle.net API.
import type { BlizzardNamespaces, Locales, Origins } from '@blizzard-api/core';BlizzardNamespaces covers the retail namespaces (dynamic, profile and static) as well as the classic ones, which are suffixed with the classic version of the game they belong to. World of Warcraft: Forever is supported through its static-forever and dynamic-forever namespaces.
| Game Version | Namespace |
|---|---|
| World of Warcraft (retail) | static |
| World of Warcraft Classic (Era) | static-classic1x |
| Mists of Pandaria Classic (Progression) | static-classic |
| Burning Crusade Classic (Anniversary) | static-classicann |
| World of Warcraft: Forever | static-forever |
The namespaces of a specific namespace type are also available on their own, which is handy when you only want to accept the classic namespaces of a given type.
import type { StaticClassicNamespaces } from '@blizzard-api/core';
const namespace: StaticClassicNamespaces = 'static-classicann';It also includes a helper function to get the origin, hostname and locale easily accessible based off a single origin.
import type { getBlizzardApi } from '@blizzard-api/core';
const { origin, hostname, locale } = getBlizzardApi('eu'); // "kr" | "tw" | "us"Modules
Interfaces
- BaseSearchParameters
- Character
- Color
- Faction
- Gender
- GenderName
- Href
- IdKey
- KeyBase
- MediaAsset
- NameId
- NameIdKey
- NameType
- NullishNameId
- NullishNameIdKey
- NullishNameType
- Realm
- ResponseBase
- SearchResponseWithoutResults
Type Aliases
- BlizzardNamespaces
- ClassicVersions
- DynamicClassicNamespaces
- DynamicForeverNamespaces
- ExtractResourceType
- Factions
- ForeverVersions
- Locales
- NamespaceTypes
- NonNeutralFactions
- Origins
- ProfileClassicNamespaces
- ProfileForeverNamespaces
- ProtectedResource
- Resource
- StaticClassicNamespaces
- StaticForeverNamespaces
Variables
- d3BasePath
- d3GameDataBasePath
- d3ProfileBasePath
- wowAccountProfileBasePath
- wowBasePath
- wowCharacterBasePath
- wowGuildBasePath
- wowMediaBasePath
- wowSearchBasePath