Class ScoresResource
The "scores" collection of methods.
Inherited Members
Namespace: Google.Apis.Games.v1
Assembly: Google.Apis.Games.v1.dll
Syntax
public class ScoresResource
Constructors
ScoresResource(IClientService)
Constructs a new resource.
Declaration
public ScoresResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Get(string, string, TimeSpanEnum)
Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a
specific time span, leaderboardId
can be set to ALL
to retrieve data for all leaderboards in a given
time span. `NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one
parameter may be set to 'ALL'.
Declaration
public virtual ScoresResource.GetRequest Get(string playerId, string leaderboardId, ScoresResource.GetRequest.TimeSpanEnum timeSpan)
Parameters
Type | Name | Description |
---|---|---|
string | playerId | A player ID. A value of |
string | leaderboardId | The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application. |
ScoresResource.GetRequest.TimeSpanEnum | timeSpan | The time span for the scores and ranks you're requesting. |
Returns
Type | Description |
---|---|
ScoresResource.GetRequest |
List(string, CollectionEnum, TimeSpanEnum)
Lists the scores in a leaderboard, starting from the top.
Declaration
public virtual ScoresResource.ListRequest List(string leaderboardId, ScoresResource.ListRequest.CollectionEnum collection, ScoresResource.ListRequest.TimeSpanEnum timeSpan)
Parameters
Type | Name | Description |
---|---|---|
string | leaderboardId | The ID of the leaderboard. |
ScoresResource.ListRequest.CollectionEnum | collection | The collection of scores you're requesting. |
ScoresResource.ListRequest.TimeSpanEnum | timeSpan | Required. The time span for the scores and ranks you're requesting. |
Returns
Type | Description |
---|---|
ScoresResource.ListRequest |
ListWindow(string, CollectionEnum, TimeSpanEnum)
Lists the scores in a leaderboard around (and including) a player's score.
Declaration
public virtual ScoresResource.ListWindowRequest ListWindow(string leaderboardId, ScoresResource.ListWindowRequest.CollectionEnum collection, ScoresResource.ListWindowRequest.TimeSpanEnum timeSpan)
Parameters
Type | Name | Description |
---|---|---|
string | leaderboardId | The ID of the leaderboard. |
ScoresResource.ListWindowRequest.CollectionEnum | collection | The collection of scores you're requesting. |
ScoresResource.ListWindowRequest.TimeSpanEnum | timeSpan | Required. The time span for the scores and ranks you're requesting. |
Returns
Type | Description |
---|---|
ScoresResource.ListWindowRequest |
Submit(string, long)
Submits a score to the specified leaderboard.
Declaration
public virtual ScoresResource.SubmitRequest Submit(string leaderboardId, long score)
Parameters
Type | Name | Description |
---|---|---|
string | leaderboardId | The ID of the leaderboard. |
long | score | Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. |
Returns
Type | Description |
---|---|
ScoresResource.SubmitRequest |
SubmitMultiple(PlayerScoreSubmissionList)
Submits multiple scores to leaderboards.
Declaration
public virtual ScoresResource.SubmitMultipleRequest SubmitMultiple(PlayerScoreSubmissionList body)
Parameters
Type | Name | Description |
---|---|---|
PlayerScoreSubmissionList | body | The body of the request. |
Returns
Type | Description |
---|---|
ScoresResource.SubmitMultipleRequest |