actions/public

Public Actions Channel

Parameters:
Name Type Description
config Object
services Object
emit function
Returns:
Type
function

Methods

(inner) echo(params) → {*}

Test action params

Example

Say "Hello World" to the user.

actions.public("echo", { message: "Hello World" })
Parameters:
Name Type Description
params *

the params object you want to test

Returns:

the params provided

Type
*

(inner) getBet(params) → {Object}

Get bet data

Parameters:
Name Type Description
params Object
Properties
Name Type Description
gamename String

game type

betid String

unique identifier of the bet

Returns:

game state

Type
Object

(inner) getGame(params) → {Object}

Get game state

Parameters:
Name Type Description
params Object
Properties
Name Type Description
gamename String

game type

gameid String

unique identifer of the bet

Returns:

game state

Type
Object

(inner) getGameConfig(params) → {Object}

Get game config

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
gamename String

name of the game

roomid String <optional>

roomid

ruleset String <optional>

ruleset

Returns:

game config

Type
Object

(inner) getGameDetails(params) → {Object}

get a game by id

Parameters:
Name Type Description
params Object
Properties
Name Type Description
catalogid String

unique identifier of the catalog game

Returns:

catalog game

Type
Object

(inner) getGameHistory(params) → {Array}

List game history

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
gamename String

game type

roomid String

the room you want the game for

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of previously ended games

Type
Array

(inner) getGameOutcomes(params) → {Array}

List game outcomes

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
gamename String

game type

roomid String

the room you want the game for

skip Integer <optional>

number of documents to skip

limit Integer <optional>

maximum documents to return

Returns:

list of previously ended game outcomes

Type
Array

(inner) getManyGameDetails(params) → {Object}

get a game by id

Parameters:
Name Type Description
params Object
Properties
Name Type Description
catalogids Array

unique identifier of the catalog game

Returns:

catalog game

Type
Object

(inner) getPrizeWheel(params) → {Object}

get prizewheel game by id

Parameters:
Name Type Description
params Object
Properties
Name Type Description
roomid String

the room you want the game for

Returns:

prizewheel

Type
Object

(inner) getUser(params) → {Object}

Get player data

Parameters:
Name Type Description
params Object
Properties
Name Type Description
userid String

unique player id

Returns:

player data

Type
Object

(inner) getUserMostPlayedGames(params) → {Array}

List popular catalog games the user played

Parameters:
Name Type Description
params Object
Properties
Name Type Description
userid String

unique player id

Returns:

list of catalog entries

Type
Array

(inner) getUserStats(params) → {Object}

Get basic stats for the given player

Parameters:
Name Type Description
params Object
Properties
Name Type Description
userid String

unique player id

min String
max String
Returns:

player stats

Type
Object

(inner) getUserVipRank(params) → {Object}

Get vip rank for the given player

Parameters:
Name Type Description
params Object
Properties
Name Type Description
userid String

unique player id

Returns:

player vip

Type
Object

(inner) getVipRankByExp(params) → {Object}

List vip ranks by exp

Parameters:
Name Type Description
params Object

the params object you want to test

Properties
Name Type Description
exp Integer

the exp you want the rank for

Returns:

the matching rank

Type
Object

(inner) getVipRankByLevel(params) → {Object}

List vip ranks by level

Parameters:
Name Type Description
params Object

the params object you want to test

Properties
Name Type Description
level Integer

the level you want the rank for

Returns:

the matching rank

Type
Object

(inner) initializeCasinoGame(params) → {Object}

create a demo session for a casino game

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
catalogid String

unique identifier of the catalog game

isMobile String <optional>

is this for mobile devices?

Returns:

game session

Type
Object

(inner) isCodeclaimValid(params) → {Boolean|Object}

Check validity of a promotion code

Parameters:
Name Type Description
params Object
Properties
Name Type Description
code String
Returns:

code details

Type
Boolean | Object

(inner) listChallenges(params) → {Array}

