Method: players.list

為目前已驗證使用者取得玩家集合。

HTTP 要求

GET https://games.googleapis.com/games/v1/players/me/players/{collection}

路徑參數

參數
collection

enum (Collection)

正在擷取玩家群

查詢參數

參數
language

string

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

maxResults

integer

回應中要傳回的玩家資源數量上限,用於分頁。對任何回應,實際傳回的玩家資源數量可能會少於指定的 maxResults

pageToken

string

上一個要求傳回的權杖。

要求主體

要求主體必須為空白。

回應主體

第三方玩家名單回應。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "kind": string,
  "nextPageToken": string,
  "items": [
    {
      object (Player)
    }
  ]
}
欄位
kind

string

專門識別這個資源的類型。值一律為固定字串 games#playerListResponse

nextPageToken

string

與下一頁結果相對應的權杖。

items[]

object (Player)

選手。

授權範圍

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

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

詳情請參閱 OAuth 2.0 總覽

集合

列舉
CONNECTED

以逆時間順序擷取也在玩這款遊戲的玩家名單。

VISIBLE

在使用者的社交圖表中擷取這款遊戲可查看的玩家名單。

FRIENDS_ALL 依字母順序擷取使用者的好友名單。