1<html><body>
2<style>
3
4body, 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
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, 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.achievements.html">achievements</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#increment">increment(achievementId, stepsToIncrement, requestId=None)</a></code></p>
79<p class="firstline">Increments the steps of the achievement with the given ID for the currently authenticated player.</p>
80<p class="toc_element">
81  <code><a href="#list">list(playerId, language=None, pageToken=None, state=None, maxResults=None)</a></code></p>
82<p class="firstline">Lists the progress for all your application's achievements for the currently authenticated player.</p>
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">
87  <code><a href="#reveal">reveal(achievementId)</a></code></p>
88<p class="firstline">Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.</p>
89<p class="toc_element">
90  <code><a href="#setStepsAtLeast">setStepsAtLeast(achievementId, steps)</a></code></p>
91<p class="firstline">Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.</p>
92<p class="toc_element">
93  <code><a href="#unlock">unlock(achievementId, builtinGameId=None)</a></code></p>
94<p class="firstline">Unlocks this achievement for the currently authenticated player.</p>
95<p class="toc_element">
96  <code><a href="#updateMultiple">updateMultiple(body, builtinGameId=None)</a></code></p>
97<p class="firstline">Updates multiple achievements for the currently authenticated player.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="increment">increment(achievementId, stepsToIncrement, requestId=None)</code>
101  <pre>Increments the steps of the achievement with the given ID for the currently authenticated player.
102
103Args:
104  achievementId: string, The ID of the achievement used by this method. (required)
105  stepsToIncrement: integer, The number of steps to increment. (required)
106  requestId: string, A randomly generated numeric ID for each request specified by the caller. This number is used at the server to ensure that the request is handled correctly across retries.
107
108Returns:
109  An object of the form:
110
111    { # This is a JSON template for an achievement increment response
112    "currentSteps": 42, # The current steps recorded for this incremental achievement.
113    "newlyUnlocked": True or False, # Whether the current steps for the achievement has reached the number of steps required to unlock.
114    "kind": "games#achievementIncrementResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementIncrementResponse.
115  }</pre>
116</div>
117
118<div class="method">
119    <code class="details" id="list">list(playerId, language=None, pageToken=None, state=None, maxResults=None)</code>
120  <pre>Lists the progress for all your application's achievements for the currently authenticated player.
121
122Args:
123  playerId: string, A player ID. A value of me may be used in place of the authenticated player's ID. (required)
124  language: string, The preferred language to use for strings returned by this method.
125  pageToken: string, The token returned by the previous request.
126  state: string, Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.
127    Allowed values
128      ALL - List all achievements. This is the default.
129      HIDDEN - List only hidden achievements.
130      REVEALED - List only revealed achievements.
131      UNLOCKED - List only unlocked achievements.
132  maxResults: integer, The maximum number of achievement resources to return in the response, used for paging. For any response, the actual number of achievement resources returned may be less than the specified maxResults.
133
134Returns:
135  An object of the form:
136
137    { # This is a JSON template for a list of achievement objects.
138    "nextPageToken": "A String", # Token corresponding to the next page of results.
139    "items": [ # The achievements.
140      { # This is a JSON template for an achievement object.
141        "achievementState": "A String", # The state of the achievement.
142            # Possible values are:
143            # - "HIDDEN" - Achievement is hidden.
144            # - "REVEALED" - Achievement is revealed.
145            # - "UNLOCKED" - Achievement is unlocked.
146        "kind": "games#playerAchievement", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerAchievement.
147        "lastUpdatedTimestamp": "A String", # The timestamp of the last modification to this achievement's state.
148        "currentSteps": 42, # The current steps for an incremental achievement.
149        "experiencePoints": "A String", # Experience points earned for the achievement. This field is absent for achievements that have not yet been unlocked and 0 for achievements that have been unlocked by testers but that are unpublished.
150        "formattedCurrentStepsString": "A String", # The current steps for an incremental achievement as a string.
151        "id": "A String", # The ID of the achievement.
152      },
153    ],
154    "kind": "games#playerAchievementListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerAchievementListResponse.
155  }</pre>
156</div>
157
158<div class="method">
159    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
160  <pre>Retrieves the next page of results.
161
162Args:
163  previous_request: The request for the previous page. (required)
164  previous_response: The response from the request for the previous page. (required)
165
166Returns:
167  A request object that you can call 'execute()' on to request the next
168  page. Returns None if there are no more items in the collection.
169    </pre>
170</div>
171
172<div class="method">
173    <code class="details" id="reveal">reveal(achievementId)</code>
174  <pre>Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
175
176Args:
177  achievementId: string, The ID of the achievement used by this method. (required)
178
179Returns:
180  An object of the form:
181
182    { # This is a JSON template for an achievement reveal response
183    "kind": "games#achievementRevealResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementRevealResponse.
184    "currentState": "A String", # The current state of the achievement for which a reveal was attempted. This might be UNLOCKED if the achievement was already unlocked.
185        # Possible values are:
186        # - "REVEALED" - Achievement is revealed.
187        # - "UNLOCKED" - Achievement is unlocked.
188  }</pre>
189</div>
190
191<div class="method">
192    <code class="details" id="setStepsAtLeast">setStepsAtLeast(achievementId, steps)</code>
193  <pre>Sets the steps for the currently authenticated player towards unlocking an achievement. If the steps parameter is less than the current number of steps that the player already gained for the achievement, the achievement is not modified.
194
195Args:
196  achievementId: string, The ID of the achievement used by this method. (required)
197  steps: integer, The minimum value to set the steps to. (required)
198
199Returns:
200  An object of the form:
201
202    { # This is a JSON template for an achievement set steps at least response.
203    "currentSteps": 42, # The current steps recorded for this incremental achievement.
204    "newlyUnlocked": True or False, # Whether the the current steps for the achievement has reached the number of steps required to unlock.
205    "kind": "games#achievementSetStepsAtLeastResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementSetStepsAtLeastResponse.
206  }</pre>
207</div>
208
209<div class="method">
210    <code class="details" id="unlock">unlock(achievementId, builtinGameId=None)</code>
211  <pre>Unlocks this achievement for the currently authenticated player.
212
213Args:
214  achievementId: string, The ID of the achievement used by this method. (required)
215  builtinGameId: string, Override used only by built-in games in Play Games application.
216
217Returns:
218  An object of the form:
219
220    { # This is a JSON template for an achievement unlock response
221    "newlyUnlocked": True or False, # Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).
222    "kind": "games#achievementUnlockResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUnlockResponse.
223  }</pre>
224</div>
225
226<div class="method">
227    <code class="details" id="updateMultiple">updateMultiple(body, builtinGameId=None)</code>
228  <pre>Updates multiple achievements for the currently authenticated player.
229
230Args:
231  body: object, The request body. (required)
232    The object takes the form of:
233
234{ # This is a JSON template for a list of achievement update requests.
235    "kind": "games#achievementUpdateMultipleRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateMultipleRequest.
236    "updates": [ # The individual achievement update requests.
237      { # This is a JSON template for a request to update an achievement.
238        "setStepsAtLeastPayload": { # This is a JSON template for the payload to request to increment an achievement. # The payload if an update of type SET_STEPS_AT_LEAST was requested for the achievement.
239          "kind": "games#GamesAchievementSetStepsAtLeast", # Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementSetStepsAtLeast.
240          "steps": 42, # The minimum number of steps for the achievement to be set to.
241        },
242        "updateType": "A String", # The type of update being applied.
243            # Possible values are:
244            # - "REVEAL" - Achievement is revealed.
245            # - "UNLOCK" - Achievement is unlocked.
246            # - "INCREMENT" - Achievement is incremented.
247            # - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed value.
248        "kind": "games#achievementUpdateRequest", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateRequest.
249        "achievementId": "A String", # The achievement this update is being applied to.
250        "incrementPayload": { # This is a JSON template for the payload to request to increment an achievement. # The payload if an update of type INCREMENT was requested for the achievement.
251          "kind": "games#GamesAchievementIncrement", # Uniquely identifies the type of this resource. Value is always the fixed string games#GamesAchievementIncrement.
252          "steps": 42, # The number of steps to be incremented.
253          "requestId": "A String", # The requestId associated with an increment to an achievement.
254        },
255      },
256    ],
257  }
258
259  builtinGameId: string, Override used only by built-in games in Play Games application.
260
261Returns:
262  An object of the form:
263
264    { # This is a JSON template for an achievement unlock response.
265    "kind": "games#achievementUpdateMultipleResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateListResponse.
266    "updatedAchievements": [ # The updated state of the achievements.
267      { # This is a JSON template for an achievement update response.
268        "kind": "games#achievementUpdateResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUpdateResponse.
269        "achievementId": "A String", # The achievement this update is was applied to.
270        "currentSteps": 42, # The current steps recorded for this achievement if it is incremental.
271        "newlyUnlocked": True or False, # Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player).
272        "updateOccurred": True or False, # Whether the requested updates actually affected the achievement.
273        "currentState": "A String", # The current state of the achievement.
274            # Possible values are:
275            # - "HIDDEN" - Achievement is hidden.
276            # - "REVEALED" - Achievement is revealed.
277            # - "UNLOCKED" - Achievement is unlocked.
278      },
279    ],
280  }</pre>
281</div>
282
283</body></html>