Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: generated/googleapis/lib/games/v1.dart

Issue 2039113004: Api-roll 37: 2016-06-06 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.games.v1; 3 library googleapis.games.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:crypto/crypto.dart' as crypto;
11 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
12 11
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 ApiRequestError, DetailedApiRequestError; 13 ApiRequestError, DetailedApiRequestError;
15 14
16 const core.String USER_AGENT = 'dart-api-client games/v1'; 15 const core.String USER_AGENT = 'dart-api-client games/v1';
17 16
18 /** The API for Google Play Game Services. */ 17 /** The API for Google Play Game Services. */
19 class GamesApi { 18 class GamesApi {
20 /** View and manage its own configuration data in your Google Drive */ 19 /** View and manage its own configuration data in your Google Drive */
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 final commons.ApiRequester _requester; 56 final commons.ApiRequester _requester;
58 57
59 AchievementDefinitionsResourceApi(commons.ApiRequester client) : 58 AchievementDefinitionsResourceApi(commons.ApiRequester client) :
60 _requester = client; 59 _requester = client;
61 60
62 /** 61 /**
63 * Lists all the achievement definitions for your application. 62 * Lists all the achievement definitions for your application.
64 * 63 *
65 * Request parameters: 64 * Request parameters:
66 * 65 *
66 * [consistencyToken] - The last-seen mutation timestamp.
67 *
67 * [language] - The preferred language to use for strings returned by this 68 * [language] - The preferred language to use for strings returned by this
68 * method. 69 * method.
69 * 70 *
70 * [maxResults] - The maximum number of achievement resources to return in the 71 * [maxResults] - The maximum number of achievement resources to return in the
71 * response, used for paging. For any response, the actual number of 72 * response, used for paging. For any response, the actual number of
72 * achievement resources returned may be less than the specified maxResults. 73 * achievement resources returned may be less than the specified maxResults.
73 * Value must be between "1" and "200". 74 * Value must be between "1" and "200".
74 * 75 *
75 * [pageToken] - The token returned by the previous request. 76 * [pageToken] - The token returned by the previous request.
76 * 77 *
77 * Completes with a [AchievementDefinitionsListResponse]. 78 * Completes with a [AchievementDefinitionsListResponse].
78 * 79 *
79 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 80 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
80 * error. 81 * error.
81 * 82 *
82 * If the used [http.Client] completes with an error when making a REST call, 83 * If the used [http.Client] completes with an error when making a REST call,
83 * this method will complete with the same error. 84 * this method will complete with the same error.
84 */ 85 */
85 async.Future<AchievementDefinitionsListResponse> list({core.String language, c ore.int maxResults, core.String pageToken}) { 86 async.Future<AchievementDefinitionsListResponse> list({core.String consistency Token, core.String language, core.int maxResults, core.String pageToken}) {
86 var _url = null; 87 var _url = null;
87 var _queryParams = new core.Map(); 88 var _queryParams = new core.Map();
88 var _uploadMedia = null; 89 var _uploadMedia = null;
89 var _uploadOptions = null; 90 var _uploadOptions = null;
90 var _downloadOptions = commons.DownloadOptions.Metadata; 91 var _downloadOptions = commons.DownloadOptions.Metadata;
91 var _body = null; 92 var _body = null;
92 93
94 if (consistencyToken != null) {
95 _queryParams["consistencyToken"] = [consistencyToken];
96 }
93 if (language != null) { 97 if (language != null) {
94 _queryParams["language"] = [language]; 98 _queryParams["language"] = [language];
95 } 99 }
96 if (maxResults != null) { 100 if (maxResults != null) {
97 _queryParams["maxResults"] = ["${maxResults}"]; 101 _queryParams["maxResults"] = ["${maxResults}"];
98 } 102 }
99 if (pageToken != null) { 103 if (pageToken != null) {
100 _queryParams["pageToken"] = [pageToken]; 104 _queryParams["pageToken"] = [pageToken];
101 } 105 }
102 106
(...skipping 21 matching lines...) Expand all
124 /** 128 /**
125 * Increments the steps of the achievement with the given ID for the currently 129 * Increments the steps of the achievement with the given ID for the currently
126 * authenticated player. 130 * authenticated player.
127 * 131 *
128 * Request parameters: 132 * Request parameters:
129 * 133 *
130 * [achievementId] - The ID of the achievement used by this method. 134 * [achievementId] - The ID of the achievement used by this method.
131 * 135 *
132 * [stepsToIncrement] - The number of steps to increment. 136 * [stepsToIncrement] - The number of steps to increment.
133 * 137 *
138 * [consistencyToken] - The last-seen mutation timestamp.
139 *
134 * [requestId] - A randomly generated numeric ID for each request specified by 140 * [requestId] - A randomly generated numeric ID for each request specified by
135 * the caller. This number is used at the server to ensure that the request is 141 * the caller. This number is used at the server to ensure that the request is
136 * handled correctly across retries. 142 * handled correctly across retries.
137 * 143 *
138 * Completes with a [AchievementIncrementResponse]. 144 * Completes with a [AchievementIncrementResponse].
139 * 145 *
140 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 146 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
141 * error. 147 * error.
142 * 148 *
143 * If the used [http.Client] completes with an error when making a REST call, 149 * If the used [http.Client] completes with an error when making a REST call,
144 * this method will complete with the same error. 150 * this method will complete with the same error.
145 */ 151 */
146 async.Future<AchievementIncrementResponse> increment(core.String achievementId , core.int stepsToIncrement, {core.String requestId}) { 152 async.Future<AchievementIncrementResponse> increment(core.String achievementId , core.int stepsToIncrement, {core.String consistencyToken, core.String requestI d}) {
147 var _url = null; 153 var _url = null;
148 var _queryParams = new core.Map(); 154 var _queryParams = new core.Map();
149 var _uploadMedia = null; 155 var _uploadMedia = null;
150 var _uploadOptions = null; 156 var _uploadOptions = null;
151 var _downloadOptions = commons.DownloadOptions.Metadata; 157 var _downloadOptions = commons.DownloadOptions.Metadata;
152 var _body = null; 158 var _body = null;
153 159
154 if (achievementId == null) { 160 if (achievementId == null) {
155 throw new core.ArgumentError("Parameter achievementId is required."); 161 throw new core.ArgumentError("Parameter achievementId is required.");
156 } 162 }
157 if (stepsToIncrement == null) { 163 if (stepsToIncrement == null) {
158 throw new core.ArgumentError("Parameter stepsToIncrement is required."); 164 throw new core.ArgumentError("Parameter stepsToIncrement is required.");
159 } 165 }
160 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"]; 166 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"];
167 if (consistencyToken != null) {
168 _queryParams["consistencyToken"] = [consistencyToken];
169 }
161 if (requestId != null) { 170 if (requestId != null) {
162 _queryParams["requestId"] = [requestId]; 171 _queryParams["requestId"] = [requestId];
163 } 172 }
164 173
165 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /increment'; 174 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /increment';
166 175
167 var _response = _requester.request(_url, 176 var _response = _requester.request(_url,
168 "POST", 177 "POST",
169 body: _body, 178 body: _body,
170 queryParams: _queryParams, 179 queryParams: _queryParams,
171 uploadOptions: _uploadOptions, 180 uploadOptions: _uploadOptions,
172 uploadMedia: _uploadMedia, 181 uploadMedia: _uploadMedia,
173 downloadOptions: _downloadOptions); 182 downloadOptions: _downloadOptions);
174 return _response.then((data) => new AchievementIncrementResponse.fromJson(da ta)); 183 return _response.then((data) => new AchievementIncrementResponse.fromJson(da ta));
175 } 184 }
176 185
177 /** 186 /**
178 * Lists the progress for all your application's achievements for the 187 * Lists the progress for all your application's achievements for the
179 * currently authenticated player. 188 * currently authenticated player.
180 * 189 *
181 * Request parameters: 190 * Request parameters:
182 * 191 *
183 * [playerId] - A player ID. A value of me may be used in place of the 192 * [playerId] - A player ID. A value of me may be used in place of the
184 * authenticated player's ID. 193 * authenticated player's ID.
185 * 194 *
195 * [consistencyToken] - The last-seen mutation timestamp.
196 *
186 * [language] - The preferred language to use for strings returned by this 197 * [language] - The preferred language to use for strings returned by this
187 * method. 198 * method.
188 * 199 *
189 * [maxResults] - The maximum number of achievement resources to return in the 200 * [maxResults] - The maximum number of achievement resources to return in the
190 * response, used for paging. For any response, the actual number of 201 * response, used for paging. For any response, the actual number of
191 * achievement resources returned may be less than the specified maxResults. 202 * achievement resources returned may be less than the specified maxResults.
192 * Value must be between "1" and "200". 203 * Value must be between "1" and "200".
193 * 204 *
194 * [pageToken] - The token returned by the previous request. 205 * [pageToken] - The token returned by the previous request.
195 * 206 *
196 * [state] - Tells the server to return only achievements with the specified 207 * [state] - Tells the server to return only achievements with the specified
197 * state. If this parameter isn't specified, all achievements are returned. 208 * state. If this parameter isn't specified, all achievements are returned.
198 * Possible string values are: 209 * Possible string values are:
199 * - "ALL" : List all achievements. This is the default. 210 * - "ALL" : List all achievements. This is the default.
200 * - "HIDDEN" : List only hidden achievements. 211 * - "HIDDEN" : List only hidden achievements.
201 * - "REVEALED" : List only revealed achievements. 212 * - "REVEALED" : List only revealed achievements.
202 * - "UNLOCKED" : List only unlocked achievements. 213 * - "UNLOCKED" : List only unlocked achievements.
203 * 214 *
204 * Completes with a [PlayerAchievementListResponse]. 215 * Completes with a [PlayerAchievementListResponse].
205 * 216 *
206 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
207 * error. 218 * error.
208 * 219 *
209 * If the used [http.Client] completes with an error when making a REST call, 220 * If the used [http.Client] completes with an error when making a REST call,
210 * this method will complete with the same error. 221 * this method will complete with the same error.
211 */ 222 */
212 async.Future<PlayerAchievementListResponse> list(core.String playerId, {core.S tring language, core.int maxResults, core.String pageToken, core.String state}) { 223 async.Future<PlayerAchievementListResponse> list(core.String playerId, {core.S tring consistencyToken, core.String language, core.int maxResults, core.String p ageToken, core.String state}) {
213 var _url = null; 224 var _url = null;
214 var _queryParams = new core.Map(); 225 var _queryParams = new core.Map();
215 var _uploadMedia = null; 226 var _uploadMedia = null;
216 var _uploadOptions = null; 227 var _uploadOptions = null;
217 var _downloadOptions = commons.DownloadOptions.Metadata; 228 var _downloadOptions = commons.DownloadOptions.Metadata;
218 var _body = null; 229 var _body = null;
219 230
220 if (playerId == null) { 231 if (playerId == null) {
221 throw new core.ArgumentError("Parameter playerId is required."); 232 throw new core.ArgumentError("Parameter playerId is required.");
222 } 233 }
234 if (consistencyToken != null) {
235 _queryParams["consistencyToken"] = [consistencyToken];
236 }
223 if (language != null) { 237 if (language != null) {
224 _queryParams["language"] = [language]; 238 _queryParams["language"] = [language];
225 } 239 }
226 if (maxResults != null) { 240 if (maxResults != null) {
227 _queryParams["maxResults"] = ["${maxResults}"]; 241 _queryParams["maxResults"] = ["${maxResults}"];
228 } 242 }
229 if (pageToken != null) { 243 if (pageToken != null) {
230 _queryParams["pageToken"] = [pageToken]; 244 _queryParams["pageToken"] = [pageToken];
231 } 245 }
232 if (state != null) { 246 if (state != null) {
(...skipping 13 matching lines...) Expand all
246 } 260 }
247 261
248 /** 262 /**
249 * Sets the state of the achievement with the given ID to REVEALED for the 263 * Sets the state of the achievement with the given ID to REVEALED for the
250 * currently authenticated player. 264 * currently authenticated player.
251 * 265 *
252 * Request parameters: 266 * Request parameters:
253 * 267 *
254 * [achievementId] - The ID of the achievement used by this method. 268 * [achievementId] - The ID of the achievement used by this method.
255 * 269 *
270 * [consistencyToken] - The last-seen mutation timestamp.
271 *
256 * Completes with a [AchievementRevealResponse]. 272 * Completes with a [AchievementRevealResponse].
257 * 273 *
258 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
259 * error. 275 * error.
260 * 276 *
261 * If the used [http.Client] completes with an error when making a REST call, 277 * If the used [http.Client] completes with an error when making a REST call,
262 * this method will complete with the same error. 278 * this method will complete with the same error.
263 */ 279 */
264 async.Future<AchievementRevealResponse> reveal(core.String achievementId) { 280 async.Future<AchievementRevealResponse> reveal(core.String achievementId, {cor e.String consistencyToken}) {
265 var _url = null; 281 var _url = null;
266 var _queryParams = new core.Map(); 282 var _queryParams = new core.Map();
267 var _uploadMedia = null; 283 var _uploadMedia = null;
268 var _uploadOptions = null; 284 var _uploadOptions = null;
269 var _downloadOptions = commons.DownloadOptions.Metadata; 285 var _downloadOptions = commons.DownloadOptions.Metadata;
270 var _body = null; 286 var _body = null;
271 287
272 if (achievementId == null) { 288 if (achievementId == null) {
273 throw new core.ArgumentError("Parameter achievementId is required."); 289 throw new core.ArgumentError("Parameter achievementId is required.");
274 } 290 }
291 if (consistencyToken != null) {
292 _queryParams["consistencyToken"] = [consistencyToken];
293 }
275 294
276 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /reveal'; 295 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /reveal';
277 296
278 var _response = _requester.request(_url, 297 var _response = _requester.request(_url,
279 "POST", 298 "POST",
280 body: _body, 299 body: _body,
281 queryParams: _queryParams, 300 queryParams: _queryParams,
282 uploadOptions: _uploadOptions, 301 uploadOptions: _uploadOptions,
283 uploadMedia: _uploadMedia, 302 uploadMedia: _uploadMedia,
284 downloadOptions: _downloadOptions); 303 downloadOptions: _downloadOptions);
285 return _response.then((data) => new AchievementRevealResponse.fromJson(data) ); 304 return _response.then((data) => new AchievementRevealResponse.fromJson(data) );
286 } 305 }
287 306
288 /** 307 /**
289 * Sets the steps for the currently authenticated player towards unlocking an 308 * Sets the steps for the currently authenticated player towards unlocking an
290 * achievement. If the steps parameter is less than the current number of 309 * achievement. If the steps parameter is less than the current number of
291 * steps that the player already gained for the achievement, the achievement 310 * steps that the player already gained for the achievement, the achievement
292 * is not modified. 311 * is not modified.
293 * 312 *
294 * Request parameters: 313 * Request parameters:
295 * 314 *
296 * [achievementId] - The ID of the achievement used by this method. 315 * [achievementId] - The ID of the achievement used by this method.
297 * 316 *
298 * [steps] - The minimum value to set the steps to. 317 * [steps] - The minimum value to set the steps to.
299 * 318 *
319 * [consistencyToken] - The last-seen mutation timestamp.
320 *
300 * Completes with a [AchievementSetStepsAtLeastResponse]. 321 * Completes with a [AchievementSetStepsAtLeastResponse].
301 * 322 *
302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
303 * error. 324 * error.
304 * 325 *
305 * If the used [http.Client] completes with an error when making a REST call, 326 * If the used [http.Client] completes with an error when making a REST call,
306 * this method will complete with the same error. 327 * this method will complete with the same error.
307 */ 328 */
308 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast(core.String a chievementId, core.int steps) { 329 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast(core.String a chievementId, core.int steps, {core.String consistencyToken}) {
309 var _url = null; 330 var _url = null;
310 var _queryParams = new core.Map(); 331 var _queryParams = new core.Map();
311 var _uploadMedia = null; 332 var _uploadMedia = null;
312 var _uploadOptions = null; 333 var _uploadOptions = null;
313 var _downloadOptions = commons.DownloadOptions.Metadata; 334 var _downloadOptions = commons.DownloadOptions.Metadata;
314 var _body = null; 335 var _body = null;
315 336
316 if (achievementId == null) { 337 if (achievementId == null) {
317 throw new core.ArgumentError("Parameter achievementId is required."); 338 throw new core.ArgumentError("Parameter achievementId is required.");
318 } 339 }
319 if (steps == null) { 340 if (steps == null) {
320 throw new core.ArgumentError("Parameter steps is required."); 341 throw new core.ArgumentError("Parameter steps is required.");
321 } 342 }
322 _queryParams["steps"] = ["${steps}"]; 343 _queryParams["steps"] = ["${steps}"];
344 if (consistencyToken != null) {
345 _queryParams["consistencyToken"] = [consistencyToken];
346 }
323 347
324 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /setStepsAtLeast'; 348 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /setStepsAtLeast';
325 349
326 var _response = _requester.request(_url, 350 var _response = _requester.request(_url,
327 "POST", 351 "POST",
328 body: _body, 352 body: _body,
329 queryParams: _queryParams, 353 queryParams: _queryParams,
330 uploadOptions: _uploadOptions, 354 uploadOptions: _uploadOptions,
331 uploadMedia: _uploadMedia, 355 uploadMedia: _uploadMedia,
332 downloadOptions: _downloadOptions); 356 downloadOptions: _downloadOptions);
333 return _response.then((data) => new AchievementSetStepsAtLeastResponse.fromJ son(data)); 357 return _response.then((data) => new AchievementSetStepsAtLeastResponse.fromJ son(data));
334 } 358 }
335 359
336 /** 360 /**
337 * Unlocks this achievement for the currently authenticated player. 361 * Unlocks this achievement for the currently authenticated player.
338 * 362 *
339 * Request parameters: 363 * Request parameters:
340 * 364 *
341 * [achievementId] - The ID of the achievement used by this method. 365 * [achievementId] - The ID of the achievement used by this method.
342 * 366 *
367 * [consistencyToken] - The last-seen mutation timestamp.
368 *
343 * Completes with a [AchievementUnlockResponse]. 369 * Completes with a [AchievementUnlockResponse].
344 * 370 *
345 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 371 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
346 * error. 372 * error.
347 * 373 *
348 * If the used [http.Client] completes with an error when making a REST call, 374 * If the used [http.Client] completes with an error when making a REST call,
349 * this method will complete with the same error. 375 * this method will complete with the same error.
350 */ 376 */
351 async.Future<AchievementUnlockResponse> unlock(core.String achievementId) { 377 async.Future<AchievementUnlockResponse> unlock(core.String achievementId, {cor e.String consistencyToken}) {
352 var _url = null; 378 var _url = null;
353 var _queryParams = new core.Map(); 379 var _queryParams = new core.Map();
354 var _uploadMedia = null; 380 var _uploadMedia = null;
355 var _uploadOptions = null; 381 var _uploadOptions = null;
356 var _downloadOptions = commons.DownloadOptions.Metadata; 382 var _downloadOptions = commons.DownloadOptions.Metadata;
357 var _body = null; 383 var _body = null;
358 384
359 if (achievementId == null) { 385 if (achievementId == null) {
360 throw new core.ArgumentError("Parameter achievementId is required."); 386 throw new core.ArgumentError("Parameter achievementId is required.");
361 } 387 }
388 if (consistencyToken != null) {
389 _queryParams["consistencyToken"] = [consistencyToken];
390 }
362 391
363 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /unlock'; 392 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + ' /unlock';
364 393
365 var _response = _requester.request(_url, 394 var _response = _requester.request(_url,
366 "POST", 395 "POST",
367 body: _body, 396 body: _body,
368 queryParams: _queryParams, 397 queryParams: _queryParams,
369 uploadOptions: _uploadOptions, 398 uploadOptions: _uploadOptions,
370 uploadMedia: _uploadMedia, 399 uploadMedia: _uploadMedia,
371 downloadOptions: _downloadOptions); 400 downloadOptions: _downloadOptions);
372 return _response.then((data) => new AchievementUnlockResponse.fromJson(data) ); 401 return _response.then((data) => new AchievementUnlockResponse.fromJson(data) );
373 } 402 }
374 403
375 /** 404 /**
376 * Updates multiple achievements for the currently authenticated player. 405 * Updates multiple achievements for the currently authenticated player.
377 * 406 *
378 * [request] - The metadata request object. 407 * [request] - The metadata request object.
379 * 408 *
380 * Request parameters: 409 * Request parameters:
381 * 410 *
411 * [consistencyToken] - The last-seen mutation timestamp.
412 *
382 * Completes with a [AchievementUpdateMultipleResponse]. 413 * Completes with a [AchievementUpdateMultipleResponse].
383 * 414 *
384 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 415 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
385 * error. 416 * error.
386 * 417 *
387 * If the used [http.Client] completes with an error when making a REST call, 418 * If the used [http.Client] completes with an error when making a REST call,
388 * this method will complete with the same error. 419 * this method will complete with the same error.
389 */ 420 */
390 async.Future<AchievementUpdateMultipleResponse> updateMultiple(AchievementUpda teMultipleRequest request) { 421 async.Future<AchievementUpdateMultipleResponse> updateMultiple(AchievementUpda teMultipleRequest request, {core.String consistencyToken}) {
391 var _url = null; 422 var _url = null;
392 var _queryParams = new core.Map(); 423 var _queryParams = new core.Map();
393 var _uploadMedia = null; 424 var _uploadMedia = null;
394 var _uploadOptions = null; 425 var _uploadOptions = null;
395 var _downloadOptions = commons.DownloadOptions.Metadata; 426 var _downloadOptions = commons.DownloadOptions.Metadata;
396 var _body = null; 427 var _body = null;
397 428
398 if (request != null) { 429 if (request != null) {
399 _body = convert.JSON.encode((request).toJson()); 430 _body = convert.JSON.encode((request).toJson());
400 } 431 }
432 if (consistencyToken != null) {
433 _queryParams["consistencyToken"] = [consistencyToken];
434 }
401 435
402 _url = 'achievements/updateMultiple'; 436 _url = 'achievements/updateMultiple';
403 437
404 var _response = _requester.request(_url, 438 var _response = _requester.request(_url,
405 "POST", 439 "POST",
406 body: _body, 440 body: _body,
407 queryParams: _queryParams, 441 queryParams: _queryParams,
408 uploadOptions: _uploadOptions, 442 uploadOptions: _uploadOptions,
409 uploadMedia: _uploadMedia, 443 uploadMedia: _uploadMedia,
410 downloadOptions: _downloadOptions); 444 downloadOptions: _downloadOptions);
(...skipping 12 matching lines...) Expand all
423 /** 457 /**
424 * Retrieves the metadata of the application with the given ID. If the 458 * Retrieves the metadata of the application with the given ID. If the
425 * requested application is not available for the specified platformType, the 459 * requested application is not available for the specified platformType, the
426 * returned response will not include any instance data. 460 * returned response will not include any instance data.
427 * 461 *
428 * Request parameters: 462 * Request parameters:
429 * 463 *
430 * [applicationId] - The application ID from the Google Play developer 464 * [applicationId] - The application ID from the Google Play developer
431 * console. 465 * console.
432 * 466 *
467 * [consistencyToken] - The last-seen mutation timestamp.
468 *
433 * [language] - The preferred language to use for strings returned by this 469 * [language] - The preferred language to use for strings returned by this
434 * method. 470 * method.
435 * 471 *
436 * [platformType] - Restrict application details returned to the specific 472 * [platformType] - Restrict application details returned to the specific
437 * platform. 473 * platform.
438 * Possible string values are: 474 * Possible string values are:
439 * - "ANDROID" : Retrieve applications that can be played on Android. 475 * - "ANDROID" : Retrieve applications that can be played on Android.
440 * - "IOS" : Retrieve applications that can be played on iOS. 476 * - "IOS" : Retrieve applications that can be played on iOS.
441 * - "WEB_APP" : Retrieve applications that can be played on desktop web. 477 * - "WEB_APP" : Retrieve applications that can be played on desktop web.
442 * 478 *
443 * Completes with a [Application]. 479 * Completes with a [Application].
444 * 480 *
445 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 481 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
446 * error. 482 * error.
447 * 483 *
448 * If the used [http.Client] completes with an error when making a REST call, 484 * If the used [http.Client] completes with an error when making a REST call,
449 * this method will complete with the same error. 485 * this method will complete with the same error.
450 */ 486 */
451 async.Future<Application> get(core.String applicationId, {core.String language , core.String platformType}) { 487 async.Future<Application> get(core.String applicationId, {core.String consiste ncyToken, core.String language, core.String platformType}) {
452 var _url = null; 488 var _url = null;
453 var _queryParams = new core.Map(); 489 var _queryParams = new core.Map();
454 var _uploadMedia = null; 490 var _uploadMedia = null;
455 var _uploadOptions = null; 491 var _uploadOptions = null;
456 var _downloadOptions = commons.DownloadOptions.Metadata; 492 var _downloadOptions = commons.DownloadOptions.Metadata;
457 var _body = null; 493 var _body = null;
458 494
459 if (applicationId == null) { 495 if (applicationId == null) {
460 throw new core.ArgumentError("Parameter applicationId is required."); 496 throw new core.ArgumentError("Parameter applicationId is required.");
461 } 497 }
498 if (consistencyToken != null) {
499 _queryParams["consistencyToken"] = [consistencyToken];
500 }
462 if (language != null) { 501 if (language != null) {
463 _queryParams["language"] = [language]; 502 _queryParams["language"] = [language];
464 } 503 }
465 if (platformType != null) { 504 if (platformType != null) {
466 _queryParams["platformType"] = [platformType]; 505 _queryParams["platformType"] = [platformType];
467 } 506 }
468 507
469 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); 508 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId');
470 509
471 var _response = _requester.request(_url, 510 var _response = _requester.request(_url,
472 "GET", 511 "GET",
473 body: _body, 512 body: _body,
474 queryParams: _queryParams, 513 queryParams: _queryParams,
475 uploadOptions: _uploadOptions, 514 uploadOptions: _uploadOptions,
476 uploadMedia: _uploadMedia, 515 uploadMedia: _uploadMedia,
477 downloadOptions: _downloadOptions); 516 downloadOptions: _downloadOptions);
478 return _response.then((data) => new Application.fromJson(data)); 517 return _response.then((data) => new Application.fromJson(data));
479 } 518 }
480 519
481 /** 520 /**
482 * Indicate that the the currently authenticated user is playing your 521 * Indicate that the the currently authenticated user is playing your
483 * application. 522 * application.
484 * 523 *
485 * Request parameters: 524 * Request parameters:
486 * 525 *
526 * [consistencyToken] - The last-seen mutation timestamp.
527 *
487 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
488 * error. 529 * error.
489 * 530 *
490 * If the used [http.Client] completes with an error when making a REST call, 531 * If the used [http.Client] completes with an error when making a REST call,
491 * this method will complete with the same error. 532 * this method will complete with the same error.
492 */ 533 */
493 async.Future played() { 534 async.Future played({core.String consistencyToken}) {
494 var _url = null; 535 var _url = null;
495 var _queryParams = new core.Map(); 536 var _queryParams = new core.Map();
496 var _uploadMedia = null; 537 var _uploadMedia = null;
497 var _uploadOptions = null; 538 var _uploadOptions = null;
498 var _downloadOptions = commons.DownloadOptions.Metadata; 539 var _downloadOptions = commons.DownloadOptions.Metadata;
499 var _body = null; 540 var _body = null;
500 541
542 if (consistencyToken != null) {
543 _queryParams["consistencyToken"] = [consistencyToken];
544 }
501 545
502 _downloadOptions = null; 546 _downloadOptions = null;
503 547
504 _url = 'applications/played'; 548 _url = 'applications/played';
505 549
506 var _response = _requester.request(_url, 550 var _response = _requester.request(_url,
507 "POST", 551 "POST",
508 body: _body, 552 body: _body,
509 queryParams: _queryParams, 553 queryParams: _queryParams,
510 uploadOptions: _uploadOptions, 554 uploadOptions: _uploadOptions,
511 uploadMedia: _uploadMedia, 555 uploadMedia: _uploadMedia,
512 downloadOptions: _downloadOptions); 556 downloadOptions: _downloadOptions);
513 return _response.then((data) => null); 557 return _response.then((data) => null);
514 } 558 }
515 559
516 /** 560 /**
517 * Verifies the auth token provided with this request is for the application 561 * Verifies the auth token provided with this request is for the application
518 * with the specified ID, and returns the ID of the player it was granted for. 562 * with the specified ID, and returns the ID of the player it was granted for.
519 * 563 *
520 * Request parameters: 564 * Request parameters:
521 * 565 *
522 * [applicationId] - The application ID from the Google Play developer 566 * [applicationId] - The application ID from the Google Play developer
523 * console. 567 * console.
524 * 568 *
569 * [consistencyToken] - The last-seen mutation timestamp.
570 *
525 * Completes with a [ApplicationVerifyResponse]. 571 * Completes with a [ApplicationVerifyResponse].
526 * 572 *
527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 573 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
528 * error. 574 * error.
529 * 575 *
530 * If the used [http.Client] completes with an error when making a REST call, 576 * If the used [http.Client] completes with an error when making a REST call,
531 * this method will complete with the same error. 577 * this method will complete with the same error.
532 */ 578 */
533 async.Future<ApplicationVerifyResponse> verify(core.String applicationId) { 579 async.Future<ApplicationVerifyResponse> verify(core.String applicationId, {cor e.String consistencyToken}) {
534 var _url = null; 580 var _url = null;
535 var _queryParams = new core.Map(); 581 var _queryParams = new core.Map();
536 var _uploadMedia = null; 582 var _uploadMedia = null;
537 var _uploadOptions = null; 583 var _uploadOptions = null;
538 var _downloadOptions = commons.DownloadOptions.Metadata; 584 var _downloadOptions = commons.DownloadOptions.Metadata;
539 var _body = null; 585 var _body = null;
540 586
541 if (applicationId == null) { 587 if (applicationId == null) {
542 throw new core.ArgumentError("Parameter applicationId is required."); 588 throw new core.ArgumentError("Parameter applicationId is required.");
543 } 589 }
590 if (consistencyToken != null) {
591 _queryParams["consistencyToken"] = [consistencyToken];
592 }
544 593
545 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /verify'; 594 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /verify';
546 595
547 var _response = _requester.request(_url, 596 var _response = _requester.request(_url,
548 "GET", 597 "GET",
549 body: _body, 598 body: _body,
550 queryParams: _queryParams, 599 queryParams: _queryParams,
551 uploadOptions: _uploadOptions, 600 uploadOptions: _uploadOptions,
552 uploadMedia: _uploadMedia, 601 uploadMedia: _uploadMedia,
553 downloadOptions: _downloadOptions); 602 downloadOptions: _downloadOptions);
554 return _response.then((data) => new ApplicationVerifyResponse.fromJson(data) ); 603 return _response.then((data) => new ApplicationVerifyResponse.fromJson(data) );
555 } 604 }
556 605
557 } 606 }
558 607
559 608
560 class EventsResourceApi { 609 class EventsResourceApi {
561 final commons.ApiRequester _requester; 610 final commons.ApiRequester _requester;
562 611
563 EventsResourceApi(commons.ApiRequester client) : 612 EventsResourceApi(commons.ApiRequester client) :
564 _requester = client; 613 _requester = client;
565 614
566 /** 615 /**
567 * Returns a list showing the current progress on events in this application 616 * Returns a list showing the current progress on events in this application
568 * for the currently authenticated user. 617 * for the currently authenticated user.
569 * 618 *
570 * Request parameters: 619 * Request parameters:
571 * 620 *
621 * [consistencyToken] - The last-seen mutation timestamp.
622 *
572 * [language] - The preferred language to use for strings returned by this 623 * [language] - The preferred language to use for strings returned by this
573 * method. 624 * method.
574 * 625 *
575 * [maxResults] - The maximum number of events to return in the response, used 626 * [maxResults] - The maximum number of events to return in the response, used
576 * for paging. For any response, the actual number of events to return may be 627 * for paging. For any response, the actual number of events to return may be
577 * less than the specified maxResults. 628 * less than the specified maxResults.
578 * Value must be between "1" and "100". 629 * Value must be between "1" and "100".
579 * 630 *
580 * [pageToken] - The token returned by the previous request. 631 * [pageToken] - The token returned by the previous request.
581 * 632 *
582 * Completes with a [PlayerEventListResponse]. 633 * Completes with a [PlayerEventListResponse].
583 * 634 *
584 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 635 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
585 * error. 636 * error.
586 * 637 *
587 * If the used [http.Client] completes with an error when making a REST call, 638 * If the used [http.Client] completes with an error when making a REST call,
588 * this method will complete with the same error. 639 * this method will complete with the same error.
589 */ 640 */
590 async.Future<PlayerEventListResponse> listByPlayer({core.String language, core .int maxResults, core.String pageToken}) { 641 async.Future<PlayerEventListResponse> listByPlayer({core.String consistencyTok en, core.String language, core.int maxResults, core.String pageToken}) {
591 var _url = null; 642 var _url = null;
592 var _queryParams = new core.Map(); 643 var _queryParams = new core.Map();
593 var _uploadMedia = null; 644 var _uploadMedia = null;
594 var _uploadOptions = null; 645 var _uploadOptions = null;
595 var _downloadOptions = commons.DownloadOptions.Metadata; 646 var _downloadOptions = commons.DownloadOptions.Metadata;
596 var _body = null; 647 var _body = null;
597 648
649 if (consistencyToken != null) {
650 _queryParams["consistencyToken"] = [consistencyToken];
651 }
598 if (language != null) { 652 if (language != null) {
599 _queryParams["language"] = [language]; 653 _queryParams["language"] = [language];
600 } 654 }
601 if (maxResults != null) { 655 if (maxResults != null) {
602 _queryParams["maxResults"] = ["${maxResults}"]; 656 _queryParams["maxResults"] = ["${maxResults}"];
603 } 657 }
604 if (pageToken != null) { 658 if (pageToken != null) {
605 _queryParams["pageToken"] = [pageToken]; 659 _queryParams["pageToken"] = [pageToken];
606 } 660 }
607 661
608 _url = 'events'; 662 _url = 'events';
609 663
610 var _response = _requester.request(_url, 664 var _response = _requester.request(_url,
611 "GET", 665 "GET",
612 body: _body, 666 body: _body,
613 queryParams: _queryParams, 667 queryParams: _queryParams,
614 uploadOptions: _uploadOptions, 668 uploadOptions: _uploadOptions,
615 uploadMedia: _uploadMedia, 669 uploadMedia: _uploadMedia,
616 downloadOptions: _downloadOptions); 670 downloadOptions: _downloadOptions);
617 return _response.then((data) => new PlayerEventListResponse.fromJson(data)); 671 return _response.then((data) => new PlayerEventListResponse.fromJson(data));
618 } 672 }
619 673
620 /** 674 /**
621 * Returns a list of the event definitions in this application. 675 * Returns a list of the event definitions in this application.
622 * 676 *
623 * Request parameters: 677 * Request parameters:
624 * 678 *
679 * [consistencyToken] - The last-seen mutation timestamp.
680 *
625 * [language] - The preferred language to use for strings returned by this 681 * [language] - The preferred language to use for strings returned by this
626 * method. 682 * method.
627 * 683 *
628 * [maxResults] - The maximum number of event definitions to return in the 684 * [maxResults] - The maximum number of event definitions to return in the
629 * response, used for paging. For any response, the actual number of event 685 * response, used for paging. For any response, the actual number of event
630 * definitions to return may be less than the specified maxResults. 686 * definitions to return may be less than the specified maxResults.
631 * Value must be between "1" and "100". 687 * Value must be between "1" and "100".
632 * 688 *
633 * [pageToken] - The token returned by the previous request. 689 * [pageToken] - The token returned by the previous request.
634 * 690 *
635 * Completes with a [EventDefinitionListResponse]. 691 * Completes with a [EventDefinitionListResponse].
636 * 692 *
637 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 693 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
638 * error. 694 * error.
639 * 695 *
640 * If the used [http.Client] completes with an error when making a REST call, 696 * If the used [http.Client] completes with an error when making a REST call,
641 * this method will complete with the same error. 697 * this method will complete with the same error.
642 */ 698 */
643 async.Future<EventDefinitionListResponse> listDefinitions({core.String languag e, core.int maxResults, core.String pageToken}) { 699 async.Future<EventDefinitionListResponse> listDefinitions({core.String consist encyToken, core.String language, core.int maxResults, core.String pageToken}) {
644 var _url = null; 700 var _url = null;
645 var _queryParams = new core.Map(); 701 var _queryParams = new core.Map();
646 var _uploadMedia = null; 702 var _uploadMedia = null;
647 var _uploadOptions = null; 703 var _uploadOptions = null;
648 var _downloadOptions = commons.DownloadOptions.Metadata; 704 var _downloadOptions = commons.DownloadOptions.Metadata;
649 var _body = null; 705 var _body = null;
650 706
707 if (consistencyToken != null) {
708 _queryParams["consistencyToken"] = [consistencyToken];
709 }
651 if (language != null) { 710 if (language != null) {
652 _queryParams["language"] = [language]; 711 _queryParams["language"] = [language];
653 } 712 }
654 if (maxResults != null) { 713 if (maxResults != null) {
655 _queryParams["maxResults"] = ["${maxResults}"]; 714 _queryParams["maxResults"] = ["${maxResults}"];
656 } 715 }
657 if (pageToken != null) { 716 if (pageToken != null) {
658 _queryParams["pageToken"] = [pageToken]; 717 _queryParams["pageToken"] = [pageToken];
659 } 718 }
660 719
(...skipping 10 matching lines...) Expand all
671 } 730 }
672 731
673 /** 732 /**
674 * Records a batch of changes to the number of times events have occurred for 733 * Records a batch of changes to the number of times events have occurred for
675 * the currently authenticated user of this application. 734 * the currently authenticated user of this application.
676 * 735 *
677 * [request] - The metadata request object. 736 * [request] - The metadata request object.
678 * 737 *
679 * Request parameters: 738 * Request parameters:
680 * 739 *
740 * [consistencyToken] - The last-seen mutation timestamp.
741 *
681 * [language] - The preferred language to use for strings returned by this 742 * [language] - The preferred language to use for strings returned by this
682 * method. 743 * method.
683 * 744 *
684 * Completes with a [EventUpdateResponse]. 745 * Completes with a [EventUpdateResponse].
685 * 746 *
686 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
687 * error. 748 * error.
688 * 749 *
689 * If the used [http.Client] completes with an error when making a REST call, 750 * If the used [http.Client] completes with an error when making a REST call,
690 * this method will complete with the same error. 751 * this method will complete with the same error.
691 */ 752 */
692 async.Future<EventUpdateResponse> record(EventRecordRequest request, {core.Str ing language}) { 753 async.Future<EventUpdateResponse> record(EventRecordRequest request, {core.Str ing consistencyToken, core.String language}) {
693 var _url = null; 754 var _url = null;
694 var _queryParams = new core.Map(); 755 var _queryParams = new core.Map();
695 var _uploadMedia = null; 756 var _uploadMedia = null;
696 var _uploadOptions = null; 757 var _uploadOptions = null;
697 var _downloadOptions = commons.DownloadOptions.Metadata; 758 var _downloadOptions = commons.DownloadOptions.Metadata;
698 var _body = null; 759 var _body = null;
699 760
700 if (request != null) { 761 if (request != null) {
701 _body = convert.JSON.encode((request).toJson()); 762 _body = convert.JSON.encode((request).toJson());
702 } 763 }
764 if (consistencyToken != null) {
765 _queryParams["consistencyToken"] = [consistencyToken];
766 }
703 if (language != null) { 767 if (language != null) {
704 _queryParams["language"] = [language]; 768 _queryParams["language"] = [language];
705 } 769 }
706 770
707 _url = 'events'; 771 _url = 'events';
708 772
709 var _response = _requester.request(_url, 773 var _response = _requester.request(_url,
710 "POST", 774 "POST",
711 body: _body, 775 body: _body,
712 queryParams: _queryParams, 776 queryParams: _queryParams,
(...skipping 12 matching lines...) Expand all
725 LeaderboardsResourceApi(commons.ApiRequester client) : 789 LeaderboardsResourceApi(commons.ApiRequester client) :
726 _requester = client; 790 _requester = client;
727 791
728 /** 792 /**
729 * Retrieves the metadata of the leaderboard with the given ID. 793 * Retrieves the metadata of the leaderboard with the given ID.
730 * 794 *
731 * Request parameters: 795 * Request parameters:
732 * 796 *
733 * [leaderboardId] - The ID of the leaderboard. 797 * [leaderboardId] - The ID of the leaderboard.
734 * 798 *
799 * [consistencyToken] - The last-seen mutation timestamp.
800 *
735 * [language] - The preferred language to use for strings returned by this 801 * [language] - The preferred language to use for strings returned by this
736 * method. 802 * method.
737 * 803 *
738 * Completes with a [Leaderboard]. 804 * Completes with a [Leaderboard].
739 * 805 *
740 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
741 * error. 807 * error.
742 * 808 *
743 * If the used [http.Client] completes with an error when making a REST call, 809 * If the used [http.Client] completes with an error when making a REST call,
744 * this method will complete with the same error. 810 * this method will complete with the same error.
745 */ 811 */
746 async.Future<Leaderboard> get(core.String leaderboardId, {core.String language }) { 812 async.Future<Leaderboard> get(core.String leaderboardId, {core.String consiste ncyToken, core.String language}) {
747 var _url = null; 813 var _url = null;
748 var _queryParams = new core.Map(); 814 var _queryParams = new core.Map();
749 var _uploadMedia = null; 815 var _uploadMedia = null;
750 var _uploadOptions = null; 816 var _uploadOptions = null;
751 var _downloadOptions = commons.DownloadOptions.Metadata; 817 var _downloadOptions = commons.DownloadOptions.Metadata;
752 var _body = null; 818 var _body = null;
753 819
754 if (leaderboardId == null) { 820 if (leaderboardId == null) {
755 throw new core.ArgumentError("Parameter leaderboardId is required."); 821 throw new core.ArgumentError("Parameter leaderboardId is required.");
756 } 822 }
823 if (consistencyToken != null) {
824 _queryParams["consistencyToken"] = [consistencyToken];
825 }
757 if (language != null) { 826 if (language != null) {
758 _queryParams["language"] = [language]; 827 _queryParams["language"] = [language];
759 } 828 }
760 829
761 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); 830 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId');
762 831
763 var _response = _requester.request(_url, 832 var _response = _requester.request(_url,
764 "GET", 833 "GET",
765 body: _body, 834 body: _body,
766 queryParams: _queryParams, 835 queryParams: _queryParams,
767 uploadOptions: _uploadOptions, 836 uploadOptions: _uploadOptions,
768 uploadMedia: _uploadMedia, 837 uploadMedia: _uploadMedia,
769 downloadOptions: _downloadOptions); 838 downloadOptions: _downloadOptions);
770 return _response.then((data) => new Leaderboard.fromJson(data)); 839 return _response.then((data) => new Leaderboard.fromJson(data));
771 } 840 }
772 841
773 /** 842 /**
774 * Lists all the leaderboard metadata for your application. 843 * Lists all the leaderboard metadata for your application.
775 * 844 *
776 * Request parameters: 845 * Request parameters:
777 * 846 *
847 * [consistencyToken] - The last-seen mutation timestamp.
848 *
778 * [language] - The preferred language to use for strings returned by this 849 * [language] - The preferred language to use for strings returned by this
779 * method. 850 * method.
780 * 851 *
781 * [maxResults] - The maximum number of leaderboards to return in the 852 * [maxResults] - The maximum number of leaderboards to return in the
782 * response. For any response, the actual number of leaderboards returned may 853 * response. For any response, the actual number of leaderboards returned may
783 * be less than the specified maxResults. 854 * be less than the specified maxResults.
784 * Value must be between "1" and "200". 855 * Value must be between "1" and "200".
785 * 856 *
786 * [pageToken] - The token returned by the previous request. 857 * [pageToken] - The token returned by the previous request.
787 * 858 *
788 * Completes with a [LeaderboardListResponse]. 859 * Completes with a [LeaderboardListResponse].
789 * 860 *
790 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 861 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
791 * error. 862 * error.
792 * 863 *
793 * If the used [http.Client] completes with an error when making a REST call, 864 * If the used [http.Client] completes with an error when making a REST call,
794 * this method will complete with the same error. 865 * this method will complete with the same error.
795 */ 866 */
796 async.Future<LeaderboardListResponse> list({core.String language, core.int max Results, core.String pageToken}) { 867 async.Future<LeaderboardListResponse> list({core.String consistencyToken, core .String language, core.int maxResults, core.String pageToken}) {
797 var _url = null; 868 var _url = null;
798 var _queryParams = new core.Map(); 869 var _queryParams = new core.Map();
799 var _uploadMedia = null; 870 var _uploadMedia = null;
800 var _uploadOptions = null; 871 var _uploadOptions = null;
801 var _downloadOptions = commons.DownloadOptions.Metadata; 872 var _downloadOptions = commons.DownloadOptions.Metadata;
802 var _body = null; 873 var _body = null;
803 874
875 if (consistencyToken != null) {
876 _queryParams["consistencyToken"] = [consistencyToken];
877 }
804 if (language != null) { 878 if (language != null) {
805 _queryParams["language"] = [language]; 879 _queryParams["language"] = [language];
806 } 880 }
807 if (maxResults != null) { 881 if (maxResults != null) {
808 _queryParams["maxResults"] = ["${maxResults}"]; 882 _queryParams["maxResults"] = ["${maxResults}"];
809 } 883 }
810 if (pageToken != null) { 884 if (pageToken != null) {
811 _queryParams["pageToken"] = [pageToken]; 885 _queryParams["pageToken"] = [pageToken];
812 } 886 }
813 887
(...skipping 16 matching lines...) Expand all
830 final commons.ApiRequester _requester; 904 final commons.ApiRequester _requester;
831 905
832 MetagameResourceApi(commons.ApiRequester client) : 906 MetagameResourceApi(commons.ApiRequester client) :
833 _requester = client; 907 _requester = client;
834 908
835 /** 909 /**
836 * Return the metagame configuration data for the calling application. 910 * Return the metagame configuration data for the calling application.
837 * 911 *
838 * Request parameters: 912 * Request parameters:
839 * 913 *
914 * [consistencyToken] - The last-seen mutation timestamp.
915 *
840 * Completes with a [MetagameConfig]. 916 * Completes with a [MetagameConfig].
841 * 917 *
842 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
843 * error. 919 * error.
844 * 920 *
845 * If the used [http.Client] completes with an error when making a REST call, 921 * If the used [http.Client] completes with an error when making a REST call,
846 * this method will complete with the same error. 922 * this method will complete with the same error.
847 */ 923 */
848 async.Future<MetagameConfig> getMetagameConfig() { 924 async.Future<MetagameConfig> getMetagameConfig({core.String consistencyToken}) {
849 var _url = null; 925 var _url = null;
850 var _queryParams = new core.Map(); 926 var _queryParams = new core.Map();
851 var _uploadMedia = null; 927 var _uploadMedia = null;
852 var _uploadOptions = null; 928 var _uploadOptions = null;
853 var _downloadOptions = commons.DownloadOptions.Metadata; 929 var _downloadOptions = commons.DownloadOptions.Metadata;
854 var _body = null; 930 var _body = null;
855 931
932 if (consistencyToken != null) {
933 _queryParams["consistencyToken"] = [consistencyToken];
934 }
856 935
857 _url = 'metagameConfig'; 936 _url = 'metagameConfig';
858 937
859 var _response = _requester.request(_url, 938 var _response = _requester.request(_url,
860 "GET", 939 "GET",
861 body: _body, 940 body: _body,
862 queryParams: _queryParams, 941 queryParams: _queryParams,
863 uploadOptions: _uploadOptions, 942 uploadOptions: _uploadOptions,
864 uploadMedia: _uploadMedia, 943 uploadMedia: _uploadMedia,
865 downloadOptions: _downloadOptions); 944 downloadOptions: _downloadOptions);
866 return _response.then((data) => new MetagameConfig.fromJson(data)); 945 return _response.then((data) => new MetagameConfig.fromJson(data));
867 } 946 }
868 947
869 /** 948 /**
870 * List play data aggregated per category for the player corresponding to 949 * List play data aggregated per category for the player corresponding to
871 * playerId. 950 * playerId.
872 * 951 *
873 * Request parameters: 952 * Request parameters:
874 * 953 *
875 * [playerId] - A player ID. A value of me may be used in place of the 954 * [playerId] - A player ID. A value of me may be used in place of the
876 * authenticated player's ID. 955 * authenticated player's ID.
877 * 956 *
878 * [collection] - The collection of categories for which data will be 957 * [collection] - The collection of categories for which data will be
879 * returned. 958 * returned.
880 * Possible string values are: 959 * Possible string values are:
881 * - "all" : Retrieve data for all categories. This is the default. 960 * - "all" : Retrieve data for all categories. This is the default.
882 * 961 *
962 * [consistencyToken] - The last-seen mutation timestamp.
963 *
883 * [language] - The preferred language to use for strings returned by this 964 * [language] - The preferred language to use for strings returned by this
884 * method. 965 * method.
885 * 966 *
886 * [maxResults] - The maximum number of category resources to return in the 967 * [maxResults] - The maximum number of category resources to return in the
887 * response, used for paging. For any response, the actual number of category 968 * response, used for paging. For any response, the actual number of category
888 * resources returned may be less than the specified maxResults. 969 * resources returned may be less than the specified maxResults.
889 * Value must be between "1" and "100". 970 * Value must be between "1" and "100".
890 * 971 *
891 * [pageToken] - The token returned by the previous request. 972 * [pageToken] - The token returned by the previous request.
892 * 973 *
893 * Completes with a [CategoryListResponse]. 974 * Completes with a [CategoryListResponse].
894 * 975 *
895 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 976 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
896 * error. 977 * error.
897 * 978 *
898 * If the used [http.Client] completes with an error when making a REST call, 979 * If the used [http.Client] completes with an error when making a REST call,
899 * this method will complete with the same error. 980 * this method will complete with the same error.
900 */ 981 */
901 async.Future<CategoryListResponse> listCategoriesByPlayer(core.String playerId , core.String collection, {core.String language, core.int maxResults, core.Strin g pageToken}) { 982 async.Future<CategoryListResponse> listCategoriesByPlayer(core.String playerId , core.String collection, {core.String consistencyToken, core.String language, c ore.int maxResults, core.String pageToken}) {
902 var _url = null; 983 var _url = null;
903 var _queryParams = new core.Map(); 984 var _queryParams = new core.Map();
904 var _uploadMedia = null; 985 var _uploadMedia = null;
905 var _uploadOptions = null; 986 var _uploadOptions = null;
906 var _downloadOptions = commons.DownloadOptions.Metadata; 987 var _downloadOptions = commons.DownloadOptions.Metadata;
907 var _body = null; 988 var _body = null;
908 989
909 if (playerId == null) { 990 if (playerId == null) {
910 throw new core.ArgumentError("Parameter playerId is required."); 991 throw new core.ArgumentError("Parameter playerId is required.");
911 } 992 }
912 if (collection == null) { 993 if (collection == null) {
913 throw new core.ArgumentError("Parameter collection is required."); 994 throw new core.ArgumentError("Parameter collection is required.");
914 } 995 }
996 if (consistencyToken != null) {
997 _queryParams["consistencyToken"] = [consistencyToken];
998 }
915 if (language != null) { 999 if (language != null) {
916 _queryParams["language"] = [language]; 1000 _queryParams["language"] = [language];
917 } 1001 }
918 if (maxResults != null) { 1002 if (maxResults != null) {
919 _queryParams["maxResults"] = ["${maxResults}"]; 1003 _queryParams["maxResults"] = ["${maxResults}"];
920 } 1004 }
921 if (pageToken != null) { 1005 if (pageToken != null) {
922 _queryParams["pageToken"] = [pageToken]; 1006 _queryParams["pageToken"] = [pageToken];
923 } 1007 }
924 1008
(...skipping 20 matching lines...) Expand all
945 1029
946 /** 1030 /**
947 * Retrieves the Player resource with the given ID. To retrieve the player for 1031 * Retrieves the Player resource with the given ID. To retrieve the player for
948 * the currently authenticated user, set playerId to me. 1032 * the currently authenticated user, set playerId to me.
949 * 1033 *
950 * Request parameters: 1034 * Request parameters:
951 * 1035 *
952 * [playerId] - A player ID. A value of me may be used in place of the 1036 * [playerId] - A player ID. A value of me may be used in place of the
953 * authenticated player's ID. 1037 * authenticated player's ID.
954 * 1038 *
1039 * [consistencyToken] - The last-seen mutation timestamp.
1040 *
955 * [language] - The preferred language to use for strings returned by this 1041 * [language] - The preferred language to use for strings returned by this
956 * method. 1042 * method.
957 * 1043 *
958 * Completes with a [Player]. 1044 * Completes with a [Player].
959 * 1045 *
960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1046 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
961 * error. 1047 * error.
962 * 1048 *
963 * If the used [http.Client] completes with an error when making a REST call, 1049 * If the used [http.Client] completes with an error when making a REST call,
964 * this method will complete with the same error. 1050 * this method will complete with the same error.
965 */ 1051 */
966 async.Future<Player> get(core.String playerId, {core.String language}) { 1052 async.Future<Player> get(core.String playerId, {core.String consistencyToken, core.String language}) {
967 var _url = null; 1053 var _url = null;
968 var _queryParams = new core.Map(); 1054 var _queryParams = new core.Map();
969 var _uploadMedia = null; 1055 var _uploadMedia = null;
970 var _uploadOptions = null; 1056 var _uploadOptions = null;
971 var _downloadOptions = commons.DownloadOptions.Metadata; 1057 var _downloadOptions = commons.DownloadOptions.Metadata;
972 var _body = null; 1058 var _body = null;
973 1059
974 if (playerId == null) { 1060 if (playerId == null) {
975 throw new core.ArgumentError("Parameter playerId is required."); 1061 throw new core.ArgumentError("Parameter playerId is required.");
976 } 1062 }
1063 if (consistencyToken != null) {
1064 _queryParams["consistencyToken"] = [consistencyToken];
1065 }
977 if (language != null) { 1066 if (language != null) {
978 _queryParams["language"] = [language]; 1067 _queryParams["language"] = [language];
979 } 1068 }
980 1069
981 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId'); 1070 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId');
982 1071
983 var _response = _requester.request(_url, 1072 var _response = _requester.request(_url,
984 "GET", 1073 "GET",
985 body: _body, 1074 body: _body,
986 queryParams: _queryParams, 1075 queryParams: _queryParams,
(...skipping 13 matching lines...) Expand all
1000 * - "connected" : Retrieve a list of players that are also playing this game 1089 * - "connected" : Retrieve a list of players that are also playing this game
1001 * in reverse chronological order. 1090 * in reverse chronological order.
1002 * - "playedWith" : (DEPRECATED: please use played_with!) Retrieve a list of 1091 * - "playedWith" : (DEPRECATED: please use played_with!) Retrieve a list of
1003 * players you have played a multiplayer game (realtime or turn-based) with 1092 * players you have played a multiplayer game (realtime or turn-based) with
1004 * recently. 1093 * recently.
1005 * - "played_with" : Retrieve a list of players you have played a multiplayer 1094 * - "played_with" : Retrieve a list of players you have played a multiplayer
1006 * game (realtime or turn-based) with recently. 1095 * game (realtime or turn-based) with recently.
1007 * - "visible" : Retrieve a list of players in the user's social graph that 1096 * - "visible" : Retrieve a list of players in the user's social graph that
1008 * are visible to this game. 1097 * are visible to this game.
1009 * 1098 *
1099 * [consistencyToken] - The last-seen mutation timestamp.
1100 *
1010 * [language] - The preferred language to use for strings returned by this 1101 * [language] - The preferred language to use for strings returned by this
1011 * method. 1102 * method.
1012 * 1103 *
1013 * [maxResults] - The maximum number of player resources to return in the 1104 * [maxResults] - The maximum number of player resources to return in the
1014 * response, used for paging. For any response, the actual number of player 1105 * response, used for paging. For any response, the actual number of player
1015 * resources returned may be less than the specified maxResults. 1106 * resources returned may be less than the specified maxResults.
1016 * Value must be between "1" and "50". 1107 * Value must be between "1" and "50".
1017 * 1108 *
1018 * [pageToken] - The token returned by the previous request. 1109 * [pageToken] - The token returned by the previous request.
1019 * 1110 *
1020 * Completes with a [PlayerListResponse]. 1111 * Completes with a [PlayerListResponse].
1021 * 1112 *
1022 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1113 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1023 * error. 1114 * error.
1024 * 1115 *
1025 * If the used [http.Client] completes with an error when making a REST call, 1116 * If the used [http.Client] completes with an error when making a REST call,
1026 * this method will complete with the same error. 1117 * this method will complete with the same error.
1027 */ 1118 */
1028 async.Future<PlayerListResponse> list(core.String collection, {core.String lan guage, core.int maxResults, core.String pageToken}) { 1119 async.Future<PlayerListResponse> list(core.String collection, {core.String con sistencyToken, core.String language, core.int maxResults, core.String pageToken} ) {
1029 var _url = null; 1120 var _url = null;
1030 var _queryParams = new core.Map(); 1121 var _queryParams = new core.Map();
1031 var _uploadMedia = null; 1122 var _uploadMedia = null;
1032 var _uploadOptions = null; 1123 var _uploadOptions = null;
1033 var _downloadOptions = commons.DownloadOptions.Metadata; 1124 var _downloadOptions = commons.DownloadOptions.Metadata;
1034 var _body = null; 1125 var _body = null;
1035 1126
1036 if (collection == null) { 1127 if (collection == null) {
1037 throw new core.ArgumentError("Parameter collection is required."); 1128 throw new core.ArgumentError("Parameter collection is required.");
1038 } 1129 }
1130 if (consistencyToken != null) {
1131 _queryParams["consistencyToken"] = [consistencyToken];
1132 }
1039 if (language != null) { 1133 if (language != null) {
1040 _queryParams["language"] = [language]; 1134 _queryParams["language"] = [language];
1041 } 1135 }
1042 if (maxResults != null) { 1136 if (maxResults != null) {
1043 _queryParams["maxResults"] = ["${maxResults}"]; 1137 _queryParams["maxResults"] = ["${maxResults}"];
1044 } 1138 }
1045 if (pageToken != null) { 1139 if (pageToken != null) {
1046 _queryParams["pageToken"] = [pageToken]; 1140 _queryParams["pageToken"] = [pageToken];
1047 } 1141 }
1048 1142
(...skipping 19 matching lines...) Expand all
1068 _requester = client; 1162 _requester = client;
1069 1163
1070 /** 1164 /**
1071 * Removes a push token for the current user and application. Removing a 1165 * Removes a push token for the current user and application. Removing a
1072 * non-existent push token will report success. 1166 * non-existent push token will report success.
1073 * 1167 *
1074 * [request] - The metadata request object. 1168 * [request] - The metadata request object.
1075 * 1169 *
1076 * Request parameters: 1170 * Request parameters:
1077 * 1171 *
1172 * [consistencyToken] - The last-seen mutation timestamp.
1173 *
1078 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1079 * error. 1175 * error.
1080 * 1176 *
1081 * If the used [http.Client] completes with an error when making a REST call, 1177 * If the used [http.Client] completes with an error when making a REST call,
1082 * this method will complete with the same error. 1178 * this method will complete with the same error.
1083 */ 1179 */
1084 async.Future remove(PushTokenId request) { 1180 async.Future remove(PushTokenId request, {core.String consistencyToken}) {
1085 var _url = null; 1181 var _url = null;
1086 var _queryParams = new core.Map(); 1182 var _queryParams = new core.Map();
1087 var _uploadMedia = null; 1183 var _uploadMedia = null;
1088 var _uploadOptions = null; 1184 var _uploadOptions = null;
1089 var _downloadOptions = commons.DownloadOptions.Metadata; 1185 var _downloadOptions = commons.DownloadOptions.Metadata;
1090 var _body = null; 1186 var _body = null;
1091 1187
1092 if (request != null) { 1188 if (request != null) {
1093 _body = convert.JSON.encode((request).toJson()); 1189 _body = convert.JSON.encode((request).toJson());
1094 } 1190 }
1191 if (consistencyToken != null) {
1192 _queryParams["consistencyToken"] = [consistencyToken];
1193 }
1095 1194
1096 _downloadOptions = null; 1195 _downloadOptions = null;
1097 1196
1098 _url = 'pushtokens/remove'; 1197 _url = 'pushtokens/remove';
1099 1198
1100 var _response = _requester.request(_url, 1199 var _response = _requester.request(_url,
1101 "POST", 1200 "POST",
1102 body: _body, 1201 body: _body,
1103 queryParams: _queryParams, 1202 queryParams: _queryParams,
1104 uploadOptions: _uploadOptions, 1203 uploadOptions: _uploadOptions,
1105 uploadMedia: _uploadMedia, 1204 uploadMedia: _uploadMedia,
1106 downloadOptions: _downloadOptions); 1205 downloadOptions: _downloadOptions);
1107 return _response.then((data) => null); 1206 return _response.then((data) => null);
1108 } 1207 }
1109 1208
1110 /** 1209 /**
1111 * Registers a push token for the current user and application. 1210 * Registers a push token for the current user and application.
1112 * 1211 *
1113 * [request] - The metadata request object. 1212 * [request] - The metadata request object.
1114 * 1213 *
1115 * Request parameters: 1214 * Request parameters:
1116 * 1215 *
1216 * [consistencyToken] - The last-seen mutation timestamp.
1217 *
1117 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1218 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1118 * error. 1219 * error.
1119 * 1220 *
1120 * If the used [http.Client] completes with an error when making a REST call, 1221 * If the used [http.Client] completes with an error when making a REST call,
1121 * this method will complete with the same error. 1222 * this method will complete with the same error.
1122 */ 1223 */
1123 async.Future update(PushToken request) { 1224 async.Future update(PushToken request, {core.String consistencyToken}) {
1124 var _url = null; 1225 var _url = null;
1125 var _queryParams = new core.Map(); 1226 var _queryParams = new core.Map();
1126 var _uploadMedia = null; 1227 var _uploadMedia = null;
1127 var _uploadOptions = null; 1228 var _uploadOptions = null;
1128 var _downloadOptions = commons.DownloadOptions.Metadata; 1229 var _downloadOptions = commons.DownloadOptions.Metadata;
1129 var _body = null; 1230 var _body = null;
1130 1231
1131 if (request != null) { 1232 if (request != null) {
1132 _body = convert.JSON.encode((request).toJson()); 1233 _body = convert.JSON.encode((request).toJson());
1133 } 1234 }
1235 if (consistencyToken != null) {
1236 _queryParams["consistencyToken"] = [consistencyToken];
1237 }
1134 1238
1135 _downloadOptions = null; 1239 _downloadOptions = null;
1136 1240
1137 _url = 'pushtokens'; 1241 _url = 'pushtokens';
1138 1242
1139 var _response = _requester.request(_url, 1243 var _response = _requester.request(_url,
1140 "PUT", 1244 "PUT",
1141 body: _body, 1245 body: _body,
1142 queryParams: _queryParams, 1246 queryParams: _queryParams,
1143 uploadOptions: _uploadOptions, 1247 uploadOptions: _uploadOptions,
(...skipping 18 matching lines...) Expand all
1162 * 1266 *
1163 * Request parameters: 1267 * Request parameters:
1164 * 1268 *
1165 * [questId] - The ID of the quest. 1269 * [questId] - The ID of the quest.
1166 * 1270 *
1167 * [milestoneId] - The ID of the milestone. 1271 * [milestoneId] - The ID of the milestone.
1168 * 1272 *
1169 * [requestId] - A numeric ID to ensure that the request is handled correctly 1273 * [requestId] - A numeric ID to ensure that the request is handled correctly
1170 * across retries. Your client application must generate this ID randomly. 1274 * across retries. Your client application must generate this ID randomly.
1171 * 1275 *
1276 * [consistencyToken] - The last-seen mutation timestamp.
1277 *
1172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1173 * error. 1279 * error.
1174 * 1280 *
1175 * If the used [http.Client] completes with an error when making a REST call, 1281 * If the used [http.Client] completes with an error when making a REST call,
1176 * this method will complete with the same error. 1282 * this method will complete with the same error.
1177 */ 1283 */
1178 async.Future claim(core.String questId, core.String milestoneId, core.String r equestId) { 1284 async.Future claim(core.String questId, core.String milestoneId, core.String r equestId, {core.String consistencyToken}) {
1179 var _url = null; 1285 var _url = null;
1180 var _queryParams = new core.Map(); 1286 var _queryParams = new core.Map();
1181 var _uploadMedia = null; 1287 var _uploadMedia = null;
1182 var _uploadOptions = null; 1288 var _uploadOptions = null;
1183 var _downloadOptions = commons.DownloadOptions.Metadata; 1289 var _downloadOptions = commons.DownloadOptions.Metadata;
1184 var _body = null; 1290 var _body = null;
1185 1291
1186 if (questId == null) { 1292 if (questId == null) {
1187 throw new core.ArgumentError("Parameter questId is required."); 1293 throw new core.ArgumentError("Parameter questId is required.");
1188 } 1294 }
1189 if (milestoneId == null) { 1295 if (milestoneId == null) {
1190 throw new core.ArgumentError("Parameter milestoneId is required."); 1296 throw new core.ArgumentError("Parameter milestoneId is required.");
1191 } 1297 }
1192 if (requestId == null) { 1298 if (requestId == null) {
1193 throw new core.ArgumentError("Parameter requestId is required."); 1299 throw new core.ArgumentError("Parameter requestId is required.");
1194 } 1300 }
1195 _queryParams["requestId"] = [requestId]; 1301 _queryParams["requestId"] = [requestId];
1302 if (consistencyToken != null) {
1303 _queryParams["consistencyToken"] = [consistencyToken];
1304 }
1196 1305
1197 _downloadOptions = null; 1306 _downloadOptions = null;
1198 1307
1199 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/milestones/ ' + commons.Escaper.ecapeVariable('$milestoneId') + '/claim'; 1308 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/milestones/ ' + commons.Escaper.ecapeVariable('$milestoneId') + '/claim';
1200 1309
1201 var _response = _requester.request(_url, 1310 var _response = _requester.request(_url,
1202 "PUT", 1311 "PUT",
1203 body: _body, 1312 body: _body,
1204 queryParams: _queryParams, 1313 queryParams: _queryParams,
1205 uploadOptions: _uploadOptions, 1314 uploadOptions: _uploadOptions,
(...skipping 11 matching lines...) Expand all
1217 QuestsResourceApi(commons.ApiRequester client) : 1326 QuestsResourceApi(commons.ApiRequester client) :
1218 _requester = client; 1327 _requester = client;
1219 1328
1220 /** 1329 /**
1221 * Indicates that the currently authorized user will participate in the quest. 1330 * Indicates that the currently authorized user will participate in the quest.
1222 * 1331 *
1223 * Request parameters: 1332 * Request parameters:
1224 * 1333 *
1225 * [questId] - The ID of the quest. 1334 * [questId] - The ID of the quest.
1226 * 1335 *
1336 * [consistencyToken] - The last-seen mutation timestamp.
1337 *
1227 * [language] - The preferred language to use for strings returned by this 1338 * [language] - The preferred language to use for strings returned by this
1228 * method. 1339 * method.
1229 * 1340 *
1230 * Completes with a [Quest]. 1341 * Completes with a [Quest].
1231 * 1342 *
1232 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1233 * error. 1344 * error.
1234 * 1345 *
1235 * If the used [http.Client] completes with an error when making a REST call, 1346 * If the used [http.Client] completes with an error when making a REST call,
1236 * this method will complete with the same error. 1347 * this method will complete with the same error.
1237 */ 1348 */
1238 async.Future<Quest> accept(core.String questId, {core.String language}) { 1349 async.Future<Quest> accept(core.String questId, {core.String consistencyToken, core.String language}) {
1239 var _url = null; 1350 var _url = null;
1240 var _queryParams = new core.Map(); 1351 var _queryParams = new core.Map();
1241 var _uploadMedia = null; 1352 var _uploadMedia = null;
1242 var _uploadOptions = null; 1353 var _uploadOptions = null;
1243 var _downloadOptions = commons.DownloadOptions.Metadata; 1354 var _downloadOptions = commons.DownloadOptions.Metadata;
1244 var _body = null; 1355 var _body = null;
1245 1356
1246 if (questId == null) { 1357 if (questId == null) {
1247 throw new core.ArgumentError("Parameter questId is required."); 1358 throw new core.ArgumentError("Parameter questId is required.");
1248 } 1359 }
1360 if (consistencyToken != null) {
1361 _queryParams["consistencyToken"] = [consistencyToken];
1362 }
1249 if (language != null) { 1363 if (language != null) {
1250 _queryParams["language"] = [language]; 1364 _queryParams["language"] = [language];
1251 } 1365 }
1252 1366
1253 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/accept'; 1367 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/accept';
1254 1368
1255 var _response = _requester.request(_url, 1369 var _response = _requester.request(_url,
1256 "POST", 1370 "POST",
1257 body: _body, 1371 body: _body,
1258 queryParams: _queryParams, 1372 queryParams: _queryParams,
1259 uploadOptions: _uploadOptions, 1373 uploadOptions: _uploadOptions,
1260 uploadMedia: _uploadMedia, 1374 uploadMedia: _uploadMedia,
1261 downloadOptions: _downloadOptions); 1375 downloadOptions: _downloadOptions);
1262 return _response.then((data) => new Quest.fromJson(data)); 1376 return _response.then((data) => new Quest.fromJson(data));
1263 } 1377 }
1264 1378
1265 /** 1379 /**
1266 * Get a list of quests for your application and the currently authenticated 1380 * Get a list of quests for your application and the currently authenticated
1267 * player. 1381 * player.
1268 * 1382 *
1269 * Request parameters: 1383 * Request parameters:
1270 * 1384 *
1271 * [playerId] - A player ID. A value of me may be used in place of the 1385 * [playerId] - A player ID. A value of me may be used in place of the
1272 * authenticated player's ID. 1386 * authenticated player's ID.
1273 * 1387 *
1388 * [consistencyToken] - The last-seen mutation timestamp.
1389 *
1274 * [language] - The preferred language to use for strings returned by this 1390 * [language] - The preferred language to use for strings returned by this
1275 * method. 1391 * method.
1276 * 1392 *
1277 * [maxResults] - The maximum number of quest resources to return in the 1393 * [maxResults] - The maximum number of quest resources to return in the
1278 * response, used for paging. For any response, the actual number of quest 1394 * response, used for paging. For any response, the actual number of quest
1279 * resources returned may be less than the specified maxResults. Acceptable 1395 * resources returned may be less than the specified maxResults. Acceptable
1280 * values are 1 to 50, inclusive. (Default: 50). 1396 * values are 1 to 50, inclusive. (Default: 50).
1281 * Value must be between "1" and "50". 1397 * Value must be between "1" and "50".
1282 * 1398 *
1283 * [pageToken] - The token returned by the previous request. 1399 * [pageToken] - The token returned by the previous request.
1284 * 1400 *
1285 * Completes with a [QuestListResponse]. 1401 * Completes with a [QuestListResponse].
1286 * 1402 *
1287 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1403 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1288 * error. 1404 * error.
1289 * 1405 *
1290 * If the used [http.Client] completes with an error when making a REST call, 1406 * If the used [http.Client] completes with an error when making a REST call,
1291 * this method will complete with the same error. 1407 * this method will complete with the same error.
1292 */ 1408 */
1293 async.Future<QuestListResponse> list(core.String playerId, {core.String langua ge, core.int maxResults, core.String pageToken}) { 1409 async.Future<QuestListResponse> list(core.String playerId, {core.String consis tencyToken, core.String language, core.int maxResults, core.String pageToken}) {
1294 var _url = null; 1410 var _url = null;
1295 var _queryParams = new core.Map(); 1411 var _queryParams = new core.Map();
1296 var _uploadMedia = null; 1412 var _uploadMedia = null;
1297 var _uploadOptions = null; 1413 var _uploadOptions = null;
1298 var _downloadOptions = commons.DownloadOptions.Metadata; 1414 var _downloadOptions = commons.DownloadOptions.Metadata;
1299 var _body = null; 1415 var _body = null;
1300 1416
1301 if (playerId == null) { 1417 if (playerId == null) {
1302 throw new core.ArgumentError("Parameter playerId is required."); 1418 throw new core.ArgumentError("Parameter playerId is required.");
1303 } 1419 }
1420 if (consistencyToken != null) {
1421 _queryParams["consistencyToken"] = [consistencyToken];
1422 }
1304 if (language != null) { 1423 if (language != null) {
1305 _queryParams["language"] = [language]; 1424 _queryParams["language"] = [language];
1306 } 1425 }
1307 if (maxResults != null) { 1426 if (maxResults != null) {
1308 _queryParams["maxResults"] = ["${maxResults}"]; 1427 _queryParams["maxResults"] = ["${maxResults}"];
1309 } 1428 }
1310 if (pageToken != null) { 1429 if (pageToken != null) {
1311 _queryParams["pageToken"] = [pageToken]; 1430 _queryParams["pageToken"] = [pageToken];
1312 } 1431 }
1313 1432
(...skipping 24 matching lines...) Expand all
1338 * Request parameters: 1457 * Request parameters:
1339 * 1458 *
1340 * [clientRevision] - The revision of the client SDK used by your application. 1459 * [clientRevision] - The revision of the client SDK used by your application.
1341 * Format: 1460 * Format:
1342 * [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: 1461 * [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:
1343 * 1462 *
1344 * - "ANDROID" - Client is running the Android SDK. 1463 * - "ANDROID" - Client is running the Android SDK.
1345 * - "IOS" - Client is running the iOS SDK. 1464 * - "IOS" - Client is running the iOS SDK.
1346 * - "WEB_APP" - Client is running as a Web App. 1465 * - "WEB_APP" - Client is running as a Web App.
1347 * 1466 *
1467 * [consistencyToken] - The last-seen mutation timestamp.
1468 *
1348 * Completes with a [RevisionCheckResponse]. 1469 * Completes with a [RevisionCheckResponse].
1349 * 1470 *
1350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1471 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1351 * error. 1472 * error.
1352 * 1473 *
1353 * If the used [http.Client] completes with an error when making a REST call, 1474 * If the used [http.Client] completes with an error when making a REST call,
1354 * this method will complete with the same error. 1475 * this method will complete with the same error.
1355 */ 1476 */
1356 async.Future<RevisionCheckResponse> check(core.String clientRevision) { 1477 async.Future<RevisionCheckResponse> check(core.String clientRevision, {core.St ring consistencyToken}) {
1357 var _url = null; 1478 var _url = null;
1358 var _queryParams = new core.Map(); 1479 var _queryParams = new core.Map();
1359 var _uploadMedia = null; 1480 var _uploadMedia = null;
1360 var _uploadOptions = null; 1481 var _uploadOptions = null;
1361 var _downloadOptions = commons.DownloadOptions.Metadata; 1482 var _downloadOptions = commons.DownloadOptions.Metadata;
1362 var _body = null; 1483 var _body = null;
1363 1484
1364 if (clientRevision == null) { 1485 if (clientRevision == null) {
1365 throw new core.ArgumentError("Parameter clientRevision is required."); 1486 throw new core.ArgumentError("Parameter clientRevision is required.");
1366 } 1487 }
1367 _queryParams["clientRevision"] = [clientRevision]; 1488 _queryParams["clientRevision"] = [clientRevision];
1489 if (consistencyToken != null) {
1490 _queryParams["consistencyToken"] = [consistencyToken];
1491 }
1368 1492
1369 _url = 'revisions/check'; 1493 _url = 'revisions/check';
1370 1494
1371 var _response = _requester.request(_url, 1495 var _response = _requester.request(_url,
1372 "GET", 1496 "GET",
1373 body: _body, 1497 body: _body,
1374 queryParams: _queryParams, 1498 queryParams: _queryParams,
1375 uploadOptions: _uploadOptions, 1499 uploadOptions: _uploadOptions,
1376 uploadMedia: _uploadMedia, 1500 uploadMedia: _uploadMedia,
1377 downloadOptions: _downloadOptions); 1501 downloadOptions: _downloadOptions);
(...skipping 10 matching lines...) Expand all
1388 _requester = client; 1512 _requester = client;
1389 1513
1390 /** 1514 /**
1391 * Create a room. For internal use by the Games SDK only. Calling this method 1515 * Create a room. For internal use by the Games SDK only. Calling this method
1392 * directly is unsupported. 1516 * directly is unsupported.
1393 * 1517 *
1394 * [request] - The metadata request object. 1518 * [request] - The metadata request object.
1395 * 1519 *
1396 * Request parameters: 1520 * Request parameters:
1397 * 1521 *
1522 * [consistencyToken] - The last-seen mutation timestamp.
1523 *
1398 * [language] - The preferred language to use for strings returned by this 1524 * [language] - The preferred language to use for strings returned by this
1399 * method. 1525 * method.
1400 * 1526 *
1401 * Completes with a [Room]. 1527 * Completes with a [Room].
1402 * 1528 *
1403 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1529 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1404 * error. 1530 * error.
1405 * 1531 *
1406 * If the used [http.Client] completes with an error when making a REST call, 1532 * If the used [http.Client] completes with an error when making a REST call,
1407 * this method will complete with the same error. 1533 * this method will complete with the same error.
1408 */ 1534 */
1409 async.Future<Room> create(RoomCreateRequest request, {core.String language}) { 1535 async.Future<Room> create(RoomCreateRequest request, {core.String consistencyT oken, core.String language}) {
1410 var _url = null; 1536 var _url = null;
1411 var _queryParams = new core.Map(); 1537 var _queryParams = new core.Map();
1412 var _uploadMedia = null; 1538 var _uploadMedia = null;
1413 var _uploadOptions = null; 1539 var _uploadOptions = null;
1414 var _downloadOptions = commons.DownloadOptions.Metadata; 1540 var _downloadOptions = commons.DownloadOptions.Metadata;
1415 var _body = null; 1541 var _body = null;
1416 1542
1417 if (request != null) { 1543 if (request != null) {
1418 _body = convert.JSON.encode((request).toJson()); 1544 _body = convert.JSON.encode((request).toJson());
1419 } 1545 }
1546 if (consistencyToken != null) {
1547 _queryParams["consistencyToken"] = [consistencyToken];
1548 }
1420 if (language != null) { 1549 if (language != null) {
1421 _queryParams["language"] = [language]; 1550 _queryParams["language"] = [language];
1422 } 1551 }
1423 1552
1424 _url = 'rooms/create'; 1553 _url = 'rooms/create';
1425 1554
1426 var _response = _requester.request(_url, 1555 var _response = _requester.request(_url,
1427 "POST", 1556 "POST",
1428 body: _body, 1557 body: _body,
1429 queryParams: _queryParams, 1558 queryParams: _queryParams,
1430 uploadOptions: _uploadOptions, 1559 uploadOptions: _uploadOptions,
1431 uploadMedia: _uploadMedia, 1560 uploadMedia: _uploadMedia,
1432 downloadOptions: _downloadOptions); 1561 downloadOptions: _downloadOptions);
1433 return _response.then((data) => new Room.fromJson(data)); 1562 return _response.then((data) => new Room.fromJson(data));
1434 } 1563 }
1435 1564
1436 /** 1565 /**
1437 * Decline an invitation to join a room. For internal use by the Games SDK 1566 * Decline an invitation to join a room. For internal use by the Games SDK
1438 * only. Calling this method directly is unsupported. 1567 * only. Calling this method directly is unsupported.
1439 * 1568 *
1440 * Request parameters: 1569 * Request parameters:
1441 * 1570 *
1442 * [roomId] - The ID of the room. 1571 * [roomId] - The ID of the room.
1443 * 1572 *
1573 * [consistencyToken] - The last-seen mutation timestamp.
1574 *
1444 * [language] - The preferred language to use for strings returned by this 1575 * [language] - The preferred language to use for strings returned by this
1445 * method. 1576 * method.
1446 * 1577 *
1447 * Completes with a [Room]. 1578 * Completes with a [Room].
1448 * 1579 *
1449 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1580 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1450 * error. 1581 * error.
1451 * 1582 *
1452 * If the used [http.Client] completes with an error when making a REST call, 1583 * If the used [http.Client] completes with an error when making a REST call,
1453 * this method will complete with the same error. 1584 * this method will complete with the same error.
1454 */ 1585 */
1455 async.Future<Room> decline(core.String roomId, {core.String language}) { 1586 async.Future<Room> decline(core.String roomId, {core.String consistencyToken, core.String language}) {
1456 var _url = null; 1587 var _url = null;
1457 var _queryParams = new core.Map(); 1588 var _queryParams = new core.Map();
1458 var _uploadMedia = null; 1589 var _uploadMedia = null;
1459 var _uploadOptions = null; 1590 var _uploadOptions = null;
1460 var _downloadOptions = commons.DownloadOptions.Metadata; 1591 var _downloadOptions = commons.DownloadOptions.Metadata;
1461 var _body = null; 1592 var _body = null;
1462 1593
1463 if (roomId == null) { 1594 if (roomId == null) {
1464 throw new core.ArgumentError("Parameter roomId is required."); 1595 throw new core.ArgumentError("Parameter roomId is required.");
1465 } 1596 }
1597 if (consistencyToken != null) {
1598 _queryParams["consistencyToken"] = [consistencyToken];
1599 }
1466 if (language != null) { 1600 if (language != null) {
1467 _queryParams["language"] = [language]; 1601 _queryParams["language"] = [language];
1468 } 1602 }
1469 1603
1470 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/decline'; 1604 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/decline';
1471 1605
1472 var _response = _requester.request(_url, 1606 var _response = _requester.request(_url,
1473 "POST", 1607 "POST",
1474 body: _body, 1608 body: _body,
1475 queryParams: _queryParams, 1609 queryParams: _queryParams,
1476 uploadOptions: _uploadOptions, 1610 uploadOptions: _uploadOptions,
1477 uploadMedia: _uploadMedia, 1611 uploadMedia: _uploadMedia,
1478 downloadOptions: _downloadOptions); 1612 downloadOptions: _downloadOptions);
1479 return _response.then((data) => new Room.fromJson(data)); 1613 return _response.then((data) => new Room.fromJson(data));
1480 } 1614 }
1481 1615
1482 /** 1616 /**
1483 * Dismiss an invitation to join a room. For internal use by the Games SDK 1617 * Dismiss an invitation to join a room. For internal use by the Games SDK
1484 * only. Calling this method directly is unsupported. 1618 * only. Calling this method directly is unsupported.
1485 * 1619 *
1486 * Request parameters: 1620 * Request parameters:
1487 * 1621 *
1488 * [roomId] - The ID of the room. 1622 * [roomId] - The ID of the room.
1489 * 1623 *
1624 * [consistencyToken] - The last-seen mutation timestamp.
1625 *
1490 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1626 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1491 * error. 1627 * error.
1492 * 1628 *
1493 * If the used [http.Client] completes with an error when making a REST call, 1629 * If the used [http.Client] completes with an error when making a REST call,
1494 * this method will complete with the same error. 1630 * this method will complete with the same error.
1495 */ 1631 */
1496 async.Future dismiss(core.String roomId) { 1632 async.Future dismiss(core.String roomId, {core.String consistencyToken}) {
1497 var _url = null; 1633 var _url = null;
1498 var _queryParams = new core.Map(); 1634 var _queryParams = new core.Map();
1499 var _uploadMedia = null; 1635 var _uploadMedia = null;
1500 var _uploadOptions = null; 1636 var _uploadOptions = null;
1501 var _downloadOptions = commons.DownloadOptions.Metadata; 1637 var _downloadOptions = commons.DownloadOptions.Metadata;
1502 var _body = null; 1638 var _body = null;
1503 1639
1504 if (roomId == null) { 1640 if (roomId == null) {
1505 throw new core.ArgumentError("Parameter roomId is required."); 1641 throw new core.ArgumentError("Parameter roomId is required.");
1506 } 1642 }
1643 if (consistencyToken != null) {
1644 _queryParams["consistencyToken"] = [consistencyToken];
1645 }
1507 1646
1508 _downloadOptions = null; 1647 _downloadOptions = null;
1509 1648
1510 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/dismiss'; 1649 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/dismiss';
1511 1650
1512 var _response = _requester.request(_url, 1651 var _response = _requester.request(_url,
1513 "POST", 1652 "POST",
1514 body: _body, 1653 body: _body,
1515 queryParams: _queryParams, 1654 queryParams: _queryParams,
1516 uploadOptions: _uploadOptions, 1655 uploadOptions: _uploadOptions,
1517 uploadMedia: _uploadMedia, 1656 uploadMedia: _uploadMedia,
1518 downloadOptions: _downloadOptions); 1657 downloadOptions: _downloadOptions);
1519 return _response.then((data) => null); 1658 return _response.then((data) => null);
1520 } 1659 }
1521 1660
1522 /** 1661 /**
1523 * Get the data for a room. 1662 * Get the data for a room.
1524 * 1663 *
1525 * Request parameters: 1664 * Request parameters:
1526 * 1665 *
1527 * [roomId] - The ID of the room. 1666 * [roomId] - The ID of the room.
1528 * 1667 *
1668 * [consistencyToken] - The last-seen mutation timestamp.
1669 *
1529 * [language] - The preferred language to use for strings returned by this 1670 * [language] - The preferred language to use for strings returned by this
1530 * method. 1671 * method.
1531 * 1672 *
1532 * Completes with a [Room]. 1673 * Completes with a [Room].
1533 * 1674 *
1534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1675 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1535 * error. 1676 * error.
1536 * 1677 *
1537 * If the used [http.Client] completes with an error when making a REST call, 1678 * If the used [http.Client] completes with an error when making a REST call,
1538 * this method will complete with the same error. 1679 * this method will complete with the same error.
1539 */ 1680 */
1540 async.Future<Room> get(core.String roomId, {core.String language}) { 1681 async.Future<Room> get(core.String roomId, {core.String consistencyToken, core .String language}) {
1541 var _url = null; 1682 var _url = null;
1542 var _queryParams = new core.Map(); 1683 var _queryParams = new core.Map();
1543 var _uploadMedia = null; 1684 var _uploadMedia = null;
1544 var _uploadOptions = null; 1685 var _uploadOptions = null;
1545 var _downloadOptions = commons.DownloadOptions.Metadata; 1686 var _downloadOptions = commons.DownloadOptions.Metadata;
1546 var _body = null; 1687 var _body = null;
1547 1688
1548 if (roomId == null) { 1689 if (roomId == null) {
1549 throw new core.ArgumentError("Parameter roomId is required."); 1690 throw new core.ArgumentError("Parameter roomId is required.");
1550 } 1691 }
1692 if (consistencyToken != null) {
1693 _queryParams["consistencyToken"] = [consistencyToken];
1694 }
1551 if (language != null) { 1695 if (language != null) {
1552 _queryParams["language"] = [language]; 1696 _queryParams["language"] = [language];
1553 } 1697 }
1554 1698
1555 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId'); 1699 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId');
1556 1700
1557 var _response = _requester.request(_url, 1701 var _response = _requester.request(_url,
1558 "GET", 1702 "GET",
1559 body: _body, 1703 body: _body,
1560 queryParams: _queryParams, 1704 queryParams: _queryParams,
1561 uploadOptions: _uploadOptions, 1705 uploadOptions: _uploadOptions,
1562 uploadMedia: _uploadMedia, 1706 uploadMedia: _uploadMedia,
1563 downloadOptions: _downloadOptions); 1707 downloadOptions: _downloadOptions);
1564 return _response.then((data) => new Room.fromJson(data)); 1708 return _response.then((data) => new Room.fromJson(data));
1565 } 1709 }
1566 1710
1567 /** 1711 /**
1568 * Join a room. For internal use by the Games SDK only. Calling this method 1712 * Join a room. For internal use by the Games SDK only. Calling this method
1569 * directly is unsupported. 1713 * directly is unsupported.
1570 * 1714 *
1571 * [request] - The metadata request object. 1715 * [request] - The metadata request object.
1572 * 1716 *
1573 * Request parameters: 1717 * Request parameters:
1574 * 1718 *
1575 * [roomId] - The ID of the room. 1719 * [roomId] - The ID of the room.
1576 * 1720 *
1721 * [consistencyToken] - The last-seen mutation timestamp.
1722 *
1577 * [language] - The preferred language to use for strings returned by this 1723 * [language] - The preferred language to use for strings returned by this
1578 * method. 1724 * method.
1579 * 1725 *
1580 * Completes with a [Room]. 1726 * Completes with a [Room].
1581 * 1727 *
1582 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1728 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1583 * error. 1729 * error.
1584 * 1730 *
1585 * If the used [http.Client] completes with an error when making a REST call, 1731 * If the used [http.Client] completes with an error when making a REST call,
1586 * this method will complete with the same error. 1732 * this method will complete with the same error.
1587 */ 1733 */
1588 async.Future<Room> join(RoomJoinRequest request, core.String roomId, {core.Str ing language}) { 1734 async.Future<Room> join(RoomJoinRequest request, core.String roomId, {core.Str ing consistencyToken, core.String language}) {
1589 var _url = null; 1735 var _url = null;
1590 var _queryParams = new core.Map(); 1736 var _queryParams = new core.Map();
1591 var _uploadMedia = null; 1737 var _uploadMedia = null;
1592 var _uploadOptions = null; 1738 var _uploadOptions = null;
1593 var _downloadOptions = commons.DownloadOptions.Metadata; 1739 var _downloadOptions = commons.DownloadOptions.Metadata;
1594 var _body = null; 1740 var _body = null;
1595 1741
1596 if (request != null) { 1742 if (request != null) {
1597 _body = convert.JSON.encode((request).toJson()); 1743 _body = convert.JSON.encode((request).toJson());
1598 } 1744 }
1599 if (roomId == null) { 1745 if (roomId == null) {
1600 throw new core.ArgumentError("Parameter roomId is required."); 1746 throw new core.ArgumentError("Parameter roomId is required.");
1601 } 1747 }
1748 if (consistencyToken != null) {
1749 _queryParams["consistencyToken"] = [consistencyToken];
1750 }
1602 if (language != null) { 1751 if (language != null) {
1603 _queryParams["language"] = [language]; 1752 _queryParams["language"] = [language];
1604 } 1753 }
1605 1754
1606 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/join'; 1755 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/join';
1607 1756
1608 var _response = _requester.request(_url, 1757 var _response = _requester.request(_url,
1609 "POST", 1758 "POST",
1610 body: _body, 1759 body: _body,
1611 queryParams: _queryParams, 1760 queryParams: _queryParams,
1612 uploadOptions: _uploadOptions, 1761 uploadOptions: _uploadOptions,
1613 uploadMedia: _uploadMedia, 1762 uploadMedia: _uploadMedia,
1614 downloadOptions: _downloadOptions); 1763 downloadOptions: _downloadOptions);
1615 return _response.then((data) => new Room.fromJson(data)); 1764 return _response.then((data) => new Room.fromJson(data));
1616 } 1765 }
1617 1766
1618 /** 1767 /**
1619 * Leave a room. For internal use by the Games SDK only. Calling this method 1768 * Leave a room. For internal use by the Games SDK only. Calling this method
1620 * directly is unsupported. 1769 * directly is unsupported.
1621 * 1770 *
1622 * [request] - The metadata request object. 1771 * [request] - The metadata request object.
1623 * 1772 *
1624 * Request parameters: 1773 * Request parameters:
1625 * 1774 *
1626 * [roomId] - The ID of the room. 1775 * [roomId] - The ID of the room.
1627 * 1776 *
1777 * [consistencyToken] - The last-seen mutation timestamp.
1778 *
1628 * [language] - The preferred language to use for strings returned by this 1779 * [language] - The preferred language to use for strings returned by this
1629 * method. 1780 * method.
1630 * 1781 *
1631 * Completes with a [Room]. 1782 * Completes with a [Room].
1632 * 1783 *
1633 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1784 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1634 * error. 1785 * error.
1635 * 1786 *
1636 * If the used [http.Client] completes with an error when making a REST call, 1787 * If the used [http.Client] completes with an error when making a REST call,
1637 * this method will complete with the same error. 1788 * this method will complete with the same error.
1638 */ 1789 */
1639 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, {core.S tring language}) { 1790 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, {core.S tring consistencyToken, core.String language}) {
1640 var _url = null; 1791 var _url = null;
1641 var _queryParams = new core.Map(); 1792 var _queryParams = new core.Map();
1642 var _uploadMedia = null; 1793 var _uploadMedia = null;
1643 var _uploadOptions = null; 1794 var _uploadOptions = null;
1644 var _downloadOptions = commons.DownloadOptions.Metadata; 1795 var _downloadOptions = commons.DownloadOptions.Metadata;
1645 var _body = null; 1796 var _body = null;
1646 1797
1647 if (request != null) { 1798 if (request != null) {
1648 _body = convert.JSON.encode((request).toJson()); 1799 _body = convert.JSON.encode((request).toJson());
1649 } 1800 }
1650 if (roomId == null) { 1801 if (roomId == null) {
1651 throw new core.ArgumentError("Parameter roomId is required."); 1802 throw new core.ArgumentError("Parameter roomId is required.");
1652 } 1803 }
1804 if (consistencyToken != null) {
1805 _queryParams["consistencyToken"] = [consistencyToken];
1806 }
1653 if (language != null) { 1807 if (language != null) {
1654 _queryParams["language"] = [language]; 1808 _queryParams["language"] = [language];
1655 } 1809 }
1656 1810
1657 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/leave'; 1811 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/leave';
1658 1812
1659 var _response = _requester.request(_url, 1813 var _response = _requester.request(_url,
1660 "POST", 1814 "POST",
1661 body: _body, 1815 body: _body,
1662 queryParams: _queryParams, 1816 queryParams: _queryParams,
1663 uploadOptions: _uploadOptions, 1817 uploadOptions: _uploadOptions,
1664 uploadMedia: _uploadMedia, 1818 uploadMedia: _uploadMedia,
1665 downloadOptions: _downloadOptions); 1819 downloadOptions: _downloadOptions);
1666 return _response.then((data) => new Room.fromJson(data)); 1820 return _response.then((data) => new Room.fromJson(data));
1667 } 1821 }
1668 1822
1669 /** 1823 /**
1670 * Returns invitations to join rooms. 1824 * Returns invitations to join rooms.
1671 * 1825 *
1672 * Request parameters: 1826 * Request parameters:
1673 * 1827 *
1828 * [consistencyToken] - The last-seen mutation timestamp.
1829 *
1674 * [language] - The preferred language to use for strings returned by this 1830 * [language] - The preferred language to use for strings returned by this
1675 * method. 1831 * method.
1676 * 1832 *
1677 * [maxResults] - The maximum number of rooms to return in the response, used 1833 * [maxResults] - The maximum number of rooms to return in the response, used
1678 * for paging. For any response, the actual number of rooms to return may be 1834 * for paging. For any response, the actual number of rooms to return may be
1679 * less than the specified maxResults. 1835 * less than the specified maxResults.
1680 * Value must be between "1" and "500". 1836 * Value must be between "1" and "500".
1681 * 1837 *
1682 * [pageToken] - The token returned by the previous request. 1838 * [pageToken] - The token returned by the previous request.
1683 * 1839 *
1684 * Completes with a [RoomList]. 1840 * Completes with a [RoomList].
1685 * 1841 *
1686 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1842 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1687 * error. 1843 * error.
1688 * 1844 *
1689 * If the used [http.Client] completes with an error when making a REST call, 1845 * If the used [http.Client] completes with an error when making a REST call,
1690 * this method will complete with the same error. 1846 * this method will complete with the same error.
1691 */ 1847 */
1692 async.Future<RoomList> list({core.String language, core.int maxResults, core.S tring pageToken}) { 1848 async.Future<RoomList> list({core.String consistencyToken, core.String languag e, core.int maxResults, core.String pageToken}) {
1693 var _url = null; 1849 var _url = null;
1694 var _queryParams = new core.Map(); 1850 var _queryParams = new core.Map();
1695 var _uploadMedia = null; 1851 var _uploadMedia = null;
1696 var _uploadOptions = null; 1852 var _uploadOptions = null;
1697 var _downloadOptions = commons.DownloadOptions.Metadata; 1853 var _downloadOptions = commons.DownloadOptions.Metadata;
1698 var _body = null; 1854 var _body = null;
1699 1855
1856 if (consistencyToken != null) {
1857 _queryParams["consistencyToken"] = [consistencyToken];
1858 }
1700 if (language != null) { 1859 if (language != null) {
1701 _queryParams["language"] = [language]; 1860 _queryParams["language"] = [language];
1702 } 1861 }
1703 if (maxResults != null) { 1862 if (maxResults != null) {
1704 _queryParams["maxResults"] = ["${maxResults}"]; 1863 _queryParams["maxResults"] = ["${maxResults}"];
1705 } 1864 }
1706 if (pageToken != null) { 1865 if (pageToken != null) {
1707 _queryParams["pageToken"] = [pageToken]; 1866 _queryParams["pageToken"] = [pageToken];
1708 } 1867 }
1709 1868
(...skipping 13 matching lines...) Expand all
1723 * Updates sent by a client reporting the status of peers in a room. For 1882 * Updates sent by a client reporting the status of peers in a room. For
1724 * internal use by the Games SDK only. Calling this method directly is 1883 * internal use by the Games SDK only. Calling this method directly is
1725 * unsupported. 1884 * unsupported.
1726 * 1885 *
1727 * [request] - The metadata request object. 1886 * [request] - The metadata request object.
1728 * 1887 *
1729 * Request parameters: 1888 * Request parameters:
1730 * 1889 *
1731 * [roomId] - The ID of the room. 1890 * [roomId] - The ID of the room.
1732 * 1891 *
1892 * [consistencyToken] - The last-seen mutation timestamp.
1893 *
1733 * [language] - The preferred language to use for strings returned by this 1894 * [language] - The preferred language to use for strings returned by this
1734 * method. 1895 * method.
1735 * 1896 *
1736 * Completes with a [RoomStatus]. 1897 * Completes with a [RoomStatus].
1737 * 1898 *
1738 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1739 * error. 1900 * error.
1740 * 1901 *
1741 * If the used [http.Client] completes with an error when making a REST call, 1902 * If the used [http.Client] completes with an error when making a REST call,
1742 * this method will complete with the same error. 1903 * this method will complete with the same error.
1743 */ 1904 */
1744 async.Future<RoomStatus> reportStatus(RoomP2PStatuses request, core.String roo mId, {core.String language}) { 1905 async.Future<RoomStatus> reportStatus(RoomP2PStatuses request, core.String roo mId, {core.String consistencyToken, core.String language}) {
1745 var _url = null; 1906 var _url = null;
1746 var _queryParams = new core.Map(); 1907 var _queryParams = new core.Map();
1747 var _uploadMedia = null; 1908 var _uploadMedia = null;
1748 var _uploadOptions = null; 1909 var _uploadOptions = null;
1749 var _downloadOptions = commons.DownloadOptions.Metadata; 1910 var _downloadOptions = commons.DownloadOptions.Metadata;
1750 var _body = null; 1911 var _body = null;
1751 1912
1752 if (request != null) { 1913 if (request != null) {
1753 _body = convert.JSON.encode((request).toJson()); 1914 _body = convert.JSON.encode((request).toJson());
1754 } 1915 }
1755 if (roomId == null) { 1916 if (roomId == null) {
1756 throw new core.ArgumentError("Parameter roomId is required."); 1917 throw new core.ArgumentError("Parameter roomId is required.");
1757 } 1918 }
1919 if (consistencyToken != null) {
1920 _queryParams["consistencyToken"] = [consistencyToken];
1921 }
1758 if (language != null) { 1922 if (language != null) {
1759 _queryParams["language"] = [language]; 1923 _queryParams["language"] = [language];
1760 } 1924 }
1761 1925
1762 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/reportstatus' ; 1926 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/reportstatus' ;
1763 1927
1764 var _response = _requester.request(_url, 1928 var _response = _requester.request(_url,
1765 "POST", 1929 "POST",
1766 body: _body, 1930 body: _body,
1767 queryParams: _queryParams, 1931 queryParams: _queryParams,
(...skipping 28 matching lines...) Expand all
1796 * retrieve data for all leaderboards for this application. 1960 * retrieve data for all leaderboards for this application.
1797 * 1961 *
1798 * [timeSpan] - The time span for the scores and ranks you're requesting. 1962 * [timeSpan] - The time span for the scores and ranks you're requesting.
1799 * Possible string values are: 1963 * Possible string values are:
1800 * - "ALL" : Get the high scores for all time spans. If this is used, 1964 * - "ALL" : Get the high scores for all time spans. If this is used,
1801 * maxResults values will be ignored. 1965 * maxResults values will be ignored.
1802 * - "ALL_TIME" : Get the all time high score. 1966 * - "ALL_TIME" : Get the all time high score.
1803 * - "DAILY" : List the top scores for the current day. 1967 * - "DAILY" : List the top scores for the current day.
1804 * - "WEEKLY" : List the top scores for the current week. 1968 * - "WEEKLY" : List the top scores for the current week.
1805 * 1969 *
1970 * [consistencyToken] - The last-seen mutation timestamp.
1971 *
1806 * [includeRankType] - The types of ranks to return. If the parameter is 1972 * [includeRankType] - The types of ranks to return. If the parameter is
1807 * omitted, no ranks will be returned. 1973 * omitted, no ranks will be returned.
1808 * Possible string values are: 1974 * Possible string values are:
1809 * - "ALL" : Retrieve public and social ranks. 1975 * - "ALL" : Retrieve public and social ranks.
1810 * - "PUBLIC" : Retrieve public ranks, if the player is sharing their gameplay 1976 * - "PUBLIC" : Retrieve public ranks, if the player is sharing their gameplay
1811 * activity publicly. 1977 * activity publicly.
1812 * - "SOCIAL" : Retrieve the social rank. 1978 * - "SOCIAL" : Retrieve the social rank.
1813 * 1979 *
1814 * [language] - The preferred language to use for strings returned by this 1980 * [language] - The preferred language to use for strings returned by this
1815 * method. 1981 * method.
1816 * 1982 *
1817 * [maxResults] - The maximum number of leaderboard scores to return in the 1983 * [maxResults] - The maximum number of leaderboard scores to return in the
1818 * response. For any response, the actual number of leaderboard scores 1984 * response. For any response, the actual number of leaderboard scores
1819 * returned may be less than the specified maxResults. 1985 * returned may be less than the specified maxResults.
1820 * Value must be between "1" and "30". 1986 * Value must be between "1" and "30".
1821 * 1987 *
1822 * [pageToken] - The token returned by the previous request. 1988 * [pageToken] - The token returned by the previous request.
1823 * 1989 *
1824 * Completes with a [PlayerLeaderboardScoreListResponse]. 1990 * Completes with a [PlayerLeaderboardScoreListResponse].
1825 * 1991 *
1826 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1827 * error. 1993 * error.
1828 * 1994 *
1829 * If the used [http.Client] completes with an error when making a REST call, 1995 * If the used [http.Client] completes with an error when making a REST call,
1830 * this method will complete with the same error. 1996 * this method will complete with the same error.
1831 */ 1997 */
1832 async.Future<PlayerLeaderboardScoreListResponse> get(core.String playerId, cor e.String leaderboardId, core.String timeSpan, {core.String includeRankType, core .String language, core.int maxResults, core.String pageToken}) { 1998 async.Future<PlayerLeaderboardScoreListResponse> get(core.String playerId, cor e.String leaderboardId, core.String timeSpan, {core.String consistencyToken, cor e.String includeRankType, core.String language, core.int maxResults, core.String pageToken}) {
1833 var _url = null; 1999 var _url = null;
1834 var _queryParams = new core.Map(); 2000 var _queryParams = new core.Map();
1835 var _uploadMedia = null; 2001 var _uploadMedia = null;
1836 var _uploadOptions = null; 2002 var _uploadOptions = null;
1837 var _downloadOptions = commons.DownloadOptions.Metadata; 2003 var _downloadOptions = commons.DownloadOptions.Metadata;
1838 var _body = null; 2004 var _body = null;
1839 2005
1840 if (playerId == null) { 2006 if (playerId == null) {
1841 throw new core.ArgumentError("Parameter playerId is required."); 2007 throw new core.ArgumentError("Parameter playerId is required.");
1842 } 2008 }
1843 if (leaderboardId == null) { 2009 if (leaderboardId == null) {
1844 throw new core.ArgumentError("Parameter leaderboardId is required."); 2010 throw new core.ArgumentError("Parameter leaderboardId is required.");
1845 } 2011 }
1846 if (timeSpan == null) { 2012 if (timeSpan == null) {
1847 throw new core.ArgumentError("Parameter timeSpan is required."); 2013 throw new core.ArgumentError("Parameter timeSpan is required.");
1848 } 2014 }
2015 if (consistencyToken != null) {
2016 _queryParams["consistencyToken"] = [consistencyToken];
2017 }
1849 if (includeRankType != null) { 2018 if (includeRankType != null) {
1850 _queryParams["includeRankType"] = [includeRankType]; 2019 _queryParams["includeRankType"] = [includeRankType];
1851 } 2020 }
1852 if (language != null) { 2021 if (language != null) {
1853 _queryParams["language"] = [language]; 2022 _queryParams["language"] = [language];
1854 } 2023 }
1855 if (maxResults != null) { 2024 if (maxResults != null) {
1856 _queryParams["maxResults"] = ["${maxResults}"]; 2025 _queryParams["maxResults"] = ["${maxResults}"];
1857 } 2026 }
1858 if (pageToken != null) { 2027 if (pageToken != null) {
(...skipping 24 matching lines...) Expand all
1883 * - "PUBLIC" : List all scores in the public leaderboard. 2052 * - "PUBLIC" : List all scores in the public leaderboard.
1884 * - "SOCIAL" : List only social scores. 2053 * - "SOCIAL" : List only social scores.
1885 * - "SOCIAL_1P" : List only social scores, not respecting the fACL. 2054 * - "SOCIAL_1P" : List only social scores, not respecting the fACL.
1886 * 2055 *
1887 * [timeSpan] - The time span for the scores and ranks you're requesting. 2056 * [timeSpan] - The time span for the scores and ranks you're requesting.
1888 * Possible string values are: 2057 * Possible string values are:
1889 * - "ALL_TIME" : List the all-time top scores. 2058 * - "ALL_TIME" : List the all-time top scores.
1890 * - "DAILY" : List the top scores for the current day. 2059 * - "DAILY" : List the top scores for the current day.
1891 * - "WEEKLY" : List the top scores for the current week. 2060 * - "WEEKLY" : List the top scores for the current week.
1892 * 2061 *
2062 * [consistencyToken] - The last-seen mutation timestamp.
2063 *
1893 * [language] - The preferred language to use for strings returned by this 2064 * [language] - The preferred language to use for strings returned by this
1894 * method. 2065 * method.
1895 * 2066 *
1896 * [maxResults] - The maximum number of leaderboard scores to return in the 2067 * [maxResults] - The maximum number of leaderboard scores to return in the
1897 * response. For any response, the actual number of leaderboard scores 2068 * response. For any response, the actual number of leaderboard scores
1898 * returned may be less than the specified maxResults. 2069 * returned may be less than the specified maxResults.
1899 * Value must be between "1" and "30". 2070 * Value must be between "1" and "30".
1900 * 2071 *
1901 * [pageToken] - The token returned by the previous request. 2072 * [pageToken] - The token returned by the previous request.
1902 * 2073 *
1903 * Completes with a [LeaderboardScores]. 2074 * Completes with a [LeaderboardScores].
1904 * 2075 *
1905 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2076 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1906 * error. 2077 * error.
1907 * 2078 *
1908 * If the used [http.Client] completes with an error when making a REST call, 2079 * If the used [http.Client] completes with an error when making a REST call,
1909 * this method will complete with the same error. 2080 * this method will complete with the same error.
1910 */ 2081 */
1911 async.Future<LeaderboardScores> list(core.String leaderboardId, core.String co llection, core.String timeSpan, {core.String language, core.int maxResults, core .String pageToken}) { 2082 async.Future<LeaderboardScores> list(core.String leaderboardId, core.String co llection, core.String timeSpan, {core.String consistencyToken, core.String langu age, core.int maxResults, core.String pageToken}) {
1912 var _url = null; 2083 var _url = null;
1913 var _queryParams = new core.Map(); 2084 var _queryParams = new core.Map();
1914 var _uploadMedia = null; 2085 var _uploadMedia = null;
1915 var _uploadOptions = null; 2086 var _uploadOptions = null;
1916 var _downloadOptions = commons.DownloadOptions.Metadata; 2087 var _downloadOptions = commons.DownloadOptions.Metadata;
1917 var _body = null; 2088 var _body = null;
1918 2089
1919 if (leaderboardId == null) { 2090 if (leaderboardId == null) {
1920 throw new core.ArgumentError("Parameter leaderboardId is required."); 2091 throw new core.ArgumentError("Parameter leaderboardId is required.");
1921 } 2092 }
1922 if (collection == null) { 2093 if (collection == null) {
1923 throw new core.ArgumentError("Parameter collection is required."); 2094 throw new core.ArgumentError("Parameter collection is required.");
1924 } 2095 }
1925 if (timeSpan == null) { 2096 if (timeSpan == null) {
1926 throw new core.ArgumentError("Parameter timeSpan is required."); 2097 throw new core.ArgumentError("Parameter timeSpan is required.");
1927 } 2098 }
1928 _queryParams["timeSpan"] = [timeSpan]; 2099 _queryParams["timeSpan"] = [timeSpan];
2100 if (consistencyToken != null) {
2101 _queryParams["consistencyToken"] = [consistencyToken];
2102 }
1929 if (language != null) { 2103 if (language != null) {
1930 _queryParams["language"] = [language]; 2104 _queryParams["language"] = [language];
1931 } 2105 }
1932 if (maxResults != null) { 2106 if (maxResults != null) {
1933 _queryParams["maxResults"] = ["${maxResults}"]; 2107 _queryParams["maxResults"] = ["${maxResults}"];
1934 } 2108 }
1935 if (pageToken != null) { 2109 if (pageToken != null) {
1936 _queryParams["pageToken"] = [pageToken]; 2110 _queryParams["pageToken"] = [pageToken];
1937 } 2111 }
1938 2112
(...skipping 21 matching lines...) Expand all
1960 * - "PUBLIC" : List all scores in the public leaderboard. 2134 * - "PUBLIC" : List all scores in the public leaderboard.
1961 * - "SOCIAL" : List only social scores. 2135 * - "SOCIAL" : List only social scores.
1962 * - "SOCIAL_1P" : List only social scores, not respecting the fACL. 2136 * - "SOCIAL_1P" : List only social scores, not respecting the fACL.
1963 * 2137 *
1964 * [timeSpan] - The time span for the scores and ranks you're requesting. 2138 * [timeSpan] - The time span for the scores and ranks you're requesting.
1965 * Possible string values are: 2139 * Possible string values are:
1966 * - "ALL_TIME" : List the all-time top scores. 2140 * - "ALL_TIME" : List the all-time top scores.
1967 * - "DAILY" : List the top scores for the current day. 2141 * - "DAILY" : List the top scores for the current day.
1968 * - "WEEKLY" : List the top scores for the current week. 2142 * - "WEEKLY" : List the top scores for the current week.
1969 * 2143 *
2144 * [consistencyToken] - The last-seen mutation timestamp.
2145 *
1970 * [language] - The preferred language to use for strings returned by this 2146 * [language] - The preferred language to use for strings returned by this
1971 * method. 2147 * method.
1972 * 2148 *
1973 * [maxResults] - The maximum number of leaderboard scores to return in the 2149 * [maxResults] - The maximum number of leaderboard scores to return in the
1974 * response. For any response, the actual number of leaderboard scores 2150 * response. For any response, the actual number of leaderboard scores
1975 * returned may be less than the specified maxResults. 2151 * returned may be less than the specified maxResults.
1976 * Value must be between "1" and "30". 2152 * Value must be between "1" and "30".
1977 * 2153 *
1978 * [pageToken] - The token returned by the previous request. 2154 * [pageToken] - The token returned by the previous request.
1979 * 2155 *
1980 * [resultsAbove] - The preferred number of scores to return above the 2156 * [resultsAbove] - The preferred number of scores to return above the
1981 * player's score. More scores may be returned if the player is at the bottom 2157 * player's score. More scores may be returned if the player is at the bottom
1982 * of the leaderboard; fewer may be returned if the player is at the top. Must 2158 * of the leaderboard; fewer may be returned if the player is at the top. Must
1983 * be less than or equal to maxResults. 2159 * be less than or equal to maxResults.
1984 * 2160 *
1985 * [returnTopIfAbsent] - True if the top scores should be returned when the 2161 * [returnTopIfAbsent] - True if the top scores should be returned when the
1986 * player is not in the leaderboard. Defaults to true. 2162 * player is not in the leaderboard. Defaults to true.
1987 * 2163 *
1988 * Completes with a [LeaderboardScores]. 2164 * Completes with a [LeaderboardScores].
1989 * 2165 *
1990 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2166 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1991 * error. 2167 * error.
1992 * 2168 *
1993 * If the used [http.Client] completes with an error when making a REST call, 2169 * If the used [http.Client] completes with an error when making a REST call,
1994 * this method will complete with the same error. 2170 * this method will complete with the same error.
1995 */ 2171 */
1996 async.Future<LeaderboardScores> listWindow(core.String leaderboardId, core.Str ing collection, core.String timeSpan, {core.String language, core.int maxResults , core.String pageToken, core.int resultsAbove, core.bool returnTopIfAbsent}) { 2172 async.Future<LeaderboardScores> listWindow(core.String leaderboardId, core.Str ing collection, core.String timeSpan, {core.String consistencyToken, core.String language, core.int maxResults, core.String pageToken, core.int resultsAbove, co re.bool returnTopIfAbsent}) {
1997 var _url = null; 2173 var _url = null;
1998 var _queryParams = new core.Map(); 2174 var _queryParams = new core.Map();
1999 var _uploadMedia = null; 2175 var _uploadMedia = null;
2000 var _uploadOptions = null; 2176 var _uploadOptions = null;
2001 var _downloadOptions = commons.DownloadOptions.Metadata; 2177 var _downloadOptions = commons.DownloadOptions.Metadata;
2002 var _body = null; 2178 var _body = null;
2003 2179
2004 if (leaderboardId == null) { 2180 if (leaderboardId == null) {
2005 throw new core.ArgumentError("Parameter leaderboardId is required."); 2181 throw new core.ArgumentError("Parameter leaderboardId is required.");
2006 } 2182 }
2007 if (collection == null) { 2183 if (collection == null) {
2008 throw new core.ArgumentError("Parameter collection is required."); 2184 throw new core.ArgumentError("Parameter collection is required.");
2009 } 2185 }
2010 if (timeSpan == null) { 2186 if (timeSpan == null) {
2011 throw new core.ArgumentError("Parameter timeSpan is required."); 2187 throw new core.ArgumentError("Parameter timeSpan is required.");
2012 } 2188 }
2013 _queryParams["timeSpan"] = [timeSpan]; 2189 _queryParams["timeSpan"] = [timeSpan];
2190 if (consistencyToken != null) {
2191 _queryParams["consistencyToken"] = [consistencyToken];
2192 }
2014 if (language != null) { 2193 if (language != null) {
2015 _queryParams["language"] = [language]; 2194 _queryParams["language"] = [language];
2016 } 2195 }
2017 if (maxResults != null) { 2196 if (maxResults != null) {
2018 _queryParams["maxResults"] = ["${maxResults}"]; 2197 _queryParams["maxResults"] = ["${maxResults}"];
2019 } 2198 }
2020 if (pageToken != null) { 2199 if (pageToken != null) {
2021 _queryParams["pageToken"] = [pageToken]; 2200 _queryParams["pageToken"] = [pageToken];
2022 } 2201 }
2023 if (resultsAbove != null) { 2202 if (resultsAbove != null) {
(...skipping 22 matching lines...) Expand all
2046 * 2225 *
2047 * [leaderboardId] - The ID of the leaderboard. 2226 * [leaderboardId] - The ID of the leaderboard.
2048 * 2227 *
2049 * [score] - The score you're submitting. The submitted score is ignored if it 2228 * [score] - The score you're submitting. The submitted score is ignored if it
2050 * is worse than a previously submitted score, where worse depends on the 2229 * is worse than a previously submitted score, where worse depends on the
2051 * leaderboard sort order. The meaning of the score value depends on the 2230 * leaderboard sort order. The meaning of the score value depends on the
2052 * leaderboard format type. For fixed-point, the score represents the raw 2231 * leaderboard format type. For fixed-point, the score represents the raw
2053 * value. For time, the score represents elapsed time in milliseconds. For 2232 * value. For time, the score represents elapsed time in milliseconds. For
2054 * currency, the score represents a value in micro units. 2233 * currency, the score represents a value in micro units.
2055 * 2234 *
2235 * [consistencyToken] - The last-seen mutation timestamp.
2236 *
2056 * [language] - The preferred language to use for strings returned by this 2237 * [language] - The preferred language to use for strings returned by this
2057 * method. 2238 * method.
2058 * 2239 *
2059 * [scoreTag] - Additional information about the score you're submitting. 2240 * [scoreTag] - Additional information about the score you're submitting.
2060 * Values must contain no more than 64 URI-safe characters as defined by 2241 * Values must contain no more than 64 URI-safe characters as defined by
2061 * section 2.3 of RFC 3986. 2242 * section 2.3 of RFC 3986.
2062 * Value must have pattern "[a-zA-Z0-9-._~]{0,64}". 2243 * Value must have pattern "[a-zA-Z0-9-._~]{0,64}".
2063 * 2244 *
2064 * Completes with a [PlayerScoreResponse]. 2245 * Completes with a [PlayerScoreResponse].
2065 * 2246 *
2066 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2067 * error. 2248 * error.
2068 * 2249 *
2069 * If the used [http.Client] completes with an error when making a REST call, 2250 * If the used [http.Client] completes with an error when making a REST call,
2070 * this method will complete with the same error. 2251 * this method will complete with the same error.
2071 */ 2252 */
2072 async.Future<PlayerScoreResponse> submit(core.String leaderboardId, core.Strin g score, {core.String language, core.String scoreTag}) { 2253 async.Future<PlayerScoreResponse> submit(core.String leaderboardId, core.Strin g score, {core.String consistencyToken, core.String language, core.String scoreT ag}) {
2073 var _url = null; 2254 var _url = null;
2074 var _queryParams = new core.Map(); 2255 var _queryParams = new core.Map();
2075 var _uploadMedia = null; 2256 var _uploadMedia = null;
2076 var _uploadOptions = null; 2257 var _uploadOptions = null;
2077 var _downloadOptions = commons.DownloadOptions.Metadata; 2258 var _downloadOptions = commons.DownloadOptions.Metadata;
2078 var _body = null; 2259 var _body = null;
2079 2260
2080 if (leaderboardId == null) { 2261 if (leaderboardId == null) {
2081 throw new core.ArgumentError("Parameter leaderboardId is required."); 2262 throw new core.ArgumentError("Parameter leaderboardId is required.");
2082 } 2263 }
2083 if (score == null) { 2264 if (score == null) {
2084 throw new core.ArgumentError("Parameter score is required."); 2265 throw new core.ArgumentError("Parameter score is required.");
2085 } 2266 }
2086 _queryParams["score"] = [score]; 2267 _queryParams["score"] = [score];
2268 if (consistencyToken != null) {
2269 _queryParams["consistencyToken"] = [consistencyToken];
2270 }
2087 if (language != null) { 2271 if (language != null) {
2088 _queryParams["language"] = [language]; 2272 _queryParams["language"] = [language];
2089 } 2273 }
2090 if (scoreTag != null) { 2274 if (scoreTag != null) {
2091 _queryParams["scoreTag"] = [scoreTag]; 2275 _queryParams["scoreTag"] = [scoreTag];
2092 } 2276 }
2093 2277
2094 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + ' /scores'; 2278 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + ' /scores';
2095 2279
2096 var _response = _requester.request(_url, 2280 var _response = _requester.request(_url,
2097 "POST", 2281 "POST",
2098 body: _body, 2282 body: _body,
2099 queryParams: _queryParams, 2283 queryParams: _queryParams,
2100 uploadOptions: _uploadOptions, 2284 uploadOptions: _uploadOptions,
2101 uploadMedia: _uploadMedia, 2285 uploadMedia: _uploadMedia,
2102 downloadOptions: _downloadOptions); 2286 downloadOptions: _downloadOptions);
2103 return _response.then((data) => new PlayerScoreResponse.fromJson(data)); 2287 return _response.then((data) => new PlayerScoreResponse.fromJson(data));
2104 } 2288 }
2105 2289
2106 /** 2290 /**
2107 * Submits multiple scores to leaderboards. 2291 * Submits multiple scores to leaderboards.
2108 * 2292 *
2109 * [request] - The metadata request object. 2293 * [request] - The metadata request object.
2110 * 2294 *
2111 * Request parameters: 2295 * Request parameters:
2112 * 2296 *
2297 * [consistencyToken] - The last-seen mutation timestamp.
2298 *
2113 * [language] - The preferred language to use for strings returned by this 2299 * [language] - The preferred language to use for strings returned by this
2114 * method. 2300 * method.
2115 * 2301 *
2116 * Completes with a [PlayerScoreListResponse]. 2302 * Completes with a [PlayerScoreListResponse].
2117 * 2303 *
2118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2119 * error. 2305 * error.
2120 * 2306 *
2121 * If the used [http.Client] completes with an error when making a REST call, 2307 * If the used [http.Client] completes with an error when making a REST call,
2122 * this method will complete with the same error. 2308 * this method will complete with the same error.
2123 */ 2309 */
2124 async.Future<PlayerScoreListResponse> submitMultiple(PlayerScoreSubmissionList request, {core.String language}) { 2310 async.Future<PlayerScoreListResponse> submitMultiple(PlayerScoreSubmissionList request, {core.String consistencyToken, core.String language}) {
2125 var _url = null; 2311 var _url = null;
2126 var _queryParams = new core.Map(); 2312 var _queryParams = new core.Map();
2127 var _uploadMedia = null; 2313 var _uploadMedia = null;
2128 var _uploadOptions = null; 2314 var _uploadOptions = null;
2129 var _downloadOptions = commons.DownloadOptions.Metadata; 2315 var _downloadOptions = commons.DownloadOptions.Metadata;
2130 var _body = null; 2316 var _body = null;
2131 2317
2132 if (request != null) { 2318 if (request != null) {
2133 _body = convert.JSON.encode((request).toJson()); 2319 _body = convert.JSON.encode((request).toJson());
2134 } 2320 }
2321 if (consistencyToken != null) {
2322 _queryParams["consistencyToken"] = [consistencyToken];
2323 }
2135 if (language != null) { 2324 if (language != null) {
2136 _queryParams["language"] = [language]; 2325 _queryParams["language"] = [language];
2137 } 2326 }
2138 2327
2139 _url = 'leaderboards/scores'; 2328 _url = 'leaderboards/scores';
2140 2329
2141 var _response = _requester.request(_url, 2330 var _response = _requester.request(_url,
2142 "POST", 2331 "POST",
2143 body: _body, 2332 body: _body,
2144 queryParams: _queryParams, 2333 queryParams: _queryParams,
(...skipping 12 matching lines...) Expand all
2157 SnapshotsResourceApi(commons.ApiRequester client) : 2346 SnapshotsResourceApi(commons.ApiRequester client) :
2158 _requester = client; 2347 _requester = client;
2159 2348
2160 /** 2349 /**
2161 * Retrieves the metadata for a given snapshot ID. 2350 * Retrieves the metadata for a given snapshot ID.
2162 * 2351 *
2163 * Request parameters: 2352 * Request parameters:
2164 * 2353 *
2165 * [snapshotId] - The ID of the snapshot. 2354 * [snapshotId] - The ID of the snapshot.
2166 * 2355 *
2356 * [consistencyToken] - The last-seen mutation timestamp.
2357 *
2167 * [language] - The preferred language to use for strings returned by this 2358 * [language] - The preferred language to use for strings returned by this
2168 * method. 2359 * method.
2169 * 2360 *
2170 * Completes with a [Snapshot]. 2361 * Completes with a [Snapshot].
2171 * 2362 *
2172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2363 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2173 * error. 2364 * error.
2174 * 2365 *
2175 * If the used [http.Client] completes with an error when making a REST call, 2366 * If the used [http.Client] completes with an error when making a REST call,
2176 * this method will complete with the same error. 2367 * this method will complete with the same error.
2177 */ 2368 */
2178 async.Future<Snapshot> get(core.String snapshotId, {core.String language}) { 2369 async.Future<Snapshot> get(core.String snapshotId, {core.String consistencyTok en, core.String language}) {
2179 var _url = null; 2370 var _url = null;
2180 var _queryParams = new core.Map(); 2371 var _queryParams = new core.Map();
2181 var _uploadMedia = null; 2372 var _uploadMedia = null;
2182 var _uploadOptions = null; 2373 var _uploadOptions = null;
2183 var _downloadOptions = commons.DownloadOptions.Metadata; 2374 var _downloadOptions = commons.DownloadOptions.Metadata;
2184 var _body = null; 2375 var _body = null;
2185 2376
2186 if (snapshotId == null) { 2377 if (snapshotId == null) {
2187 throw new core.ArgumentError("Parameter snapshotId is required."); 2378 throw new core.ArgumentError("Parameter snapshotId is required.");
2188 } 2379 }
2380 if (consistencyToken != null) {
2381 _queryParams["consistencyToken"] = [consistencyToken];
2382 }
2189 if (language != null) { 2383 if (language != null) {
2190 _queryParams["language"] = [language]; 2384 _queryParams["language"] = [language];
2191 } 2385 }
2192 2386
2193 _url = 'snapshots/' + commons.Escaper.ecapeVariable('$snapshotId'); 2387 _url = 'snapshots/' + commons.Escaper.ecapeVariable('$snapshotId');
2194 2388
2195 var _response = _requester.request(_url, 2389 var _response = _requester.request(_url,
2196 "GET", 2390 "GET",
2197 body: _body, 2391 body: _body,
2198 queryParams: _queryParams, 2392 queryParams: _queryParams,
2199 uploadOptions: _uploadOptions, 2393 uploadOptions: _uploadOptions,
2200 uploadMedia: _uploadMedia, 2394 uploadMedia: _uploadMedia,
2201 downloadOptions: _downloadOptions); 2395 downloadOptions: _downloadOptions);
2202 return _response.then((data) => new Snapshot.fromJson(data)); 2396 return _response.then((data) => new Snapshot.fromJson(data));
2203 } 2397 }
2204 2398
2205 /** 2399 /**
2206 * Retrieves a list of snapshots created by your application for the player 2400 * Retrieves a list of snapshots created by your application for the player
2207 * corresponding to the player ID. 2401 * corresponding to the player ID.
2208 * 2402 *
2209 * Request parameters: 2403 * Request parameters:
2210 * 2404 *
2211 * [playerId] - A player ID. A value of me may be used in place of the 2405 * [playerId] - A player ID. A value of me may be used in place of the
2212 * authenticated player's ID. 2406 * authenticated player's ID.
2213 * 2407 *
2408 * [consistencyToken] - The last-seen mutation timestamp.
2409 *
2214 * [language] - The preferred language to use for strings returned by this 2410 * [language] - The preferred language to use for strings returned by this
2215 * method. 2411 * method.
2216 * 2412 *
2217 * [maxResults] - The maximum number of snapshot resources to return in the 2413 * [maxResults] - The maximum number of snapshot resources to return in the
2218 * response, used for paging. For any response, the actual number of snapshot 2414 * response, used for paging. For any response, the actual number of snapshot
2219 * resources returned may be less than the specified maxResults. 2415 * resources returned may be less than the specified maxResults.
2220 * Value must be between "1" and "25". 2416 * Value must be between "1" and "25".
2221 * 2417 *
2222 * [pageToken] - The token returned by the previous request. 2418 * [pageToken] - The token returned by the previous request.
2223 * 2419 *
2224 * Completes with a [SnapshotListResponse]. 2420 * Completes with a [SnapshotListResponse].
2225 * 2421 *
2226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2422 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2227 * error. 2423 * error.
2228 * 2424 *
2229 * If the used [http.Client] completes with an error when making a REST call, 2425 * If the used [http.Client] completes with an error when making a REST call,
2230 * this method will complete with the same error. 2426 * this method will complete with the same error.
2231 */ 2427 */
2232 async.Future<SnapshotListResponse> list(core.String playerId, {core.String lan guage, core.int maxResults, core.String pageToken}) { 2428 async.Future<SnapshotListResponse> list(core.String playerId, {core.String con sistencyToken, core.String language, core.int maxResults, core.String pageToken} ) {
2233 var _url = null; 2429 var _url = null;
2234 var _queryParams = new core.Map(); 2430 var _queryParams = new core.Map();
2235 var _uploadMedia = null; 2431 var _uploadMedia = null;
2236 var _uploadOptions = null; 2432 var _uploadOptions = null;
2237 var _downloadOptions = commons.DownloadOptions.Metadata; 2433 var _downloadOptions = commons.DownloadOptions.Metadata;
2238 var _body = null; 2434 var _body = null;
2239 2435
2240 if (playerId == null) { 2436 if (playerId == null) {
2241 throw new core.ArgumentError("Parameter playerId is required."); 2437 throw new core.ArgumentError("Parameter playerId is required.");
2242 } 2438 }
2439 if (consistencyToken != null) {
2440 _queryParams["consistencyToken"] = [consistencyToken];
2441 }
2243 if (language != null) { 2442 if (language != null) {
2244 _queryParams["language"] = [language]; 2443 _queryParams["language"] = [language];
2245 } 2444 }
2246 if (maxResults != null) { 2445 if (maxResults != null) {
2247 _queryParams["maxResults"] = ["${maxResults}"]; 2446 _queryParams["maxResults"] = ["${maxResults}"];
2248 } 2447 }
2249 if (pageToken != null) { 2448 if (pageToken != null) {
2250 _queryParams["pageToken"] = [pageToken]; 2449 _queryParams["pageToken"] = [pageToken];
2251 } 2450 }
2252 2451
(...skipping 18 matching lines...) Expand all
2271 TurnBasedMatchesResourceApi(commons.ApiRequester client) : 2470 TurnBasedMatchesResourceApi(commons.ApiRequester client) :
2272 _requester = client; 2471 _requester = client;
2273 2472
2274 /** 2473 /**
2275 * Cancel a turn-based match. 2474 * Cancel a turn-based match.
2276 * 2475 *
2277 * Request parameters: 2476 * Request parameters:
2278 * 2477 *
2279 * [matchId] - The ID of the match. 2478 * [matchId] - The ID of the match.
2280 * 2479 *
2480 * [consistencyToken] - The last-seen mutation timestamp.
2481 *
2281 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2282 * error. 2483 * error.
2283 * 2484 *
2284 * If the used [http.Client] completes with an error when making a REST call, 2485 * If the used [http.Client] completes with an error when making a REST call,
2285 * this method will complete with the same error. 2486 * this method will complete with the same error.
2286 */ 2487 */
2287 async.Future cancel(core.String matchId) { 2488 async.Future cancel(core.String matchId, {core.String consistencyToken}) {
2288 var _url = null; 2489 var _url = null;
2289 var _queryParams = new core.Map(); 2490 var _queryParams = new core.Map();
2290 var _uploadMedia = null; 2491 var _uploadMedia = null;
2291 var _uploadOptions = null; 2492 var _uploadOptions = null;
2292 var _downloadOptions = commons.DownloadOptions.Metadata; 2493 var _downloadOptions = commons.DownloadOptions.Metadata;
2293 var _body = null; 2494 var _body = null;
2294 2495
2295 if (matchId == null) { 2496 if (matchId == null) {
2296 throw new core.ArgumentError("Parameter matchId is required."); 2497 throw new core.ArgumentError("Parameter matchId is required.");
2297 } 2498 }
2499 if (consistencyToken != null) {
2500 _queryParams["consistencyToken"] = [consistencyToken];
2501 }
2298 2502
2299 _downloadOptions = null; 2503 _downloadOptions = null;
2300 2504
2301 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/c ancel'; 2505 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/c ancel';
2302 2506
2303 var _response = _requester.request(_url, 2507 var _response = _requester.request(_url,
2304 "PUT", 2508 "PUT",
2305 body: _body, 2509 body: _body,
2306 queryParams: _queryParams, 2510 queryParams: _queryParams,
2307 uploadOptions: _uploadOptions, 2511 uploadOptions: _uploadOptions,
2308 uploadMedia: _uploadMedia, 2512 uploadMedia: _uploadMedia,
2309 downloadOptions: _downloadOptions); 2513 downloadOptions: _downloadOptions);
2310 return _response.then((data) => null); 2514 return _response.then((data) => null);
2311 } 2515 }
2312 2516
2313 /** 2517 /**
2314 * Create a turn-based match. 2518 * Create a turn-based match.
2315 * 2519 *
2316 * [request] - The metadata request object. 2520 * [request] - The metadata request object.
2317 * 2521 *
2318 * Request parameters: 2522 * Request parameters:
2319 * 2523 *
2524 * [consistencyToken] - The last-seen mutation timestamp.
2525 *
2320 * [language] - The preferred language to use for strings returned by this 2526 * [language] - The preferred language to use for strings returned by this
2321 * method. 2527 * method.
2322 * 2528 *
2323 * Completes with a [TurnBasedMatch]. 2529 * Completes with a [TurnBasedMatch].
2324 * 2530 *
2325 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2531 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2326 * error. 2532 * error.
2327 * 2533 *
2328 * If the used [http.Client] completes with an error when making a REST call, 2534 * If the used [http.Client] completes with an error when making a REST call,
2329 * this method will complete with the same error. 2535 * this method will complete with the same error.
2330 */ 2536 */
2331 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, {core .String language}) { 2537 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, {core .String consistencyToken, core.String language}) {
2332 var _url = null; 2538 var _url = null;
2333 var _queryParams = new core.Map(); 2539 var _queryParams = new core.Map();
2334 var _uploadMedia = null; 2540 var _uploadMedia = null;
2335 var _uploadOptions = null; 2541 var _uploadOptions = null;
2336 var _downloadOptions = commons.DownloadOptions.Metadata; 2542 var _downloadOptions = commons.DownloadOptions.Metadata;
2337 var _body = null; 2543 var _body = null;
2338 2544
2339 if (request != null) { 2545 if (request != null) {
2340 _body = convert.JSON.encode((request).toJson()); 2546 _body = convert.JSON.encode((request).toJson());
2341 } 2547 }
2548 if (consistencyToken != null) {
2549 _queryParams["consistencyToken"] = [consistencyToken];
2550 }
2342 if (language != null) { 2551 if (language != null) {
2343 _queryParams["language"] = [language]; 2552 _queryParams["language"] = [language];
2344 } 2553 }
2345 2554
2346 _url = 'turnbasedmatches/create'; 2555 _url = 'turnbasedmatches/create';
2347 2556
2348 var _response = _requester.request(_url, 2557 var _response = _requester.request(_url,
2349 "POST", 2558 "POST",
2350 body: _body, 2559 body: _body,
2351 queryParams: _queryParams, 2560 queryParams: _queryParams,
2352 uploadOptions: _uploadOptions, 2561 uploadOptions: _uploadOptions,
2353 uploadMedia: _uploadMedia, 2562 uploadMedia: _uploadMedia,
2354 downloadOptions: _downloadOptions); 2563 downloadOptions: _downloadOptions);
2355 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2564 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2356 } 2565 }
2357 2566
2358 /** 2567 /**
2359 * Decline an invitation to play a turn-based match. 2568 * Decline an invitation to play a turn-based match.
2360 * 2569 *
2361 * Request parameters: 2570 * Request parameters:
2362 * 2571 *
2363 * [matchId] - The ID of the match. 2572 * [matchId] - The ID of the match.
2364 * 2573 *
2574 * [consistencyToken] - The last-seen mutation timestamp.
2575 *
2365 * [language] - The preferred language to use for strings returned by this 2576 * [language] - The preferred language to use for strings returned by this
2366 * method. 2577 * method.
2367 * 2578 *
2368 * Completes with a [TurnBasedMatch]. 2579 * Completes with a [TurnBasedMatch].
2369 * 2580 *
2370 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2581 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2371 * error. 2582 * error.
2372 * 2583 *
2373 * If the used [http.Client] completes with an error when making a REST call, 2584 * If the used [http.Client] completes with an error when making a REST call,
2374 * this method will complete with the same error. 2585 * this method will complete with the same error.
2375 */ 2586 */
2376 async.Future<TurnBasedMatch> decline(core.String matchId, {core.String languag e}) { 2587 async.Future<TurnBasedMatch> decline(core.String matchId, {core.String consist encyToken, core.String language}) {
2377 var _url = null; 2588 var _url = null;
2378 var _queryParams = new core.Map(); 2589 var _queryParams = new core.Map();
2379 var _uploadMedia = null; 2590 var _uploadMedia = null;
2380 var _uploadOptions = null; 2591 var _uploadOptions = null;
2381 var _downloadOptions = commons.DownloadOptions.Metadata; 2592 var _downloadOptions = commons.DownloadOptions.Metadata;
2382 var _body = null; 2593 var _body = null;
2383 2594
2384 if (matchId == null) { 2595 if (matchId == null) {
2385 throw new core.ArgumentError("Parameter matchId is required."); 2596 throw new core.ArgumentError("Parameter matchId is required.");
2386 } 2597 }
2598 if (consistencyToken != null) {
2599 _queryParams["consistencyToken"] = [consistencyToken];
2600 }
2387 if (language != null) { 2601 if (language != null) {
2388 _queryParams["language"] = [language]; 2602 _queryParams["language"] = [language];
2389 } 2603 }
2390 2604
2391 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d ecline'; 2605 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d ecline';
2392 2606
2393 var _response = _requester.request(_url, 2607 var _response = _requester.request(_url,
2394 "PUT", 2608 "PUT",
2395 body: _body, 2609 body: _body,
2396 queryParams: _queryParams, 2610 queryParams: _queryParams,
2397 uploadOptions: _uploadOptions, 2611 uploadOptions: _uploadOptions,
2398 uploadMedia: _uploadMedia, 2612 uploadMedia: _uploadMedia,
2399 downloadOptions: _downloadOptions); 2613 downloadOptions: _downloadOptions);
2400 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2614 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2401 } 2615 }
2402 2616
2403 /** 2617 /**
2404 * Dismiss a turn-based match from the match list. The match will no longer 2618 * Dismiss a turn-based match from the match list. The match will no longer
2405 * show up in the list and will not generate notifications. 2619 * show up in the list and will not generate notifications.
2406 * 2620 *
2407 * Request parameters: 2621 * Request parameters:
2408 * 2622 *
2409 * [matchId] - The ID of the match. 2623 * [matchId] - The ID of the match.
2410 * 2624 *
2625 * [consistencyToken] - The last-seen mutation timestamp.
2626 *
2411 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2627 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2412 * error. 2628 * error.
2413 * 2629 *
2414 * If the used [http.Client] completes with an error when making a REST call, 2630 * If the used [http.Client] completes with an error when making a REST call,
2415 * this method will complete with the same error. 2631 * this method will complete with the same error.
2416 */ 2632 */
2417 async.Future dismiss(core.String matchId) { 2633 async.Future dismiss(core.String matchId, {core.String consistencyToken}) {
2418 var _url = null; 2634 var _url = null;
2419 var _queryParams = new core.Map(); 2635 var _queryParams = new core.Map();
2420 var _uploadMedia = null; 2636 var _uploadMedia = null;
2421 var _uploadOptions = null; 2637 var _uploadOptions = null;
2422 var _downloadOptions = commons.DownloadOptions.Metadata; 2638 var _downloadOptions = commons.DownloadOptions.Metadata;
2423 var _body = null; 2639 var _body = null;
2424 2640
2425 if (matchId == null) { 2641 if (matchId == null) {
2426 throw new core.ArgumentError("Parameter matchId is required."); 2642 throw new core.ArgumentError("Parameter matchId is required.");
2427 } 2643 }
2644 if (consistencyToken != null) {
2645 _queryParams["consistencyToken"] = [consistencyToken];
2646 }
2428 2647
2429 _downloadOptions = null; 2648 _downloadOptions = null;
2430 2649
2431 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d ismiss'; 2650 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d ismiss';
2432 2651
2433 var _response = _requester.request(_url, 2652 var _response = _requester.request(_url,
2434 "PUT", 2653 "PUT",
2435 body: _body, 2654 body: _body,
2436 queryParams: _queryParams, 2655 queryParams: _queryParams,
2437 uploadOptions: _uploadOptions, 2656 uploadOptions: _uploadOptions,
2438 uploadMedia: _uploadMedia, 2657 uploadMedia: _uploadMedia,
2439 downloadOptions: _downloadOptions); 2658 downloadOptions: _downloadOptions);
2440 return _response.then((data) => null); 2659 return _response.then((data) => null);
2441 } 2660 }
2442 2661
2443 /** 2662 /**
2444 * Finish a turn-based match. Each player should make this call once, after 2663 * Finish a turn-based match. Each player should make this call once, after
2445 * all results are in. Only the player whose turn it is may make the first 2664 * all results are in. Only the player whose turn it is may make the first
2446 * call to Finish, and can pass in the final match state. 2665 * call to Finish, and can pass in the final match state.
2447 * 2666 *
2448 * [request] - The metadata request object. 2667 * [request] - The metadata request object.
2449 * 2668 *
2450 * Request parameters: 2669 * Request parameters:
2451 * 2670 *
2452 * [matchId] - The ID of the match. 2671 * [matchId] - The ID of the match.
2453 * 2672 *
2673 * [consistencyToken] - The last-seen mutation timestamp.
2674 *
2454 * [language] - The preferred language to use for strings returned by this 2675 * [language] - The preferred language to use for strings returned by this
2455 * method. 2676 * method.
2456 * 2677 *
2457 * Completes with a [TurnBasedMatch]. 2678 * Completes with a [TurnBasedMatch].
2458 * 2679 *
2459 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2680 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2460 * error. 2681 * error.
2461 * 2682 *
2462 * If the used [http.Client] completes with an error when making a REST call, 2683 * If the used [http.Client] completes with an error when making a REST call,
2463 * this method will complete with the same error. 2684 * this method will complete with the same error.
2464 */ 2685 */
2465 async.Future<TurnBasedMatch> finish(TurnBasedMatchResults request, core.String matchId, {core.String language}) { 2686 async.Future<TurnBasedMatch> finish(TurnBasedMatchResults request, core.String matchId, {core.String consistencyToken, core.String language}) {
2466 var _url = null; 2687 var _url = null;
2467 var _queryParams = new core.Map(); 2688 var _queryParams = new core.Map();
2468 var _uploadMedia = null; 2689 var _uploadMedia = null;
2469 var _uploadOptions = null; 2690 var _uploadOptions = null;
2470 var _downloadOptions = commons.DownloadOptions.Metadata; 2691 var _downloadOptions = commons.DownloadOptions.Metadata;
2471 var _body = null; 2692 var _body = null;
2472 2693
2473 if (request != null) { 2694 if (request != null) {
2474 _body = convert.JSON.encode((request).toJson()); 2695 _body = convert.JSON.encode((request).toJson());
2475 } 2696 }
2476 if (matchId == null) { 2697 if (matchId == null) {
2477 throw new core.ArgumentError("Parameter matchId is required."); 2698 throw new core.ArgumentError("Parameter matchId is required.");
2478 } 2699 }
2700 if (consistencyToken != null) {
2701 _queryParams["consistencyToken"] = [consistencyToken];
2702 }
2479 if (language != null) { 2703 if (language != null) {
2480 _queryParams["language"] = [language]; 2704 _queryParams["language"] = [language];
2481 } 2705 }
2482 2706
2483 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/f inish'; 2707 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/f inish';
2484 2708
2485 var _response = _requester.request(_url, 2709 var _response = _requester.request(_url,
2486 "PUT", 2710 "PUT",
2487 body: _body, 2711 body: _body,
2488 queryParams: _queryParams, 2712 queryParams: _queryParams,
2489 uploadOptions: _uploadOptions, 2713 uploadOptions: _uploadOptions,
2490 uploadMedia: _uploadMedia, 2714 uploadMedia: _uploadMedia,
2491 downloadOptions: _downloadOptions); 2715 downloadOptions: _downloadOptions);
2492 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2716 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2493 } 2717 }
2494 2718
2495 /** 2719 /**
2496 * Get the data for a turn-based match. 2720 * Get the data for a turn-based match.
2497 * 2721 *
2498 * Request parameters: 2722 * Request parameters:
2499 * 2723 *
2500 * [matchId] - The ID of the match. 2724 * [matchId] - The ID of the match.
2501 * 2725 *
2726 * [consistencyToken] - The last-seen mutation timestamp.
2727 *
2502 * [includeMatchData] - Get match data along with metadata. 2728 * [includeMatchData] - Get match data along with metadata.
2503 * 2729 *
2504 * [language] - The preferred language to use for strings returned by this 2730 * [language] - The preferred language to use for strings returned by this
2505 * method. 2731 * method.
2506 * 2732 *
2507 * Completes with a [TurnBasedMatch]. 2733 * Completes with a [TurnBasedMatch].
2508 * 2734 *
2509 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2735 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2510 * error. 2736 * error.
2511 * 2737 *
2512 * If the used [http.Client] completes with an error when making a REST call, 2738 * If the used [http.Client] completes with an error when making a REST call,
2513 * this method will complete with the same error. 2739 * this method will complete with the same error.
2514 */ 2740 */
2515 async.Future<TurnBasedMatch> get(core.String matchId, {core.bool includeMatchD ata, core.String language}) { 2741 async.Future<TurnBasedMatch> get(core.String matchId, {core.String consistency Token, core.bool includeMatchData, core.String language}) {
2516 var _url = null; 2742 var _url = null;
2517 var _queryParams = new core.Map(); 2743 var _queryParams = new core.Map();
2518 var _uploadMedia = null; 2744 var _uploadMedia = null;
2519 var _uploadOptions = null; 2745 var _uploadOptions = null;
2520 var _downloadOptions = commons.DownloadOptions.Metadata; 2746 var _downloadOptions = commons.DownloadOptions.Metadata;
2521 var _body = null; 2747 var _body = null;
2522 2748
2523 if (matchId == null) { 2749 if (matchId == null) {
2524 throw new core.ArgumentError("Parameter matchId is required."); 2750 throw new core.ArgumentError("Parameter matchId is required.");
2525 } 2751 }
2752 if (consistencyToken != null) {
2753 _queryParams["consistencyToken"] = [consistencyToken];
2754 }
2526 if (includeMatchData != null) { 2755 if (includeMatchData != null) {
2527 _queryParams["includeMatchData"] = ["${includeMatchData}"]; 2756 _queryParams["includeMatchData"] = ["${includeMatchData}"];
2528 } 2757 }
2529 if (language != null) { 2758 if (language != null) {
2530 _queryParams["language"] = [language]; 2759 _queryParams["language"] = [language];
2531 } 2760 }
2532 2761
2533 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId'); 2762 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId');
2534 2763
2535 var _response = _requester.request(_url, 2764 var _response = _requester.request(_url,
2536 "GET", 2765 "GET",
2537 body: _body, 2766 body: _body,
2538 queryParams: _queryParams, 2767 queryParams: _queryParams,
2539 uploadOptions: _uploadOptions, 2768 uploadOptions: _uploadOptions,
2540 uploadMedia: _uploadMedia, 2769 uploadMedia: _uploadMedia,
2541 downloadOptions: _downloadOptions); 2770 downloadOptions: _downloadOptions);
2542 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2771 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2543 } 2772 }
2544 2773
2545 /** 2774 /**
2546 * Join a turn-based match. 2775 * Join a turn-based match.
2547 * 2776 *
2548 * Request parameters: 2777 * Request parameters:
2549 * 2778 *
2550 * [matchId] - The ID of the match. 2779 * [matchId] - The ID of the match.
2551 * 2780 *
2781 * [consistencyToken] - The last-seen mutation timestamp.
2782 *
2552 * [language] - The preferred language to use for strings returned by this 2783 * [language] - The preferred language to use for strings returned by this
2553 * method. 2784 * method.
2554 * 2785 *
2555 * Completes with a [TurnBasedMatch]. 2786 * Completes with a [TurnBasedMatch].
2556 * 2787 *
2557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2788 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2558 * error. 2789 * error.
2559 * 2790 *
2560 * If the used [http.Client] completes with an error when making a REST call, 2791 * If the used [http.Client] completes with an error when making a REST call,
2561 * this method will complete with the same error. 2792 * this method will complete with the same error.
2562 */ 2793 */
2563 async.Future<TurnBasedMatch> join(core.String matchId, {core.String language}) { 2794 async.Future<TurnBasedMatch> join(core.String matchId, {core.String consistenc yToken, core.String language}) {
2564 var _url = null; 2795 var _url = null;
2565 var _queryParams = new core.Map(); 2796 var _queryParams = new core.Map();
2566 var _uploadMedia = null; 2797 var _uploadMedia = null;
2567 var _uploadOptions = null; 2798 var _uploadOptions = null;
2568 var _downloadOptions = commons.DownloadOptions.Metadata; 2799 var _downloadOptions = commons.DownloadOptions.Metadata;
2569 var _body = null; 2800 var _body = null;
2570 2801
2571 if (matchId == null) { 2802 if (matchId == null) {
2572 throw new core.ArgumentError("Parameter matchId is required."); 2803 throw new core.ArgumentError("Parameter matchId is required.");
2573 } 2804 }
2805 if (consistencyToken != null) {
2806 _queryParams["consistencyToken"] = [consistencyToken];
2807 }
2574 if (language != null) { 2808 if (language != null) {
2575 _queryParams["language"] = [language]; 2809 _queryParams["language"] = [language];
2576 } 2810 }
2577 2811
2578 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/j oin'; 2812 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/j oin';
2579 2813
2580 var _response = _requester.request(_url, 2814 var _response = _requester.request(_url,
2581 "PUT", 2815 "PUT",
2582 body: _body, 2816 body: _body,
2583 queryParams: _queryParams, 2817 queryParams: _queryParams,
2584 uploadOptions: _uploadOptions, 2818 uploadOptions: _uploadOptions,
2585 uploadMedia: _uploadMedia, 2819 uploadMedia: _uploadMedia,
2586 downloadOptions: _downloadOptions); 2820 downloadOptions: _downloadOptions);
2587 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2821 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2588 } 2822 }
2589 2823
2590 /** 2824 /**
2591 * Leave a turn-based match when it is not the current player's turn, without 2825 * Leave a turn-based match when it is not the current player's turn, without
2592 * canceling the match. 2826 * canceling the match.
2593 * 2827 *
2594 * Request parameters: 2828 * Request parameters:
2595 * 2829 *
2596 * [matchId] - The ID of the match. 2830 * [matchId] - The ID of the match.
2597 * 2831 *
2832 * [consistencyToken] - The last-seen mutation timestamp.
2833 *
2598 * [language] - The preferred language to use for strings returned by this 2834 * [language] - The preferred language to use for strings returned by this
2599 * method. 2835 * method.
2600 * 2836 *
2601 * Completes with a [TurnBasedMatch]. 2837 * Completes with a [TurnBasedMatch].
2602 * 2838 *
2603 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2839 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2604 * error. 2840 * error.
2605 * 2841 *
2606 * If the used [http.Client] completes with an error when making a REST call, 2842 * If the used [http.Client] completes with an error when making a REST call,
2607 * this method will complete with the same error. 2843 * this method will complete with the same error.
2608 */ 2844 */
2609 async.Future<TurnBasedMatch> leave(core.String matchId, {core.String language} ) { 2845 async.Future<TurnBasedMatch> leave(core.String matchId, {core.String consisten cyToken, core.String language}) {
2610 var _url = null; 2846 var _url = null;
2611 var _queryParams = new core.Map(); 2847 var _queryParams = new core.Map();
2612 var _uploadMedia = null; 2848 var _uploadMedia = null;
2613 var _uploadOptions = null; 2849 var _uploadOptions = null;
2614 var _downloadOptions = commons.DownloadOptions.Metadata; 2850 var _downloadOptions = commons.DownloadOptions.Metadata;
2615 var _body = null; 2851 var _body = null;
2616 2852
2617 if (matchId == null) { 2853 if (matchId == null) {
2618 throw new core.ArgumentError("Parameter matchId is required."); 2854 throw new core.ArgumentError("Parameter matchId is required.");
2619 } 2855 }
2856 if (consistencyToken != null) {
2857 _queryParams["consistencyToken"] = [consistencyToken];
2858 }
2620 if (language != null) { 2859 if (language != null) {
2621 _queryParams["language"] = [language]; 2860 _queryParams["language"] = [language];
2622 } 2861 }
2623 2862
2624 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l eave'; 2863 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l eave';
2625 2864
2626 var _response = _requester.request(_url, 2865 var _response = _requester.request(_url,
2627 "PUT", 2866 "PUT",
2628 body: _body, 2867 body: _body,
2629 queryParams: _queryParams, 2868 queryParams: _queryParams,
2630 uploadOptions: _uploadOptions, 2869 uploadOptions: _uploadOptions,
2631 uploadMedia: _uploadMedia, 2870 uploadMedia: _uploadMedia,
2632 downloadOptions: _downloadOptions); 2871 downloadOptions: _downloadOptions);
2633 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2872 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2634 } 2873 }
2635 2874
2636 /** 2875 /**
2637 * Leave a turn-based match during the current player's turn, without 2876 * Leave a turn-based match during the current player's turn, without
2638 * canceling the match. 2877 * canceling the match.
2639 * 2878 *
2640 * Request parameters: 2879 * Request parameters:
2641 * 2880 *
2642 * [matchId] - The ID of the match. 2881 * [matchId] - The ID of the match.
2643 * 2882 *
2644 * [matchVersion] - The version of the match being updated. 2883 * [matchVersion] - The version of the match being updated.
2645 * 2884 *
2885 * [consistencyToken] - The last-seen mutation timestamp.
2886 *
2646 * [language] - The preferred language to use for strings returned by this 2887 * [language] - The preferred language to use for strings returned by this
2647 * method. 2888 * method.
2648 * 2889 *
2649 * [pendingParticipantId] - The ID of another participant who should take 2890 * [pendingParticipantId] - The ID of another participant who should take
2650 * their turn next. If not set, the match will wait for other player(s) to 2891 * their turn next. If not set, the match will wait for other player(s) to
2651 * join via automatching; this is only valid if automatch criteria is set on 2892 * join via automatching; this is only valid if automatch criteria is set on
2652 * the match with remaining slots for automatched players. 2893 * the match with remaining slots for automatched players.
2653 * 2894 *
2654 * Completes with a [TurnBasedMatch]. 2895 * Completes with a [TurnBasedMatch].
2655 * 2896 *
2656 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2897 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2657 * error. 2898 * error.
2658 * 2899 *
2659 * If the used [http.Client] completes with an error when making a REST call, 2900 * If the used [http.Client] completes with an error when making a REST call,
2660 * this method will complete with the same error. 2901 * this method will complete with the same error.
2661 */ 2902 */
2662 async.Future<TurnBasedMatch> leaveTurn(core.String matchId, core.int matchVers ion, {core.String language, core.String pendingParticipantId}) { 2903 async.Future<TurnBasedMatch> leaveTurn(core.String matchId, core.int matchVers ion, {core.String consistencyToken, core.String language, core.String pendingPar ticipantId}) {
2663 var _url = null; 2904 var _url = null;
2664 var _queryParams = new core.Map(); 2905 var _queryParams = new core.Map();
2665 var _uploadMedia = null; 2906 var _uploadMedia = null;
2666 var _uploadOptions = null; 2907 var _uploadOptions = null;
2667 var _downloadOptions = commons.DownloadOptions.Metadata; 2908 var _downloadOptions = commons.DownloadOptions.Metadata;
2668 var _body = null; 2909 var _body = null;
2669 2910
2670 if (matchId == null) { 2911 if (matchId == null) {
2671 throw new core.ArgumentError("Parameter matchId is required."); 2912 throw new core.ArgumentError("Parameter matchId is required.");
2672 } 2913 }
2673 if (matchVersion == null) { 2914 if (matchVersion == null) {
2674 throw new core.ArgumentError("Parameter matchVersion is required."); 2915 throw new core.ArgumentError("Parameter matchVersion is required.");
2675 } 2916 }
2676 _queryParams["matchVersion"] = ["${matchVersion}"]; 2917 _queryParams["matchVersion"] = ["${matchVersion}"];
2918 if (consistencyToken != null) {
2919 _queryParams["consistencyToken"] = [consistencyToken];
2920 }
2677 if (language != null) { 2921 if (language != null) {
2678 _queryParams["language"] = [language]; 2922 _queryParams["language"] = [language];
2679 } 2923 }
2680 if (pendingParticipantId != null) { 2924 if (pendingParticipantId != null) {
2681 _queryParams["pendingParticipantId"] = [pendingParticipantId]; 2925 _queryParams["pendingParticipantId"] = [pendingParticipantId];
2682 } 2926 }
2683 2927
2684 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l eaveTurn'; 2928 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l eaveTurn';
2685 2929
2686 var _response = _requester.request(_url, 2930 var _response = _requester.request(_url,
2687 "PUT", 2931 "PUT",
2688 body: _body, 2932 body: _body,
2689 queryParams: _queryParams, 2933 queryParams: _queryParams,
2690 uploadOptions: _uploadOptions, 2934 uploadOptions: _uploadOptions,
2691 uploadMedia: _uploadMedia, 2935 uploadMedia: _uploadMedia,
2692 downloadOptions: _downloadOptions); 2936 downloadOptions: _downloadOptions);
2693 return _response.then((data) => new TurnBasedMatch.fromJson(data)); 2937 return _response.then((data) => new TurnBasedMatch.fromJson(data));
2694 } 2938 }
2695 2939
2696 /** 2940 /**
2697 * Returns turn-based matches the player is or was involved in. 2941 * Returns turn-based matches the player is or was involved in.
2698 * 2942 *
2699 * Request parameters: 2943 * Request parameters:
2700 * 2944 *
2945 * [consistencyToken] - The last-seen mutation timestamp.
2946 *
2701 * [includeMatchData] - True if match data should be returned in the response. 2947 * [includeMatchData] - True if match data should be returned in the response.
2702 * Note that not all data will necessarily be returned if include_match_data 2948 * Note that not all data will necessarily be returned if include_match_data
2703 * is true; the server may decide to only return data for some of the matches 2949 * is true; the server may decide to only return data for some of the matches
2704 * to limit download size for the client. The remainder of the data for these 2950 * to limit download size for the client. The remainder of the data for these
2705 * matches will be retrievable on request. 2951 * matches will be retrievable on request.
2706 * 2952 *
2707 * [language] - The preferred language to use for strings returned by this 2953 * [language] - The preferred language to use for strings returned by this
2708 * method. 2954 * method.
2709 * 2955 *
2710 * [maxCompletedMatches] - The maximum number of completed or canceled matches 2956 * [maxCompletedMatches] - The maximum number of completed or canceled matches
2711 * to return in the response. If not set, all matches returned could be 2957 * to return in the response. If not set, all matches returned could be
2712 * completed or canceled. 2958 * completed or canceled.
2713 * Value must be between "0" and "500". 2959 * Value must be between "0" and "500".
2714 * 2960 *
2715 * [maxResults] - The maximum number of matches to return in the response, 2961 * [maxResults] - The maximum number of matches to return in the response,
2716 * used for paging. For any response, the actual number of matches to return 2962 * used for paging. For any response, the actual number of matches to return
2717 * may be less than the specified maxResults. 2963 * may be less than the specified maxResults.
2718 * Value must be between "1" and "500". 2964 * Value must be between "1" and "500".
2719 * 2965 *
2720 * [pageToken] - The token returned by the previous request. 2966 * [pageToken] - The token returned by the previous request.
2721 * 2967 *
2722 * Completes with a [TurnBasedMatchList]. 2968 * Completes with a [TurnBasedMatchList].
2723 * 2969 *
2724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2970 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2725 * error. 2971 * error.
2726 * 2972 *
2727 * If the used [http.Client] completes with an error when making a REST call, 2973 * If the used [http.Client] completes with an error when making a REST call,
2728 * this method will complete with the same error. 2974 * this method will complete with the same error.
2729 */ 2975 */
2730 async.Future<TurnBasedMatchList> list({core.bool includeMatchData, core.String language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo ken}) { 2976 async.Future<TurnBasedMatchList> list({core.String consistencyToken, core.bool includeMatchData, core.String language, core.int maxCompletedMatches, core.int maxResults, core.String pageToken}) {
2731 var _url = null; 2977 var _url = null;
2732 var _queryParams = new core.Map(); 2978 var _queryParams = new core.Map();
2733 var _uploadMedia = null; 2979 var _uploadMedia = null;
2734 var _uploadOptions = null; 2980 var _uploadOptions = null;
2735 var _downloadOptions = commons.DownloadOptions.Metadata; 2981 var _downloadOptions = commons.DownloadOptions.Metadata;
2736 var _body = null; 2982 var _body = null;
2737 2983
2984 if (consistencyToken != null) {
2985 _queryParams["consistencyToken"] = [consistencyToken];
2986 }
2738 if (includeMatchData != null) { 2987 if (includeMatchData != null) {
2739 _queryParams["includeMatchData"] = ["${includeMatchData}"]; 2988 _queryParams["includeMatchData"] = ["${includeMatchData}"];
2740 } 2989 }
2741 if (language != null) { 2990 if (language != null) {
2742 _queryParams["language"] = [language]; 2991 _queryParams["language"] = [language];
2743 } 2992 }
2744 if (maxCompletedMatches != null) { 2993 if (maxCompletedMatches != null) {
2745 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; 2994 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"];
2746 } 2995 }
2747 if (maxResults != null) { 2996 if (maxResults != null) {
(...skipping 18 matching lines...) Expand all
2766 /** 3015 /**
2767 * Create a rematch of a match that was previously completed, with the same 3016 * Create a rematch of a match that was previously completed, with the same
2768 * participants. This can be called by only one player on a match still in 3017 * participants. This can be called by only one player on a match still in
2769 * their list; the player must have called Finish first. Returns the newly 3018 * their list; the player must have called Finish first. Returns the newly
2770 * created match; it will be the caller's turn. 3019 * created match; it will be the caller's turn.
2771 * 3020 *
2772 * Request parameters: 3021 * Request parameters:
2773 * 3022 *
2774 * [matchId] - The ID of the match. 3023 * [matchId] - The ID of the match.
2775 * 3024 *
3025 * [consistencyToken] - The last-seen mutation timestamp.
3026 *
2776 * [language] - The preferred language to use for strings returned by this 3027 * [language] - The preferred language to use for strings returned by this
2777 * method. 3028 * method.
2778 * 3029 *
2779 * [requestId] - A randomly generated numeric ID for each request specified by 3030 * [requestId] - A randomly generated numeric ID for each request specified by
2780 * the caller. This number is used at the server to ensure that the request is 3031 * the caller. This number is used at the server to ensure that the request is
2781 * handled correctly across retries. 3032 * handled correctly across retries.
2782 * 3033 *
2783 * Completes with a [TurnBasedMatchRematch]. 3034 * Completes with a [TurnBasedMatchRematch].
2784 * 3035 *
2785 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3036 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2786 * error. 3037 * error.
2787 * 3038 *
2788 * If the used [http.Client] completes with an error when making a REST call, 3039 * If the used [http.Client] completes with an error when making a REST call,
2789 * this method will complete with the same error. 3040 * this method will complete with the same error.
2790 */ 3041 */
2791 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, {core.String language, core.String requestId}) { 3042 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, {core.String consistencyToken, core.String language, core.String requestId}) {
2792 var _url = null; 3043 var _url = null;
2793 var _queryParams = new core.Map(); 3044 var _queryParams = new core.Map();
2794 var _uploadMedia = null; 3045 var _uploadMedia = null;
2795 var _uploadOptions = null; 3046 var _uploadOptions = null;
2796 var _downloadOptions = commons.DownloadOptions.Metadata; 3047 var _downloadOptions = commons.DownloadOptions.Metadata;
2797 var _body = null; 3048 var _body = null;
2798 3049
2799 if (matchId == null) { 3050 if (matchId == null) {
2800 throw new core.ArgumentError("Parameter matchId is required."); 3051 throw new core.ArgumentError("Parameter matchId is required.");
2801 } 3052 }
3053 if (consistencyToken != null) {
3054 _queryParams["consistencyToken"] = [consistencyToken];
3055 }
2802 if (language != null) { 3056 if (language != null) {
2803 _queryParams["language"] = [language]; 3057 _queryParams["language"] = [language];
2804 } 3058 }
2805 if (requestId != null) { 3059 if (requestId != null) {
2806 _queryParams["requestId"] = [requestId]; 3060 _queryParams["requestId"] = [requestId];
2807 } 3061 }
2808 3062
2809 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/r ematch'; 3063 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/r ematch';
2810 3064
2811 var _response = _requester.request(_url, 3065 var _response = _requester.request(_url,
2812 "POST", 3066 "POST",
2813 body: _body, 3067 body: _body,
2814 queryParams: _queryParams, 3068 queryParams: _queryParams,
2815 uploadOptions: _uploadOptions, 3069 uploadOptions: _uploadOptions,
2816 uploadMedia: _uploadMedia, 3070 uploadMedia: _uploadMedia,
2817 downloadOptions: _downloadOptions); 3071 downloadOptions: _downloadOptions);
2818 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data)); 3072 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data));
2819 } 3073 }
2820 3074
2821 /** 3075 /**
2822 * Returns turn-based matches the player is or was involved in that changed 3076 * Returns turn-based matches the player is or was involved in that changed
2823 * since the last sync call, with the least recent changes coming first. 3077 * since the last sync call, with the least recent changes coming first.
2824 * Matches that should be removed from the local cache will have a status of 3078 * Matches that should be removed from the local cache will have a status of
2825 * MATCH_DELETED. 3079 * MATCH_DELETED.
2826 * 3080 *
2827 * Request parameters: 3081 * Request parameters:
2828 * 3082 *
3083 * [consistencyToken] - The last-seen mutation timestamp.
3084 *
2829 * [includeMatchData] - True if match data should be returned in the response. 3085 * [includeMatchData] - True if match data should be returned in the response.
2830 * Note that not all data will necessarily be returned if include_match_data 3086 * Note that not all data will necessarily be returned if include_match_data
2831 * is true; the server may decide to only return data for some of the matches 3087 * is true; the server may decide to only return data for some of the matches
2832 * to limit download size for the client. The remainder of the data for these 3088 * to limit download size for the client. The remainder of the data for these
2833 * matches will be retrievable on request. 3089 * matches will be retrievable on request.
2834 * 3090 *
2835 * [language] - The preferred language to use for strings returned by this 3091 * [language] - The preferred language to use for strings returned by this
2836 * method. 3092 * method.
2837 * 3093 *
2838 * [maxCompletedMatches] - The maximum number of completed or canceled matches 3094 * [maxCompletedMatches] - The maximum number of completed or canceled matches
2839 * to return in the response. If not set, all matches returned could be 3095 * to return in the response. If not set, all matches returned could be
2840 * completed or canceled. 3096 * completed or canceled.
2841 * Value must be between "0" and "500". 3097 * Value must be between "0" and "500".
2842 * 3098 *
2843 * [maxResults] - The maximum number of matches to return in the response, 3099 * [maxResults] - The maximum number of matches to return in the response,
2844 * used for paging. For any response, the actual number of matches to return 3100 * used for paging. For any response, the actual number of matches to return
2845 * may be less than the specified maxResults. 3101 * may be less than the specified maxResults.
2846 * Value must be between "1" and "500". 3102 * Value must be between "1" and "500".
2847 * 3103 *
2848 * [pageToken] - The token returned by the previous request. 3104 * [pageToken] - The token returned by the previous request.
2849 * 3105 *
2850 * Completes with a [TurnBasedMatchSync]. 3106 * Completes with a [TurnBasedMatchSync].
2851 * 3107 *
2852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2853 * error. 3109 * error.
2854 * 3110 *
2855 * If the used [http.Client] completes with an error when making a REST call, 3111 * If the used [http.Client] completes with an error when making a REST call,
2856 * this method will complete with the same error. 3112 * this method will complete with the same error.
2857 */ 3113 */
2858 async.Future<TurnBasedMatchSync> sync({core.bool includeMatchData, core.String language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo ken}) { 3114 async.Future<TurnBasedMatchSync> sync({core.String consistencyToken, core.bool includeMatchData, core.String language, core.int maxCompletedMatches, core.int maxResults, core.String pageToken}) {
2859 var _url = null; 3115 var _url = null;
2860 var _queryParams = new core.Map(); 3116 var _queryParams = new core.Map();
2861 var _uploadMedia = null; 3117 var _uploadMedia = null;
2862 var _uploadOptions = null; 3118 var _uploadOptions = null;
2863 var _downloadOptions = commons.DownloadOptions.Metadata; 3119 var _downloadOptions = commons.DownloadOptions.Metadata;
2864 var _body = null; 3120 var _body = null;
2865 3121
3122 if (consistencyToken != null) {
3123 _queryParams["consistencyToken"] = [consistencyToken];
3124 }
2866 if (includeMatchData != null) { 3125 if (includeMatchData != null) {
2867 _queryParams["includeMatchData"] = ["${includeMatchData}"]; 3126 _queryParams["includeMatchData"] = ["${includeMatchData}"];
2868 } 3127 }
2869 if (language != null) { 3128 if (language != null) {
2870 _queryParams["language"] = [language]; 3129 _queryParams["language"] = [language];
2871 } 3130 }
2872 if (maxCompletedMatches != null) { 3131 if (maxCompletedMatches != null) {
2873 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; 3132 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"];
2874 } 3133 }
2875 if (maxResults != null) { 3134 if (maxResults != null) {
(...skipping 17 matching lines...) Expand all
2893 3152
2894 /** 3153 /**
2895 * Commit the results of a player turn. 3154 * Commit the results of a player turn.
2896 * 3155 *
2897 * [request] - The metadata request object. 3156 * [request] - The metadata request object.
2898 * 3157 *
2899 * Request parameters: 3158 * Request parameters:
2900 * 3159 *
2901 * [matchId] - The ID of the match. 3160 * [matchId] - The ID of the match.
2902 * 3161 *
3162 * [consistencyToken] - The last-seen mutation timestamp.
3163 *
2903 * [language] - The preferred language to use for strings returned by this 3164 * [language] - The preferred language to use for strings returned by this
2904 * method. 3165 * method.
2905 * 3166 *
2906 * Completes with a [TurnBasedMatch]. 3167 * Completes with a [TurnBasedMatch].
2907 * 3168 *
2908 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2909 * error. 3170 * error.
2910 * 3171 *
2911 * If the used [http.Client] completes with an error when making a REST call, 3172 * If the used [http.Client] completes with an error when making a REST call,
2912 * this method will complete with the same error. 3173 * this method will complete with the same error.
2913 */ 3174 */
2914 async.Future<TurnBasedMatch> takeTurn(TurnBasedMatchTurn request, core.String matchId, {core.String language}) { 3175 async.Future<TurnBasedMatch> takeTurn(TurnBasedMatchTurn request, core.String matchId, {core.String consistencyToken, core.String language}) {
2915 var _url = null; 3176 var _url = null;
2916 var _queryParams = new core.Map(); 3177 var _queryParams = new core.Map();
2917 var _uploadMedia = null; 3178 var _uploadMedia = null;
2918 var _uploadOptions = null; 3179 var _uploadOptions = null;
2919 var _downloadOptions = commons.DownloadOptions.Metadata; 3180 var _downloadOptions = commons.DownloadOptions.Metadata;
2920 var _body = null; 3181 var _body = null;
2921 3182
2922 if (request != null) { 3183 if (request != null) {
2923 _body = convert.JSON.encode((request).toJson()); 3184 _body = convert.JSON.encode((request).toJson());
2924 } 3185 }
2925 if (matchId == null) { 3186 if (matchId == null) {
2926 throw new core.ArgumentError("Parameter matchId is required."); 3187 throw new core.ArgumentError("Parameter matchId is required.");
2927 } 3188 }
3189 if (consistencyToken != null) {
3190 _queryParams["consistencyToken"] = [consistencyToken];
3191 }
2928 if (language != null) { 3192 if (language != null) {
2929 _queryParams["language"] = [language]; 3193 _queryParams["language"] = [language];
2930 } 3194 }
2931 3195
2932 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/t urn'; 3196 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/t urn';
2933 3197
2934 var _response = _requester.request(_url, 3198 var _response = _requester.request(_url,
2935 "PUT", 3199 "PUT",
2936 body: _body, 3200 body: _body,
2937 queryParams: _queryParams, 3201 queryParams: _queryParams,
(...skipping 3595 matching lines...) Expand 10 before | Expand all | Expand 10 after
6533 } 6797 }
6534 6798
6535 /** A push token ID for iOS devices. */ 6799 /** A push token ID for iOS devices. */
6536 class PushTokenIdIos { 6800 class PushTokenIdIos {
6537 /** 6801 /**
6538 * Device token supplied by an iOS system call to register for remote 6802 * Device token supplied by an iOS system call to register for remote
6539 * notifications. Encode this field as web-safe base64. 6803 * notifications. Encode this field as web-safe base64.
6540 */ 6804 */
6541 core.String apnsDeviceToken; 6805 core.String apnsDeviceToken;
6542 core.List<core.int> get apnsDeviceTokenAsBytes { 6806 core.List<core.int> get apnsDeviceTokenAsBytes {
6543 return crypto.CryptoUtils.base64StringToBytes(apnsDeviceToken); 6807 return convert.BASE64.decode(apnsDeviceToken);
6544 } 6808 }
6545 6809
6546 void set apnsDeviceTokenAsBytes(core.List<core.int> _bytes) { 6810 void set apnsDeviceTokenAsBytes(core.List<core.int> _bytes) {
6547 apnsDeviceToken = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); 6811 apnsDeviceToken = convert.BASE64.encode(_bytes).replaceAll("/", "_").replace All("+", "-");
6548 } 6812 }
6549 /** 6813 /**
6550 * Indicates whether this token should be used for the production or sandbox 6814 * Indicates whether this token should be used for the production or sandbox
6551 * APNS server. 6815 * APNS server.
6552 */ 6816 */
6553 core.String apnsEnvironment; 6817 core.String apnsEnvironment;
6554 6818
6555 PushTokenIdIos(); 6819 PushTokenIdIos();
6556 6820
6557 PushTokenIdIos.fromJson(core.Map _json) { 6821 PushTokenIdIos.fromJson(core.Map _json) {
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
6947 7211
6948 /** This is a JSON template for a Quest Milestone resource. */ 7212 /** This is a JSON template for a Quest Milestone resource. */
6949 class QuestMilestone { 7213 class QuestMilestone {
6950 /** 7214 /**
6951 * The completion reward data of the milestone, represented as a 7215 * The completion reward data of the milestone, represented as a
6952 * Base64-encoded string. This is a developer-specified binary blob with size 7216 * Base64-encoded string. This is a developer-specified binary blob with size
6953 * between 0 and 2 KB before encoding. 7217 * between 0 and 2 KB before encoding.
6954 */ 7218 */
6955 core.String completionRewardData; 7219 core.String completionRewardData;
6956 core.List<core.int> get completionRewardDataAsBytes { 7220 core.List<core.int> get completionRewardDataAsBytes {
6957 return crypto.CryptoUtils.base64StringToBytes(completionRewardData); 7221 return convert.BASE64.decode(completionRewardData);
6958 } 7222 }
6959 7223
6960 void set completionRewardDataAsBytes(core.List<core.int> _bytes) { 7224 void set completionRewardDataAsBytes(core.List<core.int> _bytes) {
6961 completionRewardData = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: tru e); 7225 completionRewardData = convert.BASE64.encode(_bytes).replaceAll("/", "_").re placeAll("+", "-");
6962 } 7226 }
6963 /** The criteria of the milestone. */ 7227 /** The criteria of the milestone. */
6964 core.List<QuestCriterion> criteria; 7228 core.List<QuestCriterion> criteria;
6965 /** The milestone ID. */ 7229 /** The milestone ID. */
6966 core.String id; 7230 core.String id;
6967 /** 7231 /**
6968 * Uniquely identifies the type of this resource. Value is always the fixed 7232 * Uniquely identifies the type of this resource. Value is always the fixed
6969 * string games#questMilestone. 7233 * string games#questMilestone.
6970 */ 7234 */
6971 core.String kind; 7235 core.String kind;
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
8730 } 8994 }
8731 8995
8732 /** This is a JSON template for a turn-based match data object. */ 8996 /** This is a JSON template for a turn-based match data object. */
8733 class TurnBasedMatchData { 8997 class TurnBasedMatchData {
8734 /** 8998 /**
8735 * The byte representation of the data (limited to 128 kB), as a 8999 * The byte representation of the data (limited to 128 kB), as a
8736 * Base64-encoded string with the URL_SAFE encoding option. 9000 * Base64-encoded string with the URL_SAFE encoding option.
8737 */ 9001 */
8738 core.String data; 9002 core.String data;
8739 core.List<core.int> get dataAsBytes { 9003 core.List<core.int> get dataAsBytes {
8740 return crypto.CryptoUtils.base64StringToBytes(data); 9004 return convert.BASE64.decode(data);
8741 } 9005 }
8742 9006
8743 void set dataAsBytes(core.List<core.int> _bytes) { 9007 void set dataAsBytes(core.List<core.int> _bytes) {
8744 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); 9008 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
8745 } 9009 }
8746 /** 9010 /**
8747 * True if this match has data available but it wasn't returned in a list 9011 * True if this match has data available but it wasn't returned in a list
8748 * response; fetching the match individually will retrieve this data. 9012 * response; fetching the match individually will retrieve this data.
8749 */ 9013 */
8750 core.bool dataAvailable; 9014 core.bool dataAvailable;
8751 /** 9015 /**
8752 * Uniquely identifies the type of this resource. Value is always the fixed 9016 * Uniquely identifies the type of this resource. Value is always the fixed
8753 * string games#turnBasedMatchData. 9017 * string games#turnBasedMatchData.
8754 */ 9018 */
(...skipping 29 matching lines...) Expand all
8784 } 9048 }
8785 9049
8786 /** This is a JSON template for sending a turn-based match data object. */ 9050 /** This is a JSON template for sending a turn-based match data object. */
8787 class TurnBasedMatchDataRequest { 9051 class TurnBasedMatchDataRequest {
8788 /** 9052 /**
8789 * The byte representation of the data (limited to 128 kB), as a 9053 * The byte representation of the data (limited to 128 kB), as a
8790 * Base64-encoded string with the URL_SAFE encoding option. 9054 * Base64-encoded string with the URL_SAFE encoding option.
8791 */ 9055 */
8792 core.String data; 9056 core.String data;
8793 core.List<core.int> get dataAsBytes { 9057 core.List<core.int> get dataAsBytes {
8794 return crypto.CryptoUtils.base64StringToBytes(data); 9058 return convert.BASE64.decode(data);
8795 } 9059 }
8796 9060
8797 void set dataAsBytes(core.List<core.int> _bytes) { 9061 void set dataAsBytes(core.List<core.int> _bytes) {
8798 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); 9062 data = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
8799 } 9063 }
8800 /** 9064 /**
8801 * Uniquely identifies the type of this resource. Value is always the fixed 9065 * Uniquely identifies the type of this resource. Value is always the fixed
8802 * string games#turnBasedMatchDataRequest. 9066 * string games#turnBasedMatchDataRequest.
8803 */ 9067 */
8804 core.String kind; 9068 core.String kind;
8805 9069
8806 TurnBasedMatchDataRequest(); 9070 TurnBasedMatchDataRequest();
8807 9071
8808 TurnBasedMatchDataRequest.fromJson(core.Map _json) { 9072 TurnBasedMatchDataRequest.fromJson(core.Map _json) {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
9211 } 9475 }
9212 if (pendingParticipantId != null) { 9476 if (pendingParticipantId != null) {
9213 _json["pendingParticipantId"] = pendingParticipantId; 9477 _json["pendingParticipantId"] = pendingParticipantId;
9214 } 9478 }
9215 if (results != null) { 9479 if (results != null) {
9216 _json["results"] = results.map((value) => (value).toJson()).toList(); 9480 _json["results"] = results.map((value) => (value).toJson()).toList();
9217 } 9481 }
9218 return _json; 9482 return _json;
9219 } 9483 }
9220 } 9484 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/fusiontables/v2.dart ('k') | generated/googleapis/lib/genomics/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698