blob: ead3690cdec74bf21c748d3ed63c3a1cfb3e81b7 [file] [log] [blame]
Joe Gregorio37802c32013-08-06 12:24:05 -04001<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="#unlock">unlock(achievementId)</a></code></p>
91<p class="firstline">Unlocks this achievement for the currently authenticated player.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="increment">increment(achievementId, stepsToIncrement, requestId=None)</code>
95 <pre>Increments the steps of the achievement with the given ID for the currently authenticated player.
96
97Args:
98 achievementId: string, The ID of the achievement used by this method. (required)
99 stepsToIncrement: integer, The number of steps to increment. (required)
100 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 increment is performed correctly across retries.
101
102Returns:
103 An object of the form:
104
105 { # This is a JSON template for an achievement increment response
106 "currentSteps": 42, # The current steps recorded for this incremental achievement.
107 "newlyUnlocked": True or False, # Whether the the current steps for the achievement has reached the number of steps required to unlock.
108 "kind": "games#achievementIncrementResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementIncrementResponse.
109 }</pre>
110</div>
111
112<div class="method">
113 <code class="details" id="list">list(playerId, language=None, pageToken=None, state=None, maxResults=None)</code>
114 <pre>Lists the progress for all your application's achievements for the currently authenticated player.
115
116Args:
117 playerId: string, A player ID. A value of me may be used in place of the authenticated player's ID. (required)
118 language: string, The preferred language to use for strings returned by this method.
119 pageToken: string, The token returned by the previous request.
120 state: string, Tells the server to return only achievements with the specified state. If this parameter isn't specified, all achievements are returned.
121 Allowed values
122 ALL - List all achievements. This is the default.
123 HIDDEN - List only hidden achievements.
124 REVEALED - List only revealed achievements.
125 UNLOCKED - List only unlocked achievements.
126 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.
127
128Returns:
129 An object of the form:
130
131 { # This is a JSON template for a list of achievement objects.
132 "nextPageToken": "A String", # Token corresponding to the next page of results.
133 "items": [ # The achievements.
134 { # This is a JSON template for an achievement object.
135 "achievementState": "A String", # The state of the achievement.
136 # Possible values are:
137 # - "HIDDEN" - Achievement is hidden.
138 # - "REVEALED" - Achievement is revealed.
139 # - "UNLOCKED" - Achievement is unlocked.
140 "kind": "games#playerAchievement", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerAchievement.
141 "lastUpdatedTimestamp": "A String", # The timestamp of the last modification to this achievement's state.
142 "currentSteps": 42, # The current steps for an incremental achievement.
143 "formattedCurrentStepsString": "A String", # The current steps for an incremental achievement as a string.
144 "id": "A String", # The ID of the achievement.
145 },
146 ],
147 "kind": "games#playerAchievementListResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#playerAchievementListResponse.
148 }</pre>
149</div>
150
151<div class="method">
152 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
153 <pre>Retrieves the next page of results.
154
155Args:
156 previous_request: The request for the previous page. (required)
157 previous_response: The response from the request for the previous page. (required)
158
159Returns:
160 A request object that you can call 'execute()' on to request the next
161 page. Returns None if there are no more items in the collection.
162 </pre>
163</div>
164
165<div class="method">
166 <code class="details" id="reveal">reveal(achievementId)</code>
167 <pre>Sets the state of the achievement with the given ID to REVEALED for the currently authenticated player.
168
169Args:
170 achievementId: string, The ID of the achievement used by this method. (required)
171
172Returns:
173 An object of the form:
174
175 { # This is a JSON template for an achievement reveal response
176 "kind": "games#achievementRevealResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementRevealResponse.
177 "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.
178 # Possible values are:
179 # - "REVEALED" - Achievement is revealed.
180 # - "UNLOCKED" - Achievement is unlocked.
181 }</pre>
182</div>
183
184<div class="method">
185 <code class="details" id="unlock">unlock(achievementId)</code>
186 <pre>Unlocks this achievement for the currently authenticated player.
187
188Args:
189 achievementId: string, The ID of the achievement used by this method. (required)
190
191Returns:
192 An object of the form:
193
194 { # This is a JSON template for an achievement unlock response
195 "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).
196 "kind": "games#achievementUnlockResponse", # Uniquely identifies the type of this resource. Value is always the fixed string games#achievementUnlockResponse.
197 }</pre>
198</div>
199
200</body></html>