REST Resource: scores
Stay organized with collections
Save and categorize content based on your preferences.
Resource: GetLeaderboardScoresResponse
A list of player leaderboard scores.
JSON representation |
{
"kind": string,
"nextPageToken": string,
"player": {
object (Player )
},
"items": [
{
object (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 )
The Player resources for the owner of this score.
|
items[] |
object (LeaderboardScore )
The leaderboard scores.
|
LeaderboardScore
A player leaderboard score object.
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 format)
The numerical value of this score.
|
scoreString |
string
The formatted value of this score.
|
publicRank |
object (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 )
The social rank of the score in this leaderboard.
|
friendsRank |
object (LeaderboardScoreRank )
The rank of the score in the friends collection for this leaderboard.
|
timeSpan |
enum (ScoreTimeSpan )
The time span of this score.
|
writeTimestamp |
string (int64 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 format)
The rank in the leaderboard.
|
formattedRank |
string
The rank in the leaderboard as a string.
|
numScores |
string (int64 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 high scores, and optionally ranks, in leaderboards for the currently authenticated player. |
|
Lists the scores in a leaderboard, starting from the top. |
|
Lists the scores in a leaderboard around (and including) a player's score. |
|
Submits a score to the specified leaderboard. |
|
Submits multiple scores to leaderboards. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-28 UTC."],[],[],null,["# REST Resource: scores\n\n- [Resource: GetLeaderboardScoresResponse](#GetLeaderboardScoresResponse)\n - [JSON representation](#GetLeaderboardScoresResponse.SCHEMA_REPRESENTATION)\n- [LeaderboardScore](#LeaderboardScore)\n - [JSON representation](#LeaderboardScore.SCHEMA_REPRESENTATION)\n- [LeaderboardScoreRank](#LeaderboardScoreRank)\n - [JSON representation](#LeaderboardScoreRank.SCHEMA_REPRESENTATION)\n- [ScoreTimeSpan](#ScoreTimeSpan)\n- [Methods](#METHODS_SUMMARY)\n\nResource: GetLeaderboardScoresResponse\n--------------------------------------\n\nA list of player leaderboard scores.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"nextPageToken\": string, \"player\": { object (/games/services/web/api/rest/v1/players#Player) }, \"items\": [ { object (/games/services/web/api/rest/v1/scores#LeaderboardScore) } ] } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#playerLeaderboardScoreListResponse`. |\n| `nextPageToken` | `string` The pagination token for the next page of results. |\n| `player` | `object (`[Player](/games/services/web/api/rest/v1/players#Player)`)` The Player resources for the owner of this score. |\n| `items[]` | `object (`[LeaderboardScore](/games/services/web/api/rest/v1/scores#LeaderboardScore)`)` The leaderboard scores. |\n\nLeaderboardScore\n----------------\n\nA player leaderboard score object.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"leaderboard_id\": string, \"scoreValue\": string, \"scoreString\": string, \"publicRank\": { object (/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, \"socialRank\": { object (/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, \"friendsRank\": { object (/games/services/web/api/rest/v1/scores#LeaderboardScoreRank) }, \"timeSpan\": enum (/games/services/web/api/rest/v1/scores#ScoreTimeSpan), \"writeTimestamp\": string, \"scoreTag\": string } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#playerLeaderboardScore`. |\n| `leaderboard_id` | `string` The ID of the leaderboard this score is in. |\n| `scoreValue` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The numerical value of this score. |\n| `scoreString` | `string` The formatted value of this score. |\n| `publicRank` | `object (`[LeaderboardScoreRank](/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. |\n| `socialRank` | `object (`[LeaderboardScoreRank](/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)`)` The social rank of the score in this leaderboard. |\n| `friendsRank` | `object (`[LeaderboardScoreRank](/games/services/web/api/rest/v1/scores#LeaderboardScoreRank)`)` The rank of the score in the friends collection for this leaderboard. |\n| `timeSpan` | `enum (`[ScoreTimeSpan](/games/services/web/api/rest/v1/scores#ScoreTimeSpan)`)` The time span of this score. |\n| `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. |\n| `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. |\n\nLeaderboardScoreRank\n--------------------\n\nA score rank in a leaderboard.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"rank\": string, \"formattedRank\": string, \"numScores\": string, \"formattedNumScores\": string } ``` |\n\n| Fields ||\n|----------------------|------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#leaderboardScoreRank`. |\n| `rank` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The rank in the leaderboard. |\n| `formattedRank` | `string` The rank in the leaderboard as a string. |\n| `numScores` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The number of scores in the leaderboard. |\n| `formattedNumScores` | `string` The number of scores in the leaderboard as a string. |\n\nScoreTimeSpan\n-------------\n\nDefines possible time spans for a score.\n\n| Enums ||\n|------------|---------------------------------|\n| `ALL_TIME` | The score is an all-time score. |\n| `WEEKLY` | The score is a weekly score. |\n| `DAILY` | The score is a daily score. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| ### [get](/games/services/web/api/rest/v1/scores/get) | Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. |\n| ### [list](/games/services/web/api/rest/v1/scores/list) | Lists the scores in a leaderboard, starting from the top. |\n| ### [listWindow](/games/services/web/api/rest/v1/scores/listWindow) | Lists the scores in a leaderboard around (and including) a player's score. |\n| ### [submit](/games/services/web/api/rest/v1/scores/submit) | Submits a score to the specified leaderboard. |\n| ### [submitMultiple](/games/services/web/api/rest/v1/scores/submitMultiple) | Submits multiple scores to leaderboards. |"]]