Beamable SDK
Public Member Functions | Protected Member Functions | Properties | List of all members
Beamable.Common.Api.Stats.AbsStatsApi Class Referenceabstract
Inheritance diagram for Beamable.Common.Api.Stats.AbsStatsApi:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Common.Api.Stats.AbsStatsApi:
Collaboration graph
[legend]

Public Member Functions

 AbsStatsApi (IBeamableRequester requester, IUserContext userContext, IDependencyProvider provider, UserDataCache< Dictionary< string, string > >.FactoryFunction cacheFactory)
 
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...
 
Promise< StatsSearchResponseSearchStats (string domain, string access, string type, List< Criteria > criteriaList)
 

Protected Member Functions

abstract Promise< Dictionary< long, Dictionary< string, string > > > Resolve (string prefix, List< long > gamerTags)
 

Properties

IBeamableRequester Requester [get]
 
IUserContext UserContext [get]
 
IDependencyProvider Provider [get]
 

Member Function Documentation

◆ GetCache()

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

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.

Implements Beamable.Common.Api.Stats.IStatsApi.

◆ GetStats()

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

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.

Implements Beamable.Common.Api.Stats.IStatsApi.

◆ SearchStats()

Promise< StatsSearchResponse > Beamable.Common.Api.Stats.AbsStatsApi.SearchStats ( string  domain,
string  access,
string  type,
List< Criteria criteriaList 
)
inline

Supports searching for DBIDs by stat query. This method is useful e.g for friend search

IMPORTANT: This method only works for admin role

◆ SetStats()

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

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.

Implements Beamable.Common.Api.Stats.IStatsApi.


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