Method: scores.listWindow

列出排行榜周圍 (並包含) 玩家得分的分數。

HTTP 要求

GET https://games.googleapis.com/games/v1/leaderboards/{leaderboardId}/window/{collection}

路徑參數

參數
leaderboardId

string

排行榜 ID。

collection

enum (ScoreCollection)

您要求的分數集合。

查詢參數

參數
language

string

此方法傳回的字串偏好語言。

timeSpan

enum (ScoreTimeSpan)

必要欄位。要求分數的時間範圍及要求排名的時間範圍。

maxResults

integer

回應中要傳回的排行榜分數上限。對任何回應而言,傳回的排行榜分數實際數量可能會低於指定的 maxResults

resultsAbove

integer

要傳回的得分超過玩家得分的偏好分數。如果玩家位於排行榜底部,則可能會傳回較多分數;如果玩家位於排行榜頂端,則傳回較少的分數。必須小於或等於 maxResults。

returnTopIfAbsent

boolean

如果玩家不在排行榜上時應傳回最高分數,則為 True。預設為 true。

pageToken

string

上一個要求傳回的權杖。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會包含 ListLeaderboardScoresResponse 的執行例項。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/games
  • https://www.googleapis.com/auth/games_lite

詳情請參閱 OAuth 2.0 總覽