Beamable SDK
|
Public Member Functions | |
Promise< TournamentInfo > | GetTournamentInfo (string tournamentContentId) |
Find the first TournamentInfo that matches the given tournament content id. More... | |
Promise< TournamentInfoResponse > | GetAllTournaments (string contentId=null, int? cycle=null, bool? isRunning=null) |
Find all the tournaments that match given criteria. More... | |
Promise< TournamentChampionsResponse > | GetChampions (string tournamentId, int cycleLimit=30) |
Tournament champions are players who came in first across all stages and tiers for a given cycle. This method will fetch the latest cycle winners. Use the GetStandings method to get the standings for the current player's stage and tier. More... | |
Promise< TournamentStandingsResponse > | GetGlobalStandings (string tournamentId, int cycle=-1, int @from=-1, int max=-1, int focus=-1) |
Promise< TournamentStandingsResponse > | GetStandings (string tournamentId, int cycle=-1, int @from=-1, int max=-1, int focus=-1) |
Promise< TournamentRewardsResponse > | GetUnclaimedRewards (string tournamentId) |
Retrieve a list of unclaimed rewards that the current player has earned from previous cycles of a tournament. This method can be used to show a player what rewards they will acquire before they are claimed. Use the ClaimAllRewards method to actually claim the rewards. Use the GetPlayerStatus method to identify tournaments that the player is participating in. More... | |
Promise< TournamentRewardsResponse > | ClaimAllRewards (string tournamentId) |
Claim all rewards that the current player has earned for previous cycles of a tournament. If you need to show the rewards before claiming them, use the GetUnclaimedRewards method. Use the GetPlayerStatus method to identify tournaments that the player is participating in. More... | |
Promise< TournamentPlayerStatus > | JoinTournament (string tournamentId, double startScore=0) |
A player must join a tournament before they can submit scores with the SetScore method. Once a player has joined a tournament, they will be given scores for all future cycles of the tournament. There is no way to leave a tournament. More... | |
Promise< Unit > | SetScore (string tournamentId, long dbid, double score, bool incrementScore=false) |
Set the tournament score for the given dbid. The player must have joined the tournament using the JoinTournament method before they can submit scores. More... | |
Promise< bool > | HasJoinedTournament (string tournamentId) |
Promise< TournamentPlayerStatusResponse > | GetPlayerStatus (string tournamentId=null, string contentId=null, bool? hasUnclaimedRewards=null) |
Retrieve a set of TournamentPlayerStatuss for all matching tournaments. The TournamentPlayerStatus is a view of a tournament for the current player. More... | |
Promise< string > | GetPlayerAlias (long playerId, string statName="alias") |
A utility function to get the alias for a given player. The alias will be found by looking at the player's public stat values. More... | |
Promise< string > | GetPlayerAvatar (long playerId, string statName="avatar") |
A utility function to get the avatar key for a given player. The avatar key will be found by looking at the player's public stat values. More... | |
Promise< TournamentStandingsResponse > | GetGroupPlayers (string tournamentId, int cycle=-1, int from=-1, int max=-1, int focus=-1) |
Retrieve scores for the the group members in the current player's group. More... | |
Promise< TournamentGroupsResponse > | GetGroups (string tournamentId, int cycle=-1, int from=-1, int max=-1, int focus=-1) |
Retrieve the tournament scores for player groups. When groups participate in leaderboards, the group's score is the sum of all participating members in the group. More... | |
Promise< TournamentGroupStatusResponse > | GetGroupStatus (string tournamentId, string contentId) |
Retrieve a set of TournamentGroupStatuss for all matching tournaments. The TournamentGroupStatus is a view of a tournament for the current player, for the player's group. More... | |
Promise< TournamentGroupStatusResponse > | GetGroupStatuses (List< long > groupIds, string contentId) |
Retrieve a set of TournamentGroupStatuss for some set of groups for all tournaments that were spawned from the given content id. More... | |
Public Member Functions inherited from Beamable.Common.Api.Tournaments.ITournamentApi | |
Promise< TournamentStandingsResponse > | GetGlobalStandings (string tournamentId, int cycle=-1, int from=-1, int max=-1, int focus=-1) |
Players participating in a tournament are segmented into different leaderboard partitions to limit the size of the leaderboard any given player sees. Global standings are the scores across all stages, tiers, and partitions. Use the GetStandings method to get the standings for the current player's stage and tier. More... | |
Promise< TournamentStandingsResponse > | GetStandings (string tournamentId, int cycle=-1, int from=-1, int max=-1, int focus=-1) |
Retrieve the scores for the current player's stage and tier in the tournament. More... | |
Public Attributes | |
TournamentRef | ContentRef |
|
inline |
Claim all rewards that the current player has earned for previous cycles of a tournament. If you need to show the rewards before claiming them, use the GetUnclaimedRewards method. Use the GetPlayerStatus method to identify tournaments that the player is participating in.
tournamentId | The runtime id of a tournament. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Find all the tournaments that match given criteria.
contentId | If included, only tournaments that were created from the given tournament content id will be included. |
cycle | If included, only tournaments with a matching TournamentInfo.cycle will be included. |
isRunning | If included, only tournaments that are running will be included. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Tournament champions are players who came in first across all stages and tiers for a given cycle. This method will fetch the latest cycle winners. Use the GetStandings method to get the standings for the current player's stage and tier.
tournamentId | The runtime id of a tournament. |
cycleLimit | The number of cycles in history to look back to see champions for. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve scores for the the group members in the current player's group.
tournamentId | The runtime id of a tournament. |
cycle | The relative of number cycles in the past to look for the standings. Leaving this blank, or passing 0, will get the standings for the current cycle. For example, if the value is 2, the resulting standings will be from 2 cycles ago. |
from | How many entries from the top of the list to skip before returning data. Used with max, this can be used to page the standings. |
max | Limit the number of entries that will be returned. used with from, this can be used to page the standings. |
focus | The gamertag of a player to focus the results for. A focused response will include the given player, and surrounding scores. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve the tournament scores for player groups. When groups participate in leaderboards, the group's score is the sum of all participating members in the group.
tournamentId | The runtime id of a tournament. |
cycle | The relative of number cycles in the past to look for the group standings. Leaving this blank, or passing 0, will get the standings for the current cycle. For example, if the value is 2, the resulting standings will be from 2 cycles ago. |
from | How many entries from the top of the list to skip before returning data. Used with max, this can be used to page the group standings. |
max | Limit the number of entries that will be returned. used with from, this can be used to page the group standings. |
focus | The id of a group to focus the results for. A focused response will include the given group, and surrounding scores. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve a set of TournamentGroupStatuss for all matching tournaments. The TournamentGroupStatus is a view of a tournament for the current player, for the player's group.
tournamentId | A tournament runtime id. If this is argument is provided, then the resulting list may only contain up to one TournamentGroupStatus, which represents the current player's group status on the given tournament id. |
contentId | A tournament content id. If this argument is provided, then the resulting list may contain all TournamentGroupStatuss for each tournament that was spawned from the given content id. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve a set of TournamentGroupStatuss for some set of groups for all tournaments that were spawned from the given content id.
groupIds | A list of group ids to get TournamentGroupStatus for. There should be a TournamentGroupStatus instance per group id, per tournament. |
contentId | A tournament content id. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
A utility function to get the alias for a given player. The alias will be found by looking at the player's public stat values.
playerId | The gamertag of the player to get the alias for. |
statName | The stat name where the alias is kept. By default, this is "alias" |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
A utility function to get the avatar key for a given player. The avatar key will be found by looking at the player's public stat values.
playerId | The gamertag of the player to get the avatar key for. |
statName | The stat name where the avatar key is kept. By default, this is "avatar" |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve a set of TournamentPlayerStatuss for all matching tournaments. The TournamentPlayerStatus is a view of a tournament for the current player.
tournamentId | A tournament runtime id. If this is argument is provided, then the resulting list may only contain up to one TournamentPlayerStatus, which represents the current player's status on the given tournament id. |
contentId | A tournament content id. If this argument is provided, then the resulting list may contain all TournamentPlayerStatuss for each tournament that was spawned from the given content id. |
hasUnclaimedRewards | When true, the resulting list will only contain TournamentPlayerStatuss for tournaments that have unclaimed rewards. This can be used in conjunction with the ClaimAllRewards to claim all pending rewards for the player. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Find the first TournamentInfo that matches the given tournament content id.
tournamentContentId | A tournament content id. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Retrieve a list of unclaimed rewards that the current player has earned from previous cycles of a tournament. This method can be used to show a player what rewards they will acquire before they are claimed. Use the ClaimAllRewards method to actually claim the rewards. Use the GetPlayerStatus method to identify tournaments that the player is participating in.
tournamentId | The runtime id of a tournament. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
A player must join a tournament before they can submit scores with the SetScore method. Once a player has joined a tournament, they will be given scores for all future cycles of the tournament. There is no way to leave a tournament.
tournamentId | The runtime id of a tournament. |
startScore | An initial score for the player. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.
|
inline |
Set the tournament score for the given dbid. The player must have joined the tournament using the JoinTournament method before they can submit scores.
tournamentId | The runtime id of a tournament. |
dbid | The gamertag of the player that will have their score updated. |
score | If the incrementScore is false (which it is by default), then the score will be the player's new score. However, if the incrementScore is true, then the score will be added to the player's existing score. Negative values would lower the player's score. |
incrementScore | When true, the score value will be added to the player's existing score. When false, the score value will become the player's new score. |
Implements Beamable.Common.Api.Tournaments.ITournamentApi.