Skip to content

Documentation


Documentation / @blizzard-api/hs / hs

Variable: hs ​

const hs: 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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: 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 ​

CardBackSearchParameters

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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: 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 ​

CardSearchParameters

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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: 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? ​

GameMode

The game mode to use for fetching the card (optional).

locale? ​

Locales

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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: object

parameters.gameMode? ​

optional gameMode?: GameMode

parameters.locale? ​

optional locale?: 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? ​

Locales

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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: object

parameters.locale? ​

optional locale?: 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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: 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? ​

optional namespace?: BlizzardNamespaces

parameters? ​

optional parameters?: Record<string, unknown>

path ​

path: string

The request path. Dynamic path segments should be encoded with encodeURIComponent.