REST Resource: scores
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:GetLeaderboardScoresResponse
JSON 表示法 |
{
"kind": string,
"nextPageToken": string,
"player": {
object (Player )
},
"items": [
{
object (LeaderboardScore )
}
]
} |
字段 |
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#playerLeaderboardScoreListResponse 。
|
nextPageToken |
string
下一页结果的分页令牌。
|
player |
object (Player )
此得分所有者的玩家资源。
|
items[] |
object (LeaderboardScore )
排行榜得分。
|
LeaderboardScore
字段 |
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#playerLeaderboardScore 。
|
leaderboard_id |
string
此得分所在排行榜的 ID。
|
scoreValue |
string (int64 format)
此得分的数值。
|
scoreString |
string
此得分的格式化值。
|
publicRank |
object (LeaderboardScoreRank )
此排行榜中得分的公示排名。如果用户未公开分享其分数,则此对象将不存在。
|
socialRank |
object (LeaderboardScoreRank )
此排行榜中相应得分的社交排名。
|
friendsRank |
object (LeaderboardScoreRank )
此排行榜好友集合中的得分排名。
|
timeSpan |
enum (ScoreTimeSpan )
此评分的时间范围。
|
writeTimestamp |
string (int64 format)
此得分记录的时间戳,以从公元纪年开始计算的毫秒数表示(世界协调时间 [UTC])。
|
scoreTag |
string
有关该得分的其他信息。值不得超过 64 个 URI 安全字符(如 RFC 3986 的第 2.3 节所定义)。
|
LeaderboardScoreRank
JSON 表示法 |
{
"kind": string,
"rank": string,
"formattedRank": string,
"numScores": string,
"formattedNumScores": string
} |
字段 |
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#leaderboardScoreRank 。
|
rank |
string (int64 format)
排行榜中的排名。
|
formattedRank |
string
排行榜中的排名(字符串)。
|
numScores |
string (int64 format)
排行榜中的得分数量。
|
formattedNumScores |
string
排行榜中的得分数量(字符串)。
|
ScoreTimeSpan
枚举 |
ALL_TIME |
得分是历史得分。 |
WEEKLY |
得分是每周得分。 |
DAILY |
该分数是每日分数。 |
方法 |
|
获取当前已通过身份验证的玩家在排行榜中的最高得分和排名(可选)。 |
|
列出排行榜中的分数,从顶部开始。 |
|
列出排行榜中与玩家得分相近(包括该得分)的得分。 |
|
将得分提交到指定的排行榜。 |
|
向排行榜提交多个得分。 |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],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. |"]]