Get game config

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
catalogid String <optional>

catalog game uuid

userid String <optional>

creator of the challenge

Returns:

list of challenges

Type
Array

(inner) listEnabledGames(params) → {Array}

List catalog games

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGameCategories(params) → {Array}

List catalog game categories

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamePrizesByPromotionid(params) → {Array}

List game prizes

Parameters:
Name Type Description
params Object
Properties
Name Type Description
promotionid String
Returns:

list of game prizes

Type
Array

(inner) listGameProducers() → {Array}

List catalog game producers

Returns:

list of catalog game producers

Type
Array

(inner) listGameProviders() → {Array}

List catalog game providers

Returns:

list of catalog game providers

Type
Array

(inner) listGameRooms(params) → {Array}

List game rooms

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
gamename String

game type

details String <optional>

include game state

Returns:

list of active rooms or game objects

Type
Array

(inner) listGames(params) → {Array}

list catalog games

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
tags Array <optional>

the seach term

category String <optional>

game category

provider String <optional>

game provider

producer String <optional>

game producer

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamesByCategory(params) → {Array}

List catalog game categories

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
category String

game category to filter by

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamesByProducer(params) → {Array}

List catalog games by game producer

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
producer String

game producer to filter by

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamesByProvider(params) → {Array}

List catalog games by game provider

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
provider String

game provider to filter by

tags Array <optional>

game provider to filter by

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamesByTags(params) → {Array}

List catalog games by tag

Parameters:
Name Type Description
params Object
Properties
Name Type Default Description
tags Array
skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGamesMostPlayed(params) → {Array}

List popular catalog games

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
sortKey String "count"

key to sort the results by

sortDirection Integer -1

ASC or DESC

duration String <optional>
1m

the window of time to calculate results

start String <optional>

Date.now() - duration

end String <optional>

Date.now()

skip Integer 0

number of documents to skip

limit Integer 100

maximum documents to return

Returns:

list of catalog entries

Type
Array

(inner) listGameTags() → {Array}

List catalog game tags

Returns:

list of catalog game tags

Type
Array

(inner) listKothGames(params) → {Array}

Get game config

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
catalogid String <optional>

catalog game uuid

userid String <optional>

creator of the koth

Returns:

koth games

Type
Array

(inner) listVipRanks() → {Array}

Liat vip ranks

Returns:

list of vip ranks and perks

Type
Array

(inner) off(params) → {Object}

un-subscribe to realtime state changes

Parameters:
Name Type Description
params Object
Properties
Name Type Description
channel String
path String
Returns:

initial state

Type
Object

(inner) on(params) → {Object}

subscribe to realtime state changes

Parameters:
Name Type Description
params Object
Properties
Name Type Description
channel String
path String
Returns:

initial state

Type
Object

(inner) sampleGameDetails(params) → {Array}

Sample catalog games

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
limit Integer

the number of games

tags Array <optional>

the seach term

category String <optional>

game category

provider String <optional>

game provider

producer String <optional>

game producer

Returns:

list of catalog entries

Type
Array

(inner) searchGames(params) → {Array}

find all catalog entries matching the query

Parameters:
Name Type Description
params Object

the params object you want to test

Properties
Name Type Attributes Description
term String

the seach term

tags Array <optional>

the seach term

category String <optional>

game category

provider String <optional>

game provider

producer String <optional>

game producer

Returns:

list of catalog entries

Type
Array

(inner) searchGamesByTag(params) → {Array}

find all catalog entries by matching tag

Parameters:
Name Type Description
params Object

the params object you want to test

Properties
Name Type Description
term String

the seach term

Returns:

list of catalog entries

Type
Array

(inner) verifyProvable(params) → {Integer}

Verify provable outcome

Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Default Description
clientSeeed String
serverSeed String
nonce Integer
min Integer <optional>
0
max Integer <optional>
10001
Returns:

game outcome

Type
Integer