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

Public Member Functions

 LeaderboardApi (IBeamableRequester requester, IUserContext userContext, IDependencyProvider provider, UserDataCache< RankEntry >.FactoryFunction factoryFunction)
 
UserDataCache< RankEntryGetCache (string boardId)
 Get the UserDataCache<RankEntry> with RankEntry values for some leaderboard ID. More...
 
Promise< LeaderboardAssignmentInfoGetAssignment (string boardId, bool joinBoard)
 For partitioned or cohorted leaderboards Resolves the specific child leaderboard the player is assigned to e.g. "leaderboards.my_partitioned_board" -> "leaderboards.my_partitioned_board#0" – where #0 denotes the partition identifier More...
 
Promise< LeaderboardAssignmentInfoResolveAssignment (string boardId, long gamerTag)
 For partitioned or cohorted leaderboards Resolves the specific child leaderboard the player is assigned to Uses a cache to avoid repeat communication with the server More...
 
Promise< RankEntryGetUser (LeaderboardRef leaderBoard, long gamerTag)
 Get the rank of a specific player on a specific leaderboard More...
 
Promise< RankEntryGetUser (string boardId, long gamerTag)
 Get the rank of a specific player on a specific leaderboard More...
 
Promise< LeaderBoardViewGetBoard (LeaderboardRef leaderBoard, int @from, int max, long? focus=null, long? outlier=null)
 
Promise< LeaderBoardViewGetBoard (string boardId, int @from, int max, long? focus=null, long? outlier=null)
 
Promise< LeaderBoardViewGetAssignedBoard (string boardId, int @from, int max, long? focus=null, long? outlier=null)
 
Promise< LeaderBoardViewGetAssignedBoard (LeaderboardRef leaderBoard, int @from, int max, long? focus=null, long? outlier=null)
 
Promise< LeaderBoardViewGetFriendRanks (LeaderboardRef leaderboard)
 Get the rankings of the current player's friends participating in this leaderboard More...
 
Promise< LeaderBoardViewGetFriendRanks (string boardId)
 Get the rankings of the current player's friends participating in this leaderboard More...
 
Promise< LeaderBoardViewGetRanks (LeaderboardRef leaderBoard, List< long > ids)
 Get a specific list of rankings by player id/gamertag from a leaderboard More...
 
Promise< LeaderBoardViewGetRanks (string boardId, List< long > ids)
 Get a specific list of rankings by player id/gamertag from a leaderboard More...
 
Promise< EmptyResponseSetScore (LeaderboardRef leaderBoard, double score, IDictionary< string, object > stats=null)
 Replace the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard More...
 
Promise< EmptyResponseSetScore (string boardId, double score, IDictionary< string, object > stats=null)
 Replace the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard More...
 
Promise< EmptyResponseIncrementScore (LeaderboardRef leaderBoard, double score, IDictionary< string, object > stats=null)
 Increment (add to) the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard More...
 
Promise< EmptyResponseIncrementScore (string boardId, double score, IDictionary< string, object > stats=null)
 Increment (add to) the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard More...
 
- Public Member Functions inherited from Beamable.Common.Api.Leaderboards.ILeaderboardApi
Promise< LeaderBoardViewGetBoard (LeaderboardRef leaderBoard, int from, int max, long? focus=null, long? outlier=null)
 Get a view with ranking of a specific leaderboard More...
 
Promise< LeaderBoardViewGetBoard (string boardId, int from, int max, long? focus=null, long? outlier=null)
 Get a view with ranking of a specific leaderboard More...
 
Promise< LeaderBoardViewGetAssignedBoard (LeaderboardRef leaderBoard, int from, int max, long? focus=null, long? outlier=null)
 For partitioned or cohorted leaderboards Get a view with rankings of child leaderboard the current player is assigned to More...
 
Promise< LeaderBoardViewGetAssignedBoard (string boardId, int from, int max, long? focus=null, long? outlier=null)
 For partitioned or cohorted leaderboards Get a view with rankings of child leaderboard the current player is assigned to More...
 

Protected Member Functions

