nolimit

Members

(static) version

Properties:
Name Type Description
version String

current version of nolimit.js

Source:

Methods

(static) info(options, callback)

Load information about the game, such as: current version, preferred width/height etc.

Source:
Parameters:
Name Type Description
options Object
Name Type Attributes Default Description
environment String <optional>
partner

which environment to use; usually 'partner' or 'production'

game String

case sensitive game code, for example 'CreepyCarnival' or 'SpaceArcade'

version String <optional>

force specific version of game to load.

callback function

called with the info object, if there was an error, the 'error' field will be set

Example
nolimit.info({game: 'SpaceArcade'}, function(info) {
    var target = document.getElementById('game');
    target.style.width = info.size.width + 'px';
    target.style.height = info.size.height + 'px';
    console.log(info.name, info.version);
});

(static) init(options)

Initialize loader with default parameters. Can be skipped if the parameters are included in the call to load instead.

Source:
Parameters:
Name Type Description
options Object
Name Type Attributes Default Description
operator String

the operator code for the operator

language String <optional>
"en"

the language to use for the game

device String <optional>
desktop

type of device: 'desktop' or 'mobile'

environment String <optional>
partner

which environment to use; usually 'partner' or 'production'

currency String <optional>
EUR

currency to use, if not provided by server

fullscreen Boolean <optional>
true

set to false to disable automatic fullscreen on mobile (Android only)

clock Boolean <optional>
true

set to false to disable in-game clock

quality String <optional>

force asset quality. Possible values are 'high', 'medium', 'low'. Defaults to smart loading in each game.

jurisdiction Object <optional>

force a specific jurisdiction to enforce specific license requirements and set specific options and overrides. See README for jurisdiction-specific details.

Name Type Attributes Description
name Object <optional>

the name of the jurisdiction, for example "UKGC" or "SE".

realityCheck Object <optional>

set options for reality check. See README for more details.

Name Type Attributes Default Description
enabled Object <optional>
true

set to false to disable reality-check dialog.

interval Number <optional>
60

Interval in minutes between showing reality-check dialog.

sessionStart Number <optional>
Date.now()

override session start, default is Date.now().

nextTime Number <optional>

next time to show dialog, defaults to Date.now() + interval.

bets Number <optional>
0

set initial bets if player already has bets in the session.

winnings Number <optional>
0

set initial winnings if player already has winnings in the session.

message Number <optional>

Message to display when dialog is opened. A generic default is provided.

Example
nolimit.init({
   operator: 'SMOOTHOPERATOR',
   language: 'sv',
   device: 'mobile',
   environment: 'production',
   currency: 'SEK',
   jurisdiction: {
       name: 'SE'
   },
   realityCheck: {
       interval: 30
   }
});

(static) load(options) → {nolimitApi}

Load game, replacing target with the game.

  • If target is a HTML element, it will be replaced with an iframe, keeping all the attributes of the original element, so those can be used to set id, classes, styles and more.
  • If target is a Window element, the game will be loaded directly in that.
  • If target is undefined, it will default to the current window.
  • Source:
    Parameters:
    Name Type Description
    options Object
    Name Type Attributes Default Description
    game String

    case sensitive game code, for example 'CreepyCarnival' or 'SpaceArcade'

    target HTMLElement | Window <optional>
    window

    the HTMLElement or Window to load the game in

    token String <optional>

    the token to use for real money play

    mute Boolean <optional>
    false

    start the game without sound

    version String <optional>

    force specific game version such as '1.2.3', or 'development' to disable cache

    hideCurrency Boolean <optional>

    hide currency symbols/codes in the game

    Returns:
    Type:
    nolimitApi

    The API connection to the opened game.

    Example
    var api = nolimit.load({
       game: 'SpaceArcade',
       target: document.getElementById('game'),
       token: realMoneyToken,
       mute: true
    });

    (static) replace(options)

    Load game in a new, separate page. This offers the best isolation, but no communication with the game is possible.

    Source:
    Parameters:
    Name Type Description
    options Object
    Name Type Attributes Default Description
    game String

    case sensitive game code, for example 'CreepyCarnival' or 'SpaceArcade'

    token String <optional>

    the token to use for real money play

    mute Boolean <optional>
    false

    start the game without sound

    version String <optional>

    force specific game version such as '1.2.3', or 'development' to disable cache

    hideCurrency Boolean <optional>

    hide currency symbols/codes in the game

    lobbyUrl String <optional>
    "history:back()"

    URL to redirect back to lobby on mobile, if not using a target

    depositUrl String <optional>

    URL to deposit page, if not using a target element

    supportUrl String <optional>

    URL to support page, if not using a target element

    depositEvent Boolean <optional>

    instead of using URL, emit "deposit" event (see event documentation)

    lobbyEvent Boolean <optional>

    instead of using URL, emit "lobby" event (see event documentation) (mobile only)

    accountHistoryUrl String <optional>

    URL to support page, if not using a target element

    Example
    var api = nolimit.replace({
       game: 'SpaceArcade',
       target: document.getElementById('game'),
       token: realMoneyToken,
       mute: true
    });

    (static) url(options) → {string}

    Constructs a URL for manually loading the game in an iframe or via redirect.

    Source:
    See:
    • nolimit.replace for details on options
    Parameters:
    Name Type Description
    options Object

    see replace for details

    Returns:
    Type:
    string