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 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間: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. |"]]