Beamable SDK
Public Member Functions | List of all members
Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi Interface Reference

This type defines the Client main entry point for the Leaderboards feature. More...

Inheritance diagram for Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi:
Collaboration graph
[legend]

Public Member Functions

Promise< EmptyResponseCreateLeaderboard (string leaderboardId, LeaderboardContent templateLeaderboardContent, OptionalLong ttl=null, OptionalListString derivatives=null, OptionalLong freezeTime=null)
 Call to create a new leaderboard with the given leaderboardId using the parameters found in the templateLeaderboardContent . Does not return an error when given an existing leaderboardId . Instead, returns a success without any alteration made to the existing leaderboard that matches leaderboardId . More...
 
Promise< EmptyResponseCreateLeaderboard (string leaderboardId, OptionalInt maxEntries, OptionalLong ttl, OptionalBoolean partitioned, OptionalCohortSettings cohortSettings, OptionalListString derivatives, OptionalClientPermissions permissions, OptionalLong freezeTime)
 Call to create a leaderboard without a template as a base. More...
 
Promise< EmptyResponseCreateLeaderboard (string leaderboardId, CreateLeaderboardRequest req)
 Call to create a leaderboard without a template as a base.
 
Promise< ListLeaderboardResultListLeaderboards (int? skip=null, int? limit=50)
 Get a list of all available leaderboard ids. More...
 
Promise< GetPlayerLeaderboardsResponseGetPlayerLeaderboards (long gamerTag)
 Get a list of all the leaderboards that a specific player is participating in. More...
 
- Public Member Functions inherited from Beamable.Common.Api.Leaderboards.ILeaderboardApi
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)
 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...
 
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...
 
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...
 

Detailed Description

This type defines the Client main entry point for the Leaderboards feature.

Related Links

img beamable-logo

Member Function Documentation

◆ CreateLeaderboard() [1/2]

Promise< EmptyResponse > Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi.CreateLeaderboard ( string  leaderboardId,
LeaderboardContent  templateLeaderboardContent,
OptionalLong  ttl = null,
OptionalListString  derivatives = null,
OptionalLong  freezeTime = null 
)

Call to create a new leaderboard with the given leaderboardId using the parameters found in the templateLeaderboardContent . Does not return an error when given an existing leaderboardId . Instead, returns a success without any alteration made to the existing leaderboard that matches leaderboardId .

Parameters
leaderboardIdId for the new leaderboard. Caller must guarantee this to be unique.
templateLeaderboardContentTemplate parameters that'll be used to create the new leaderboard.
ttlWhen this leaderboard should expire.
derivativesBoard Ids for boards that must be recalculated when a entry is updated in this board.
freezeTimeAn arbitrary time since jan 1st 1970 when this leaderboard should be frozen

◆ CreateLeaderboard() [2/2]

Promise< EmptyResponse > Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi.CreateLeaderboard ( string  leaderboardId,
OptionalInt  maxEntries,
OptionalLong  ttl,
OptionalBoolean  partitioned,
OptionalCohortSettings  cohortSettings,
OptionalListString  derivatives,
OptionalClientPermissions  permissions,
OptionalLong  freezeTime 
)

Call to create a leaderboard without a template as a base.

Parameters
leaderboardIdId for the new leaderboard. Caller must guarantee this to be unique.
maxEntriesMaximum number of players who can be in the leaderboard.
ttlWhen this leaderboard should expire.
partitionedWhether or not the leaderboard should be partitioned into N "maxEntries" boards.
cohortSettingsStats-based filter that's used to group together leaderboard entries.
derivativesBoard Ids for boards that must be recalculated when a entry is updated in this board.
permissionsWhether or not a client can write to this leaderboard
freezeTimeAn arbitrary time since jan 1st 1970 when this leaderboard should be frozen

◆ GetPlayerLeaderboards()

Promise< GetPlayerLeaderboardsResponse > Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi.GetPlayerLeaderboards ( long  gamerTag)

Get a list of all the leaderboards that a specific player is participating in.

Parameters
gamerTagThe gamertag of the player to find leaderboards for.
Returns
A Promise containing a GetPlayerLeaderboardsResponse that has a set of LeaderBoardViews

◆ ListLeaderboards()

Promise< ListLeaderboardResult > Beamable.Server.Api.Leaderboards.IMicroserviceLeaderboardsApi.ListLeaderboards ( int?  skip = null,
int?  limit = 50 
)

Get a list of all available leaderboard ids.

Parameters
skipAn optional number of leaderboard ids to skip. By default, no leaderboards will be skipped. Use this with the limit argument to page the results.
limitAn optional maximum number of leaderboard ids to return. By default, the limit will be 50. Use this with the skip argument to page the results.
Returns
A Promise containing a ListLeaderboardResult that has the leaderboard ids.

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