Class: StatManager

HungryGames~ StatManager


new StatManager(game)

Manages stats and leaderboard information for all of HG.
Parameters:
Name Type Description
game HungryGames~GuildGame Parent game.
Source:

Members


<constant> game :HungryGames~GuildGame

Parent game to reference by default.
Type:
Source:

Methods


createGroup( [metadata] [, cb])

Create a new stat group.
Parameters:
Name Type Argument Description
metadata HGStatMetadata <optional>
Metadata to store with stat group.
cb function <optional>
Callback function once completed. Only argument is the created group.
Source:

fetchGroup( [id], cb)

Fetch a {@HungryGames~StatGroup} reference.
Parameters:
Name Type Argument Default Description
id string <optional>
'global' The ID of the group to fetch.
cb function Callback with optional error argument, otherwise second argument is the group reference.
Source:

fetchGroupList(cb)

Fetch IDs of all created groups.
Parameters:
Name Type Description
cb function Callback with optional error argument, otherwise second argument is array of IDs as strings.
Source:

parseDay()

Update stats based on the current day data of the given game.
Source: