John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 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 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 75 | <h1><a href="games_v1.html">Google Play Game Services</a> . <a href="games_v1.achievements.html">achievements</a></h1> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 78 | <code><a href="#increment">increment(achievementId, stepsToIncrement, requestId=None, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Increments the steps of the achievement with the given ID for the currently</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 80 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 81 | <code><a href="#list">list(playerId, state=None, maxResults=None, pageToken=None, language=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Lists the progress for all your application's achievements for the</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 83 | <p class="toc_element"> |
| 84 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 85 | <p class="firstline">Retrieves the next page of results.</p> |
| 86 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 87 | <code><a href="#reveal">reveal(achievementId, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Sets the state of the achievement with the given ID to</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 89 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 90 | <code><a href="#setStepsAtLeast">setStepsAtLeast(achievementId, steps, x__xgafv=None)</a></code></p> |
| 91 | <p class="firstline">Sets the steps for the currently authenticated player towards unlocking an</p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 92 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 93 | <code><a href="#unlock">unlock(achievementId, x__xgafv=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 94 | <p class="firstline">Unlocks this achievement for the currently authenticated player.</p> |
| 95 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 96 | <code><a href="#updateMultiple">updateMultiple(body=None, x__xgafv=None)</a></code></p> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 97 | <p class="firstline">Updates multiple achievements for the currently authenticated player.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 100 | <code class="details" id="increment">increment(achievementId, stepsToIncrement, requestId=None, x__xgafv=None)</code> |
| 101 | <pre>Increments the steps of the achievement with the given ID for the currently |
| 102 | authenticated player. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 103 | |
| 104 | Args: |
| 105 | achievementId: string, The ID of the achievement used by this method. (required) |
| 106 | stepsToIncrement: integer, The number of steps to increment. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 107 | requestId: string, A randomly generated numeric ID for each request specified by the caller. |
| 108 | This number is used at the server to ensure that the request is handled |
| 109 | correctly across retries. |
| 110 | x__xgafv: string, V1 error format. |
| 111 | Allowed values |
| 112 | 1 - v1 error format |
| 113 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 114 | |
| 115 | Returns: |
| 116 | An object of the form: |
| 117 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 118 | { # An achievement increment response |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 119 | "currentSteps": 42, # The current steps recorded for this incremental achievement. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 120 | "newlyUnlocked": True or False, # Whether the current steps for the achievement has reached the number of |
| 121 | # steps required to unlock. |
| 122 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 123 | # string `games#achievementIncrementResponse`. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 124 | }</pre> |
| 125 | </div> |
| 126 | |
| 127 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 128 | <code class="details" id="list">list(playerId, state=None, maxResults=None, pageToken=None, language=None, x__xgafv=None)</code> |
| 129 | <pre>Lists the progress for all your application's achievements for the |
| 130 | currently authenticated player. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 131 | |
| 132 | Args: |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 133 | playerId: string, A player ID. A value of `me` may be used in place of the |
| 134 | authenticated player's ID. (required) |
| 135 | state: string, Tells the server to return only achievements with the specified state. If |
| 136 | this parameter isn't specified, all achievements are returned. |
| 137 | maxResults: integer, The maximum number of achievement resources to return in the response, used |
| 138 | for paging. For any response, the actual number of achievement resources |
| 139 | returned may be less than the specified `maxResults`. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 140 | pageToken: string, The token returned by the previous request. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 141 | language: string, The preferred language to use for strings returned by this method. |
| 142 | x__xgafv: string, V1 error format. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 143 | Allowed values |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 144 | 1 - v1 error format |
| 145 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 146 | |
| 147 | Returns: |
| 148 | An object of the form: |
| 149 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 150 | { # A list of achievement objects. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 151 | "items": [ # The achievements. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 152 | { # An achievement object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 153 | "id": "A String", # The ID of the achievement. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 154 | "formattedCurrentStepsString": "A String", # The current steps for an incremental achievement as a string. |
| 155 | "experiencePoints": "A String", # Experience points earned for the achievement. This field is absent for |
| 156 | # achievements that have not yet been unlocked and 0 for achievements that |
| 157 | # have been unlocked by testers but that are unpublished. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 158 | "lastUpdatedTimestamp": "A String", # The timestamp of the last modification to this achievement's state. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 159 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 160 | # string `games#playerAchievement`. |
| 161 | "currentSteps": 42, # The current steps for an incremental achievement. |
| 162 | "achievementState": "A String", # The state of the achievement. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 163 | }, |
| 164 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 165 | "nextPageToken": "A String", # Token corresponding to the next page of results. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 166 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 167 | # string `games#playerAchievementListResponse`. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 168 | }</pre> |
| 169 | </div> |
| 170 | |
| 171 | <div class="method"> |
| 172 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 173 | <pre>Retrieves the next page of results. |
| 174 | |
| 175 | Args: |
| 176 | previous_request: The request for the previous page. (required) |
| 177 | previous_response: The response from the request for the previous page. (required) |
| 178 | |
| 179 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | A request object that you can call 'execute()' on to request the next |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 181 | page. Returns None if there are no more items in the collection. |
| 182 | </pre> |
| 183 | </div> |
| 184 | |
| 185 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 186 | <code class="details" id="reveal">reveal(achievementId, x__xgafv=None)</code> |
| 187 | <pre>Sets the state of the achievement with the given ID to |
| 188 | `REVEALED` for the currently authenticated player. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 189 | |
| 190 | Args: |
| 191 | achievementId: string, The ID of the achievement used by this method. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 192 | x__xgafv: string, V1 error format. |
| 193 | Allowed values |
| 194 | 1 - v1 error format |
| 195 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 196 | |
| 197 | Returns: |
| 198 | An object of the form: |
| 199 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 200 | { # An achievement reveal response |
| 201 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 202 | # string `games#achievementRevealResponse`. |
| 203 | "currentState": "A String", # The current state of the achievement for which a reveal was attempted. This |
| 204 | # might be `UNLOCKED` if the achievement was already unlocked. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 205 | }</pre> |
| 206 | </div> |
| 207 | |
| 208 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 209 | <code class="details" id="setStepsAtLeast">setStepsAtLeast(achievementId, steps, x__xgafv=None)</code> |
| 210 | <pre>Sets the steps for the currently authenticated player towards unlocking an |
| 211 | achievement. If the steps parameter is less than the current number of |
| 212 | steps that the player already gained for the achievement, the achievement |
| 213 | is not modified. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 214 | |
| 215 | Args: |
| 216 | achievementId: string, The ID of the achievement used by this method. (required) |
| 217 | steps: integer, The minimum value to set the steps to. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 218 | x__xgafv: string, V1 error format. |
| 219 | Allowed values |
| 220 | 1 - v1 error format |
| 221 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 222 | |
| 223 | Returns: |
| 224 | An object of the form: |
| 225 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 226 | { # An achievement set steps at least response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 227 | "currentSteps": 42, # The current steps recorded for this incremental achievement. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 228 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 229 | # string `games#achievementSetStepsAtLeastResponse`. |
| 230 | "newlyUnlocked": True or False, # Whether the current steps for the achievement has reached the number of |
| 231 | # steps required to unlock. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 232 | }</pre> |
| 233 | </div> |
| 234 | |
| 235 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 236 | <code class="details" id="unlock">unlock(achievementId, x__xgafv=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 237 | <pre>Unlocks this achievement for the currently authenticated player. |
| 238 | |
| 239 | Args: |
| 240 | achievementId: string, The ID of the achievement used by this method. (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 241 | x__xgafv: string, V1 error format. |
| 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 249 | { # An achievement unlock response |
| 250 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 251 | # string `games#achievementUnlockResponse`. |
| 252 | "newlyUnlocked": True or False, # Whether this achievement was newly unlocked (that is, whether the unlock |
| 253 | # request for the achievement was the first for the player). |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 254 | }</pre> |
| 255 | </div> |
| 256 | |
| 257 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 258 | <code class="details" id="updateMultiple">updateMultiple(body=None, x__xgafv=None)</code> |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 259 | <pre>Updates multiple achievements for the currently authenticated player. |
| 260 | |
| 261 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 262 | body: object, The request body. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 263 | The object takes the form of: |
| 264 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 265 | { # A list of achievement update requests. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 266 | "updates": [ # The individual achievement update requests. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 267 | { # A request to update an achievement. |
| 268 | "updateType": "A String", # The type of update being applied. |
| 269 | "setStepsAtLeastPayload": { # The payload to request to increment an # The payload if an update of type `SET_STEPS_AT_LEAST` was |
| 270 | # requested for the achievement. |
| 271 | # achievement. |
| 272 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 273 | # string `games#GamesAchievementSetStepsAtLeast`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 274 | "steps": 42, # The minimum number of steps for the achievement to be set to. |
| 275 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 276 | "achievementId": "A String", # The achievement this update is being applied to. |
| 277 | "incrementPayload": { # The payload to request to increment an # The payload if an update of type `INCREMENT` was requested for |
| 278 | # the achievement. |
| 279 | # achievement. |
| 280 | "requestId": "A String", # The requestId associated with an increment to an achievement. |
| 281 | "steps": 42, # The number of steps to be incremented. |
| 282 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 283 | # string `games#GamesAchievementIncrement`. |
| 284 | }, |
| 285 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 286 | # string `games#achievementUpdateRequest`. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 287 | }, |
| 288 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 289 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 290 | # string `games#achievementUpdateMultipleRequest`. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 291 | } |
| 292 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 293 | x__xgafv: string, V1 error format. |
| 294 | Allowed values |
| 295 | 1 - v1 error format |
| 296 | 2 - v2 error format |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 297 | |
| 298 | Returns: |
| 299 | An object of the form: |
| 300 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 301 | { |
| 302 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 303 | # string `games#achievementUpdateMultipleResponse`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 304 | "updatedAchievements": [ # The updated state of the achievements. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 305 | { # An updated achievement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 306 | "currentState": "A String", # The current state of the achievement. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 307 | "kind": "A String", # Uniquely identifies the type of this resource. Value is always the fixed |
| 308 | # string `games#achievementUpdateResponse`. |
| 309 | "newlyUnlocked": True or False, # Whether this achievement was newly unlocked (that is, whether the unlock |
| 310 | # request for the achievement was the first for the player). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 311 | "updateOccurred": True or False, # Whether the requested updates actually affected the achievement. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 312 | "achievementId": "A String", # The achievement this update is was applied to. |
| 313 | "currentSteps": 42, # The current steps recorded for this achievement if it is incremental. |
John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 314 | }, |
| 315 | ], |
| 316 | }</pre> |
| 317 | </div> |
| 318 | |
| 319 | </body></html> |