Method: scores.list

列出排行榜中的得分(从顶部开始)。

HTTP 请求

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

路径参数

参数
leaderboardId

string

排行榜的 ID。

collection

enum (ScoreCollection)

您请求的得分集合。

查询参数

参数
language

string

此方法返回的字符串使用的首选语言。

timeSpan

enum (ScoreTimeSpan)

必需。您请求的得分和排名的时间跨度。

maxResults

integer

响应中要返回的排行榜得分数量上限。对于任何响应,返回的实际排行榜得分可能小于指定的 maxResults

pageToken

string

上一个请求返回的令牌。

请求正文

请求正文必须为空。

响应正文

如果成功,则响应正文包含一个 ListLeaderboardScoresResponse 实例。

授权范围

需要以下 OAuth 范围之一:

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

有关详情,请参阅 OAuth 2.0 概览