Method: leaderboards.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Liệt kê tất cả siêu dữ liệu bảng xếp hạng cho ứng dụng của bạn.
Yêu cầu HTTP
GET https://games.googleapis.com/games/v1/leaderboards
Tham số truy vấn
Tham số |
language |
string
Ngôn ngữ ưu tiên sử dụng cho các chuỗi được phương thức này trả về.
|
maxResults |
integer
Số lượng bảng xếp hạng tối đa cần trả về trong câu trả lời. Đối với mọi phản hồi, số lượng bảng xếp hạng thực tế được trả về có thể ít hơn maxResults đã chỉ định.
|
pageToken |
string
Mã thông báo do yêu cầu trước đó trả về.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Danh sách đối tượng bảng xếp hạng.
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"kind": string,
"nextPageToken": string,
"items": [
{
object (Leaderboard )
}
]
} |
Trường |
kind |
string
Xác định duy nhất loại tài nguyên này. Giá trị luôn là chuỗi games#leaderboardListResponse cố định.
|
nextPageToken |
string
Mã thông báo tương ứng với trang kết quả tiếp theo.
|
items[] |
object (Leaderboard )
Bảng xếp hạng.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Method: leaderboards.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListLeaderboardsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists all the leaderboard metadata for your application.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/leaderboards`\n\n### Query parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `maxResults` | `integer` The maximum number of leaderboards to return in the response. For any response, the actual number of leaderboards returned may be less than the specified `maxResults`. |\n| `pageToken` | `string` The token returned by the previous request. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA list of leaderboard objects.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"nextPageToken\": string, \"items\": [ { object (/games/services/web/api/rest/v1/leaderboards#Leaderboard) } ] } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` Uniquely identifies the type of this resource. Value is always the fixed string `games#leaderboardListResponse`. |\n| `nextPageToken` | `string` Token corresponding to the next page of results. |\n| `items[]` | `object (`[Leaderboard](/games/services/web/api/rest/v1/leaderboards#Leaderboard)`)` The leaderboards. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/games`\n- `\n https://www.googleapis.com/auth/games_lite`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]