Beamable SDK
Public Member Functions | List of all members
Beamable.Common.Api.Stats.IStatsApi Interface Reference
Inheritance diagram for Beamable.Common.Api.Stats.IStatsApi:
Inheritance graph
[legend]

Public Member Functions

UserDataCache< Dictionary< string, string > > GetCache (string prefix)
 Get the UserDataCache<T> for the stat prefix More...
 
Promise< EmptyResponseSetStats (string access, Dictionary< string, string > stats)
 Set the current player's client player stats. More...
 
Promise< Dictionary< string, string > > GetStats (string domain, string access, string type, long id)
 Get all of the stats for a given player id More...
 

Member Function Documentation

◆ GetCache()

UserDataCache< Dictionary< string, string > > Beamable.Common.Api.Stats.IStatsApi.GetCache ( string  prefix)

Get the UserDataCache<T> for the stat prefix

Parameters
prefixA stat prefix is a dot separated string containing the ordered set of stat clauses.

{domain}.{access}.{type}

Domain can be "client" or "game" Access can be "public" or "private". Type should always be "player".

Returns
The UserDataCache<T> containing stats given the prefix.

Implemented in Beamable.Common.Api.Stats.AbsStatsApi.

◆ GetStats()

Promise< Dictionary< string, string > > Beamable.Common.Api.Stats.IStatsApi.GetStats ( string  domain,
string  access,
string  type,
long  id 
)

Get all of the stats for a given player id

Parameters
domain"client" or "game". Should always be "client" unless you are executing this method as a privileged user or from a Microservice.
access"public" or "private". Should always be "public" unless you are executing this method as a privileged user or from a Microserivce.
typeShould always be "player".
idThe player id to get stats for
Returns
A dictionary containing all of the stats for the given domain, access, and player id.

Implemented in Beamable.Common.Api.Stats.AbsStatsApi.

◆ SetStats()

Promise< EmptyResponse > Beamable.Common.Api.Stats.IStatsApi.SetStats ( string  access,
Dictionary< string, string >  stats 
)

Set the current player's client player stats.

Parameters
access"public" or "private". Should always be "public", unless you are executing this method as a privileged user or from a Microserivce.
statsA dictionary of stat keys and values to set. This will overwrite ONLY the stats that are present in the given dictionary.
Returns
A Promise<T> representing the network call.

Implemented in Beamable.Common.Api.Stats.AbsStatsApi.


The documentation for this interface was generated from the following file: