# REST Resource: scores

- [Resource: GetLeaderboardScoresResponse](https://developer.android.com/games/services/web/api/rest/v1/scores#GetLeaderboardScoresResponse)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/scores#GetLeaderboardScoresResponse.SCHEMA_REPRESENTATION)
- [LeaderboardScore](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScore)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScore.SCHEMA_REPRESENTATION)
- [LeaderboardScoreRank](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)
  - [JSON representation](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank.SCHEMA_REPRESENTATION)
- [ScoreTimeSpan](https://developer.android.com/games/services/web/api/rest/v1/scores#ScoreTimeSpan)
- [Methods](https://developer.android.com/games/services/web/api/rest/v1/scores#METHODS_SUMMARY)

## Resource: GetLeaderboardScoresResponse

A list of player leaderboard scores.

|                                                                                                                           JSON representation                                                                                                                           |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "nextPageToken": string, "player": { object (https://developer.android.com/games/services/web/api/rest/v1/players#Player) }, "items": [ { object (https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScore) } ] } ``` |

|                                                                                Fields                                                                                 ||
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`          | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#playerLeaderboardScoreListResponse`.                  |
| `nextPageToken` | `string` The pagination token for the next page of results.                                                                                          |
| `player`        | `object (`[Player](https://developer.android.com/games/services/web/api/rest/v1/players#Player)`)` The Player resources for the owner of this score. |
| `items[]`       | `object (`[LeaderboardScore](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScore)`)` The leaderboard scores.        |

## LeaderboardScore

A player leaderboard score object.

|                                                                                                                                                                                                                                                                                                  JSON representation                                                                                                                                                                                                                                                                                                  |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "leaderboard_id": string, "scoreValue": string, "scoreString": string, "publicRank": { object (https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, "socialRank": { object (https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, "friendsRank": { object (https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, "timeSpan": enum (https://developer.android.com/games/services/web/api/rest/v1/scores#ScoreTimeSpan), "writeTimestamp": string, "scoreTag": string } ``` |

|                                                                                                                                       Fields                                                                                                                                        ||
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `kind`           | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#playerLeaderboardScore`.                                                                                                                                           |
| `leaderboard_id` | `string` The ID of the leaderboard this score is in.                                                                                                                                                                                                              |
| `scoreValue`     | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The numerical value of this score.                                                                                                                                            |
| `scoreString`    | `string` The formatted value of this score.                                                                                                                                                                                                                       |
| `publicRank`     | `object (`[LeaderboardScoreRank](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)`)` The public rank of the score in this leaderboard. This object will not be present if the user is not sharing their scores publicly. |
| `socialRank`     | `object (`[LeaderboardScoreRank](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)`)` The social rank of the score in this leaderboard.                                                                                   |
| `friendsRank`    | `object (`[LeaderboardScoreRank](https://developer.android.com/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)`)` The rank of the score in the friends collection for this leaderboard.                                                               |
| `timeSpan`       | `enum (`[ScoreTimeSpan](https://developer.android.com/games/services/web/api/rest/v1/scores#ScoreTimeSpan)`)` The time span of this score.                                                                                                                        |
| `writeTimestamp` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The timestamp at which this score was recorded, in milliseconds since the epoch in UTC.                                                                                       |
| `scoreTag`       | `string` Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.                                                                                                                   |

## LeaderboardScoreRank

A score rank in a leaderboard.

|                                                  JSON representation                                                   |
|------------------------------------------------------------------------------------------------------------------------|
| ``` { "kind": string, "rank": string, "formattedRank": string, "numScores": string, "formattedNumScores": string } ``` |

|                                                                       Fields                                                                       ||
|----------------------|------------------------------------------------------------------------------------------------------------------------------|
| `kind`               | `string` Uniquely identifies the type of this resource. Value is always the fixed string`games#leaderboardScoreRank`.        |
| `rank`               | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The rank in the leaderboard.             |
| `formattedRank`      | `string` The rank in the leaderboard as a string.                                                                            |
| `numScores`          | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The number of scores in the leaderboard. |
| `formattedNumScores` | `string` The number of scores in the leaderboard as a string.                                                                |

## ScoreTimeSpan

Defines possible time spans for a score.

|                    Enums                    ||
|------------|---------------------------------|
| `ALL_TIME` | The score is an all-time score. |
| `WEEKLY`   | The score is a weekly score.    |
| `DAILY`    | The score is a daily score.     |

|                                                                                                ## Methods                                                                                                ||
|----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| ### [get](https://developer.android.com/games/services/web/api/rest/v1/scores/get)                       | Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. |
| ### [list](https://developer.android.com/games/services/web/api/rest/v1/scores/list)                     | Lists the scores in a leaderboard, starting from the top.                                      |
| ### [listWindow](https://developer.android.com/games/services/web/api/rest/v1/scores/listWindow)         | Lists the scores in a leaderboard around (and including) a player's score.                     |
| ### [submit](https://developer.android.com/games/services/web/api/rest/v1/scores/submit)                 | Submits a score to the specified leaderboard.                                                  |
| ### [submitMultiple](https://developer.android.com/games/services/web/api/rest/v1/scores/submitMultiple) | Submits multiple scores to leaderboards.                                                       |