Method: scores.listWindow
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mencantumkan skor di papan peringkat di sekitar (dan termasuk) skor pemain.
Permintaan HTTP
GET https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/window/{collection}
Parameter jalur
Parameter |
leaderboardId |
string
ID papan peringkat.
|
collection |
enum (ScoreCollection )
Kumpulan skor yang Anda minta.
|
Parameter kueri
Parameter |
language |
string
Bahasa pilihan yang akan digunakan untuk string yang ditampilkan oleh metode ini.
|
timeSpan |
enum (ScoreTimeSpan )
Wajib. Rentang waktu untuk skor dan peringkat yang Anda minta.
|
maxResults |
integer
Jumlah maksimum skor papan peringkat yang akan ditampilkan dalam respons. Untuk respons apa pun, jumlah skor papan peringkat yang sebenarnya yang ditampilkan mungkin kurang dari maxResults yang ditentukan.
|
resultsAbove |
integer
Jumlah skor yang diinginkan untuk ditampilkan di atas skor pemain. Lebih banyak skor dapat ditampilkan jika pemain berada di bagian bawah papan peringkat; lebih sedikit skor yang dapat ditampilkan jika pemain berada di bagian atas. Harus kurang dari atau sama dengan maxResults.
|
returnTopIfAbsent |
boolean
Benar jika skor teratas harus ditampilkan saat pemain tidak ada di papan peringkat. Nilai default-nya adalah true.
|
pageToken |
string
Token yang ditampilkan oleh permintaan sebelumnya.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons berisi instance ListLeaderboardScoresResponse
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/games
https://www.googleapis.com/auth/games_lite
Untuk informasi selengkapnya, lihat Ringkasan OAuth 2.0.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-27 UTC."],[],[],null,["# Method: scores.listWindow\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists the scores in a leaderboard around (and including) a player's score.\n\n### HTTP request\n\n`GET https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/window/{collection}`\n\n### Path parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------|\n| `leaderboardId` | `string` The ID of the leaderboard. |\n| `collection` | `enum (`[ScoreCollection](/games/services/web/api/rest/v1/ScoreCollection)`)` The collection of scores you're requesting. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `language` | `string` The preferred language to use for strings returned by this method. |\n| `timeSpan` | `enum (`[ScoreTimeSpan](/games/services/web/api/rest/v1/scores#ScoreTimeSpan)`)` Required. The time span for the scores and ranks you're requesting. |\n| `maxResults` | `integer` The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified `maxResults`. |\n| `resultsAbove` | `integer` The preferred number of scores to return above the player's score. More scores may be returned if the player is at the bottom of the leaderboard; fewer may be returned if the player is at the top. Must be less than or equal to maxResults. |\n| `returnTopIfAbsent` | `boolean` True if the top scores should be returned when the player is not in the leaderboard. Defaults to true. |\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\nIf successful, the response body contains an instance of [ListLeaderboardScoresResponse](/games/services/web/api/rest/v1/ListLeaderboardScoresResponse).\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)."]]