Class ScoresResource
The "scores" collection of methods.
Inheritance
Namespace: Google.Apis.Games.v1
Assembly: Google.Apis.Games.v1.dll
Syntax
public class ScoresResource : object
Constructors
ScoresResource(IClientService)
Constructs a new resource.
Declaration
public ScoresResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Get(String, String, ScoresResource.GetRequest.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 |
|---|---|---|
| System.String | playerId | A player ID. A value of me may be used in place of the authenticated player's ID. |
| System.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, ScoresResource.ListRequest.CollectionEnum, ScoresResource.ListRequest.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 |
|---|---|---|
| System.String | leaderboardId | The ID of the leaderboard. |
| ScoresResource.ListRequest.CollectionEnum | collection | The collection of scores you're requesting. |
| ScoresResource.ListRequest.TimeSpanEnum | timeSpan | The time span for the scores and ranks you're requesting. |
Returns
| Type | Description |
|---|---|
| ScoresResource.ListRequest |
ListWindow(String, ScoresResource.ListWindowRequest.CollectionEnum, ScoresResource.ListWindowRequest.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 |
|---|---|---|
| System.String | leaderboardId | The ID of the leaderboard. |
| ScoresResource.ListWindowRequest.CollectionEnum | collection | The collection of scores you're requesting. |
| ScoresResource.ListWindowRequest.TimeSpanEnum | timeSpan | The time span for the scores and ranks you're requesting. |
Returns
| Type | Description |
|---|---|
| ScoresResource.ListWindowRequest |
Submit(String, Int64)
Submits a score to the specified leaderboard.
Declaration
public virtual ScoresResource.SubmitRequest Submit(string leaderboardId, long score)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | leaderboardId | The ID of the leaderboard. |
| System.Int64 | score | 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 |