Promise< EmptyResponseUpdate (string boardId, double score, bool increment=false, IDictionary< string, object > stats=null)
 

Properties

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

Member Function Documentation

◆ GetAssignment()

Promise< LeaderboardAssignmentInfo > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetAssignment ( string  boardId,
bool  joinBoard 
)
inline

For partitioned or cohorted leaderboards Resolves the specific child leaderboard the player is assigned to e.g. "leaderboards.my_partitioned_board" -> "leaderboards.my_partitioned_board#0" – where #0 denotes the partition identifier

Parameters
boardIdParent Leaderboard Id
joinBoardJoin the board if the player is not assigned.
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetCache()

UserDataCache< RankEntry > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetCache ( string  boardId)
inline

Get the UserDataCache<RankEntry> with RankEntry values for some leaderboard ID.

Parameters
boardIdThe leaderboard ID
Returns
A UserDataCache<T> of RankEntry

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetFriendRanks() [1/2]

Promise< LeaderBoardView > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetFriendRanks ( LeaderboardRef  leaderboard)

Get the rankings of the current player's friends participating in this leaderboard

Parameters
leaderboard
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetFriendRanks() [2/2]

Promise< LeaderBoardView > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetFriendRanks ( string  boardId)
inline

Get the rankings of the current player's friends participating in this leaderboard

Parameters
boardId
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetRanks() [1/2]

Promise< LeaderBoardView > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetRanks ( LeaderboardRef  leaderBoard,
List< long >  ids 
)

Get a specific list of rankings by player id/gamertag from a leaderboard

Parameters
leaderBoard
ids
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetRanks() [2/2]

Promise< LeaderBoardView > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetRanks ( string  boardId,
List< long >  ids 
)
inline

Get a specific list of rankings by player id/gamertag from a leaderboard

Parameters
boardId
ids
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetUser() [1/2]

Promise< RankEntry > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetUser ( LeaderboardRef  leaderBoard,
long  gamerTag 
)

Get the rank of a specific player on a specific leaderboard

Parameters
leaderBoard
gamerTag
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ GetUser() [2/2]

Promise< RankEntry > Beamable.Common.Api.Leaderboards.LeaderboardApi.GetUser ( string  boardId,
long  gamerTag 
)
inline

Get the rank of a specific player on a specific leaderboard

Parameters
boardId
gamerTag
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ IncrementScore() [1/2]

Promise< EmptyResponse > Beamable.Common.Api.Leaderboards.LeaderboardApi.IncrementScore ( LeaderboardRef  leaderBoard,
double  score,
IDictionary< string, object >  stats = null 
)

Increment (add to) the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard

Parameters
leaderBoard
score
stats
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ IncrementScore() [2/2]

Promise< EmptyResponse > Beamable.Common.Api.Leaderboards.LeaderboardApi.IncrementScore ( string  boardId,
double  score,
IDictionary< string, object >  stats = null 
)
inline

Increment (add to) the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard

Parameters
boardId
score
stats
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ ResolveAssignment()

Promise< LeaderboardAssignmentInfo > Beamable.Common.Api.Leaderboards.LeaderboardApi.ResolveAssignment ( string  boardId,
long  gamerTag 
)
inline

For partitioned or cohorted leaderboards Resolves the specific child leaderboard the player is assigned to Uses a cache to avoid repeat communication with the server

Parameters
boardId
gamerTag
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ SetScore() [1/2]

Promise< EmptyResponse > Beamable.Common.Api.Leaderboards.LeaderboardApi.SetScore ( LeaderboardRef  leaderBoard,
double  score,
IDictionary< string, object >  stats = null 
)

Replace the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard

Parameters
leaderBoard
score
stats
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.

◆ SetScore() [2/2]

Promise< EmptyResponse > Beamable.Common.Api.Leaderboards.LeaderboardApi.SetScore ( string  boardId,
double  score,
IDictionary< string, object >  stats = null 
)
inline

Replace the score of the current player Cohorted and Partitioned leaderboards will automatically update the correct child leaderboard

Parameters
boardId
score
stats
Returns

Implements Beamable.Common.Api.Leaderboards.ILeaderboardApi.


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