Scores

A player leaderboard score. Represents the score (and optionally, the ranks) of a given player in a leaderboard.

For a list of methods for this resource, see the end of this page.

Resource representations

This is a JSON template for a list of player leaderboard scores.

{
  "kind": "games#playerLeaderboardScoreListResponse",
  "nextPageToken": string,
  "player": players Resource,
  "items": [
    {
      "kind": "games#playerLeaderboardScore",
      "leaderboard_id": string,
      "scoreValue": long,
      "scoreString": string,
      "publicRank": {
        "kind": "games#leaderboardScoreRank",
        "rank": long,
        "formattedRank": string,
        "numScores": long,
        "formattedNumScores": string
      },
      "socialRank": {
        "kind": "games#leaderboardScoreRank",
        "rank": long,
        "formattedRank": string,
        "numScores": long,
        "formattedNumScores": string
      },
      "friendsRank": {
        "kind": "games#leaderboardScoreRank",
        "rank": long,
        "formattedRank": string,
        "numScores": long,
        "formattedNumScores": string
      },
      "timeSpan": string,
      "writeTimestamp": long,
      "scoreTag": string
    }
  ]
}
Property name Value Description Notes
items[] list The leaderboard scores.
items[].friendsRank nested object The rank of the score in the friends collection for this leaderboard.
items[].friendsRank.formattedNumScores string The number of scores in the leaderboard as a string.
items[].friendsRank.formattedRank string The rank in the leaderboard as a string.
items[].friendsRank.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScoreRank.
items[].friendsRank.numScores long The number of scores in the leaderboard.
items[].friendsRank.rank long The rank in the leaderboard.
items[].kind string Uniquely identifies the type of this resource. Value is always the fixed string games#playerLeaderboardScore.
items[].leaderboard_id string The ID of the leaderboard this score is in.
items[].publicRank nested object The public rank of the score in this leaderboard. This object will not be present if the user is not sharing their scores publicly.
items[].publicRank.formattedNumScores string The number of scores in the leaderboard as a string.
items[].publicRank.formattedRank string The rank in the leaderboard as a string.
items[].publicRank.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScoreRank.
items[].publicRank.numScores long The number of scores in the leaderboard.
items[].publicRank.rank long The rank in the leaderboard.
items[].scoreString string The formatted value of this score.
items[].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.
items[].scoreValue long The numerical value of this score.
items[].socialRank nested object The social rank of the score in this leaderboard.
items[].socialRank.formattedNumScores string The number of scores in the leaderboard as a string.
items[].socialRank.formattedRank string The rank in the leaderboard as a string.
items[].socialRank.kind string Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScoreRank.
items[].socialRank.numScores long The number of scores in the leaderboard.
items[].socialRank.rank long The rank in the leaderboard.
items[].timeSpan string The time span of this score.
Possible values are:
  • "ALL_TIME" - The score is an all-time score.
  • "WEEKLY" - The score is a weekly score.
  • "DAILY" - The score is a daily score.


Acceptable values are:
  • "ALL_TIME"
  • "DAILY"
  • "WEEKLY"
items[].writeTimestamp long The timestamp at which this score was recorded, in milliseconds since the epoch in UTC.
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 nested object The Player resources for the owner of this score.

Methods

get
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'.
list
Lists the scores in a leaderboard, starting from the top.
listWindow
Lists the scores in a leaderboard around (and including) a player's score.
submit
Submits a score to the specified leaderboard.
submitMultiple
Submits multiple scores to leaderboards.