Documentation / @blizzard-api/hs / hs
Variable: hs
consths:object
Defined in: hs/src/index.ts:6
Type Declaration
allMetadata
allMetadata: () =>
object
Returns all metadata
Returns
The all metadata resource. See AllMetadataResponse.
_responseType?
optional_responseType?:AllMetadataResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:Record<string,unknown>
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
cardBackSearch
cardBackSearch: (
options) =>object
Returns a list of card backs based on the search parameters provided.
Parameters
options
The options for fetching card backs. See CardBackSearchParameters.
Returns
The card back search resource. See CardBackSearchResponse.
_responseType?
optional_responseType?:CardBackSearchResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:CardBackSearchParameters
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
cardSearch
cardSearch: (
options) =>object
Returns a list of cards based on the search parameters provided.
Parameters
options
The options for fetching cards. See CardSearchParameters.
Returns
The card search resource. See CardSearchResponse.
_responseType?
optional_responseType?:CardSearchResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:BlizzardCardSearchParameters
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
fetchOneCard
fetchOneCard: (
id,options?) =>object
Returns a single card based on the ID provided.
Parameters
id
string
The card ID
options?
The options for fetching a card.
gameMode?
The game mode to use for fetching the card (optional).
locale?
The locale to use for fetching the card (optional).
Returns
The card resource. See FetchOneCardResponse.
_responseType?
optional_responseType?:FetchOneCardResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:object
parameters.gameMode?
optionalgameMode?:GameMode
parameters.locale?
optionallocale?:Locales
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
fetchOneCardBack
fetchOneCardBack: (
id,locale?) =>object
Returns a single card back based on the ID provided.
Parameters
id
string | number
The card back ID
locale?
The locale to use for fetching the card back (optional).
Returns
The card back resource. See SingleCardBackSearchResponse.
_responseType?
optional_responseType?:SingleCardBackSearchResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:object
parameters.locale?
optionallocale?:Locales
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
getDeck
getDeck: (
options) =>object
Returns a deck based on the code provided.
Parameters
options
{ code: string; } | { hero?: string | number; ids: (string | number)[]; sideboardCards?: `${number}:${number}` | `${number}:${number}`[]; }
The options for fetching a deck.
Returns
The deck resource. See DeckResponse.
_responseType?
optional_responseType?:DeckResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:DeckSearchParameters
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.
specificMetadata
specificMetadata: (
type) =>object
Returns specific metadata based on the type requested.
Parameters
type
keyof AllMetadataResponse
The type of metadata to retrieve.
Returns
The specific metadata resource. See SpecificMetadataResponse.
_responseType?
optional_responseType?:SpecificMetadataResponse
Internal
The response type of the resource
namespace?
optionalnamespace?:BlizzardNamespaces
parameters?
optionalparameters?:Record<string,unknown>
path
path:
string
The request path. Dynamic path segments should be encoded with encodeURIComponent.