Documentation / @blizzard-api/client / createBlizzardApiClient
Function: createBlizzardApiClient()
createBlizzardApiClient(
options,onTokenRefresh?):Promise<BlizzardApiClient>
Defined in: client/src/client/create-client.ts:45
Create a new Blizzard API client.
Parameters
options
Client options, see ClientOptions & https://develop.battle.net/documentation/guides/getting-started
onTokenRefresh?
boolean | ((token) => void) = true
Callback function to handle token refresh. If set to true, the client will automatically refresh the token. If set to false, the client will not refresh the token. If set to a function, the function will be called with the new token.
Returns
Promise<BlizzardApiClient>
A new Blizzard API client.