Players

プレーヤーは、リーダーボードと実績で人間のプレーヤーを表します。

このリソースのメソッドの一覧は、このページの最後に掲載されています。

リソース表記

これは 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
}
プロパティ名 説明 備考
avatarImageUrl string プレーヤーを表す画像のベース URL。
bannerUrlLandscape string 横表示のプレーヤー バナー画像の URL。
bannerUrlPortrait string ポートレート モードのプレーヤーのバナー画像の URL。
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 エポック UTC からの時間、ミリ秒単位)。
experienceInfo.nextLevel nested object プレーヤーの次のレベル。現在のレベルが最大レベルである場合、これは現在のレベルと同じです。
experienceInfo.nextLevel.kind string このリソースの種類を一意に識別します。値は常に固定文字列の games#playerLevel です。
experienceInfo.nextLevel.level integer ユーザーのレベル。
experienceInfo.nextLevel.maxExperiencePoints long このレベルの最大経験値。
experienceInfo.nextLevel.minExperiencePoints long このレベルでの最低経験値。
friendStatus string リクエスト元のユーザーに対する、特定のプレーヤーの友だちのステータス。プレーヤーが友だちリストをゲームと共有していない場合、これは設定されません。

有効な値は次のとおりです。
  • FRIEND
  • NO_RELATIONSHIP
kind string このリソースの種類を一意に識別します。値は常に固定文字列の games#player です。
lastPlayedWith nested object このプレーヤーが現在認証されているプレーヤーでマルチプレーヤー ゲームをプレイした最後の日時の詳細。PLAYED_WITH のプレーヤー コレクション メンバーによってデータが入力されます。
lastPlayedWith.autoMatched boolean プレーヤーが現在認証されているユーザーと自動一致した場合は true。
lastPlayedWith.kind string このリソースの種類を一意に識別します。値は常に固定文字列の games#played です。
lastPlayedWith.timeMillis long プレーヤーが最後にゲームをプレイした時間(ミリ秒単位、エポック時間(UTC)。
name object プレーヤー名の個々のコンポーネントのオブジェクト表現。一部のプレーヤーでは、これらのフィールドが表示されない場合があります。
name.familyName string このプレーヤーの姓。この場所は、姓と呼ばれることもあります。
name.givenName string このプレーヤーに付けられた名前。この場所には、この名前で呼ばれることがあります。
originalPlayerId string このプレーヤーが該当するゲームに初めてログインしたときに使用されたプレーヤー ID。この値は、リクエスト元のプレーヤーの player.get の呼び出しに対してのみ入力され、プレーヤー ID がその後変更された場合にのみ、プレーヤー ID の再マッピングをサポートするクライアントにのみ表示されます。
playerId string プレーヤーの ID。
profileSettings nested object プレーヤーのプロフィール設定。プレーヤーのプロフィールが他のプレーヤーに表示されるかどうかを指定します。
profileSettings.friendsListVisibility string プレーヤーのフレンドリストがゲームに表示されるかどうか。

有効な値は次のとおりです。
  • REQUEST_REQUIRED
  • UNAVAILABLE
  • VISIBLE
profileSettings.kind string このリソースの種類を一意に識別します。値は常に固定文字列の games#profileSettings です。
profileSettings.profileVisible boolean
title string ゲーム アクティビティに対して報酬を支払ったプレーヤーのタイトル。

Methods

get
指定された ID の Player リソースを取得します。現在認証されているユーザーのプレーヤーを取得するには、playerIdme に設定します。
list
現在認証されているユーザーのプレーヤー コレクションを取得します。