我想看看玩家是否在前1%的玩家中,所以我需要查看他们的排名以及已提交给游戏的分数。我该如何检查?
答案 0 :(得分:0)
您可以使用Scores下的方法获得排名。
资源表示形式:
{
"kind": "games#playerLeaderboardScoreListResponse",
"nextPageToken": string,
"player": players Resource,
"items": [
{
"kind": "games#playerLeaderboardScore",
"leaderboard_id": string,
"scoreValue": long,
"scoreString": string,
"publicRank": {
"kind": "games#leaderboardScoreRank",
"rank": long,
"formattedRank": string,
"numScores": long,
"formattedNumScores": string
},
"socialRank": {
"kind": "games#leaderboardScoreRank",
"rank": long,
"formattedRank": string,
"numScores": long,
"formattedNumScores": string
},
"timeSpan": string,
"writeTimestamp": long,
"scoreTag": string
}
]
}
使用得分:get方法可在当前经过身份验证的玩家的排行榜中获得高分和排名(可选)。
请注意,此方法需要authorization