Global object with all Playtech-related cool stuff.
Namespaces
- API
Methods
#
(static) fetchUserDetails() → {Object}
Returns user details that were fetched once when player has logged in.
For just-in-time request for details please see
getPlayerData API
.
Examples
// {birthDate: "1989-04-03", casinoName: "playtech800075", email: "test@playech.com", ...}
Playtech.fetchUserDetails();
// { previousLoginTime: undefined, sessionId: undefined }
Playtech.fetchUserDetails();
#
(static) getUserBalance() → {Object}
Returns user balance
Returns:
{formattedBalance: string, totalAmount: string, balances: {[balance_type]: amount: string, currencyCode: string}} Value of balance_type: 'withdrawable_balance', 'free_spin_balance', 'casino_bonus_buyin_balance', 'ringfenced_real_balance', 'bonus_balance', 'casino_gaming_balance', 'real_gaming_balance', 'total_bonus_balance', 'bonus_pending_winnings', 'pending_withdrawals'.
-
Type
-
Object
Example
// {balances: {…}, totalAmount: '0', formattedBalance: '£ 0.00'}
Playtech.getUserBalance();
#
(static) off(event, callback)
Shortcut for Playtech.API.events.removeEventListener(event, callback).
Parameters:
Name |
Type |
Description |
event |
string
|
|
callback |
EventTarget.EventListener
|
|
Example
Playtech.off(event, callback);
#
(static) on(event, callback)
Shortcut for Playtech.API.events.addEventListener(event, (...args) => { ... }). Example of events see
in events section
.
Parameters:
Name |
Type |
Description |
event |
string
|
|
callback |
EventTarget.EventListener
|
|
Example
Playtech.on(event, (...args) => { ... });
#
(static) once(event, callback)
Shortcut for Playtech.API.events.addEventListener(event, (...args) => { ... }, { once: true }).
Parameters:
Name |
Type |
Description |
event |
string
|
|
callback |
EventTarget.EventListener
|
|
Example
Playtech.once(event, (...args) => { ... });