「排行榜」與「成就」代表一個人類玩家。
如需本資源的方法清單,請見本頁結尾。
資源表示法
這是 Player 資源的 JSON 範本。
{ "kind": "games#player", "playerId": string, "displayName": string, "avatarImageUrl": string, "bannerUrlPortrait": string, "bannerUrlLandscape": string, "originalPlayerId": string, "lastPlayedWith": { "kind": "games#played", "timeMillis": long, "autoMatched": boolean }, "profileSettings": { "kind": "games#profileSettings", "profileVisible": boolean, "friendsListVisibility": string }, "name": { "familyName": string, "givenName": string }, "experienceInfo": { "kind": "games#playerExperienceInfo", "currentExperiencePoints": long, "lastLevelUpTimestampMillis": long, "currentLevel": { "kind": "games#playerLevel", "level": integer, "minExperiencePoints": long, "maxExperiencePoints": long }, "nextLevel": { "kind": "games#playerLevel", "level": integer, "minExperiencePoints": long, "maxExperiencePoints": long } }, "title": string, "friendStatus": string }
資源名稱 | 值 | 說明 | Notes |
---|---|---|---|
avatarImageUrl |
string |
代表播放器的圖片基本網址。 | |
bannerUrlLandscape |
string |
橫向模式播放器橫幅圖片的網址。 | |
bannerUrlPortrait |
string |
縱向播放器橫幅圖片的網址。 | |
displayName |
string |
玩家的顯示名稱。 | |
experienceInfo |
nested object |
代表玩家 Play 遊戲體驗資訊的物件。 | |
experienceInfo.currentExperiencePoints |
long |
玩家目前的體驗分數。 | |
experienceInfo.currentLevel |
nested object |
玩家目前等級。 | |
experienceInfo.currentLevel.kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#playerLevel 。 |
|
experienceInfo.currentLevel.level |
integer |
使用者的等級。 | |
experienceInfo.currentLevel.maxExperiencePoints |
long |
這個等級的使用經驗上限。 | |
experienceInfo.currentLevel.minExperiencePoints |
long |
這個等級的最低經驗值。 | |
experienceInfo.kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#playerExperienceInfo 。 |
|
experienceInfo.lastLevelUpTimestampMillis |
long |
玩家升級時的時間戳記 (以毫秒為單位自 Unix 紀元時間起算)。 | |
experienceInfo.nextLevel |
nested object |
玩家的下一級如果目前的等級是最高等級,這應該會與目前等級相同。 | |
experienceInfo.nextLevel.kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#playerLevel 。 |
|
experienceInfo.nextLevel.level |
integer |
使用者的等級。 | |
experienceInfo.nextLevel.maxExperiencePoints |
long |
這個等級的使用經驗上限。 | |
experienceInfo.nextLevel.minExperiencePoints |
long |
這個等級的最低經驗值。 | |
friendStatus |
string |
指定玩家的好友狀態 (相對於要求者)。如果玩家並未將好友名單分享給遊戲,則系統會取消這項動作。
可接受的值如下:
|
|
kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#player 。 |
|
lastPlayedWith |
nested object |
玩家上次與目前已驗證玩家進行多人對戰遊戲時的詳細資料。填入 PLAYED_WITH 玩家集合成員。 | |
lastPlayedWith.autoMatched |
boolean |
如果玩家與目前已驗證的使用者進行自動比對,則傳回 True。 | |
lastPlayedWith.kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#played 。 |
|
lastPlayedWith.timeMillis |
long |
自世界標準時間紀元以來,玩家上次玩遊戲的時間 (毫秒)。 | |
name |
object |
玩家名稱中個別元件的物件表示法。部分玩家可能不會顯示這些欄位。 | |
name.familyName |
string |
此玩家的系列名稱。在某些地方,這是姓氏。 | |
name.givenName |
string |
此玩家的指定名稱。在某些地方,這稱為名字。 | |
originalPlayerId |
string |
玩家第一次登入相關遊戲時使用的玩家 ID。只有在要求播放器的 Player.get 呼叫之後,只有播放器 ID 之後才會變更,且只有支援重新對應播放器 ID 的用戶端,才會填入這個欄位。 | |
playerId |
string |
玩家的 ID。 | |
profileSettings |
nested object |
玩家的個人資料設定。控制是否允許其他玩家看到玩家的個人資料。 | |
profileSettings.friendsListVisibility |
string |
玩家是否可以看見玩家的好友名單。
可接受的值如下:
|
|
profileSettings.kind |
string |
用於識別這項資源的類型。值一律為固定字串 games#profileSettings 。 |
|
profileSettings.profileVisible |
boolean |
||
title |
string |
玩家在遊戲活動中的獎勵。 |