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 概览