1 <html><body> 2 <style> 3 4 body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13 } 14 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51 } 52 53 .toc_element { 54 margin-top: 0.5em; 55 } 56 57 .firstline { 58 margin-left: 2 em; 59 } 60 61 .method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66 } 67 68 .details { 69 font-weight: bold; 70 font-size: 14px; 71 } 72 73 </style> 74 75 <h1><a href="games_v1.html">Google Play Game Services API</a> . <a href="games_v1.scores.html">scores</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#get">get(playerId, leaderboardId, timeSpan, includeRankType=None, language=None, maxResults=None, pageToken=None, consistencyToken=None)</a></code></p> 79 <p class="firstline">Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, leaderboardId can be set to ALL to retrieve data for all leaderboards in a given time span.</p> 80 <p class="toc_element"> 81 <code><a href="#get_next">get_next(previous_request, previous_response)</a></code></p> 82 <p class="firstline">Retrieves the next page of results.</p> 83 <p class="toc_element"> 84 <code><a href="#list">list(leaderboardId, collection, timeSpan, language=None, maxResults=None, pageToken=None, consistencyToken=None)</a></code></p> 85 <p class="firstline">Lists the scores in a leaderboard, starting from the top.</p> 86 <p class="toc_element"> 87 <code><a href="#listWindow">listWindow(leaderboardId, collection, timeSpan, language=None, returnTopIfAbsent=None, resultsAbove=None, maxResults=None, pageToken=None, consistencyToken=None)</a></code></p> 88 <p class="firstline">Lists the scores in a leaderboard around (and including) a player's score.</p> 89 <p class="toc_element"> 90 <code><a href="#listWindow_next">listWindow_next(previous_request, previous_response)</a></code></p> 91 <p class="firstline">Retrieves the next page of results.</p> 92 <p class="toc_element"> 93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 94 <p class="firstline">Retrieves the next page of results.</p> 95 <p class="toc_element"> 96 <code><a href="#submit">submit(leaderboardId, score, language=None, scoreTag=None, consistencyToken=None)</a></code></p> 97 <p class="firstline">Submits a score to the specified leaderboard.</p> 98 <p class="toc_element"> 99 <code><a href="#submitMultiple">submitMultiple(body, language=None, consistencyToken=None)</a></code></p> 100 <p class="firstline">Submits multiple scores to leaderboards.</p> 101 <h3>Method Details</h3> 102 <div class="method"> 103 <code class="details" id="get">get(playerId, leaderboardId, timeSpan, includeRankType=None, language=None, maxResults=None, pageToken=None, consistencyToken=None)</code> 104 <pre>Get high scores, and optionally ranks, in leaderboards for the currently authenticated player. For a specific time span, leaderboardId can be set to ALL to retrieve data for all leaderboards in a given time span. 105 NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same request; only one parameter may be set to 'ALL'. 106 107 Args: 108 playerId: string, A player ID. A value of me may be used in place of the authenticated player's ID. (required) 109 leaderboardId: string, The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all leaderboards for this application. (required) 110 timeSpan: string, The time span for the scores and ranks you're requesting. (required) 111 Allowed values 112 ALL - Get the high scores for all time spans. If this is used, maxResults values will be ignored. 113 ALL_TIME - Get the all time high score. 114 DAILY - List the top scores for the current day. 115 WEEKLY - List the top scores for the current week. 116 includeRankType: string, The types of ranks to return. If the parameter is omitted, no ranks will be returned. 117 Allowed values 118 ALL - Retrieve public and social ranks. 119 PUBLIC - Retrieve public ranks, if the player is sharing their gameplay activity publicly. 120 SOCIAL - Retrieve the social rank. 121 language: string, The preferred language to use for strings returned by this method. 122 maxResults: integer, The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. 123 pageToken: string, The token returned by the previous request. 124 consistencyToken: string, The last-seen mutation timestamp. 125 126 Returns: 127 An object of the form: 128 129 { # This is a JSON template for a list of player leaderboard scores. 130 "nextPageToken": "A String", # The pagination token for the next page of results. 131 "items": [ # The leaderboard scores. 132 { # This is a JSON template for a player leaderboard score object. 133 "writeTimestamp": "A String", # The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. 134 "kind": "games#playerLeaderboardScore", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLeaderboardScore. 135 "publicRank": { # This is a JSON template for a score rank in a leaderboard. # The public rank of the score in this leaderboard. This object will not be present if the user is not sharing their scores publicly. 136 "numScores": "A String", # The number of scores in the leaderboard. 137 "kind": "games#leaderboardScoreRank", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScoreRank. 138 "formattedRank": "A String", # The rank in the leaderboard as a string. 139 "rank": "A String", # The rank in the leaderboard. 140 "formattedNumScores": "A String", # The number of scores in the leaderboard as a string. 141 }, 142 "scoreTag": "A String", # Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 143 "timeSpan": "A String", # The time span of this score. 144 # Possible values are: 145 # - "ALL_TIME" - The score is an all-time score. 146 # - "WEEKLY" - The score is a weekly score. 147 # - "DAILY" - The score is a daily score. 148 "scoreString": "A String", # The formatted value of this score. 149 "leaderboard_id": "A String", # The ID of the leaderboard this score is in. 150 "scoreValue": "A String", # The numerical value of this score. 151 "socialRank": { # This is a JSON template for a score rank in a leaderboard. # The social rank of the score in this leaderboard. 152 "numScores": "A String", # The number of scores in the leaderboard. 153 "kind": "games#leaderboardScoreRank", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScoreRank. 154 "formattedRank": "A String", # The rank in the leaderboard as a string. 155 "rank": "A String", # The rank in the leaderboard. 156 "formattedNumScores": "A String", # The number of scores in the leaderboard as a string. 157 }, 158 }, 159 ], 160 "kind": "games#playerLeaderboardScoreListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLeaderboardScoreListResponse. 161 "player": { # This is a JSON template for a Player resource. # The Player resources for the owner of this score. 162 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. 163 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. 164 "displayName": "A String", # The name to display for the player. 165 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present. 166 "givenName": "A String", # The given name of this player. In some places, this is known as the first name. 167 "familyName": "A String", # The family name of this player. In some places, this is known as the last name. 168 }, 169 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members. 170 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user. 171 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played. 172 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC. 173 }, 174 "playerId": "A String", # The ID of the player. 175 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image. 176 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players. 177 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings. 178 "profileVisible": True or False, # The player's current profile visibility. This field is visible to both 1P and 3P APIs. 179 }, 180 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player. 181 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC. 182 "currentExperiencePoints": "A String", # The current number of experience points for the player. 183 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo. 184 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player. 185 "maxExperiencePoints": "A String", # The maximum experience points for this level. 186 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 187 "minExperiencePoints": "A String", # The minimum experience points for this level. 188 "level": 42, # The level for the user. 189 }, 190 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level. 191 "maxExperiencePoints": "A String", # The maximum experience points for this level. 192 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 193 "minExperiencePoints": "A String", # The minimum experience points for this level. 194 "level": 42, # The level for the user. 195 }, 196 }, 197 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image. 198 "title": "A String", # The player's title rewarded for their game activities. 199 "avatarImageUrl": "A String", # The base URL for the image that represents the player. 200 }, 201 }</pre> 202 </div> 203 204 <div class="method"> 205 <code class="details" id="get_next">get_next(previous_request, previous_response)</code> 206 <pre>Retrieves the next page of results. 207 208 Args: 209 previous_request: The request for the previous page. (required) 210 previous_response: The response from the request for the previous page. (required) 211 212 Returns: 213 A request object that you can call 'execute()' on to request the next 214 page. Returns None if there are no more items in the collection. 215 </pre> 216 </div> 217 218 <div class="method"> 219 <code class="details" id="list">list(leaderboardId, collection, timeSpan, language=None, maxResults=None, pageToken=None, consistencyToken=None)</code> 220 <pre>Lists the scores in a leaderboard, starting from the top. 221 222 Args: 223 leaderboardId: string, The ID of the leaderboard. (required) 224 collection: string, The collection of scores you're requesting. (required) 225 Allowed values 226 PUBLIC - List all scores in the public leaderboard. 227 SOCIAL - List only social scores. 228 SOCIAL_1P - List only social scores, not respecting the fACL. 229 timeSpan: string, The time span for the scores and ranks you're requesting. (required) 230 Allowed values 231 ALL_TIME - List the all-time top scores. 232 DAILY - List the top scores for the current day. 233 WEEKLY - List the top scores for the current week. 234 language: string, The preferred language to use for strings returned by this method. 235 maxResults: integer, The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. 236 pageToken: string, The token returned by the previous request. 237 consistencyToken: string, The last-seen mutation timestamp. 238 239 Returns: 240 An object of the form: 241 242 { # This is a JSON template for a ListScores response. 243 "nextPageToken": "A String", # The pagination token for the next page of results. 244 "kind": "games#leaderboardScores", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScores. 245 "numScores": "A String", # The total number of scores in the leaderboard. 246 "items": [ # The scores in the leaderboard. 247 { # This is a JSON template for the Leaderboard Entry resource. 248 "kind": "games#leaderboardEntry", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardEntry. 249 "scoreValue": "A String", # The numerical value of this score. 250 "scoreTag": "A String", # Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 251 "timeSpan": "A String", # The time span of this high score. 252 # Possible values are: 253 # - "ALL_TIME" - The score is an all-time high score. 254 # - "WEEKLY" - The score is a weekly high score. 255 # - "DAILY" - The score is a daily high score. 256 "formattedScore": "A String", # The localized string for the numerical value of this score. 257 "player": { # This is a JSON template for a Player resource. # The player who holds this score. 258 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. 259 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. 260 "displayName": "A String", # The name to display for the player. 261 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present. 262 "givenName": "A String", # The given name of this player. In some places, this is known as the first name. 263 "familyName": "A String", # The family name of this player. In some places, this is known as the last name. 264 }, 265 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members. 266 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user. 267 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played. 268 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC. 269 }, 270 "playerId": "A String", # The ID of the player. 271 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image. 272 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players. 273 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings. 274 "profileVisible": True or False, # The player's current profile visibility. This field is visible to both 1P and 3P APIs. 275 }, 276 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player. 277 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC. 278 "currentExperiencePoints": "A String", # The current number of experience points for the player. 279 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo. 280 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player. 281 "maxExperiencePoints": "A String", # The maximum experience points for this level. 282 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 283 "minExperiencePoints": "A String", # The minimum experience points for this level. 284 "level": 42, # The level for the user. 285 }, 286 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level. 287 "maxExperiencePoints": "A String", # The maximum experience points for this level. 288 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 289 "minExperiencePoints": "A String", # The minimum experience points for this level. 290 "level": 42, # The level for the user. 291 }, 292 }, 293 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image. 294 "title": "A String", # The player's title rewarded for their game activities. 295 "avatarImageUrl": "A String", # The base URL for the image that represents the player. 296 }, 297 "formattedScoreRank": "A String", # The localized string for the rank of this score for this leaderboard. 298 "scoreRank": "A String", # The rank of this score for this leaderboard. 299 "writeTimestampMillis": "A String", # The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. 300 }, 301 ], 302 "playerScore": { # This is a JSON template for the Leaderboard Entry resource. # The score of the requesting player on the leaderboard. The player's score may appear both here and in the list of scores above. If you are viewing a public leaderboard and the player is not sharing their gameplay information publicly, the scoreRank and formattedScoreRank values will not be present. 303 "kind": "games#leaderboardEntry", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardEntry. 304 "scoreValue": "A String", # The numerical value of this score. 305 "scoreTag": "A String", # Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 306 "timeSpan": "A String", # The time span of this high score. 307 # Possible values are: 308 # - "ALL_TIME" - The score is an all-time high score. 309 # - "WEEKLY" - The score is a weekly high score. 310 # - "DAILY" - The score is a daily high score. 311 "formattedScore": "A String", # The localized string for the numerical value of this score. 312 "player": { # This is a JSON template for a Player resource. # The player who holds this score. 313 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. 314 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. 315 "displayName": "A String", # The name to display for the player. 316 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present. 317 "givenName": "A String", # The given name of this player. In some places, this is known as the first name. 318 "familyName": "A String", # The family name of this player. In some places, this is known as the last name. 319 }, 320 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members. 321 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user. 322 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played. 323 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC. 324 }, 325 "playerId": "A String", # The ID of the player. 326 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image. 327 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players. 328 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings. 329 "profileVisible": True or False, # The player's current profile visibility. This field is visible to both 1P and 3P APIs. 330 }, 331 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player. 332 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC. 333 "currentExperiencePoints": "A String", # The current number of experience points for the player. 334 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo. 335 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player. 336 "maxExperiencePoints": "A String", # The maximum experience points for this level. 337 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 338 "minExperiencePoints": "A String", # The minimum experience points for this level. 339 "level": 42, # The level for the user. 340 }, 341 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level. 342 "maxExperiencePoints": "A String", # The maximum experience points for this level. 343 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 344 "minExperiencePoints": "A String", # The minimum experience points for this level. 345 "level": 42, # The level for the user. 346 }, 347 }, 348 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image. 349 "title": "A String", # The player's title rewarded for their game activities. 350 "avatarImageUrl": "A String", # The base URL for the image that represents the player. 351 }, 352 "formattedScoreRank": "A String", # The localized string for the rank of this score for this leaderboard. 353 "scoreRank": "A String", # The rank of this score for this leaderboard. 354 "writeTimestampMillis": "A String", # The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. 355 }, 356 "prevPageToken": "A String", # The pagination token for the previous page of results. 357 }</pre> 358 </div> 359 360 <div class="method"> 361 <code class="details" id="listWindow">listWindow(leaderboardId, collection, timeSpan, language=None, returnTopIfAbsent=None, resultsAbove=None, maxResults=None, pageToken=None, consistencyToken=None)</code> 362 <pre>Lists the scores in a leaderboard around (and including) a player's score. 363 364 Args: 365 leaderboardId: string, The ID of the leaderboard. (required) 366 collection: string, The collection of scores you're requesting. (required) 367 Allowed values 368 PUBLIC - List all scores in the public leaderboard. 369 SOCIAL - List only social scores. 370 SOCIAL_1P - List only social scores, not respecting the fACL. 371 timeSpan: string, The time span for the scores and ranks you're requesting. (required) 372 Allowed values 373 ALL_TIME - List the all-time top scores. 374 DAILY - List the top scores for the current day. 375 WEEKLY - List the top scores for the current week. 376 language: string, The preferred language to use for strings returned by this method. 377 returnTopIfAbsent: boolean, True if the top scores should be returned when the player is not in the leaderboard. Defaults to true. 378 resultsAbove: integer, The preferred number of scores to return above the player's score. More scores may be returned if the player is at the bottom of the leaderboard; fewer may be returned if the player is at the top. Must be less than or equal to maxResults. 379 maxResults: integer, The maximum number of leaderboard scores to return in the response. For any response, the actual number of leaderboard scores returned may be less than the specified maxResults. 380 pageToken: string, The token returned by the previous request. 381 consistencyToken: string, The last-seen mutation timestamp. 382 383 Returns: 384 An object of the form: 385 386 { # This is a JSON template for a ListScores response. 387 "nextPageToken": "A String", # The pagination token for the next page of results. 388 "kind": "games#leaderboardScores", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardScores. 389 "numScores": "A String", # The total number of scores in the leaderboard. 390 "items": [ # The scores in the leaderboard. 391 { # This is a JSON template for the Leaderboard Entry resource. 392 "kind": "games#leaderboardEntry", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardEntry. 393 "scoreValue": "A String", # The numerical value of this score. 394 "scoreTag": "A String", # Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 395 "timeSpan": "A String", # The time span of this high score. 396 # Possible values are: 397 # - "ALL_TIME" - The score is an all-time high score. 398 # - "WEEKLY" - The score is a weekly high score. 399 # - "DAILY" - The score is a daily high score. 400 "formattedScore": "A String", # The localized string for the numerical value of this score. 401 "player": { # This is a JSON template for a Player resource. # The player who holds this score. 402 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. 403 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. 404 "displayName": "A String", # The name to display for the player. 405 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present. 406 "givenName": "A String", # The given name of this player. In some places, this is known as the first name. 407 "familyName": "A String", # The family name of this player. In some places, this is known as the last name. 408 }, 409 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members. 410 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user. 411 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played. 412 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC. 413 }, 414 "playerId": "A String", # The ID of the player. 415 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image. 416 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players. 417 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings. 418 "profileVisible": True or False, # The player's current profile visibility. This field is visible to both 1P and 3P APIs. 419 }, 420 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player. 421 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC. 422 "currentExperiencePoints": "A String", # The current number of experience points for the player. 423 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo. 424 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player. 425 "maxExperiencePoints": "A String", # The maximum experience points for this level. 426 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 427 "minExperiencePoints": "A String", # The minimum experience points for this level. 428 "level": 42, # The level for the user. 429 }, 430 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level. 431 "maxExperiencePoints": "A String", # The maximum experience points for this level. 432 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 433 "minExperiencePoints": "A String", # The minimum experience points for this level. 434 "level": 42, # The level for the user. 435 }, 436 }, 437 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image. 438 "title": "A String", # The player's title rewarded for their game activities. 439 "avatarImageUrl": "A String", # The base URL for the image that represents the player. 440 }, 441 "formattedScoreRank": "A String", # The localized string for the rank of this score for this leaderboard. 442 "scoreRank": "A String", # The rank of this score for this leaderboard. 443 "writeTimestampMillis": "A String", # The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. 444 }, 445 ], 446 "playerScore": { # This is a JSON template for the Leaderboard Entry resource. # The score of the requesting player on the leaderboard. The player's score may appear both here and in the list of scores above. If you are viewing a public leaderboard and the player is not sharing their gameplay information publicly, the scoreRank and formattedScoreRank values will not be present. 447 "kind": "games#leaderboardEntry", # Uniquely identifies the type of this resource. Value is always the fixed string games#leaderboardEntry. 448 "scoreValue": "A String", # The numerical value of this score. 449 "scoreTag": "A String", # Additional information about the score. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 450 "timeSpan": "A String", # The time span of this high score. 451 # Possible values are: 452 # - "ALL_TIME" - The score is an all-time high score. 453 # - "WEEKLY" - The score is a weekly high score. 454 # - "DAILY" - The score is a daily high score. 455 "formattedScore": "A String", # The localized string for the numerical value of this score. 456 "player": { # This is a JSON template for a Player resource. # The player who holds this score. 457 "originalPlayerId": "A String", # The player ID that was used for this player the first time they signed into the game in question. This is only populated for calls to player.get for the requesting player, only if the player ID has subsequently changed, and only to clients that support remapping player IDs. 458 "kind": "games#player", # Uniquely identifies the type of this resource. Value is always the fixed string games#player. 459 "displayName": "A String", # The name to display for the player. 460 "name": { # An object representation of the individual components of the player's name. For some players, these fields may not be present. 461 "givenName": "A String", # The given name of this player. In some places, this is known as the first name. 462 "familyName": "A String", # The family name of this player. In some places, this is known as the last name. 463 }, 464 "lastPlayedWith": { # This is a JSON template for metadata about a player playing a game with the currently authenticated user. # Details about the last time this player played a multiplayer game with the currently authenticated player. Populated for PLAYED_WITH player collection members. 465 "autoMatched": True or False, # True if the player was auto-matched with the currently authenticated user. 466 "kind": "games#played", # Uniquely identifies the type of this resource. Value is always the fixed string games#played. 467 "timeMillis": "A String", # The last time the player played the game in milliseconds since the epoch in UTC. 468 }, 469 "playerId": "A String", # The ID of the player. 470 "bannerUrlPortrait": "A String", # The url to the portrait mode player banner image. 471 "profileSettings": { # This is a JSON template for profile settings # The player's profile settings. Controls whether or not the player's profile is visible to other players. 472 "kind": "games#profileSettings", # Uniquely identifies the type of this resource. Value is always the fixed string games#profileSettings. 473 "profileVisible": True or False, # The player's current profile visibility. This field is visible to both 1P and 3P APIs. 474 }, 475 "experienceInfo": { # This is a JSON template for 1P/3P metadata about the player's experience. # An object to represent Play Game experience information for the player. 476 "lastLevelUpTimestampMillis": "A String", # The timestamp when the player was leveled up, in millis since Unix epoch UTC. 477 "currentExperiencePoints": "A String", # The current number of experience points for the player. 478 "kind": "games#playerExperienceInfo", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerExperienceInfo. 479 "currentLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The current level of the player. 480 "maxExperiencePoints": "A String", # The maximum experience points for this level. 481 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 482 "minExperiencePoints": "A String", # The minimum experience points for this level. 483 "level": 42, # The level for the user. 484 }, 485 "nextLevel": { # This is a JSON template for 1P/3P metadata about a user's level. # The next level of the player. If the current level is the maximum level, this should be same as the current level. 486 "maxExperiencePoints": "A String", # The maximum experience points for this level. 487 "kind": "games#playerLevel", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerLevel. 488 "minExperiencePoints": "A String", # The minimum experience points for this level. 489 "level": 42, # The level for the user. 490 }, 491 }, 492 "bannerUrlLandscape": "A String", # The url to the landscape mode player banner image. 493 "title": "A String", # The player's title rewarded for their game activities. 494 "avatarImageUrl": "A String", # The base URL for the image that represents the player. 495 }, 496 "formattedScoreRank": "A String", # The localized string for the rank of this score for this leaderboard. 497 "scoreRank": "A String", # The rank of this score for this leaderboard. 498 "writeTimestampMillis": "A String", # The timestamp at which this score was recorded, in milliseconds since the epoch in UTC. 499 }, 500 "prevPageToken": "A String", # The pagination token for the previous page of results. 501 }</pre> 502 </div> 503 504 <div class="method"> 505 <code class="details" id="listWindow_next">listWindow_next(previous_request, previous_response)</code> 506 <pre>Retrieves the next page of results. 507 508 Args: 509 previous_request: The request for the previous page. (required) 510 previous_response: The response from the request for the previous page. (required) 511 512 Returns: 513 A request object that you can call 'execute()' on to request the next 514 page. Returns None if there are no more items in the collection. 515 </pre> 516 </div> 517 518 <div class="method"> 519 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 520 <pre>Retrieves the next page of results. 521 522 Args: 523 previous_request: The request for the previous page. (required) 524 previous_response: The response from the request for the previous page. (required) 525 526 Returns: 527 A request object that you can call 'execute()' on to request the next 528 page. Returns None if there are no more items in the collection. 529 </pre> 530 </div> 531 532 <div class="method"> 533 <code class="details" id="submit">submit(leaderboardId, score, language=None, scoreTag=None, consistencyToken=None)</code> 534 <pre>Submits a score to the specified leaderboard. 535 536 Args: 537 leaderboardId: string, The ID of the leaderboard. (required) 538 score: string, The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units. (required) 539 language: string, The preferred language to use for strings returned by this method. 540 scoreTag: string, Additional information about the score you're submitting. Values must contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 541 consistencyToken: string, The last-seen mutation timestamp. 542 543 Returns: 544 An object of the form: 545 546 { # This is a JSON template for a list of leaderboard entry resources. 547 "kind": "games#playerScoreResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreResponse. 548 "scoreTag": "A String", # Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 549 "leaderboardId": "A String", # The leaderboard ID that this score was submitted to. 550 "formattedScore": "A String", # The formatted value of the submitted score. 551 "beatenScoreTimeSpans": [ # The time spans where the submitted score is better than the existing score for that time span. 552 # Possible values are: 553 # - "ALL_TIME" - The score is an all-time score. 554 # - "WEEKLY" - The score is a weekly score. 555 # - "DAILY" - The score is a daily score. 556 "A String", 557 ], 558 "unbeatenScores": [ # The scores in time spans that have not been beaten. As an example, the submitted score may be better than the player's DAILY score, but not better than the player's scores for the WEEKLY or ALL_TIME time spans. 559 { # This is a JSON template for a player score. 560 "kind": "games#playerScore", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScore. 561 "score": "A String", # The numerical value for this player score. 562 "formattedScore": "A String", # The formatted score for this player score. 563 "scoreTag": "A String", # Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 564 "timeSpan": "A String", # The time span for this player score. 565 # Possible values are: 566 # - "ALL_TIME" - The score is an all-time score. 567 # - "WEEKLY" - The score is a weekly score. 568 # - "DAILY" - The score is a daily score. 569 }, 570 ], 571 }</pre> 572 </div> 573 574 <div class="method"> 575 <code class="details" id="submitMultiple">submitMultiple(body, language=None, consistencyToken=None)</code> 576 <pre>Submits multiple scores to leaderboards. 577 578 Args: 579 body: object, The request body. (required) 580 The object takes the form of: 581 582 { # This is a JSON template for a list of score submission requests 583 "kind": "games#playerScoreSubmissionList", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreSubmissionList. 584 "scores": [ # The score submissions. 585 { # This is a JSON template for a request to submit a score to leaderboards. 586 "kind": "games#scoreSubmission", # Uniquely identifies the type of this resource. Value is always the fixed string games#scoreSubmission. 587 "leaderboardId": "A String", # The leaderboard this score is being submitted to. 588 "score": "A String", # The new score being submitted. 589 "scoreTag": "A String", # Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 590 "signature": "A String", # Signature Values will contain URI-safe characters as defined by section 2.3 of RFC 3986. 591 }, 592 ], 593 } 594 595 language: string, The preferred language to use for strings returned by this method. 596 consistencyToken: string, The last-seen mutation timestamp. 597 598 Returns: 599 An object of the form: 600 601 { # This is a JSON template for a list of score submission statuses. 602 "submittedScores": [ # The score submissions statuses. 603 { # This is a JSON template for a list of leaderboard entry resources. 604 "kind": "games#playerScoreResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreResponse. 605 "scoreTag": "A String", # Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 606 "leaderboardId": "A String", # The leaderboard ID that this score was submitted to. 607 "formattedScore": "A String", # The formatted value of the submitted score. 608 "beatenScoreTimeSpans": [ # The time spans where the submitted score is better than the existing score for that time span. 609 # Possible values are: 610 # - "ALL_TIME" - The score is an all-time score. 611 # - "WEEKLY" - The score is a weekly score. 612 # - "DAILY" - The score is a daily score. 613 "A String", 614 ], 615 "unbeatenScores": [ # The scores in time spans that have not been beaten. As an example, the submitted score may be better than the player's DAILY score, but not better than the player's scores for the WEEKLY or ALL_TIME time spans. 616 { # This is a JSON template for a player score. 617 "kind": "games#playerScore", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScore. 618 "score": "A String", # The numerical value for this player score. 619 "formattedScore": "A String", # The formatted score for this player score. 620 "scoreTag": "A String", # Additional information about this score. Values will contain no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. 621 "timeSpan": "A String", # The time span for this player score. 622 # Possible values are: 623 # - "ALL_TIME" - The score is an all-time score. 624 # - "WEEKLY" - The score is a weekly score. 625 # - "DAILY" - The score is a daily score. 626 }, 627 ], 628 }, 629 ], 630 "kind": "games#playerScoreListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerScoreListResponse. 631 }</pre> 632 </div> 633 634 </body></html>