REST Resource: leaderboards
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:排行榜
JSON 表示法 |
{
"kind": string,
"id": string,
"name": string,
"iconUrl": string,
"isIconUrlDefault": boolean,
"order": enum (ScoreOrder )
} |
字段 |
kind |
string
唯一标识此资源的类型。值始终为固定字符串 games#leaderboard 。
|
id |
string
排行榜 ID。
|
name |
string
排行榜的名称。
|
iconUrl |
string
排行榜的图标。
|
isIconUrlDefault |
boolean
指明要返回的图标图片是默认图片还是游戏提供的图片。
|
order |
enum (ScoreOrder )
得分排序方式。
|
ScoreOrder
枚举 |
LARGER_IS_BETTER |
得分越高越好;得分按降序排序 |
SMALLER_IS_BETTER |
值越小越好;得分按升序排列 |
方法 |
|
检索具有指定 ID 的排行榜的元数据。 |
|
列出应用的所有排行榜元数据。 |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# REST Resource: leaderboards\n\n- [Resource: Leaderboard](#Leaderboard)\n - [JSON representation](#Leaderboard.SCHEMA_REPRESENTATION)\n- [ScoreOrder](#ScoreOrder)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Leaderboard\n---------------------\n\nThe Leaderboard resource.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"id\": string, \"name\": string, \"iconUrl\": string, \"isIconUrlDefault\": boolean, \"order\": enum (/games/services/web/api/rest/v1/leaderboards#ScoreOrder) } ``` |\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#leaderboard`. |\n| `id` | `string` The leaderboard ID. |\n| `name` | `string` The name of the leaderboard. |\n| `iconUrl` | `string` The icon for the leaderboard. |\n| `isIconUrlDefault` | `boolean` Indicates whether the icon image being returned is a default image, or is game-provided. |\n| `order` | `enum (`[ScoreOrder](/games/services/web/api/rest/v1/leaderboards#ScoreOrder)`)` How scores are ordered. |\n\nScoreOrder\n----------\n\nPossible score orders.\n\n| Enums ||\n|---------------------|-----------------------------------------------------------------|\n| `LARGER_IS_BETTER` | Larger values are better; scores are sorted in descending order |\n| `SMALLER_IS_BETTER` | Smaller values are better; scores are sorted in ascending order |\n\n| Methods ------- ||\n|---------------------------------------------------------------|--------------------------------------------------------------|\n| ### [get](/games/services/web/api/rest/v1/leaderboards/get) | Retrieves the metadata of the leaderboard with the given ID. |\n| ### [list](/games/services/web/api/rest/v1/leaderboards/list) | Lists all the leaderboard metadata for your application. |"]]