Reference / @getenginex/sdk-igaming / createIgaming
createIgaming()
createIgaming(
client):IgamingClient
Creates the iGaming namespaces on top of a @getenginex/sdk client. It creates no session, tenant or transport of its own and makes no request: call it once per client (in the browser, one per app; on the server, one per request, together with the client).
After enginex.dispose(), createIgaming still accepts the client, but every iGaming method rejects with CONFIGURATION_ERROR, like the core methods.
Parameters
client
The client returned by createEnginexClient (the object itself, not a copy).
Returns
Example
import { createEnginexClient } from '@getenginex/sdk'
import { createIgaming } from '@getenginex/sdk-igaming'
export const enginex = createEnginexClient({ locale: 'pt-BR' })
export const igaming = createIgaming(enginex)Throws
CONFIGURATION_ERROR if client is not a client created by createEnginexClient (e.g. an arbitrary object or a { ...enginex } copy), or if it was created by an incompatible copy of @getenginex/sdk (install a single core version). Identify with isEnginexError(error, 'CONFIGURATION_ERROR').