OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.games.v1; | 3 library googleapis.games.v1; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection_1; | 6 import 'dart:collection' as collection_1; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client games/v1'; |
15 | 18 |
16 /** The API for Google Play Game Services. */ | 19 /** The API for Google Play Game Services. */ |
17 class GamesApi { | 20 class GamesApi { |
18 /** View and manage its own configuration data in your Google Drive */ | 21 /** View and manage its own configuration data in your Google Drive */ |
19 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat
a"; | 22 static const DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdat
a"; |
20 | 23 |
21 /** | 24 /** |
22 * Share your Google+ profile information and view and manage your game | 25 * Share your Google+ profile information and view and manage your game |
23 * activity | 26 * activity |
24 */ | 27 */ |
25 static const GamesScope = "https://www.googleapis.com/auth/games"; | 28 static const GamesScope = "https://www.googleapis.com/auth/games"; |
26 | 29 |
27 /** Know your basic profile info and list of people in your circles. */ | 30 /** Know your basic profile info and list of people in your circles. */ |
28 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; | 31 static const PlusLoginScope = "https://www.googleapis.com/auth/plus.login"; |
29 | 32 |
30 | 33 |
31 final common_internal.ApiRequester _requester; | 34 final commons.ApiRequester _requester; |
32 | 35 |
33 AchievementDefinitionsResourceApi get achievementDefinitions => new Achievemen
tDefinitionsResourceApi(_requester); | 36 AchievementDefinitionsResourceApi get achievementDefinitions => new Achievemen
tDefinitionsResourceApi(_requester); |
34 AchievementsResourceApi get achievements => new AchievementsResourceApi(_reque
ster); | 37 AchievementsResourceApi get achievements => new AchievementsResourceApi(_reque
ster); |
35 ApplicationsResourceApi get applications => new ApplicationsResourceApi(_reque
ster); | 38 ApplicationsResourceApi get applications => new ApplicationsResourceApi(_reque
ster); |
36 EventsResourceApi get events => new EventsResourceApi(_requester); | 39 EventsResourceApi get events => new EventsResourceApi(_requester); |
37 LeaderboardsResourceApi get leaderboards => new LeaderboardsResourceApi(_reque
ster); | 40 LeaderboardsResourceApi get leaderboards => new LeaderboardsResourceApi(_reque
ster); |
38 MetagameResourceApi get metagame => new MetagameResourceApi(_requester); | 41 MetagameResourceApi get metagame => new MetagameResourceApi(_requester); |
39 PlayersResourceApi get players => new PlayersResourceApi(_requester); | 42 PlayersResourceApi get players => new PlayersResourceApi(_requester); |
40 PushtokensResourceApi get pushtokens => new PushtokensResourceApi(_requester); | 43 PushtokensResourceApi get pushtokens => new PushtokensResourceApi(_requester); |
41 QuestMilestonesResourceApi get questMilestones => new QuestMilestonesResourceA
pi(_requester); | 44 QuestMilestonesResourceApi get questMilestones => new QuestMilestonesResourceA
pi(_requester); |
42 QuestsResourceApi get quests => new QuestsResourceApi(_requester); | 45 QuestsResourceApi get quests => new QuestsResourceApi(_requester); |
43 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); | 46 RevisionsResourceApi get revisions => new RevisionsResourceApi(_requester); |
44 RoomsResourceApi get rooms => new RoomsResourceApi(_requester); | 47 RoomsResourceApi get rooms => new RoomsResourceApi(_requester); |
45 ScoresResourceApi get scores => new ScoresResourceApi(_requester); | 48 ScoresResourceApi get scores => new ScoresResourceApi(_requester); |
46 SnapshotsResourceApi get snapshots => new SnapshotsResourceApi(_requester); | 49 SnapshotsResourceApi get snapshots => new SnapshotsResourceApi(_requester); |
47 TurnBasedMatchesResourceApi get turnBasedMatches => new TurnBasedMatchesResour
ceApi(_requester); | 50 TurnBasedMatchesResourceApi get turnBasedMatches => new TurnBasedMatchesResour
ceApi(_requester); |
48 | 51 |
49 GamesApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "games/v1/"}) : | 52 GamesApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com
/", core.String servicePath: "games/v1/"}) : |
50 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 53 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
51 } | 54 } |
52 | 55 |
53 | 56 |
54 /** Not documented yet. */ | |
55 class AchievementDefinitionsResourceApi { | 57 class AchievementDefinitionsResourceApi { |
56 final common_internal.ApiRequester _requester; | 58 final commons.ApiRequester _requester; |
57 | 59 |
58 AchievementDefinitionsResourceApi(common_internal.ApiRequester client) : | 60 AchievementDefinitionsResourceApi(commons.ApiRequester client) : |
59 _requester = client; | 61 _requester = client; |
60 | 62 |
61 /** | 63 /** |
62 * Lists all the achievement definitions for your application. | 64 * Lists all the achievement definitions for your application. |
63 * | 65 * |
64 * Request parameters: | 66 * Request parameters: |
65 * | 67 * |
66 * [language] - The preferred language to use for strings returned by this | 68 * [language] - The preferred language to use for strings returned by this |
67 * method. | 69 * method. |
68 * | 70 * |
69 * [maxResults] - The maximum number of achievement resources to return in the | 71 * [maxResults] - The maximum number of achievement resources to return in the |
70 * response, used for paging. For any response, the actual number of | 72 * response, used for paging. For any response, the actual number of |
71 * achievement resources returned may be less than the specified maxResults. | 73 * achievement resources returned may be less than the specified maxResults. |
72 * Value must be between "1" and "200". | 74 * Value must be between "1" and "200". |
73 * | 75 * |
74 * [pageToken] - The token returned by the previous request. | 76 * [pageToken] - The token returned by the previous request. |
75 * | 77 * |
76 * Completes with a [AchievementDefinitionsListResponse]. | 78 * Completes with a [AchievementDefinitionsListResponse]. |
77 * | 79 * |
78 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 80 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
79 * error. | 81 * error. |
80 * | 82 * |
81 * 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, |
82 * this method will complete with the same error. | 84 * this method will complete with the same error. |
83 */ | 85 */ |
84 async.Future<AchievementDefinitionsListResponse> list({core.String language, c
ore.int maxResults, core.String pageToken}) { | 86 async.Future<AchievementDefinitionsListResponse> list({core.String language, c
ore.int maxResults, core.String pageToken}) { |
85 var _url = null; | 87 var _url = null; |
86 var _queryParams = new core.Map(); | 88 var _queryParams = new core.Map(); |
87 var _uploadMedia = null; | 89 var _uploadMedia = null; |
88 var _uploadOptions = null; | 90 var _uploadOptions = null; |
89 var _downloadOptions = common.DownloadOptions.Metadata; | 91 var _downloadOptions = commons.DownloadOptions.Metadata; |
90 var _body = null; | 92 var _body = null; |
91 | 93 |
92 if (language != null) { | 94 if (language != null) { |
93 _queryParams["language"] = [language]; | 95 _queryParams["language"] = [language]; |
94 } | 96 } |
95 if (maxResults != null) { | 97 if (maxResults != null) { |
96 _queryParams["maxResults"] = ["${maxResults}"]; | 98 _queryParams["maxResults"] = ["${maxResults}"]; |
97 } | 99 } |
98 if (pageToken != null) { | 100 if (pageToken != null) { |
99 _queryParams["pageToken"] = [pageToken]; | 101 _queryParams["pageToken"] = [pageToken]; |
100 } | 102 } |
101 | 103 |
102 | 104 |
103 _url = 'achievements'; | 105 _url = 'achievements'; |
104 | 106 |
105 var _response = _requester.request(_url, | 107 var _response = _requester.request(_url, |
106 "GET", | 108 "GET", |
107 body: _body, | 109 body: _body, |
108 queryParams: _queryParams, | 110 queryParams: _queryParams, |
109 uploadOptions: _uploadOptions, | 111 uploadOptions: _uploadOptions, |
110 uploadMedia: _uploadMedia, | 112 uploadMedia: _uploadMedia, |
111 downloadOptions: _downloadOptions); | 113 downloadOptions: _downloadOptions); |
112 return _response.then((data) => new AchievementDefinitionsListResponse.fromJ
son(data)); | 114 return _response.then((data) => new AchievementDefinitionsListResponse.fromJ
son(data)); |
113 } | 115 } |
114 | 116 |
115 } | 117 } |
116 | 118 |
117 | 119 |
118 /** Not documented yet. */ | |
119 class AchievementsResourceApi { | 120 class AchievementsResourceApi { |
120 final common_internal.ApiRequester _requester; | 121 final commons.ApiRequester _requester; |
121 | 122 |
122 AchievementsResourceApi(common_internal.ApiRequester client) : | 123 AchievementsResourceApi(commons.ApiRequester client) : |
123 _requester = client; | 124 _requester = client; |
124 | 125 |
125 /** | 126 /** |
126 * Increments the steps of the achievement with the given ID for the currently | 127 * Increments the steps of the achievement with the given ID for the currently |
127 * authenticated player. | 128 * authenticated player. |
128 * | 129 * |
129 * Request parameters: | 130 * Request parameters: |
130 * | 131 * |
131 * [achievementId] - The ID of the achievement used by this method. | 132 * [achievementId] - The ID of the achievement used by this method. |
132 * | 133 * |
133 * [stepsToIncrement] - The number of steps to increment. | 134 * [stepsToIncrement] - The number of steps to increment. |
134 * | 135 * |
135 * [requestId] - A randomly generated numeric ID for each request specified by | 136 * [requestId] - A randomly generated numeric ID for each request specified by |
136 * the caller. This number is used at the server to ensure that the request is | 137 * the caller. This number is used at the server to ensure that the request is |
137 * handled correctly across retries. | 138 * handled correctly across retries. |
138 * | 139 * |
139 * Completes with a [AchievementIncrementResponse]. | 140 * Completes with a [AchievementIncrementResponse]. |
140 * | 141 * |
141 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 142 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
142 * error. | 143 * error. |
143 * | 144 * |
144 * If the used [http.Client] completes with an error when making a REST call, | 145 * If the used [http.Client] completes with an error when making a REST call, |
145 * this method will complete with the same error. | 146 * this method will complete with the same error. |
146 */ | 147 */ |
147 async.Future<AchievementIncrementResponse> increment(core.String achievementId
, core.int stepsToIncrement, {core.String requestId}) { | 148 async.Future<AchievementIncrementResponse> increment(core.String achievementId
, core.int stepsToIncrement, {core.String requestId}) { |
148 var _url = null; | 149 var _url = null; |
149 var _queryParams = new core.Map(); | 150 var _queryParams = new core.Map(); |
150 var _uploadMedia = null; | 151 var _uploadMedia = null; |
151 var _uploadOptions = null; | 152 var _uploadOptions = null; |
152 var _downloadOptions = common.DownloadOptions.Metadata; | 153 var _downloadOptions = commons.DownloadOptions.Metadata; |
153 var _body = null; | 154 var _body = null; |
154 | 155 |
155 if (achievementId == null) { | 156 if (achievementId == null) { |
156 throw new core.ArgumentError("Parameter achievementId is required."); | 157 throw new core.ArgumentError("Parameter achievementId is required."); |
157 } | 158 } |
158 if (stepsToIncrement == null) { | 159 if (stepsToIncrement == null) { |
159 throw new core.ArgumentError("Parameter stepsToIncrement is required."); | 160 throw new core.ArgumentError("Parameter stepsToIncrement is required."); |
160 } | 161 } |
161 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"]; | 162 _queryParams["stepsToIncrement"] = ["${stepsToIncrement}"]; |
162 if (requestId != null) { | 163 if (requestId != null) { |
163 _queryParams["requestId"] = [requestId]; | 164 _queryParams["requestId"] = [requestId]; |
164 } | 165 } |
165 | 166 |
166 | 167 |
167 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement
Id') + '/increment'; | 168 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/increment'; |
168 | 169 |
169 var _response = _requester.request(_url, | 170 var _response = _requester.request(_url, |
170 "POST", | 171 "POST", |
171 body: _body, | 172 body: _body, |
172 queryParams: _queryParams, | 173 queryParams: _queryParams, |
173 uploadOptions: _uploadOptions, | 174 uploadOptions: _uploadOptions, |
174 uploadMedia: _uploadMedia, | 175 uploadMedia: _uploadMedia, |
175 downloadOptions: _downloadOptions); | 176 downloadOptions: _downloadOptions); |
176 return _response.then((data) => new AchievementIncrementResponse.fromJson(da
ta)); | 177 return _response.then((data) => new AchievementIncrementResponse.fromJson(da
ta)); |
177 } | 178 } |
(...skipping 20 matching lines...) Expand all Loading... |
198 * [state] - Tells the server to return only achievements with the specified | 199 * [state] - Tells the server to return only achievements with the specified |
199 * state. If this parameter isn't specified, all achievements are returned. | 200 * state. If this parameter isn't specified, all achievements are returned. |
200 * Possible string values are: | 201 * Possible string values are: |
201 * - "ALL" : List all achievements. This is the default. | 202 * - "ALL" : List all achievements. This is the default. |
202 * - "HIDDEN" : List only hidden achievements. | 203 * - "HIDDEN" : List only hidden achievements. |
203 * - "REVEALED" : List only revealed achievements. | 204 * - "REVEALED" : List only revealed achievements. |
204 * - "UNLOCKED" : List only unlocked achievements. | 205 * - "UNLOCKED" : List only unlocked achievements. |
205 * | 206 * |
206 * Completes with a [PlayerAchievementListResponse]. | 207 * Completes with a [PlayerAchievementListResponse]. |
207 * | 208 * |
208 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
209 * error. | 210 * error. |
210 * | 211 * |
211 * If the used [http.Client] completes with an error when making a REST call, | 212 * If the used [http.Client] completes with an error when making a REST call, |
212 * this method will complete with the same error. | 213 * this method will complete with the same error. |
213 */ | 214 */ |
214 async.Future<PlayerAchievementListResponse> list(core.String playerId, {core.S
tring language, core.int maxResults, core.String pageToken, core.String state})
{ | 215 async.Future<PlayerAchievementListResponse> list(core.String playerId, {core.S
tring language, core.int maxResults, core.String pageToken, core.String state})
{ |
215 var _url = null; | 216 var _url = null; |
216 var _queryParams = new core.Map(); | 217 var _queryParams = new core.Map(); |
217 var _uploadMedia = null; | 218 var _uploadMedia = null; |
218 var _uploadOptions = null; | 219 var _uploadOptions = null; |
219 var _downloadOptions = common.DownloadOptions.Metadata; | 220 var _downloadOptions = commons.DownloadOptions.Metadata; |
220 var _body = null; | 221 var _body = null; |
221 | 222 |
222 if (playerId == null) { | 223 if (playerId == null) { |
223 throw new core.ArgumentError("Parameter playerId is required."); | 224 throw new core.ArgumentError("Parameter playerId is required."); |
224 } | 225 } |
225 if (language != null) { | 226 if (language != null) { |
226 _queryParams["language"] = [language]; | 227 _queryParams["language"] = [language]; |
227 } | 228 } |
228 if (maxResults != null) { | 229 if (maxResults != null) { |
229 _queryParams["maxResults"] = ["${maxResults}"]; | 230 _queryParams["maxResults"] = ["${maxResults}"]; |
230 } | 231 } |
231 if (pageToken != null) { | 232 if (pageToken != null) { |
232 _queryParams["pageToken"] = [pageToken]; | 233 _queryParams["pageToken"] = [pageToken]; |
233 } | 234 } |
234 if (state != null) { | 235 if (state != null) { |
235 _queryParams["state"] = [state]; | 236 _queryParams["state"] = [state]; |
236 } | 237 } |
237 | 238 |
238 | 239 |
239 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId') + '/a
chievements'; | 240 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/achieveme
nts'; |
240 | 241 |
241 var _response = _requester.request(_url, | 242 var _response = _requester.request(_url, |
242 "GET", | 243 "GET", |
243 body: _body, | 244 body: _body, |
244 queryParams: _queryParams, | 245 queryParams: _queryParams, |
245 uploadOptions: _uploadOptions, | 246 uploadOptions: _uploadOptions, |
246 uploadMedia: _uploadMedia, | 247 uploadMedia: _uploadMedia, |
247 downloadOptions: _downloadOptions); | 248 downloadOptions: _downloadOptions); |
248 return _response.then((data) => new PlayerAchievementListResponse.fromJson(d
ata)); | 249 return _response.then((data) => new PlayerAchievementListResponse.fromJson(d
ata)); |
249 } | 250 } |
250 | 251 |
251 /** | 252 /** |
252 * Sets the state of the achievement with the given ID to REVEALED for the | 253 * Sets the state of the achievement with the given ID to REVEALED for the |
253 * currently authenticated player. | 254 * currently authenticated player. |
254 * | 255 * |
255 * Request parameters: | 256 * Request parameters: |
256 * | 257 * |
257 * [achievementId] - The ID of the achievement used by this method. | 258 * [achievementId] - The ID of the achievement used by this method. |
258 * | 259 * |
259 * Completes with a [AchievementRevealResponse]. | 260 * Completes with a [AchievementRevealResponse]. |
260 * | 261 * |
261 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 262 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
262 * error. | 263 * error. |
263 * | 264 * |
264 * If the used [http.Client] completes with an error when making a REST call, | 265 * If the used [http.Client] completes with an error when making a REST call, |
265 * this method will complete with the same error. | 266 * this method will complete with the same error. |
266 */ | 267 */ |
267 async.Future<AchievementRevealResponse> reveal(core.String achievementId) { | 268 async.Future<AchievementRevealResponse> reveal(core.String achievementId) { |
268 var _url = null; | 269 var _url = null; |
269 var _queryParams = new core.Map(); | 270 var _queryParams = new core.Map(); |
270 var _uploadMedia = null; | 271 var _uploadMedia = null; |
271 var _uploadOptions = null; | 272 var _uploadOptions = null; |
272 var _downloadOptions = common.DownloadOptions.Metadata; | 273 var _downloadOptions = commons.DownloadOptions.Metadata; |
273 var _body = null; | 274 var _body = null; |
274 | 275 |
275 if (achievementId == null) { | 276 if (achievementId == null) { |
276 throw new core.ArgumentError("Parameter achievementId is required."); | 277 throw new core.ArgumentError("Parameter achievementId is required."); |
277 } | 278 } |
278 | 279 |
279 | 280 |
280 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement
Id') + '/reveal'; | 281 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/reveal'; |
281 | 282 |
282 var _response = _requester.request(_url, | 283 var _response = _requester.request(_url, |
283 "POST", | 284 "POST", |
284 body: _body, | 285 body: _body, |
285 queryParams: _queryParams, | 286 queryParams: _queryParams, |
286 uploadOptions: _uploadOptions, | 287 uploadOptions: _uploadOptions, |
287 uploadMedia: _uploadMedia, | 288 uploadMedia: _uploadMedia, |
288 downloadOptions: _downloadOptions); | 289 downloadOptions: _downloadOptions); |
289 return _response.then((data) => new AchievementRevealResponse.fromJson(data)
); | 290 return _response.then((data) => new AchievementRevealResponse.fromJson(data)
); |
290 } | 291 } |
291 | 292 |
292 /** | 293 /** |
293 * Sets the steps for the currently authenticated player towards unlocking an | 294 * Sets the steps for the currently authenticated player towards unlocking an |
294 * achievement. If the steps parameter is less than the current number of | 295 * achievement. If the steps parameter is less than the current number of |
295 * steps that the player already gained for the achievement, the achievement | 296 * steps that the player already gained for the achievement, the achievement |
296 * is not modified. | 297 * is not modified. |
297 * | 298 * |
298 * Request parameters: | 299 * Request parameters: |
299 * | 300 * |
300 * [achievementId] - The ID of the achievement used by this method. | 301 * [achievementId] - The ID of the achievement used by this method. |
301 * | 302 * |
302 * [steps] - The minimum value to set the steps to. | 303 * [steps] - The minimum value to set the steps to. |
303 * | 304 * |
304 * Completes with a [AchievementSetStepsAtLeastResponse]. | 305 * Completes with a [AchievementSetStepsAtLeastResponse]. |
305 * | 306 * |
306 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
307 * error. | 308 * error. |
308 * | 309 * |
309 * If the used [http.Client] completes with an error when making a REST call, | 310 * If the used [http.Client] completes with an error when making a REST call, |
310 * this method will complete with the same error. | 311 * this method will complete with the same error. |
311 */ | 312 */ |
312 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast(core.String a
chievementId, core.int steps) { | 313 async.Future<AchievementSetStepsAtLeastResponse> setStepsAtLeast(core.String a
chievementId, core.int steps) { |
313 var _url = null; | 314 var _url = null; |
314 var _queryParams = new core.Map(); | 315 var _queryParams = new core.Map(); |
315 var _uploadMedia = null; | 316 var _uploadMedia = null; |
316 var _uploadOptions = null; | 317 var _uploadOptions = null; |
317 var _downloadOptions = common.DownloadOptions.Metadata; | 318 var _downloadOptions = commons.DownloadOptions.Metadata; |
318 var _body = null; | 319 var _body = null; |
319 | 320 |
320 if (achievementId == null) { | 321 if (achievementId == null) { |
321 throw new core.ArgumentError("Parameter achievementId is required."); | 322 throw new core.ArgumentError("Parameter achievementId is required."); |
322 } | 323 } |
323 if (steps == null) { | 324 if (steps == null) { |
324 throw new core.ArgumentError("Parameter steps is required."); | 325 throw new core.ArgumentError("Parameter steps is required."); |
325 } | 326 } |
326 _queryParams["steps"] = ["${steps}"]; | 327 _queryParams["steps"] = ["${steps}"]; |
327 | 328 |
328 | 329 |
329 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement
Id') + '/setStepsAtLeast'; | 330 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/setStepsAtLeast'; |
330 | 331 |
331 var _response = _requester.request(_url, | 332 var _response = _requester.request(_url, |
332 "POST", | 333 "POST", |
333 body: _body, | 334 body: _body, |
334 queryParams: _queryParams, | 335 queryParams: _queryParams, |
335 uploadOptions: _uploadOptions, | 336 uploadOptions: _uploadOptions, |
336 uploadMedia: _uploadMedia, | 337 uploadMedia: _uploadMedia, |
337 downloadOptions: _downloadOptions); | 338 downloadOptions: _downloadOptions); |
338 return _response.then((data) => new AchievementSetStepsAtLeastResponse.fromJ
son(data)); | 339 return _response.then((data) => new AchievementSetStepsAtLeastResponse.fromJ
son(data)); |
339 } | 340 } |
340 | 341 |
341 /** | 342 /** |
342 * Unlocks this achievement for the currently authenticated player. | 343 * Unlocks this achievement for the currently authenticated player. |
343 * | 344 * |
344 * Request parameters: | 345 * Request parameters: |
345 * | 346 * |
346 * [achievementId] - The ID of the achievement used by this method. | 347 * [achievementId] - The ID of the achievement used by this method. |
347 * | 348 * |
348 * Completes with a [AchievementUnlockResponse]. | 349 * Completes with a [AchievementUnlockResponse]. |
349 * | 350 * |
350 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 351 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
351 * error. | 352 * error. |
352 * | 353 * |
353 * If the used [http.Client] completes with an error when making a REST call, | 354 * If the used [http.Client] completes with an error when making a REST call, |
354 * this method will complete with the same error. | 355 * this method will complete with the same error. |
355 */ | 356 */ |
356 async.Future<AchievementUnlockResponse> unlock(core.String achievementId) { | 357 async.Future<AchievementUnlockResponse> unlock(core.String achievementId) { |
357 var _url = null; | 358 var _url = null; |
358 var _queryParams = new core.Map(); | 359 var _queryParams = new core.Map(); |
359 var _uploadMedia = null; | 360 var _uploadMedia = null; |
360 var _uploadOptions = null; | 361 var _uploadOptions = null; |
361 var _downloadOptions = common.DownloadOptions.Metadata; | 362 var _downloadOptions = commons.DownloadOptions.Metadata; |
362 var _body = null; | 363 var _body = null; |
363 | 364 |
364 if (achievementId == null) { | 365 if (achievementId == null) { |
365 throw new core.ArgumentError("Parameter achievementId is required."); | 366 throw new core.ArgumentError("Parameter achievementId is required."); |
366 } | 367 } |
367 | 368 |
368 | 369 |
369 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement
Id') + '/unlock'; | 370 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId') + '
/unlock'; |
370 | 371 |
371 var _response = _requester.request(_url, | 372 var _response = _requester.request(_url, |
372 "POST", | 373 "POST", |
373 body: _body, | 374 body: _body, |
374 queryParams: _queryParams, | 375 queryParams: _queryParams, |
375 uploadOptions: _uploadOptions, | 376 uploadOptions: _uploadOptions, |
376 uploadMedia: _uploadMedia, | 377 uploadMedia: _uploadMedia, |
377 downloadOptions: _downloadOptions); | 378 downloadOptions: _downloadOptions); |
378 return _response.then((data) => new AchievementUnlockResponse.fromJson(data)
); | 379 return _response.then((data) => new AchievementUnlockResponse.fromJson(data)
); |
379 } | 380 } |
380 | 381 |
381 /** | 382 /** |
382 * Updates multiple achievements for the currently authenticated player. | 383 * Updates multiple achievements for the currently authenticated player. |
383 * | 384 * |
384 * [request] - The metadata request object. | 385 * [request] - The metadata request object. |
385 * | 386 * |
386 * Request parameters: | 387 * Request parameters: |
387 * | 388 * |
388 * Completes with a [AchievementUpdateMultipleResponse]. | 389 * Completes with a [AchievementUpdateMultipleResponse]. |
389 * | 390 * |
390 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 391 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
391 * error. | 392 * error. |
392 * | 393 * |
393 * If the used [http.Client] completes with an error when making a REST call, | 394 * If the used [http.Client] completes with an error when making a REST call, |
394 * this method will complete with the same error. | 395 * this method will complete with the same error. |
395 */ | 396 */ |
396 async.Future<AchievementUpdateMultipleResponse> updateMultiple(AchievementUpda
teMultipleRequest request) { | 397 async.Future<AchievementUpdateMultipleResponse> updateMultiple(AchievementUpda
teMultipleRequest request) { |
397 var _url = null; | 398 var _url = null; |
398 var _queryParams = new core.Map(); | 399 var _queryParams = new core.Map(); |
399 var _uploadMedia = null; | 400 var _uploadMedia = null; |
400 var _uploadOptions = null; | 401 var _uploadOptions = null; |
401 var _downloadOptions = common.DownloadOptions.Metadata; | 402 var _downloadOptions = commons.DownloadOptions.Metadata; |
402 var _body = null; | 403 var _body = null; |
403 | 404 |
404 if (request != null) { | 405 if (request != null) { |
405 _body = convert.JSON.encode((request).toJson()); | 406 _body = convert.JSON.encode((request).toJson()); |
406 } | 407 } |
407 | 408 |
408 | 409 |
409 _url = 'achievements/updateMultiple'; | 410 _url = 'achievements/updateMultiple'; |
410 | 411 |
411 var _response = _requester.request(_url, | 412 var _response = _requester.request(_url, |
412 "POST", | 413 "POST", |
413 body: _body, | 414 body: _body, |
414 queryParams: _queryParams, | 415 queryParams: _queryParams, |
415 uploadOptions: _uploadOptions, | 416 uploadOptions: _uploadOptions, |
416 uploadMedia: _uploadMedia, | 417 uploadMedia: _uploadMedia, |
417 downloadOptions: _downloadOptions); | 418 downloadOptions: _downloadOptions); |
418 return _response.then((data) => new AchievementUpdateMultipleResponse.fromJs
on(data)); | 419 return _response.then((data) => new AchievementUpdateMultipleResponse.fromJs
on(data)); |
419 } | 420 } |
420 | 421 |
421 } | 422 } |
422 | 423 |
423 | 424 |
424 /** Not documented yet. */ | |
425 class ApplicationsResourceApi { | 425 class ApplicationsResourceApi { |
426 final common_internal.ApiRequester _requester; | 426 final commons.ApiRequester _requester; |
427 | 427 |
428 ApplicationsResourceApi(common_internal.ApiRequester client) : | 428 ApplicationsResourceApi(commons.ApiRequester client) : |
429 _requester = client; | 429 _requester = client; |
430 | 430 |
431 /** | 431 /** |
432 * Retrieves the metadata of the application with the given ID. If the | 432 * Retrieves the metadata of the application with the given ID. If the |
433 * requested application is not available for the specified platformType, the | 433 * requested application is not available for the specified platformType, the |
434 * returned response will not include any instance data. | 434 * returned response will not include any instance data. |
435 * | 435 * |
436 * Request parameters: | 436 * Request parameters: |
437 * | 437 * |
438 * [applicationId] - The application ID from the Google Play developer | 438 * [applicationId] - The application ID from the Google Play developer |
439 * console. | 439 * console. |
440 * | 440 * |
441 * [language] - The preferred language to use for strings returned by this | 441 * [language] - The preferred language to use for strings returned by this |
442 * method. | 442 * method. |
443 * | 443 * |
444 * [platformType] - Restrict application details returned to the specific | 444 * [platformType] - Restrict application details returned to the specific |
445 * platform. | 445 * platform. |
446 * Possible string values are: | 446 * Possible string values are: |
447 * - "ANDROID" : Retrieve applications that can be played on Android. | 447 * - "ANDROID" : Retrieve applications that can be played on Android. |
448 * - "IOS" : Retrieve applications that can be played on iOS. | 448 * - "IOS" : Retrieve applications that can be played on iOS. |
449 * - "WEB_APP" : Retrieve applications that can be played on desktop web. | 449 * - "WEB_APP" : Retrieve applications that can be played on desktop web. |
450 * | 450 * |
451 * Completes with a [Application]. | 451 * Completes with a [Application]. |
452 * | 452 * |
453 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
454 * error. | 454 * error. |
455 * | 455 * |
456 * If the used [http.Client] completes with an error when making a REST call, | 456 * If the used [http.Client] completes with an error when making a REST call, |
457 * this method will complete with the same error. | 457 * this method will complete with the same error. |
458 */ | 458 */ |
459 async.Future<Application> get(core.String applicationId, {core.String language
, core.String platformType}) { | 459 async.Future<Application> get(core.String applicationId, {core.String language
, core.String platformType}) { |
460 var _url = null; | 460 var _url = null; |
461 var _queryParams = new core.Map(); | 461 var _queryParams = new core.Map(); |
462 var _uploadMedia = null; | 462 var _uploadMedia = null; |
463 var _uploadOptions = null; | 463 var _uploadOptions = null; |
464 var _downloadOptions = common.DownloadOptions.Metadata; | 464 var _downloadOptions = commons.DownloadOptions.Metadata; |
465 var _body = null; | 465 var _body = null; |
466 | 466 |
467 if (applicationId == null) { | 467 if (applicationId == null) { |
468 throw new core.ArgumentError("Parameter applicationId is required."); | 468 throw new core.ArgumentError("Parameter applicationId is required."); |
469 } | 469 } |
470 if (language != null) { | 470 if (language != null) { |
471 _queryParams["language"] = [language]; | 471 _queryParams["language"] = [language]; |
472 } | 472 } |
473 if (platformType != null) { | 473 if (platformType != null) { |
474 _queryParams["platformType"] = [platformType]; | 474 _queryParams["platformType"] = [platformType]; |
475 } | 475 } |
476 | 476 |
477 | 477 |
478 _url = 'applications/' + common_internal.Escaper.ecapeVariable('$application
Id'); | 478 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId'); |
479 | 479 |
480 var _response = _requester.request(_url, | 480 var _response = _requester.request(_url, |
481 "GET", | 481 "GET", |
482 body: _body, | 482 body: _body, |
483 queryParams: _queryParams, | 483 queryParams: _queryParams, |
484 uploadOptions: _uploadOptions, | 484 uploadOptions: _uploadOptions, |
485 uploadMedia: _uploadMedia, | 485 uploadMedia: _uploadMedia, |
486 downloadOptions: _downloadOptions); | 486 downloadOptions: _downloadOptions); |
487 return _response.then((data) => new Application.fromJson(data)); | 487 return _response.then((data) => new Application.fromJson(data)); |
488 } | 488 } |
489 | 489 |
490 /** | 490 /** |
491 * Indicate that the the currently authenticated user is playing your | 491 * Indicate that the the currently authenticated user is playing your |
492 * application. | 492 * application. |
493 * | 493 * |
494 * Request parameters: | 494 * Request parameters: |
495 * | 495 * |
496 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 496 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
497 * error. | 497 * error. |
498 * | 498 * |
499 * If the used [http.Client] completes with an error when making a REST call, | 499 * If the used [http.Client] completes with an error when making a REST call, |
500 * this method will complete with the same error. | 500 * this method will complete with the same error. |
501 */ | 501 */ |
502 async.Future played() { | 502 async.Future played() { |
503 var _url = null; | 503 var _url = null; |
504 var _queryParams = new core.Map(); | 504 var _queryParams = new core.Map(); |
505 var _uploadMedia = null; | 505 var _uploadMedia = null; |
506 var _uploadOptions = null; | 506 var _uploadOptions = null; |
507 var _downloadOptions = common.DownloadOptions.Metadata; | 507 var _downloadOptions = commons.DownloadOptions.Metadata; |
508 var _body = null; | 508 var _body = null; |
509 | 509 |
510 | 510 |
511 _downloadOptions = null; | 511 _downloadOptions = null; |
512 | 512 |
513 _url = 'applications/played'; | 513 _url = 'applications/played'; |
514 | 514 |
515 var _response = _requester.request(_url, | 515 var _response = _requester.request(_url, |
516 "POST", | 516 "POST", |
517 body: _body, | 517 body: _body, |
518 queryParams: _queryParams, | 518 queryParams: _queryParams, |
519 uploadOptions: _uploadOptions, | 519 uploadOptions: _uploadOptions, |
520 uploadMedia: _uploadMedia, | 520 uploadMedia: _uploadMedia, |
521 downloadOptions: _downloadOptions); | 521 downloadOptions: _downloadOptions); |
522 return _response.then((data) => null); | 522 return _response.then((data) => null); |
523 } | 523 } |
524 | 524 |
525 } | 525 } |
526 | 526 |
527 | 527 |
528 /** Not documented yet. */ | |
529 class EventsResourceApi { | 528 class EventsResourceApi { |
530 final common_internal.ApiRequester _requester; | 529 final commons.ApiRequester _requester; |
531 | 530 |
532 EventsResourceApi(common_internal.ApiRequester client) : | 531 EventsResourceApi(commons.ApiRequester client) : |
533 _requester = client; | 532 _requester = client; |
534 | 533 |
535 /** | 534 /** |
536 * Returns a list showing the current progress on events in this application | 535 * Returns a list showing the current progress on events in this application |
537 * for the currently authenticated user. | 536 * for the currently authenticated user. |
538 * | 537 * |
539 * Request parameters: | 538 * Request parameters: |
540 * | 539 * |
541 * [language] - The preferred language to use for strings returned by this | 540 * [language] - The preferred language to use for strings returned by this |
542 * method. | 541 * method. |
543 * | 542 * |
544 * [maxResults] - The maximum number of events to return in the response, used | 543 * [maxResults] - The maximum number of events to return in the response, used |
545 * for paging. For any response, the actual number of events to return may be | 544 * for paging. For any response, the actual number of events to return may be |
546 * less than the specified maxResults. | 545 * less than the specified maxResults. |
547 * Value must be between "1" and "100". | 546 * Value must be between "1" and "100". |
548 * | 547 * |
549 * [pageToken] - The token returned by the previous request. | 548 * [pageToken] - The token returned by the previous request. |
550 * | 549 * |
551 * Completes with a [PlayerEventListResponse]. | 550 * Completes with a [PlayerEventListResponse]. |
552 * | 551 * |
553 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 552 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
554 * error. | 553 * error. |
555 * | 554 * |
556 * If the used [http.Client] completes with an error when making a REST call, | 555 * If the used [http.Client] completes with an error when making a REST call, |
557 * this method will complete with the same error. | 556 * this method will complete with the same error. |
558 */ | 557 */ |
559 async.Future<PlayerEventListResponse> listByPlayer({core.String language, core
.int maxResults, core.String pageToken}) { | 558 async.Future<PlayerEventListResponse> listByPlayer({core.String language, core
.int maxResults, core.String pageToken}) { |
560 var _url = null; | 559 var _url = null; |
561 var _queryParams = new core.Map(); | 560 var _queryParams = new core.Map(); |
562 var _uploadMedia = null; | 561 var _uploadMedia = null; |
563 var _uploadOptions = null; | 562 var _uploadOptions = null; |
564 var _downloadOptions = common.DownloadOptions.Metadata; | 563 var _downloadOptions = commons.DownloadOptions.Metadata; |
565 var _body = null; | 564 var _body = null; |
566 | 565 |
567 if (language != null) { | 566 if (language != null) { |
568 _queryParams["language"] = [language]; | 567 _queryParams["language"] = [language]; |
569 } | 568 } |
570 if (maxResults != null) { | 569 if (maxResults != null) { |
571 _queryParams["maxResults"] = ["${maxResults}"]; | 570 _queryParams["maxResults"] = ["${maxResults}"]; |
572 } | 571 } |
573 if (pageToken != null) { | 572 if (pageToken != null) { |
574 _queryParams["pageToken"] = [pageToken]; | 573 _queryParams["pageToken"] = [pageToken]; |
(...skipping 22 matching lines...) Expand all Loading... |
597 * | 596 * |
598 * [maxResults] - The maximum number of event definitions to return in the | 597 * [maxResults] - The maximum number of event definitions to return in the |
599 * response, used for paging. For any response, the actual number of event | 598 * response, used for paging. For any response, the actual number of event |
600 * definitions to return may be less than the specified maxResults. | 599 * definitions to return may be less than the specified maxResults. |
601 * Value must be between "1" and "100". | 600 * Value must be between "1" and "100". |
602 * | 601 * |
603 * [pageToken] - The token returned by the previous request. | 602 * [pageToken] - The token returned by the previous request. |
604 * | 603 * |
605 * Completes with a [EventDefinitionListResponse]. | 604 * Completes with a [EventDefinitionListResponse]. |
606 * | 605 * |
607 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 606 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
608 * error. | 607 * error. |
609 * | 608 * |
610 * If the used [http.Client] completes with an error when making a REST call, | 609 * If the used [http.Client] completes with an error when making a REST call, |
611 * this method will complete with the same error. | 610 * this method will complete with the same error. |
612 */ | 611 */ |
613 async.Future<EventDefinitionListResponse> listDefinitions({core.String languag
e, core.int maxResults, core.String pageToken}) { | 612 async.Future<EventDefinitionListResponse> listDefinitions({core.String languag
e, core.int maxResults, core.String pageToken}) { |
614 var _url = null; | 613 var _url = null; |
615 var _queryParams = new core.Map(); | 614 var _queryParams = new core.Map(); |
616 var _uploadMedia = null; | 615 var _uploadMedia = null; |
617 var _uploadOptions = null; | 616 var _uploadOptions = null; |
618 var _downloadOptions = common.DownloadOptions.Metadata; | 617 var _downloadOptions = commons.DownloadOptions.Metadata; |
619 var _body = null; | 618 var _body = null; |
620 | 619 |
621 if (language != null) { | 620 if (language != null) { |
622 _queryParams["language"] = [language]; | 621 _queryParams["language"] = [language]; |
623 } | 622 } |
624 if (maxResults != null) { | 623 if (maxResults != null) { |
625 _queryParams["maxResults"] = ["${maxResults}"]; | 624 _queryParams["maxResults"] = ["${maxResults}"]; |
626 } | 625 } |
627 if (pageToken != null) { | 626 if (pageToken != null) { |
628 _queryParams["pageToken"] = [pageToken]; | 627 _queryParams["pageToken"] = [pageToken]; |
(...skipping 18 matching lines...) Expand all Loading... |
647 * | 646 * |
648 * [request] - The metadata request object. | 647 * [request] - The metadata request object. |
649 * | 648 * |
650 * Request parameters: | 649 * Request parameters: |
651 * | 650 * |
652 * [language] - The preferred language to use for strings returned by this | 651 * [language] - The preferred language to use for strings returned by this |
653 * method. | 652 * method. |
654 * | 653 * |
655 * Completes with a [EventUpdateResponse]. | 654 * Completes with a [EventUpdateResponse]. |
656 * | 655 * |
657 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 656 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
658 * error. | 657 * error. |
659 * | 658 * |
660 * If the used [http.Client] completes with an error when making a REST call, | 659 * If the used [http.Client] completes with an error when making a REST call, |
661 * this method will complete with the same error. | 660 * this method will complete with the same error. |
662 */ | 661 */ |
663 async.Future<EventUpdateResponse> record(EventRecordRequest request, {core.Str
ing language}) { | 662 async.Future<EventUpdateResponse> record(EventRecordRequest request, {core.Str
ing language}) { |
664 var _url = null; | 663 var _url = null; |
665 var _queryParams = new core.Map(); | 664 var _queryParams = new core.Map(); |
666 var _uploadMedia = null; | 665 var _uploadMedia = null; |
667 var _uploadOptions = null; | 666 var _uploadOptions = null; |
668 var _downloadOptions = common.DownloadOptions.Metadata; | 667 var _downloadOptions = commons.DownloadOptions.Metadata; |
669 var _body = null; | 668 var _body = null; |
670 | 669 |
671 if (request != null) { | 670 if (request != null) { |
672 _body = convert.JSON.encode((request).toJson()); | 671 _body = convert.JSON.encode((request).toJson()); |
673 } | 672 } |
674 if (language != null) { | 673 if (language != null) { |
675 _queryParams["language"] = [language]; | 674 _queryParams["language"] = [language]; |
676 } | 675 } |
677 | 676 |
678 | 677 |
679 _url = 'events'; | 678 _url = 'events'; |
680 | 679 |
681 var _response = _requester.request(_url, | 680 var _response = _requester.request(_url, |
682 "POST", | 681 "POST", |
683 body: _body, | 682 body: _body, |
684 queryParams: _queryParams, | 683 queryParams: _queryParams, |
685 uploadOptions: _uploadOptions, | 684 uploadOptions: _uploadOptions, |
686 uploadMedia: _uploadMedia, | 685 uploadMedia: _uploadMedia, |
687 downloadOptions: _downloadOptions); | 686 downloadOptions: _downloadOptions); |
688 return _response.then((data) => new EventUpdateResponse.fromJson(data)); | 687 return _response.then((data) => new EventUpdateResponse.fromJson(data)); |
689 } | 688 } |
690 | 689 |
691 } | 690 } |
692 | 691 |
693 | 692 |
694 /** Not documented yet. */ | |
695 class LeaderboardsResourceApi { | 693 class LeaderboardsResourceApi { |
696 final common_internal.ApiRequester _requester; | 694 final commons.ApiRequester _requester; |
697 | 695 |
698 LeaderboardsResourceApi(common_internal.ApiRequester client) : | 696 LeaderboardsResourceApi(commons.ApiRequester client) : |
699 _requester = client; | 697 _requester = client; |
700 | 698 |
701 /** | 699 /** |
702 * Retrieves the metadata of the leaderboard with the given ID. | 700 * Retrieves the metadata of the leaderboard with the given ID. |
703 * | 701 * |
704 * Request parameters: | 702 * Request parameters: |
705 * | 703 * |
706 * [leaderboardId] - The ID of the leaderboard. | 704 * [leaderboardId] - The ID of the leaderboard. |
707 * | 705 * |
708 * [language] - The preferred language to use for strings returned by this | 706 * [language] - The preferred language to use for strings returned by this |
709 * method. | 707 * method. |
710 * | 708 * |
711 * Completes with a [Leaderboard]. | 709 * Completes with a [Leaderboard]. |
712 * | 710 * |
713 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 711 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
714 * error. | 712 * error. |
715 * | 713 * |
716 * If the used [http.Client] completes with an error when making a REST call, | 714 * If the used [http.Client] completes with an error when making a REST call, |
717 * this method will complete with the same error. | 715 * this method will complete with the same error. |
718 */ | 716 */ |
719 async.Future<Leaderboard> get(core.String leaderboardId, {core.String language
}) { | 717 async.Future<Leaderboard> get(core.String leaderboardId, {core.String language
}) { |
720 var _url = null; | 718 var _url = null; |
721 var _queryParams = new core.Map(); | 719 var _queryParams = new core.Map(); |
722 var _uploadMedia = null; | 720 var _uploadMedia = null; |
723 var _uploadOptions = null; | 721 var _uploadOptions = null; |
724 var _downloadOptions = common.DownloadOptions.Metadata; | 722 var _downloadOptions = commons.DownloadOptions.Metadata; |
725 var _body = null; | 723 var _body = null; |
726 | 724 |
727 if (leaderboardId == null) { | 725 if (leaderboardId == null) { |
728 throw new core.ArgumentError("Parameter leaderboardId is required."); | 726 throw new core.ArgumentError("Parameter leaderboardId is required."); |
729 } | 727 } |
730 if (language != null) { | 728 if (language != null) { |
731 _queryParams["language"] = [language]; | 729 _queryParams["language"] = [language]; |
732 } | 730 } |
733 | 731 |
734 | 732 |
735 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard
Id'); | 733 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId'); |
736 | 734 |
737 var _response = _requester.request(_url, | 735 var _response = _requester.request(_url, |
738 "GET", | 736 "GET", |
739 body: _body, | 737 body: _body, |
740 queryParams: _queryParams, | 738 queryParams: _queryParams, |
741 uploadOptions: _uploadOptions, | 739 uploadOptions: _uploadOptions, |
742 uploadMedia: _uploadMedia, | 740 uploadMedia: _uploadMedia, |
743 downloadOptions: _downloadOptions); | 741 downloadOptions: _downloadOptions); |
744 return _response.then((data) => new Leaderboard.fromJson(data)); | 742 return _response.then((data) => new Leaderboard.fromJson(data)); |
745 } | 743 } |
746 | 744 |
747 /** | 745 /** |
748 * Lists all the leaderboard metadata for your application. | 746 * Lists all the leaderboard metadata for your application. |
749 * | 747 * |
750 * Request parameters: | 748 * Request parameters: |
751 * | 749 * |
752 * [language] - The preferred language to use for strings returned by this | 750 * [language] - The preferred language to use for strings returned by this |
753 * method. | 751 * method. |
754 * | 752 * |
755 * [maxResults] - The maximum number of leaderboards to return in the | 753 * [maxResults] - The maximum number of leaderboards to return in the |
756 * response. For any response, the actual number of leaderboards returned may | 754 * response. For any response, the actual number of leaderboards returned may |
757 * be less than the specified maxResults. | 755 * be less than the specified maxResults. |
758 * Value must be between "1" and "200". | 756 * Value must be between "1" and "200". |
759 * | 757 * |
760 * [pageToken] - The token returned by the previous request. | 758 * [pageToken] - The token returned by the previous request. |
761 * | 759 * |
762 * Completes with a [LeaderboardListResponse]. | 760 * Completes with a [LeaderboardListResponse]. |
763 * | 761 * |
764 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 762 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
765 * error. | 763 * error. |
766 * | 764 * |
767 * If the used [http.Client] completes with an error when making a REST call, | 765 * If the used [http.Client] completes with an error when making a REST call, |
768 * this method will complete with the same error. | 766 * this method will complete with the same error. |
769 */ | 767 */ |
770 async.Future<LeaderboardListResponse> list({core.String language, core.int max
Results, core.String pageToken}) { | 768 async.Future<LeaderboardListResponse> list({core.String language, core.int max
Results, core.String pageToken}) { |
771 var _url = null; | 769 var _url = null; |
772 var _queryParams = new core.Map(); | 770 var _queryParams = new core.Map(); |
773 var _uploadMedia = null; | 771 var _uploadMedia = null; |
774 var _uploadOptions = null; | 772 var _uploadOptions = null; |
775 var _downloadOptions = common.DownloadOptions.Metadata; | 773 var _downloadOptions = commons.DownloadOptions.Metadata; |
776 var _body = null; | 774 var _body = null; |
777 | 775 |
778 if (language != null) { | 776 if (language != null) { |
779 _queryParams["language"] = [language]; | 777 _queryParams["language"] = [language]; |
780 } | 778 } |
781 if (maxResults != null) { | 779 if (maxResults != null) { |
782 _queryParams["maxResults"] = ["${maxResults}"]; | 780 _queryParams["maxResults"] = ["${maxResults}"]; |
783 } | 781 } |
784 if (pageToken != null) { | 782 if (pageToken != null) { |
785 _queryParams["pageToken"] = [pageToken]; | 783 _queryParams["pageToken"] = [pageToken]; |
786 } | 784 } |
787 | 785 |
788 | 786 |
789 _url = 'leaderboards'; | 787 _url = 'leaderboards'; |
790 | 788 |
791 var _response = _requester.request(_url, | 789 var _response = _requester.request(_url, |
792 "GET", | 790 "GET", |
793 body: _body, | 791 body: _body, |
794 queryParams: _queryParams, | 792 queryParams: _queryParams, |
795 uploadOptions: _uploadOptions, | 793 uploadOptions: _uploadOptions, |
796 uploadMedia: _uploadMedia, | 794 uploadMedia: _uploadMedia, |
797 downloadOptions: _downloadOptions); | 795 downloadOptions: _downloadOptions); |
798 return _response.then((data) => new LeaderboardListResponse.fromJson(data)); | 796 return _response.then((data) => new LeaderboardListResponse.fromJson(data)); |
799 } | 797 } |
800 | 798 |
801 } | 799 } |
802 | 800 |
803 | 801 |
804 /** Not documented yet. */ | |
805 class MetagameResourceApi { | 802 class MetagameResourceApi { |
806 final common_internal.ApiRequester _requester; | 803 final commons.ApiRequester _requester; |
807 | 804 |
808 MetagameResourceApi(common_internal.ApiRequester client) : | 805 MetagameResourceApi(commons.ApiRequester client) : |
809 _requester = client; | 806 _requester = client; |
810 | 807 |
811 /** | 808 /** |
812 * Return the metagame configuration data for the calling application. | 809 * Return the metagame configuration data for the calling application. |
813 * | 810 * |
814 * Request parameters: | 811 * Request parameters: |
815 * | 812 * |
816 * Completes with a [MetagameConfig]. | 813 * Completes with a [MetagameConfig]. |
817 * | 814 * |
818 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 815 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
819 * error. | 816 * error. |
820 * | 817 * |
821 * If the used [http.Client] completes with an error when making a REST call, | 818 * If the used [http.Client] completes with an error when making a REST call, |
822 * this method will complete with the same error. | 819 * this method will complete with the same error. |
823 */ | 820 */ |
824 async.Future<MetagameConfig> getMetagameConfig() { | 821 async.Future<MetagameConfig> getMetagameConfig() { |
825 var _url = null; | 822 var _url = null; |
826 var _queryParams = new core.Map(); | 823 var _queryParams = new core.Map(); |
827 var _uploadMedia = null; | 824 var _uploadMedia = null; |
828 var _uploadOptions = null; | 825 var _uploadOptions = null; |
829 var _downloadOptions = common.DownloadOptions.Metadata; | 826 var _downloadOptions = commons.DownloadOptions.Metadata; |
830 var _body = null; | 827 var _body = null; |
831 | 828 |
832 | 829 |
833 | 830 |
834 _url = 'metagameConfig'; | 831 _url = 'metagameConfig'; |
835 | 832 |
836 var _response = _requester.request(_url, | 833 var _response = _requester.request(_url, |
837 "GET", | 834 "GET", |
838 body: _body, | 835 body: _body, |
839 queryParams: _queryParams, | 836 queryParams: _queryParams, |
(...skipping 22 matching lines...) Expand all Loading... |
862 * | 859 * |
863 * [maxResults] - The maximum number of category resources to return in the | 860 * [maxResults] - The maximum number of category resources to return in the |
864 * response, used for paging. For any response, the actual number of category | 861 * response, used for paging. For any response, the actual number of category |
865 * resources returned may be less than the specified maxResults. | 862 * resources returned may be less than the specified maxResults. |
866 * Value must be between "1" and "100". | 863 * Value must be between "1" and "100". |
867 * | 864 * |
868 * [pageToken] - The token returned by the previous request. | 865 * [pageToken] - The token returned by the previous request. |
869 * | 866 * |
870 * Completes with a [CategoryListResponse]. | 867 * Completes with a [CategoryListResponse]. |
871 * | 868 * |
872 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 869 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
873 * error. | 870 * error. |
874 * | 871 * |
875 * If the used [http.Client] completes with an error when making a REST call, | 872 * If the used [http.Client] completes with an error when making a REST call, |
876 * this method will complete with the same error. | 873 * this method will complete with the same error. |
877 */ | 874 */ |
878 async.Future<CategoryListResponse> listCategoriesByPlayer(core.String playerId
, core.String collection, {core.String language, core.int maxResults, core.Strin
g pageToken}) { | 875 async.Future<CategoryListResponse> listCategoriesByPlayer(core.String playerId
, core.String collection, {core.String language, core.int maxResults, core.Strin
g pageToken}) { |
879 var _url = null; | 876 var _url = null; |
880 var _queryParams = new core.Map(); | 877 var _queryParams = new core.Map(); |
881 var _uploadMedia = null; | 878 var _uploadMedia = null; |
882 var _uploadOptions = null; | 879 var _uploadOptions = null; |
883 var _downloadOptions = common.DownloadOptions.Metadata; | 880 var _downloadOptions = commons.DownloadOptions.Metadata; |
884 var _body = null; | 881 var _body = null; |
885 | 882 |
886 if (playerId == null) { | 883 if (playerId == null) { |
887 throw new core.ArgumentError("Parameter playerId is required."); | 884 throw new core.ArgumentError("Parameter playerId is required."); |
888 } | 885 } |
889 if (collection == null) { | 886 if (collection == null) { |
890 throw new core.ArgumentError("Parameter collection is required."); | 887 throw new core.ArgumentError("Parameter collection is required."); |
891 } | 888 } |
892 if (language != null) { | 889 if (language != null) { |
893 _queryParams["language"] = [language]; | 890 _queryParams["language"] = [language]; |
894 } | 891 } |
895 if (maxResults != null) { | 892 if (maxResults != null) { |
896 _queryParams["maxResults"] = ["${maxResults}"]; | 893 _queryParams["maxResults"] = ["${maxResults}"]; |
897 } | 894 } |
898 if (pageToken != null) { | 895 if (pageToken != null) { |
899 _queryParams["pageToken"] = [pageToken]; | 896 _queryParams["pageToken"] = [pageToken]; |
900 } | 897 } |
901 | 898 |
902 | 899 |
903 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId') + '/c
ategories/' + common_internal.Escaper.ecapeVariable('$collection'); | 900 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/categorie
s/' + commons.Escaper.ecapeVariable('$collection'); |
904 | 901 |
905 var _response = _requester.request(_url, | 902 var _response = _requester.request(_url, |
906 "GET", | 903 "GET", |
907 body: _body, | 904 body: _body, |
908 queryParams: _queryParams, | 905 queryParams: _queryParams, |
909 uploadOptions: _uploadOptions, | 906 uploadOptions: _uploadOptions, |
910 uploadMedia: _uploadMedia, | 907 uploadMedia: _uploadMedia, |
911 downloadOptions: _downloadOptions); | 908 downloadOptions: _downloadOptions); |
912 return _response.then((data) => new CategoryListResponse.fromJson(data)); | 909 return _response.then((data) => new CategoryListResponse.fromJson(data)); |
913 } | 910 } |
914 | 911 |
915 } | 912 } |
916 | 913 |
917 | 914 |
918 /** Not documented yet. */ | |
919 class PlayersResourceApi { | 915 class PlayersResourceApi { |
920 final common_internal.ApiRequester _requester; | 916 final commons.ApiRequester _requester; |
921 | 917 |
922 PlayersResourceApi(common_internal.ApiRequester client) : | 918 PlayersResourceApi(commons.ApiRequester client) : |
923 _requester = client; | 919 _requester = client; |
924 | 920 |
925 /** | 921 /** |
926 * Retrieves the Player resource with the given ID. To retrieve the player for | 922 * Retrieves the Player resource with the given ID. To retrieve the player for |
927 * the currently authenticated user, set playerId to me. | 923 * the currently authenticated user, set playerId to me. |
928 * | 924 * |
929 * Request parameters: | 925 * Request parameters: |
930 * | 926 * |
931 * [playerId] - A player ID. A value of me may be used in place of the | 927 * [playerId] - A player ID. A value of me may be used in place of the |
932 * authenticated player's ID. | 928 * authenticated player's ID. |
933 * | 929 * |
934 * [language] - The preferred language to use for strings returned by this | 930 * [language] - The preferred language to use for strings returned by this |
935 * method. | 931 * method. |
936 * | 932 * |
937 * Completes with a [Player]. | 933 * Completes with a [Player]. |
938 * | 934 * |
939 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 935 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
940 * error. | 936 * error. |
941 * | 937 * |
942 * If the used [http.Client] completes with an error when making a REST call, | 938 * If the used [http.Client] completes with an error when making a REST call, |
943 * this method will complete with the same error. | 939 * this method will complete with the same error. |
944 */ | 940 */ |
945 async.Future<Player> get(core.String playerId, {core.String language}) { | 941 async.Future<Player> get(core.String playerId, {core.String language}) { |
946 var _url = null; | 942 var _url = null; |
947 var _queryParams = new core.Map(); | 943 var _queryParams = new core.Map(); |
948 var _uploadMedia = null; | 944 var _uploadMedia = null; |
949 var _uploadOptions = null; | 945 var _uploadOptions = null; |
950 var _downloadOptions = common.DownloadOptions.Metadata; | 946 var _downloadOptions = commons.DownloadOptions.Metadata; |
951 var _body = null; | 947 var _body = null; |
952 | 948 |
953 if (playerId == null) { | 949 if (playerId == null) { |
954 throw new core.ArgumentError("Parameter playerId is required."); | 950 throw new core.ArgumentError("Parameter playerId is required."); |
955 } | 951 } |
956 if (language != null) { | 952 if (language != null) { |
957 _queryParams["language"] = [language]; | 953 _queryParams["language"] = [language]; |
958 } | 954 } |
959 | 955 |
960 | 956 |
961 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId'); | 957 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId'); |
962 | 958 |
963 var _response = _requester.request(_url, | 959 var _response = _requester.request(_url, |
964 "GET", | 960 "GET", |
965 body: _body, | 961 body: _body, |
966 queryParams: _queryParams, | 962 queryParams: _queryParams, |
967 uploadOptions: _uploadOptions, | 963 uploadOptions: _uploadOptions, |
968 uploadMedia: _uploadMedia, | 964 uploadMedia: _uploadMedia, |
969 downloadOptions: _downloadOptions); | 965 downloadOptions: _downloadOptions); |
970 return _response.then((data) => new Player.fromJson(data)); | 966 return _response.then((data) => new Player.fromJson(data)); |
971 } | 967 } |
(...skipping 16 matching lines...) Expand all Loading... |
988 * | 984 * |
989 * [maxResults] - The maximum number of player resources to return in the | 985 * [maxResults] - The maximum number of player resources to return in the |
990 * response, used for paging. For any response, the actual number of player | 986 * response, used for paging. For any response, the actual number of player |
991 * resources returned may be less than the specified maxResults. | 987 * resources returned may be less than the specified maxResults. |
992 * Value must be between "1" and "15". | 988 * Value must be between "1" and "15". |
993 * | 989 * |
994 * [pageToken] - The token returned by the previous request. | 990 * [pageToken] - The token returned by the previous request. |
995 * | 991 * |
996 * Completes with a [PlayerListResponse]. | 992 * Completes with a [PlayerListResponse]. |
997 * | 993 * |
998 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 994 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
999 * error. | 995 * error. |
1000 * | 996 * |
1001 * If the used [http.Client] completes with an error when making a REST call, | 997 * If the used [http.Client] completes with an error when making a REST call, |
1002 * this method will complete with the same error. | 998 * this method will complete with the same error. |
1003 */ | 999 */ |
1004 async.Future<PlayerListResponse> list(core.String collection, {core.String lan
guage, core.int maxResults, core.String pageToken}) { | 1000 async.Future<PlayerListResponse> list(core.String collection, {core.String lan
guage, core.int maxResults, core.String pageToken}) { |
1005 var _url = null; | 1001 var _url = null; |
1006 var _queryParams = new core.Map(); | 1002 var _queryParams = new core.Map(); |
1007 var _uploadMedia = null; | 1003 var _uploadMedia = null; |
1008 var _uploadOptions = null; | 1004 var _uploadOptions = null; |
1009 var _downloadOptions = common.DownloadOptions.Metadata; | 1005 var _downloadOptions = commons.DownloadOptions.Metadata; |
1010 var _body = null; | 1006 var _body = null; |
1011 | 1007 |
1012 if (collection == null) { | 1008 if (collection == null) { |
1013 throw new core.ArgumentError("Parameter collection is required."); | 1009 throw new core.ArgumentError("Parameter collection is required."); |
1014 } | 1010 } |
1015 if (language != null) { | 1011 if (language != null) { |
1016 _queryParams["language"] = [language]; | 1012 _queryParams["language"] = [language]; |
1017 } | 1013 } |
1018 if (maxResults != null) { | 1014 if (maxResults != null) { |
1019 _queryParams["maxResults"] = ["${maxResults}"]; | 1015 _queryParams["maxResults"] = ["${maxResults}"]; |
1020 } | 1016 } |
1021 if (pageToken != null) { | 1017 if (pageToken != null) { |
1022 _queryParams["pageToken"] = [pageToken]; | 1018 _queryParams["pageToken"] = [pageToken]; |
1023 } | 1019 } |
1024 | 1020 |
1025 | 1021 |
1026 _url = 'players/me/players/' + common_internal.Escaper.ecapeVariable('$colle
ction'); | 1022 _url = 'players/me/players/' + commons.Escaper.ecapeVariable('$collection'); |
1027 | 1023 |
1028 var _response = _requester.request(_url, | 1024 var _response = _requester.request(_url, |
1029 "GET", | 1025 "GET", |
1030 body: _body, | 1026 body: _body, |
1031 queryParams: _queryParams, | 1027 queryParams: _queryParams, |
1032 uploadOptions: _uploadOptions, | 1028 uploadOptions: _uploadOptions, |
1033 uploadMedia: _uploadMedia, | 1029 uploadMedia: _uploadMedia, |
1034 downloadOptions: _downloadOptions); | 1030 downloadOptions: _downloadOptions); |
1035 return _response.then((data) => new PlayerListResponse.fromJson(data)); | 1031 return _response.then((data) => new PlayerListResponse.fromJson(data)); |
1036 } | 1032 } |
1037 | 1033 |
1038 } | 1034 } |
1039 | 1035 |
1040 | 1036 |
1041 /** Not documented yet. */ | |
1042 class PushtokensResourceApi { | 1037 class PushtokensResourceApi { |
1043 final common_internal.ApiRequester _requester; | 1038 final commons.ApiRequester _requester; |
1044 | 1039 |
1045 PushtokensResourceApi(common_internal.ApiRequester client) : | 1040 PushtokensResourceApi(commons.ApiRequester client) : |
1046 _requester = client; | 1041 _requester = client; |
1047 | 1042 |
1048 /** | 1043 /** |
1049 * Removes a push token for the current user and application. Removing a | 1044 * Removes a push token for the current user and application. Removing a |
1050 * non-existent push token will report success. | 1045 * non-existent push token will report success. |
1051 * | 1046 * |
1052 * [request] - The metadata request object. | 1047 * [request] - The metadata request object. |
1053 * | 1048 * |
1054 * Request parameters: | 1049 * Request parameters: |
1055 * | 1050 * |
1056 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1051 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1057 * error. | 1052 * error. |
1058 * | 1053 * |
1059 * If the used [http.Client] completes with an error when making a REST call, | 1054 * If the used [http.Client] completes with an error when making a REST call, |
1060 * this method will complete with the same error. | 1055 * this method will complete with the same error. |
1061 */ | 1056 */ |
1062 async.Future remove(PushTokenId request) { | 1057 async.Future remove(PushTokenId request) { |
1063 var _url = null; | 1058 var _url = null; |
1064 var _queryParams = new core.Map(); | 1059 var _queryParams = new core.Map(); |
1065 var _uploadMedia = null; | 1060 var _uploadMedia = null; |
1066 var _uploadOptions = null; | 1061 var _uploadOptions = null; |
1067 var _downloadOptions = common.DownloadOptions.Metadata; | 1062 var _downloadOptions = commons.DownloadOptions.Metadata; |
1068 var _body = null; | 1063 var _body = null; |
1069 | 1064 |
1070 if (request != null) { | 1065 if (request != null) { |
1071 _body = convert.JSON.encode((request).toJson()); | 1066 _body = convert.JSON.encode((request).toJson()); |
1072 } | 1067 } |
1073 | 1068 |
1074 _downloadOptions = null; | 1069 _downloadOptions = null; |
1075 | 1070 |
1076 _url = 'pushtokens/remove'; | 1071 _url = 'pushtokens/remove'; |
1077 | 1072 |
1078 var _response = _requester.request(_url, | 1073 var _response = _requester.request(_url, |
1079 "POST", | 1074 "POST", |
1080 body: _body, | 1075 body: _body, |
1081 queryParams: _queryParams, | 1076 queryParams: _queryParams, |
1082 uploadOptions: _uploadOptions, | 1077 uploadOptions: _uploadOptions, |
1083 uploadMedia: _uploadMedia, | 1078 uploadMedia: _uploadMedia, |
1084 downloadOptions: _downloadOptions); | 1079 downloadOptions: _downloadOptions); |
1085 return _response.then((data) => null); | 1080 return _response.then((data) => null); |
1086 } | 1081 } |
1087 | 1082 |
1088 /** | 1083 /** |
1089 * Registers a push token for the current user and application. | 1084 * Registers a push token for the current user and application. |
1090 * | 1085 * |
1091 * [request] - The metadata request object. | 1086 * [request] - The metadata request object. |
1092 * | 1087 * |
1093 * Request parameters: | 1088 * Request parameters: |
1094 * | 1089 * |
1095 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1090 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1096 * error. | 1091 * error. |
1097 * | 1092 * |
1098 * If the used [http.Client] completes with an error when making a REST call, | 1093 * If the used [http.Client] completes with an error when making a REST call, |
1099 * this method will complete with the same error. | 1094 * this method will complete with the same error. |
1100 */ | 1095 */ |
1101 async.Future update(PushToken request) { | 1096 async.Future update(PushToken request) { |
1102 var _url = null; | 1097 var _url = null; |
1103 var _queryParams = new core.Map(); | 1098 var _queryParams = new core.Map(); |
1104 var _uploadMedia = null; | 1099 var _uploadMedia = null; |
1105 var _uploadOptions = null; | 1100 var _uploadOptions = null; |
1106 var _downloadOptions = common.DownloadOptions.Metadata; | 1101 var _downloadOptions = commons.DownloadOptions.Metadata; |
1107 var _body = null; | 1102 var _body = null; |
1108 | 1103 |
1109 if (request != null) { | 1104 if (request != null) { |
1110 _body = convert.JSON.encode((request).toJson()); | 1105 _body = convert.JSON.encode((request).toJson()); |
1111 } | 1106 } |
1112 | 1107 |
1113 _downloadOptions = null; | 1108 _downloadOptions = null; |
1114 | 1109 |
1115 _url = 'pushtokens'; | 1110 _url = 'pushtokens'; |
1116 | 1111 |
1117 var _response = _requester.request(_url, | 1112 var _response = _requester.request(_url, |
1118 "PUT", | 1113 "PUT", |
1119 body: _body, | 1114 body: _body, |
1120 queryParams: _queryParams, | 1115 queryParams: _queryParams, |
1121 uploadOptions: _uploadOptions, | 1116 uploadOptions: _uploadOptions, |
1122 uploadMedia: _uploadMedia, | 1117 uploadMedia: _uploadMedia, |
1123 downloadOptions: _downloadOptions); | 1118 downloadOptions: _downloadOptions); |
1124 return _response.then((data) => null); | 1119 return _response.then((data) => null); |
1125 } | 1120 } |
1126 | 1121 |
1127 } | 1122 } |
1128 | 1123 |
1129 | 1124 |
1130 /** Not documented yet. */ | |
1131 class QuestMilestonesResourceApi { | 1125 class QuestMilestonesResourceApi { |
1132 final common_internal.ApiRequester _requester; | 1126 final commons.ApiRequester _requester; |
1133 | 1127 |
1134 QuestMilestonesResourceApi(common_internal.ApiRequester client) : | 1128 QuestMilestonesResourceApi(commons.ApiRequester client) : |
1135 _requester = client; | 1129 _requester = client; |
1136 | 1130 |
1137 /** | 1131 /** |
1138 * Report that a reward for the milestone corresponding to milestoneId for the | 1132 * Report that a reward for the milestone corresponding to milestoneId for the |
1139 * quest corresponding to questId has been claimed by the currently authorized | 1133 * quest corresponding to questId has been claimed by the currently authorized |
1140 * user. | 1134 * user. |
1141 * | 1135 * |
1142 * Request parameters: | 1136 * Request parameters: |
1143 * | 1137 * |
1144 * [questId] - The ID of the quest. | 1138 * [questId] - The ID of the quest. |
1145 * | 1139 * |
1146 * [milestoneId] - The ID of the milestone. | 1140 * [milestoneId] - The ID of the milestone. |
1147 * | 1141 * |
1148 * [requestId] - A numeric ID to ensure that the request is handled correctly | 1142 * [requestId] - A numeric ID to ensure that the request is handled correctly |
1149 * across retries. Your client application must generate this ID randomly. | 1143 * across retries. Your client application must generate this ID randomly. |
1150 * | 1144 * |
1151 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1145 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1152 * error. | 1146 * error. |
1153 * | 1147 * |
1154 * If the used [http.Client] completes with an error when making a REST call, | 1148 * If the used [http.Client] completes with an error when making a REST call, |
1155 * this method will complete with the same error. | 1149 * this method will complete with the same error. |
1156 */ | 1150 */ |
1157 async.Future claim(core.String questId, core.String milestoneId, core.String r
equestId) { | 1151 async.Future claim(core.String questId, core.String milestoneId, core.String r
equestId) { |
1158 var _url = null; | 1152 var _url = null; |
1159 var _queryParams = new core.Map(); | 1153 var _queryParams = new core.Map(); |
1160 var _uploadMedia = null; | 1154 var _uploadMedia = null; |
1161 var _uploadOptions = null; | 1155 var _uploadOptions = null; |
1162 var _downloadOptions = common.DownloadOptions.Metadata; | 1156 var _downloadOptions = commons.DownloadOptions.Metadata; |
1163 var _body = null; | 1157 var _body = null; |
1164 | 1158 |
1165 if (questId == null) { | 1159 if (questId == null) { |
1166 throw new core.ArgumentError("Parameter questId is required."); | 1160 throw new core.ArgumentError("Parameter questId is required."); |
1167 } | 1161 } |
1168 if (milestoneId == null) { | 1162 if (milestoneId == null) { |
1169 throw new core.ArgumentError("Parameter milestoneId is required."); | 1163 throw new core.ArgumentError("Parameter milestoneId is required."); |
1170 } | 1164 } |
1171 if (requestId == null) { | 1165 if (requestId == null) { |
1172 throw new core.ArgumentError("Parameter requestId is required."); | 1166 throw new core.ArgumentError("Parameter requestId is required."); |
1173 } | 1167 } |
1174 _queryParams["requestId"] = [requestId]; | 1168 _queryParams["requestId"] = [requestId]; |
1175 | 1169 |
1176 _downloadOptions = null; | 1170 _downloadOptions = null; |
1177 | 1171 |
1178 _url = 'quests/' + common_internal.Escaper.ecapeVariable('$questId') + '/mil
estones/' + common_internal.Escaper.ecapeVariable('$milestoneId') + '/claim'; | 1172 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/milestones/
' + commons.Escaper.ecapeVariable('$milestoneId') + '/claim'; |
1179 | 1173 |
1180 var _response = _requester.request(_url, | 1174 var _response = _requester.request(_url, |
1181 "PUT", | 1175 "PUT", |
1182 body: _body, | 1176 body: _body, |
1183 queryParams: _queryParams, | 1177 queryParams: _queryParams, |
1184 uploadOptions: _uploadOptions, | 1178 uploadOptions: _uploadOptions, |
1185 uploadMedia: _uploadMedia, | 1179 uploadMedia: _uploadMedia, |
1186 downloadOptions: _downloadOptions); | 1180 downloadOptions: _downloadOptions); |
1187 return _response.then((data) => null); | 1181 return _response.then((data) => null); |
1188 } | 1182 } |
1189 | 1183 |
1190 } | 1184 } |
1191 | 1185 |
1192 | 1186 |
1193 /** Not documented yet. */ | |
1194 class QuestsResourceApi { | 1187 class QuestsResourceApi { |
1195 final common_internal.ApiRequester _requester; | 1188 final commons.ApiRequester _requester; |
1196 | 1189 |
1197 QuestsResourceApi(common_internal.ApiRequester client) : | 1190 QuestsResourceApi(commons.ApiRequester client) : |
1198 _requester = client; | 1191 _requester = client; |
1199 | 1192 |
1200 /** | 1193 /** |
1201 * Indicates that the currently authorized user will participate in the quest. | 1194 * Indicates that the currently authorized user will participate in the quest. |
1202 * | 1195 * |
1203 * Request parameters: | 1196 * Request parameters: |
1204 * | 1197 * |
1205 * [questId] - The ID of the quest. | 1198 * [questId] - The ID of the quest. |
1206 * | 1199 * |
1207 * [language] - The preferred language to use for strings returned by this | 1200 * [language] - The preferred language to use for strings returned by this |
1208 * method. | 1201 * method. |
1209 * | 1202 * |
1210 * Completes with a [Quest]. | 1203 * Completes with a [Quest]. |
1211 * | 1204 * |
1212 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1205 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1213 * error. | 1206 * error. |
1214 * | 1207 * |
1215 * If the used [http.Client] completes with an error when making a REST call, | 1208 * If the used [http.Client] completes with an error when making a REST call, |
1216 * this method will complete with the same error. | 1209 * this method will complete with the same error. |
1217 */ | 1210 */ |
1218 async.Future<Quest> accept(core.String questId, {core.String language}) { | 1211 async.Future<Quest> accept(core.String questId, {core.String language}) { |
1219 var _url = null; | 1212 var _url = null; |
1220 var _queryParams = new core.Map(); | 1213 var _queryParams = new core.Map(); |
1221 var _uploadMedia = null; | 1214 var _uploadMedia = null; |
1222 var _uploadOptions = null; | 1215 var _uploadOptions = null; |
1223 var _downloadOptions = common.DownloadOptions.Metadata; | 1216 var _downloadOptions = commons.DownloadOptions.Metadata; |
1224 var _body = null; | 1217 var _body = null; |
1225 | 1218 |
1226 if (questId == null) { | 1219 if (questId == null) { |
1227 throw new core.ArgumentError("Parameter questId is required."); | 1220 throw new core.ArgumentError("Parameter questId is required."); |
1228 } | 1221 } |
1229 if (language != null) { | 1222 if (language != null) { |
1230 _queryParams["language"] = [language]; | 1223 _queryParams["language"] = [language]; |
1231 } | 1224 } |
1232 | 1225 |
1233 | 1226 |
1234 _url = 'quests/' + common_internal.Escaper.ecapeVariable('$questId') + '/acc
ept'; | 1227 _url = 'quests/' + commons.Escaper.ecapeVariable('$questId') + '/accept'; |
1235 | 1228 |
1236 var _response = _requester.request(_url, | 1229 var _response = _requester.request(_url, |
1237 "POST", | 1230 "POST", |
1238 body: _body, | 1231 body: _body, |
1239 queryParams: _queryParams, | 1232 queryParams: _queryParams, |
1240 uploadOptions: _uploadOptions, | 1233 uploadOptions: _uploadOptions, |
1241 uploadMedia: _uploadMedia, | 1234 uploadMedia: _uploadMedia, |
1242 downloadOptions: _downloadOptions); | 1235 downloadOptions: _downloadOptions); |
1243 return _response.then((data) => new Quest.fromJson(data)); | 1236 return _response.then((data) => new Quest.fromJson(data)); |
1244 } | 1237 } |
(...skipping 13 matching lines...) Expand all Loading... |
1258 * [maxResults] - The maximum number of quest resources to return in the | 1251 * [maxResults] - The maximum number of quest resources to return in the |
1259 * response, used for paging. For any response, the actual number of quest | 1252 * response, used for paging. For any response, the actual number of quest |
1260 * resources returned may be less than the specified maxResults. Acceptable | 1253 * resources returned may be less than the specified maxResults. Acceptable |
1261 * values are 1 to 50, inclusive. (Default: 50). | 1254 * values are 1 to 50, inclusive. (Default: 50). |
1262 * Value must be between "1" and "50". | 1255 * Value must be between "1" and "50". |
1263 * | 1256 * |
1264 * [pageToken] - The token returned by the previous request. | 1257 * [pageToken] - The token returned by the previous request. |
1265 * | 1258 * |
1266 * Completes with a [QuestListResponse]. | 1259 * Completes with a [QuestListResponse]. |
1267 * | 1260 * |
1268 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1261 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1269 * error. | 1262 * error. |
1270 * | 1263 * |
1271 * If the used [http.Client] completes with an error when making a REST call, | 1264 * If the used [http.Client] completes with an error when making a REST call, |
1272 * this method will complete with the same error. | 1265 * this method will complete with the same error. |
1273 */ | 1266 */ |
1274 async.Future<QuestListResponse> list(core.String playerId, {core.String langua
ge, core.int maxResults, core.String pageToken}) { | 1267 async.Future<QuestListResponse> list(core.String playerId, {core.String langua
ge, core.int maxResults, core.String pageToken}) { |
1275 var _url = null; | 1268 var _url = null; |
1276 var _queryParams = new core.Map(); | 1269 var _queryParams = new core.Map(); |
1277 var _uploadMedia = null; | 1270 var _uploadMedia = null; |
1278 var _uploadOptions = null; | 1271 var _uploadOptions = null; |
1279 var _downloadOptions = common.DownloadOptions.Metadata; | 1272 var _downloadOptions = commons.DownloadOptions.Metadata; |
1280 var _body = null; | 1273 var _body = null; |
1281 | 1274 |
1282 if (playerId == null) { | 1275 if (playerId == null) { |
1283 throw new core.ArgumentError("Parameter playerId is required."); | 1276 throw new core.ArgumentError("Parameter playerId is required."); |
1284 } | 1277 } |
1285 if (language != null) { | 1278 if (language != null) { |
1286 _queryParams["language"] = [language]; | 1279 _queryParams["language"] = [language]; |
1287 } | 1280 } |
1288 if (maxResults != null) { | 1281 if (maxResults != null) { |
1289 _queryParams["maxResults"] = ["${maxResults}"]; | 1282 _queryParams["maxResults"] = ["${maxResults}"]; |
1290 } | 1283 } |
1291 if (pageToken != null) { | 1284 if (pageToken != null) { |
1292 _queryParams["pageToken"] = [pageToken]; | 1285 _queryParams["pageToken"] = [pageToken]; |
1293 } | 1286 } |
1294 | 1287 |
1295 | 1288 |
1296 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId') + '/q
uests'; | 1289 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/quests'; |
1297 | 1290 |
1298 var _response = _requester.request(_url, | 1291 var _response = _requester.request(_url, |
1299 "GET", | 1292 "GET", |
1300 body: _body, | 1293 body: _body, |
1301 queryParams: _queryParams, | 1294 queryParams: _queryParams, |
1302 uploadOptions: _uploadOptions, | 1295 uploadOptions: _uploadOptions, |
1303 uploadMedia: _uploadMedia, | 1296 uploadMedia: _uploadMedia, |
1304 downloadOptions: _downloadOptions); | 1297 downloadOptions: _downloadOptions); |
1305 return _response.then((data) => new QuestListResponse.fromJson(data)); | 1298 return _response.then((data) => new QuestListResponse.fromJson(data)); |
1306 } | 1299 } |
1307 | 1300 |
1308 } | 1301 } |
1309 | 1302 |
1310 | 1303 |
1311 /** Not documented yet. */ | |
1312 class RevisionsResourceApi { | 1304 class RevisionsResourceApi { |
1313 final common_internal.ApiRequester _requester; | 1305 final commons.ApiRequester _requester; |
1314 | 1306 |
1315 RevisionsResourceApi(common_internal.ApiRequester client) : | 1307 RevisionsResourceApi(commons.ApiRequester client) : |
1316 _requester = client; | 1308 _requester = client; |
1317 | 1309 |
1318 /** | 1310 /** |
1319 * Checks whether the games client is out of date. | 1311 * Checks whether the games client is out of date. |
1320 * | 1312 * |
1321 * Request parameters: | 1313 * Request parameters: |
1322 * | 1314 * |
1323 * [clientRevision] - The revision of the client SDK used by your application. | 1315 * [clientRevision] - The revision of the client SDK used by your application. |
1324 * Format: | 1316 * Format: |
1325 * [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: | 1317 * [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: |
1326 * | 1318 * |
1327 * - "ANDROID" - Client is running the Android SDK. | 1319 * - "ANDROID" - Client is running the Android SDK. |
1328 * - "IOS" - Client is running the iOS SDK. | 1320 * - "IOS" - Client is running the iOS SDK. |
1329 * - "WEB_APP" - Client is running as a Web App. | 1321 * - "WEB_APP" - Client is running as a Web App. |
1330 * | 1322 * |
1331 * Completes with a [RevisionCheckResponse]. | 1323 * Completes with a [RevisionCheckResponse]. |
1332 * | 1324 * |
1333 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1325 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1334 * error. | 1326 * error. |
1335 * | 1327 * |
1336 * If the used [http.Client] completes with an error when making a REST call, | 1328 * If the used [http.Client] completes with an error when making a REST call, |
1337 * this method will complete with the same error. | 1329 * this method will complete with the same error. |
1338 */ | 1330 */ |
1339 async.Future<RevisionCheckResponse> check(core.String clientRevision) { | 1331 async.Future<RevisionCheckResponse> check(core.String clientRevision) { |
1340 var _url = null; | 1332 var _url = null; |
1341 var _queryParams = new core.Map(); | 1333 var _queryParams = new core.Map(); |
1342 var _uploadMedia = null; | 1334 var _uploadMedia = null; |
1343 var _uploadOptions = null; | 1335 var _uploadOptions = null; |
1344 var _downloadOptions = common.DownloadOptions.Metadata; | 1336 var _downloadOptions = commons.DownloadOptions.Metadata; |
1345 var _body = null; | 1337 var _body = null; |
1346 | 1338 |
1347 if (clientRevision == null) { | 1339 if (clientRevision == null) { |
1348 throw new core.ArgumentError("Parameter clientRevision is required."); | 1340 throw new core.ArgumentError("Parameter clientRevision is required."); |
1349 } | 1341 } |
1350 _queryParams["clientRevision"] = [clientRevision]; | 1342 _queryParams["clientRevision"] = [clientRevision]; |
1351 | 1343 |
1352 | 1344 |
1353 _url = 'revisions/check'; | 1345 _url = 'revisions/check'; |
1354 | 1346 |
1355 var _response = _requester.request(_url, | 1347 var _response = _requester.request(_url, |
1356 "GET", | 1348 "GET", |
1357 body: _body, | 1349 body: _body, |
1358 queryParams: _queryParams, | 1350 queryParams: _queryParams, |
1359 uploadOptions: _uploadOptions, | 1351 uploadOptions: _uploadOptions, |
1360 uploadMedia: _uploadMedia, | 1352 uploadMedia: _uploadMedia, |
1361 downloadOptions: _downloadOptions); | 1353 downloadOptions: _downloadOptions); |
1362 return _response.then((data) => new RevisionCheckResponse.fromJson(data)); | 1354 return _response.then((data) => new RevisionCheckResponse.fromJson(data)); |
1363 } | 1355 } |
1364 | 1356 |
1365 } | 1357 } |
1366 | 1358 |
1367 | 1359 |
1368 /** Not documented yet. */ | |
1369 class RoomsResourceApi { | 1360 class RoomsResourceApi { |
1370 final common_internal.ApiRequester _requester; | 1361 final commons.ApiRequester _requester; |
1371 | 1362 |
1372 RoomsResourceApi(common_internal.ApiRequester client) : | 1363 RoomsResourceApi(commons.ApiRequester client) : |
1373 _requester = client; | 1364 _requester = client; |
1374 | 1365 |
1375 /** | 1366 /** |
1376 * Create a room. For internal use by the Games SDK only. Calling this method | 1367 * Create a room. For internal use by the Games SDK only. Calling this method |
1377 * directly is unsupported. | 1368 * directly is unsupported. |
1378 * | 1369 * |
1379 * [request] - The metadata request object. | 1370 * [request] - The metadata request object. |
1380 * | 1371 * |
1381 * Request parameters: | 1372 * Request parameters: |
1382 * | 1373 * |
1383 * [language] - The preferred language to use for strings returned by this | 1374 * [language] - The preferred language to use for strings returned by this |
1384 * method. | 1375 * method. |
1385 * | 1376 * |
1386 * Completes with a [Room]. | 1377 * Completes with a [Room]. |
1387 * | 1378 * |
1388 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1379 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1389 * error. | 1380 * error. |
1390 * | 1381 * |
1391 * If the used [http.Client] completes with an error when making a REST call, | 1382 * If the used [http.Client] completes with an error when making a REST call, |
1392 * this method will complete with the same error. | 1383 * this method will complete with the same error. |
1393 */ | 1384 */ |
1394 async.Future<Room> create(RoomCreateRequest request, {core.String language}) { | 1385 async.Future<Room> create(RoomCreateRequest request, {core.String language}) { |
1395 var _url = null; | 1386 var _url = null; |
1396 var _queryParams = new core.Map(); | 1387 var _queryParams = new core.Map(); |
1397 var _uploadMedia = null; | 1388 var _uploadMedia = null; |
1398 var _uploadOptions = null; | 1389 var _uploadOptions = null; |
1399 var _downloadOptions = common.DownloadOptions.Metadata; | 1390 var _downloadOptions = commons.DownloadOptions.Metadata; |
1400 var _body = null; | 1391 var _body = null; |
1401 | 1392 |
1402 if (request != null) { | 1393 if (request != null) { |
1403 _body = convert.JSON.encode((request).toJson()); | 1394 _body = convert.JSON.encode((request).toJson()); |
1404 } | 1395 } |
1405 if (language != null) { | 1396 if (language != null) { |
1406 _queryParams["language"] = [language]; | 1397 _queryParams["language"] = [language]; |
1407 } | 1398 } |
1408 | 1399 |
1409 | 1400 |
(...skipping 15 matching lines...) Expand all Loading... |
1425 * | 1416 * |
1426 * Request parameters: | 1417 * Request parameters: |
1427 * | 1418 * |
1428 * [roomId] - The ID of the room. | 1419 * [roomId] - The ID of the room. |
1429 * | 1420 * |
1430 * [language] - The preferred language to use for strings returned by this | 1421 * [language] - The preferred language to use for strings returned by this |
1431 * method. | 1422 * method. |
1432 * | 1423 * |
1433 * Completes with a [Room]. | 1424 * Completes with a [Room]. |
1434 * | 1425 * |
1435 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1426 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1436 * error. | 1427 * error. |
1437 * | 1428 * |
1438 * If the used [http.Client] completes with an error when making a REST call, | 1429 * If the used [http.Client] completes with an error when making a REST call, |
1439 * this method will complete with the same error. | 1430 * this method will complete with the same error. |
1440 */ | 1431 */ |
1441 async.Future<Room> decline(core.String roomId, {core.String language}) { | 1432 async.Future<Room> decline(core.String roomId, {core.String language}) { |
1442 var _url = null; | 1433 var _url = null; |
1443 var _queryParams = new core.Map(); | 1434 var _queryParams = new core.Map(); |
1444 var _uploadMedia = null; | 1435 var _uploadMedia = null; |
1445 var _uploadOptions = null; | 1436 var _uploadOptions = null; |
1446 var _downloadOptions = common.DownloadOptions.Metadata; | 1437 var _downloadOptions = commons.DownloadOptions.Metadata; |
1447 var _body = null; | 1438 var _body = null; |
1448 | 1439 |
1449 if (roomId == null) { | 1440 if (roomId == null) { |
1450 throw new core.ArgumentError("Parameter roomId is required."); | 1441 throw new core.ArgumentError("Parameter roomId is required."); |
1451 } | 1442 } |
1452 if (language != null) { | 1443 if (language != null) { |
1453 _queryParams["language"] = [language]; | 1444 _queryParams["language"] = [language]; |
1454 } | 1445 } |
1455 | 1446 |
1456 | 1447 |
1457 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId') + '/decli
ne'; | 1448 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/decline'; |
1458 | 1449 |
1459 var _response = _requester.request(_url, | 1450 var _response = _requester.request(_url, |
1460 "POST", | 1451 "POST", |
1461 body: _body, | 1452 body: _body, |
1462 queryParams: _queryParams, | 1453 queryParams: _queryParams, |
1463 uploadOptions: _uploadOptions, | 1454 uploadOptions: _uploadOptions, |
1464 uploadMedia: _uploadMedia, | 1455 uploadMedia: _uploadMedia, |
1465 downloadOptions: _downloadOptions); | 1456 downloadOptions: _downloadOptions); |
1466 return _response.then((data) => new Room.fromJson(data)); | 1457 return _response.then((data) => new Room.fromJson(data)); |
1467 } | 1458 } |
1468 | 1459 |
1469 /** | 1460 /** |
1470 * Dismiss an invitation to join a room. For internal use by the Games SDK | 1461 * Dismiss an invitation to join a room. For internal use by the Games SDK |
1471 * only. Calling this method directly is unsupported. | 1462 * only. Calling this method directly is unsupported. |
1472 * | 1463 * |
1473 * Request parameters: | 1464 * Request parameters: |
1474 * | 1465 * |
1475 * [roomId] - The ID of the room. | 1466 * [roomId] - The ID of the room. |
1476 * | 1467 * |
1477 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1478 * error. | 1469 * error. |
1479 * | 1470 * |
1480 * If the used [http.Client] completes with an error when making a REST call, | 1471 * If the used [http.Client] completes with an error when making a REST call, |
1481 * this method will complete with the same error. | 1472 * this method will complete with the same error. |
1482 */ | 1473 */ |
1483 async.Future dismiss(core.String roomId) { | 1474 async.Future dismiss(core.String roomId) { |
1484 var _url = null; | 1475 var _url = null; |
1485 var _queryParams = new core.Map(); | 1476 var _queryParams = new core.Map(); |
1486 var _uploadMedia = null; | 1477 var _uploadMedia = null; |
1487 var _uploadOptions = null; | 1478 var _uploadOptions = null; |
1488 var _downloadOptions = common.DownloadOptions.Metadata; | 1479 var _downloadOptions = commons.DownloadOptions.Metadata; |
1489 var _body = null; | 1480 var _body = null; |
1490 | 1481 |
1491 if (roomId == null) { | 1482 if (roomId == null) { |
1492 throw new core.ArgumentError("Parameter roomId is required."); | 1483 throw new core.ArgumentError("Parameter roomId is required."); |
1493 } | 1484 } |
1494 | 1485 |
1495 _downloadOptions = null; | 1486 _downloadOptions = null; |
1496 | 1487 |
1497 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId') + '/dismi
ss'; | 1488 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/dismiss'; |
1498 | 1489 |
1499 var _response = _requester.request(_url, | 1490 var _response = _requester.request(_url, |
1500 "POST", | 1491 "POST", |
1501 body: _body, | 1492 body: _body, |
1502 queryParams: _queryParams, | 1493 queryParams: _queryParams, |
1503 uploadOptions: _uploadOptions, | 1494 uploadOptions: _uploadOptions, |
1504 uploadMedia: _uploadMedia, | 1495 uploadMedia: _uploadMedia, |
1505 downloadOptions: _downloadOptions); | 1496 downloadOptions: _downloadOptions); |
1506 return _response.then((data) => null); | 1497 return _response.then((data) => null); |
1507 } | 1498 } |
1508 | 1499 |
1509 /** | 1500 /** |
1510 * Get the data for a room. | 1501 * Get the data for a room. |
1511 * | 1502 * |
1512 * Request parameters: | 1503 * Request parameters: |
1513 * | 1504 * |
1514 * [roomId] - The ID of the room. | 1505 * [roomId] - The ID of the room. |
1515 * | 1506 * |
1516 * [language] - The preferred language to use for strings returned by this | 1507 * [language] - The preferred language to use for strings returned by this |
1517 * method. | 1508 * method. |
1518 * | 1509 * |
1519 * Completes with a [Room]. | 1510 * Completes with a [Room]. |
1520 * | 1511 * |
1521 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1512 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1522 * error. | 1513 * error. |
1523 * | 1514 * |
1524 * If the used [http.Client] completes with an error when making a REST call, | 1515 * If the used [http.Client] completes with an error when making a REST call, |
1525 * this method will complete with the same error. | 1516 * this method will complete with the same error. |
1526 */ | 1517 */ |
1527 async.Future<Room> get(core.String roomId, {core.String language}) { | 1518 async.Future<Room> get(core.String roomId, {core.String language}) { |
1528 var _url = null; | 1519 var _url = null; |
1529 var _queryParams = new core.Map(); | 1520 var _queryParams = new core.Map(); |
1530 var _uploadMedia = null; | 1521 var _uploadMedia = null; |
1531 var _uploadOptions = null; | 1522 var _uploadOptions = null; |
1532 var _downloadOptions = common.DownloadOptions.Metadata; | 1523 var _downloadOptions = commons.DownloadOptions.Metadata; |
1533 var _body = null; | 1524 var _body = null; |
1534 | 1525 |
1535 if (roomId == null) { | 1526 if (roomId == null) { |
1536 throw new core.ArgumentError("Parameter roomId is required."); | 1527 throw new core.ArgumentError("Parameter roomId is required."); |
1537 } | 1528 } |
1538 if (language != null) { | 1529 if (language != null) { |
1539 _queryParams["language"] = [language]; | 1530 _queryParams["language"] = [language]; |
1540 } | 1531 } |
1541 | 1532 |
1542 | 1533 |
1543 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId'); | 1534 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId'); |
1544 | 1535 |
1545 var _response = _requester.request(_url, | 1536 var _response = _requester.request(_url, |
1546 "GET", | 1537 "GET", |
1547 body: _body, | 1538 body: _body, |
1548 queryParams: _queryParams, | 1539 queryParams: _queryParams, |
1549 uploadOptions: _uploadOptions, | 1540 uploadOptions: _uploadOptions, |
1550 uploadMedia: _uploadMedia, | 1541 uploadMedia: _uploadMedia, |
1551 downloadOptions: _downloadOptions); | 1542 downloadOptions: _downloadOptions); |
1552 return _response.then((data) => new Room.fromJson(data)); | 1543 return _response.then((data) => new Room.fromJson(data)); |
1553 } | 1544 } |
1554 | 1545 |
1555 /** | 1546 /** |
1556 * Join a room. For internal use by the Games SDK only. Calling this method | 1547 * Join a room. For internal use by the Games SDK only. Calling this method |
1557 * directly is unsupported. | 1548 * directly is unsupported. |
1558 * | 1549 * |
1559 * [request] - The metadata request object. | 1550 * [request] - The metadata request object. |
1560 * | 1551 * |
1561 * Request parameters: | 1552 * Request parameters: |
1562 * | 1553 * |
1563 * [roomId] - The ID of the room. | 1554 * [roomId] - The ID of the room. |
1564 * | 1555 * |
1565 * [language] - The preferred language to use for strings returned by this | 1556 * [language] - The preferred language to use for strings returned by this |
1566 * method. | 1557 * method. |
1567 * | 1558 * |
1568 * Completes with a [Room]. | 1559 * Completes with a [Room]. |
1569 * | 1560 * |
1570 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1561 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1571 * error. | 1562 * error. |
1572 * | 1563 * |
1573 * If the used [http.Client] completes with an error when making a REST call, | 1564 * If the used [http.Client] completes with an error when making a REST call, |
1574 * this method will complete with the same error. | 1565 * this method will complete with the same error. |
1575 */ | 1566 */ |
1576 async.Future<Room> join(RoomJoinRequest request, core.String roomId, {core.Str
ing language}) { | 1567 async.Future<Room> join(RoomJoinRequest request, core.String roomId, {core.Str
ing language}) { |
1577 var _url = null; | 1568 var _url = null; |
1578 var _queryParams = new core.Map(); | 1569 var _queryParams = new core.Map(); |
1579 var _uploadMedia = null; | 1570 var _uploadMedia = null; |
1580 var _uploadOptions = null; | 1571 var _uploadOptions = null; |
1581 var _downloadOptions = common.DownloadOptions.Metadata; | 1572 var _downloadOptions = commons.DownloadOptions.Metadata; |
1582 var _body = null; | 1573 var _body = null; |
1583 | 1574 |
1584 if (request != null) { | 1575 if (request != null) { |
1585 _body = convert.JSON.encode((request).toJson()); | 1576 _body = convert.JSON.encode((request).toJson()); |
1586 } | 1577 } |
1587 if (roomId == null) { | 1578 if (roomId == null) { |
1588 throw new core.ArgumentError("Parameter roomId is required."); | 1579 throw new core.ArgumentError("Parameter roomId is required."); |
1589 } | 1580 } |
1590 if (language != null) { | 1581 if (language != null) { |
1591 _queryParams["language"] = [language]; | 1582 _queryParams["language"] = [language]; |
1592 } | 1583 } |
1593 | 1584 |
1594 | 1585 |
1595 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId') + '/join'
; | 1586 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/join'; |
1596 | 1587 |
1597 var _response = _requester.request(_url, | 1588 var _response = _requester.request(_url, |
1598 "POST", | 1589 "POST", |
1599 body: _body, | 1590 body: _body, |
1600 queryParams: _queryParams, | 1591 queryParams: _queryParams, |
1601 uploadOptions: _uploadOptions, | 1592 uploadOptions: _uploadOptions, |
1602 uploadMedia: _uploadMedia, | 1593 uploadMedia: _uploadMedia, |
1603 downloadOptions: _downloadOptions); | 1594 downloadOptions: _downloadOptions); |
1604 return _response.then((data) => new Room.fromJson(data)); | 1595 return _response.then((data) => new Room.fromJson(data)); |
1605 } | 1596 } |
1606 | 1597 |
1607 /** | 1598 /** |
1608 * Leave a room. For internal use by the Games SDK only. Calling this method | 1599 * Leave a room. For internal use by the Games SDK only. Calling this method |
1609 * directly is unsupported. | 1600 * directly is unsupported. |
1610 * | 1601 * |
1611 * [request] - The metadata request object. | 1602 * [request] - The metadata request object. |
1612 * | 1603 * |
1613 * Request parameters: | 1604 * Request parameters: |
1614 * | 1605 * |
1615 * [roomId] - The ID of the room. | 1606 * [roomId] - The ID of the room. |
1616 * | 1607 * |
1617 * [language] - The preferred language to use for strings returned by this | 1608 * [language] - The preferred language to use for strings returned by this |
1618 * method. | 1609 * method. |
1619 * | 1610 * |
1620 * Completes with a [Room]. | 1611 * Completes with a [Room]. |
1621 * | 1612 * |
1622 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1613 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1623 * error. | 1614 * error. |
1624 * | 1615 * |
1625 * If the used [http.Client] completes with an error when making a REST call, | 1616 * If the used [http.Client] completes with an error when making a REST call, |
1626 * this method will complete with the same error. | 1617 * this method will complete with the same error. |
1627 */ | 1618 */ |
1628 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, {core.S
tring language}) { | 1619 async.Future<Room> leave(RoomLeaveRequest request, core.String roomId, {core.S
tring language}) { |
1629 var _url = null; | 1620 var _url = null; |
1630 var _queryParams = new core.Map(); | 1621 var _queryParams = new core.Map(); |
1631 var _uploadMedia = null; | 1622 var _uploadMedia = null; |
1632 var _uploadOptions = null; | 1623 var _uploadOptions = null; |
1633 var _downloadOptions = common.DownloadOptions.Metadata; | 1624 var _downloadOptions = commons.DownloadOptions.Metadata; |
1634 var _body = null; | 1625 var _body = null; |
1635 | 1626 |
1636 if (request != null) { | 1627 if (request != null) { |
1637 _body = convert.JSON.encode((request).toJson()); | 1628 _body = convert.JSON.encode((request).toJson()); |
1638 } | 1629 } |
1639 if (roomId == null) { | 1630 if (roomId == null) { |
1640 throw new core.ArgumentError("Parameter roomId is required."); | 1631 throw new core.ArgumentError("Parameter roomId is required."); |
1641 } | 1632 } |
1642 if (language != null) { | 1633 if (language != null) { |
1643 _queryParams["language"] = [language]; | 1634 _queryParams["language"] = [language]; |
1644 } | 1635 } |
1645 | 1636 |
1646 | 1637 |
1647 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId') + '/leave
'; | 1638 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/leave'; |
1648 | 1639 |
1649 var _response = _requester.request(_url, | 1640 var _response = _requester.request(_url, |
1650 "POST", | 1641 "POST", |
1651 body: _body, | 1642 body: _body, |
1652 queryParams: _queryParams, | 1643 queryParams: _queryParams, |
1653 uploadOptions: _uploadOptions, | 1644 uploadOptions: _uploadOptions, |
1654 uploadMedia: _uploadMedia, | 1645 uploadMedia: _uploadMedia, |
1655 downloadOptions: _downloadOptions); | 1646 downloadOptions: _downloadOptions); |
1656 return _response.then((data) => new Room.fromJson(data)); | 1647 return _response.then((data) => new Room.fromJson(data)); |
1657 } | 1648 } |
1658 | 1649 |
1659 /** | 1650 /** |
1660 * Returns invitations to join rooms. | 1651 * Returns invitations to join rooms. |
1661 * | 1652 * |
1662 * Request parameters: | 1653 * Request parameters: |
1663 * | 1654 * |
1664 * [language] - The preferred language to use for strings returned by this | 1655 * [language] - The preferred language to use for strings returned by this |
1665 * method. | 1656 * method. |
1666 * | 1657 * |
1667 * [maxResults] - The maximum number of rooms to return in the response, used | 1658 * [maxResults] - The maximum number of rooms to return in the response, used |
1668 * for paging. For any response, the actual number of rooms to return may be | 1659 * for paging. For any response, the actual number of rooms to return may be |
1669 * less than the specified maxResults. | 1660 * less than the specified maxResults. |
1670 * Value must be between "1" and "500". | 1661 * Value must be between "1" and "500". |
1671 * | 1662 * |
1672 * [pageToken] - The token returned by the previous request. | 1663 * [pageToken] - The token returned by the previous request. |
1673 * | 1664 * |
1674 * Completes with a [RoomList]. | 1665 * Completes with a [RoomList]. |
1675 * | 1666 * |
1676 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1677 * error. | 1668 * error. |
1678 * | 1669 * |
1679 * If the used [http.Client] completes with an error when making a REST call, | 1670 * If the used [http.Client] completes with an error when making a REST call, |
1680 * this method will complete with the same error. | 1671 * this method will complete with the same error. |
1681 */ | 1672 */ |
1682 async.Future<RoomList> list({core.String language, core.int maxResults, core.S
tring pageToken}) { | 1673 async.Future<RoomList> list({core.String language, core.int maxResults, core.S
tring pageToken}) { |
1683 var _url = null; | 1674 var _url = null; |
1684 var _queryParams = new core.Map(); | 1675 var _queryParams = new core.Map(); |
1685 var _uploadMedia = null; | 1676 var _uploadMedia = null; |
1686 var _uploadOptions = null; | 1677 var _uploadOptions = null; |
1687 var _downloadOptions = common.DownloadOptions.Metadata; | 1678 var _downloadOptions = commons.DownloadOptions.Metadata; |
1688 var _body = null; | 1679 var _body = null; |
1689 | 1680 |
1690 if (language != null) { | 1681 if (language != null) { |
1691 _queryParams["language"] = [language]; | 1682 _queryParams["language"] = [language]; |
1692 } | 1683 } |
1693 if (maxResults != null) { | 1684 if (maxResults != null) { |
1694 _queryParams["maxResults"] = ["${maxResults}"]; | 1685 _queryParams["maxResults"] = ["${maxResults}"]; |
1695 } | 1686 } |
1696 if (pageToken != null) { | 1687 if (pageToken != null) { |
1697 _queryParams["pageToken"] = [pageToken]; | 1688 _queryParams["pageToken"] = [pageToken]; |
(...skipping 21 matching lines...) Expand all Loading... |
1719 * | 1710 * |
1720 * Request parameters: | 1711 * Request parameters: |
1721 * | 1712 * |
1722 * [roomId] - The ID of the room. | 1713 * [roomId] - The ID of the room. |
1723 * | 1714 * |
1724 * [language] - The preferred language to use for strings returned by this | 1715 * [language] - The preferred language to use for strings returned by this |
1725 * method. | 1716 * method. |
1726 * | 1717 * |
1727 * Completes with a [RoomStatus]. | 1718 * Completes with a [RoomStatus]. |
1728 * | 1719 * |
1729 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1720 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1730 * error. | 1721 * error. |
1731 * | 1722 * |
1732 * If the used [http.Client] completes with an error when making a REST call, | 1723 * If the used [http.Client] completes with an error when making a REST call, |
1733 * this method will complete with the same error. | 1724 * this method will complete with the same error. |
1734 */ | 1725 */ |
1735 async.Future<RoomStatus> reportStatus(RoomP2PStatuses request, core.String roo
mId, {core.String language}) { | 1726 async.Future<RoomStatus> reportStatus(RoomP2PStatuses request, core.String roo
mId, {core.String language}) { |
1736 var _url = null; | 1727 var _url = null; |
1737 var _queryParams = new core.Map(); | 1728 var _queryParams = new core.Map(); |
1738 var _uploadMedia = null; | 1729 var _uploadMedia = null; |
1739 var _uploadOptions = null; | 1730 var _uploadOptions = null; |
1740 var _downloadOptions = common.DownloadOptions.Metadata; | 1731 var _downloadOptions = commons.DownloadOptions.Metadata; |
1741 var _body = null; | 1732 var _body = null; |
1742 | 1733 |
1743 if (request != null) { | 1734 if (request != null) { |
1744 _body = convert.JSON.encode((request).toJson()); | 1735 _body = convert.JSON.encode((request).toJson()); |
1745 } | 1736 } |
1746 if (roomId == null) { | 1737 if (roomId == null) { |
1747 throw new core.ArgumentError("Parameter roomId is required."); | 1738 throw new core.ArgumentError("Parameter roomId is required."); |
1748 } | 1739 } |
1749 if (language != null) { | 1740 if (language != null) { |
1750 _queryParams["language"] = [language]; | 1741 _queryParams["language"] = [language]; |
1751 } | 1742 } |
1752 | 1743 |
1753 | 1744 |
1754 _url = 'rooms/' + common_internal.Escaper.ecapeVariable('$roomId') + '/repor
tstatus'; | 1745 _url = 'rooms/' + commons.Escaper.ecapeVariable('$roomId') + '/reportstatus'
; |
1755 | 1746 |
1756 var _response = _requester.request(_url, | 1747 var _response = _requester.request(_url, |
1757 "POST", | 1748 "POST", |
1758 body: _body, | 1749 body: _body, |
1759 queryParams: _queryParams, | 1750 queryParams: _queryParams, |
1760 uploadOptions: _uploadOptions, | 1751 uploadOptions: _uploadOptions, |
1761 uploadMedia: _uploadMedia, | 1752 uploadMedia: _uploadMedia, |
1762 downloadOptions: _downloadOptions); | 1753 downloadOptions: _downloadOptions); |
1763 return _response.then((data) => new RoomStatus.fromJson(data)); | 1754 return _response.then((data) => new RoomStatus.fromJson(data)); |
1764 } | 1755 } |
1765 | 1756 |
1766 } | 1757 } |
1767 | 1758 |
1768 | 1759 |
1769 /** Not documented yet. */ | |
1770 class ScoresResourceApi { | 1760 class ScoresResourceApi { |
1771 final common_internal.ApiRequester _requester; | 1761 final commons.ApiRequester _requester; |
1772 | 1762 |
1773 ScoresResourceApi(common_internal.ApiRequester client) : | 1763 ScoresResourceApi(commons.ApiRequester client) : |
1774 _requester = client; | 1764 _requester = client; |
1775 | 1765 |
1776 /** | 1766 /** |
1777 * Get high scores, and optionally ranks, in leaderboards for the currently | 1767 * Get high scores, and optionally ranks, in leaderboards for the currently |
1778 * authenticated player. For a specific time span, leaderboardId can be set to | 1768 * authenticated player. For a specific time span, leaderboardId can be set to |
1779 * ALL to retrieve data for all leaderboards in a given time span. | 1769 * ALL to retrieve data for all leaderboards in a given time span. |
1780 * NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same | 1770 * NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same |
1781 * request; only one parameter may be set to 'ALL'. | 1771 * request; only one parameter may be set to 'ALL'. |
1782 * | 1772 * |
1783 * Request parameters: | 1773 * Request parameters: |
(...skipping 25 matching lines...) Expand all Loading... |
1809 * | 1799 * |
1810 * [maxResults] - The maximum number of leaderboard scores to return in the | 1800 * [maxResults] - The maximum number of leaderboard scores to return in the |
1811 * response. For any response, the actual number of leaderboard scores | 1801 * response. For any response, the actual number of leaderboard scores |
1812 * returned may be less than the specified maxResults. | 1802 * returned may be less than the specified maxResults. |
1813 * Value must be between "1" and "30". | 1803 * Value must be between "1" and "30". |
1814 * | 1804 * |
1815 * [pageToken] - The token returned by the previous request. | 1805 * [pageToken] - The token returned by the previous request. |
1816 * | 1806 * |
1817 * Completes with a [PlayerLeaderboardScoreListResponse]. | 1807 * Completes with a [PlayerLeaderboardScoreListResponse]. |
1818 * | 1808 * |
1819 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1809 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1820 * error. | 1810 * error. |
1821 * | 1811 * |
1822 * If the used [http.Client] completes with an error when making a REST call, | 1812 * If the used [http.Client] completes with an error when making a REST call, |
1823 * this method will complete with the same error. | 1813 * this method will complete with the same error. |
1824 */ | 1814 */ |
1825 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}) { | 1815 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}) { |
1826 var _url = null; | 1816 var _url = null; |
1827 var _queryParams = new core.Map(); | 1817 var _queryParams = new core.Map(); |
1828 var _uploadMedia = null; | 1818 var _uploadMedia = null; |
1829 var _uploadOptions = null; | 1819 var _uploadOptions = null; |
1830 var _downloadOptions = common.DownloadOptions.Metadata; | 1820 var _downloadOptions = commons.DownloadOptions.Metadata; |
1831 var _body = null; | 1821 var _body = null; |
1832 | 1822 |
1833 if (playerId == null) { | 1823 if (playerId == null) { |
1834 throw new core.ArgumentError("Parameter playerId is required."); | 1824 throw new core.ArgumentError("Parameter playerId is required."); |
1835 } | 1825 } |
1836 if (leaderboardId == null) { | 1826 if (leaderboardId == null) { |
1837 throw new core.ArgumentError("Parameter leaderboardId is required."); | 1827 throw new core.ArgumentError("Parameter leaderboardId is required."); |
1838 } | 1828 } |
1839 if (timeSpan == null) { | 1829 if (timeSpan == null) { |
1840 throw new core.ArgumentError("Parameter timeSpan is required."); | 1830 throw new core.ArgumentError("Parameter timeSpan is required."); |
1841 } | 1831 } |
1842 if (includeRankType != null) { | 1832 if (includeRankType != null) { |
1843 _queryParams["includeRankType"] = [includeRankType]; | 1833 _queryParams["includeRankType"] = [includeRankType]; |
1844 } | 1834 } |
1845 if (language != null) { | 1835 if (language != null) { |
1846 _queryParams["language"] = [language]; | 1836 _queryParams["language"] = [language]; |
1847 } | 1837 } |
1848 if (maxResults != null) { | 1838 if (maxResults != null) { |
1849 _queryParams["maxResults"] = ["${maxResults}"]; | 1839 _queryParams["maxResults"] = ["${maxResults}"]; |
1850 } | 1840 } |
1851 if (pageToken != null) { | 1841 if (pageToken != null) { |
1852 _queryParams["pageToken"] = [pageToken]; | 1842 _queryParams["pageToken"] = [pageToken]; |
1853 } | 1843 } |
1854 | 1844 |
1855 | 1845 |
1856 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId') + '/l
eaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboardId') + '/scor
es/' + common_internal.Escaper.ecapeVariable('$timeSpan'); | 1846 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/leaderboa
rds/' + commons.Escaper.ecapeVariable('$leaderboardId') + '/scores/' + commons.E
scaper.ecapeVariable('$timeSpan'); |
1857 | 1847 |
1858 var _response = _requester.request(_url, | 1848 var _response = _requester.request(_url, |
1859 "GET", | 1849 "GET", |
1860 body: _body, | 1850 body: _body, |
1861 queryParams: _queryParams, | 1851 queryParams: _queryParams, |
1862 uploadOptions: _uploadOptions, | 1852 uploadOptions: _uploadOptions, |
1863 uploadMedia: _uploadMedia, | 1853 uploadMedia: _uploadMedia, |
1864 downloadOptions: _downloadOptions); | 1854 downloadOptions: _downloadOptions); |
1865 return _response.then((data) => new PlayerLeaderboardScoreListResponse.fromJ
son(data)); | 1855 return _response.then((data) => new PlayerLeaderboardScoreListResponse.fromJ
son(data)); |
1866 } | 1856 } |
(...skipping 21 matching lines...) Expand all Loading... |
1888 * | 1878 * |
1889 * [maxResults] - The maximum number of leaderboard scores to return in the | 1879 * [maxResults] - The maximum number of leaderboard scores to return in the |
1890 * response. For any response, the actual number of leaderboard scores | 1880 * response. For any response, the actual number of leaderboard scores |
1891 * returned may be less than the specified maxResults. | 1881 * returned may be less than the specified maxResults. |
1892 * Value must be between "1" and "30". | 1882 * Value must be between "1" and "30". |
1893 * | 1883 * |
1894 * [pageToken] - The token returned by the previous request. | 1884 * [pageToken] - The token returned by the previous request. |
1895 * | 1885 * |
1896 * Completes with a [LeaderboardScores]. | 1886 * Completes with a [LeaderboardScores]. |
1897 * | 1887 * |
1898 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1888 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1899 * error. | 1889 * error. |
1900 * | 1890 * |
1901 * If the used [http.Client] completes with an error when making a REST call, | 1891 * If the used [http.Client] completes with an error when making a REST call, |
1902 * this method will complete with the same error. | 1892 * this method will complete with the same error. |
1903 */ | 1893 */ |
1904 async.Future<LeaderboardScores> list(core.String leaderboardId, core.String co
llection, core.String timeSpan, {core.String language, core.int maxResults, core
.String pageToken}) { | 1894 async.Future<LeaderboardScores> list(core.String leaderboardId, core.String co
llection, core.String timeSpan, {core.String language, core.int maxResults, core
.String pageToken}) { |
1905 var _url = null; | 1895 var _url = null; |
1906 var _queryParams = new core.Map(); | 1896 var _queryParams = new core.Map(); |
1907 var _uploadMedia = null; | 1897 var _uploadMedia = null; |
1908 var _uploadOptions = null; | 1898 var _uploadOptions = null; |
1909 var _downloadOptions = common.DownloadOptions.Metadata; | 1899 var _downloadOptions = commons.DownloadOptions.Metadata; |
1910 var _body = null; | 1900 var _body = null; |
1911 | 1901 |
1912 if (leaderboardId == null) { | 1902 if (leaderboardId == null) { |
1913 throw new core.ArgumentError("Parameter leaderboardId is required."); | 1903 throw new core.ArgumentError("Parameter leaderboardId is required."); |
1914 } | 1904 } |
1915 if (collection == null) { | 1905 if (collection == null) { |
1916 throw new core.ArgumentError("Parameter collection is required."); | 1906 throw new core.ArgumentError("Parameter collection is required."); |
1917 } | 1907 } |
1918 if (timeSpan == null) { | 1908 if (timeSpan == null) { |
1919 throw new core.ArgumentError("Parameter timeSpan is required."); | 1909 throw new core.ArgumentError("Parameter timeSpan is required."); |
1920 } | 1910 } |
1921 _queryParams["timeSpan"] = [timeSpan]; | 1911 _queryParams["timeSpan"] = [timeSpan]; |
1922 if (language != null) { | 1912 if (language != null) { |
1923 _queryParams["language"] = [language]; | 1913 _queryParams["language"] = [language]; |
1924 } | 1914 } |
1925 if (maxResults != null) { | 1915 if (maxResults != null) { |
1926 _queryParams["maxResults"] = ["${maxResults}"]; | 1916 _queryParams["maxResults"] = ["${maxResults}"]; |
1927 } | 1917 } |
1928 if (pageToken != null) { | 1918 if (pageToken != null) { |
1929 _queryParams["pageToken"] = [pageToken]; | 1919 _queryParams["pageToken"] = [pageToken]; |
1930 } | 1920 } |
1931 | 1921 |
1932 | 1922 |
1933 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard
Id') + '/scores/' + common_internal.Escaper.ecapeVariable('$collection'); | 1923 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/scores/' + commons.Escaper.ecapeVariable('$collection'); |
1934 | 1924 |
1935 var _response = _requester.request(_url, | 1925 var _response = _requester.request(_url, |
1936 "GET", | 1926 "GET", |
1937 body: _body, | 1927 body: _body, |
1938 queryParams: _queryParams, | 1928 queryParams: _queryParams, |
1939 uploadOptions: _uploadOptions, | 1929 uploadOptions: _uploadOptions, |
1940 uploadMedia: _uploadMedia, | 1930 uploadMedia: _uploadMedia, |
1941 downloadOptions: _downloadOptions); | 1931 downloadOptions: _downloadOptions); |
1942 return _response.then((data) => new LeaderboardScores.fromJson(data)); | 1932 return _response.then((data) => new LeaderboardScores.fromJson(data)); |
1943 } | 1933 } |
(...skipping 29 matching lines...) Expand all Loading... |
1973 * [resultsAbove] - The preferred number of scores to return above the | 1963 * [resultsAbove] - The preferred number of scores to return above the |
1974 * player's score. More scores may be returned if the player is at the bottom | 1964 * player's score. More scores may be returned if the player is at the bottom |
1975 * of the leaderboard; fewer may be returned if the player is at the top. Must | 1965 * of the leaderboard; fewer may be returned if the player is at the top. Must |
1976 * be less than or equal to maxResults. | 1966 * be less than or equal to maxResults. |
1977 * | 1967 * |
1978 * [returnTopIfAbsent] - True if the top scores should be returned when the | 1968 * [returnTopIfAbsent] - True if the top scores should be returned when the |
1979 * player is not in the leaderboard. Defaults to true. | 1969 * player is not in the leaderboard. Defaults to true. |
1980 * | 1970 * |
1981 * Completes with a [LeaderboardScores]. | 1971 * Completes with a [LeaderboardScores]. |
1982 * | 1972 * |
1983 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1973 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1984 * error. | 1974 * error. |
1985 * | 1975 * |
1986 * If the used [http.Client] completes with an error when making a REST call, | 1976 * If the used [http.Client] completes with an error when making a REST call, |
1987 * this method will complete with the same error. | 1977 * this method will complete with the same error. |
1988 */ | 1978 */ |
1989 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}) { | 1979 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}) { |
1990 var _url = null; | 1980 var _url = null; |
1991 var _queryParams = new core.Map(); | 1981 var _queryParams = new core.Map(); |
1992 var _uploadMedia = null; | 1982 var _uploadMedia = null; |
1993 var _uploadOptions = null; | 1983 var _uploadOptions = null; |
1994 var _downloadOptions = common.DownloadOptions.Metadata; | 1984 var _downloadOptions = commons.DownloadOptions.Metadata; |
1995 var _body = null; | 1985 var _body = null; |
1996 | 1986 |
1997 if (leaderboardId == null) { | 1987 if (leaderboardId == null) { |
1998 throw new core.ArgumentError("Parameter leaderboardId is required."); | 1988 throw new core.ArgumentError("Parameter leaderboardId is required."); |
1999 } | 1989 } |
2000 if (collection == null) { | 1990 if (collection == null) { |
2001 throw new core.ArgumentError("Parameter collection is required."); | 1991 throw new core.ArgumentError("Parameter collection is required."); |
2002 } | 1992 } |
2003 if (timeSpan == null) { | 1993 if (timeSpan == null) { |
2004 throw new core.ArgumentError("Parameter timeSpan is required."); | 1994 throw new core.ArgumentError("Parameter timeSpan is required."); |
2005 } | 1995 } |
2006 _queryParams["timeSpan"] = [timeSpan]; | 1996 _queryParams["timeSpan"] = [timeSpan]; |
2007 if (language != null) { | 1997 if (language != null) { |
2008 _queryParams["language"] = [language]; | 1998 _queryParams["language"] = [language]; |
2009 } | 1999 } |
2010 if (maxResults != null) { | 2000 if (maxResults != null) { |
2011 _queryParams["maxResults"] = ["${maxResults}"]; | 2001 _queryParams["maxResults"] = ["${maxResults}"]; |
2012 } | 2002 } |
2013 if (pageToken != null) { | 2003 if (pageToken != null) { |
2014 _queryParams["pageToken"] = [pageToken]; | 2004 _queryParams["pageToken"] = [pageToken]; |
2015 } | 2005 } |
2016 if (resultsAbove != null) { | 2006 if (resultsAbove != null) { |
2017 _queryParams["resultsAbove"] = ["${resultsAbove}"]; | 2007 _queryParams["resultsAbove"] = ["${resultsAbove}"]; |
2018 } | 2008 } |
2019 if (returnTopIfAbsent != null) { | 2009 if (returnTopIfAbsent != null) { |
2020 _queryParams["returnTopIfAbsent"] = ["${returnTopIfAbsent}"]; | 2010 _queryParams["returnTopIfAbsent"] = ["${returnTopIfAbsent}"]; |
2021 } | 2011 } |
2022 | 2012 |
2023 | 2013 |
2024 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard
Id') + '/window/' + common_internal.Escaper.ecapeVariable('$collection'); | 2014 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/window/' + commons.Escaper.ecapeVariable('$collection'); |
2025 | 2015 |
2026 var _response = _requester.request(_url, | 2016 var _response = _requester.request(_url, |
2027 "GET", | 2017 "GET", |
2028 body: _body, | 2018 body: _body, |
2029 queryParams: _queryParams, | 2019 queryParams: _queryParams, |
2030 uploadOptions: _uploadOptions, | 2020 uploadOptions: _uploadOptions, |
2031 uploadMedia: _uploadMedia, | 2021 uploadMedia: _uploadMedia, |
2032 downloadOptions: _downloadOptions); | 2022 downloadOptions: _downloadOptions); |
2033 return _response.then((data) => new LeaderboardScores.fromJson(data)); | 2023 return _response.then((data) => new LeaderboardScores.fromJson(data)); |
2034 } | 2024 } |
(...skipping 15 matching lines...) Expand all Loading... |
2050 * [language] - The preferred language to use for strings returned by this | 2040 * [language] - The preferred language to use for strings returned by this |
2051 * method. | 2041 * method. |
2052 * | 2042 * |
2053 * [scoreTag] - Additional information about the score you're submitting. | 2043 * [scoreTag] - Additional information about the score you're submitting. |
2054 * Values must contain no more than 64 URI-safe characters as defined by | 2044 * Values must contain no more than 64 URI-safe characters as defined by |
2055 * section 2.3 of RFC 3986. | 2045 * section 2.3 of RFC 3986. |
2056 * Value must have pattern "[a-zA-Z0-9-._~]{0,64}". | 2046 * Value must have pattern "[a-zA-Z0-9-._~]{0,64}". |
2057 * | 2047 * |
2058 * Completes with a [PlayerScoreResponse]. | 2048 * Completes with a [PlayerScoreResponse]. |
2059 * | 2049 * |
2060 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2050 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2061 * error. | 2051 * error. |
2062 * | 2052 * |
2063 * If the used [http.Client] completes with an error when making a REST call, | 2053 * If the used [http.Client] completes with an error when making a REST call, |
2064 * this method will complete with the same error. | 2054 * this method will complete with the same error. |
2065 */ | 2055 */ |
2066 async.Future<PlayerScoreResponse> submit(core.String leaderboardId, core.Strin
g score, {core.String language, core.String scoreTag}) { | 2056 async.Future<PlayerScoreResponse> submit(core.String leaderboardId, core.Strin
g score, {core.String language, core.String scoreTag}) { |
2067 var _url = null; | 2057 var _url = null; |
2068 var _queryParams = new core.Map(); | 2058 var _queryParams = new core.Map(); |
2069 var _uploadMedia = null; | 2059 var _uploadMedia = null; |
2070 var _uploadOptions = null; | 2060 var _uploadOptions = null; |
2071 var _downloadOptions = common.DownloadOptions.Metadata; | 2061 var _downloadOptions = commons.DownloadOptions.Metadata; |
2072 var _body = null; | 2062 var _body = null; |
2073 | 2063 |
2074 if (leaderboardId == null) { | 2064 if (leaderboardId == null) { |
2075 throw new core.ArgumentError("Parameter leaderboardId is required."); | 2065 throw new core.ArgumentError("Parameter leaderboardId is required."); |
2076 } | 2066 } |
2077 if (score == null) { | 2067 if (score == null) { |
2078 throw new core.ArgumentError("Parameter score is required."); | 2068 throw new core.ArgumentError("Parameter score is required."); |
2079 } | 2069 } |
2080 _queryParams["score"] = [score]; | 2070 _queryParams["score"] = [score]; |
2081 if (language != null) { | 2071 if (language != null) { |
2082 _queryParams["language"] = [language]; | 2072 _queryParams["language"] = [language]; |
2083 } | 2073 } |
2084 if (scoreTag != null) { | 2074 if (scoreTag != null) { |
2085 _queryParams["scoreTag"] = [scoreTag]; | 2075 _queryParams["scoreTag"] = [scoreTag]; |
2086 } | 2076 } |
2087 | 2077 |
2088 | 2078 |
2089 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard
Id') + '/scores'; | 2079 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId') + '
/scores'; |
2090 | 2080 |
2091 var _response = _requester.request(_url, | 2081 var _response = _requester.request(_url, |
2092 "POST", | 2082 "POST", |
2093 body: _body, | 2083 body: _body, |
2094 queryParams: _queryParams, | 2084 queryParams: _queryParams, |
2095 uploadOptions: _uploadOptions, | 2085 uploadOptions: _uploadOptions, |
2096 uploadMedia: _uploadMedia, | 2086 uploadMedia: _uploadMedia, |
2097 downloadOptions: _downloadOptions); | 2087 downloadOptions: _downloadOptions); |
2098 return _response.then((data) => new PlayerScoreResponse.fromJson(data)); | 2088 return _response.then((data) => new PlayerScoreResponse.fromJson(data)); |
2099 } | 2089 } |
2100 | 2090 |
2101 /** | 2091 /** |
2102 * Submits multiple scores to leaderboards. | 2092 * Submits multiple scores to leaderboards. |
2103 * | 2093 * |
2104 * [request] - The metadata request object. | 2094 * [request] - The metadata request object. |
2105 * | 2095 * |
2106 * Request parameters: | 2096 * Request parameters: |
2107 * | 2097 * |
2108 * [language] - The preferred language to use for strings returned by this | 2098 * [language] - The preferred language to use for strings returned by this |
2109 * method. | 2099 * method. |
2110 * | 2100 * |
2111 * Completes with a [PlayerScoreListResponse]. | 2101 * Completes with a [PlayerScoreListResponse]. |
2112 * | 2102 * |
2113 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2114 * error. | 2104 * error. |
2115 * | 2105 * |
2116 * If the used [http.Client] completes with an error when making a REST call, | 2106 * If the used [http.Client] completes with an error when making a REST call, |
2117 * this method will complete with the same error. | 2107 * this method will complete with the same error. |
2118 */ | 2108 */ |
2119 async.Future<PlayerScoreListResponse> submitMultiple(PlayerScoreSubmissionList
request, {core.String language}) { | 2109 async.Future<PlayerScoreListResponse> submitMultiple(PlayerScoreSubmissionList
request, {core.String language}) { |
2120 var _url = null; | 2110 var _url = null; |
2121 var _queryParams = new core.Map(); | 2111 var _queryParams = new core.Map(); |
2122 var _uploadMedia = null; | 2112 var _uploadMedia = null; |
2123 var _uploadOptions = null; | 2113 var _uploadOptions = null; |
2124 var _downloadOptions = common.DownloadOptions.Metadata; | 2114 var _downloadOptions = commons.DownloadOptions.Metadata; |
2125 var _body = null; | 2115 var _body = null; |
2126 | 2116 |
2127 if (request != null) { | 2117 if (request != null) { |
2128 _body = convert.JSON.encode((request).toJson()); | 2118 _body = convert.JSON.encode((request).toJson()); |
2129 } | 2119 } |
2130 if (language != null) { | 2120 if (language != null) { |
2131 _queryParams["language"] = [language]; | 2121 _queryParams["language"] = [language]; |
2132 } | 2122 } |
2133 | 2123 |
2134 | 2124 |
2135 _url = 'leaderboards/scores'; | 2125 _url = 'leaderboards/scores'; |
2136 | 2126 |
2137 var _response = _requester.request(_url, | 2127 var _response = _requester.request(_url, |
2138 "POST", | 2128 "POST", |
2139 body: _body, | 2129 body: _body, |
2140 queryParams: _queryParams, | 2130 queryParams: _queryParams, |
2141 uploadOptions: _uploadOptions, | 2131 uploadOptions: _uploadOptions, |
2142 uploadMedia: _uploadMedia, | 2132 uploadMedia: _uploadMedia, |
2143 downloadOptions: _downloadOptions); | 2133 downloadOptions: _downloadOptions); |
2144 return _response.then((data) => new PlayerScoreListResponse.fromJson(data)); | 2134 return _response.then((data) => new PlayerScoreListResponse.fromJson(data)); |
2145 } | 2135 } |
2146 | 2136 |
2147 } | 2137 } |
2148 | 2138 |
2149 | 2139 |
2150 /** Not documented yet. */ | |
2151 class SnapshotsResourceApi { | 2140 class SnapshotsResourceApi { |
2152 final common_internal.ApiRequester _requester; | 2141 final commons.ApiRequester _requester; |
2153 | 2142 |
2154 SnapshotsResourceApi(common_internal.ApiRequester client) : | 2143 SnapshotsResourceApi(commons.ApiRequester client) : |
2155 _requester = client; | 2144 _requester = client; |
2156 | 2145 |
2157 /** | 2146 /** |
2158 * Retrieves the metadata for a given snapshot ID. | 2147 * Retrieves the metadata for a given snapshot ID. |
2159 * | 2148 * |
2160 * Request parameters: | 2149 * Request parameters: |
2161 * | 2150 * |
2162 * [snapshotId] - The ID of the snapshot. | 2151 * [snapshotId] - The ID of the snapshot. |
2163 * | 2152 * |
2164 * [language] - The preferred language to use for strings returned by this | 2153 * [language] - The preferred language to use for strings returned by this |
2165 * method. | 2154 * method. |
2166 * | 2155 * |
2167 * Completes with a [Snapshot]. | 2156 * Completes with a [Snapshot]. |
2168 * | 2157 * |
2169 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2158 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2170 * error. | 2159 * error. |
2171 * | 2160 * |
2172 * If the used [http.Client] completes with an error when making a REST call, | 2161 * If the used [http.Client] completes with an error when making a REST call, |
2173 * this method will complete with the same error. | 2162 * this method will complete with the same error. |
2174 */ | 2163 */ |
2175 async.Future<Snapshot> get(core.String snapshotId, {core.String language}) { | 2164 async.Future<Snapshot> get(core.String snapshotId, {core.String language}) { |
2176 var _url = null; | 2165 var _url = null; |
2177 var _queryParams = new core.Map(); | 2166 var _queryParams = new core.Map(); |
2178 var _uploadMedia = null; | 2167 var _uploadMedia = null; |
2179 var _uploadOptions = null; | 2168 var _uploadOptions = null; |
2180 var _downloadOptions = common.DownloadOptions.Metadata; | 2169 var _downloadOptions = commons.DownloadOptions.Metadata; |
2181 var _body = null; | 2170 var _body = null; |
2182 | 2171 |
2183 if (snapshotId == null) { | 2172 if (snapshotId == null) { |
2184 throw new core.ArgumentError("Parameter snapshotId is required."); | 2173 throw new core.ArgumentError("Parameter snapshotId is required."); |
2185 } | 2174 } |
2186 if (language != null) { | 2175 if (language != null) { |
2187 _queryParams["language"] = [language]; | 2176 _queryParams["language"] = [language]; |
2188 } | 2177 } |
2189 | 2178 |
2190 | 2179 |
2191 _url = 'snapshots/' + common_internal.Escaper.ecapeVariable('$snapshotId'); | 2180 _url = 'snapshots/' + commons.Escaper.ecapeVariable('$snapshotId'); |
2192 | 2181 |
2193 var _response = _requester.request(_url, | 2182 var _response = _requester.request(_url, |
2194 "GET", | 2183 "GET", |
2195 body: _body, | 2184 body: _body, |
2196 queryParams: _queryParams, | 2185 queryParams: _queryParams, |
2197 uploadOptions: _uploadOptions, | 2186 uploadOptions: _uploadOptions, |
2198 uploadMedia: _uploadMedia, | 2187 uploadMedia: _uploadMedia, |
2199 downloadOptions: _downloadOptions); | 2188 downloadOptions: _downloadOptions); |
2200 return _response.then((data) => new Snapshot.fromJson(data)); | 2189 return _response.then((data) => new Snapshot.fromJson(data)); |
2201 } | 2190 } |
(...skipping 12 matching lines...) Expand all Loading... |
2214 * | 2203 * |
2215 * [maxResults] - The maximum number of snapshot resources to return in the | 2204 * [maxResults] - The maximum number of snapshot resources to return in the |
2216 * response, used for paging. For any response, the actual number of snapshot | 2205 * response, used for paging. For any response, the actual number of snapshot |
2217 * resources returned may be less than the specified maxResults. | 2206 * resources returned may be less than the specified maxResults. |
2218 * Value must be between "1" and "25". | 2207 * Value must be between "1" and "25". |
2219 * | 2208 * |
2220 * [pageToken] - The token returned by the previous request. | 2209 * [pageToken] - The token returned by the previous request. |
2221 * | 2210 * |
2222 * Completes with a [SnapshotListResponse]. | 2211 * Completes with a [SnapshotListResponse]. |
2223 * | 2212 * |
2224 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2213 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2225 * error. | 2214 * error. |
2226 * | 2215 * |
2227 * If the used [http.Client] completes with an error when making a REST call, | 2216 * If the used [http.Client] completes with an error when making a REST call, |
2228 * this method will complete with the same error. | 2217 * this method will complete with the same error. |
2229 */ | 2218 */ |
2230 async.Future<SnapshotListResponse> list(core.String playerId, {core.String lan
guage, core.int maxResults, core.String pageToken}) { | 2219 async.Future<SnapshotListResponse> list(core.String playerId, {core.String lan
guage, core.int maxResults, core.String pageToken}) { |
2231 var _url = null; | 2220 var _url = null; |
2232 var _queryParams = new core.Map(); | 2221 var _queryParams = new core.Map(); |
2233 var _uploadMedia = null; | 2222 var _uploadMedia = null; |
2234 var _uploadOptions = null; | 2223 var _uploadOptions = null; |
2235 var _downloadOptions = common.DownloadOptions.Metadata; | 2224 var _downloadOptions = commons.DownloadOptions.Metadata; |
2236 var _body = null; | 2225 var _body = null; |
2237 | 2226 |
2238 if (playerId == null) { | 2227 if (playerId == null) { |
2239 throw new core.ArgumentError("Parameter playerId is required."); | 2228 throw new core.ArgumentError("Parameter playerId is required."); |
2240 } | 2229 } |
2241 if (language != null) { | 2230 if (language != null) { |
2242 _queryParams["language"] = [language]; | 2231 _queryParams["language"] = [language]; |
2243 } | 2232 } |
2244 if (maxResults != null) { | 2233 if (maxResults != null) { |
2245 _queryParams["maxResults"] = ["${maxResults}"]; | 2234 _queryParams["maxResults"] = ["${maxResults}"]; |
2246 } | 2235 } |
2247 if (pageToken != null) { | 2236 if (pageToken != null) { |
2248 _queryParams["pageToken"] = [pageToken]; | 2237 _queryParams["pageToken"] = [pageToken]; |
2249 } | 2238 } |
2250 | 2239 |
2251 | 2240 |
2252 _url = 'players/' + common_internal.Escaper.ecapeVariable('$playerId') + '/s
napshots'; | 2241 _url = 'players/' + commons.Escaper.ecapeVariable('$playerId') + '/snapshots
'; |
2253 | 2242 |
2254 var _response = _requester.request(_url, | 2243 var _response = _requester.request(_url, |
2255 "GET", | 2244 "GET", |
2256 body: _body, | 2245 body: _body, |
2257 queryParams: _queryParams, | 2246 queryParams: _queryParams, |
2258 uploadOptions: _uploadOptions, | 2247 uploadOptions: _uploadOptions, |
2259 uploadMedia: _uploadMedia, | 2248 uploadMedia: _uploadMedia, |
2260 downloadOptions: _downloadOptions); | 2249 downloadOptions: _downloadOptions); |
2261 return _response.then((data) => new SnapshotListResponse.fromJson(data)); | 2250 return _response.then((data) => new SnapshotListResponse.fromJson(data)); |
2262 } | 2251 } |
2263 | 2252 |
2264 } | 2253 } |
2265 | 2254 |
2266 | 2255 |
2267 /** Not documented yet. */ | |
2268 class TurnBasedMatchesResourceApi { | 2256 class TurnBasedMatchesResourceApi { |
2269 final common_internal.ApiRequester _requester; | 2257 final commons.ApiRequester _requester; |
2270 | 2258 |
2271 TurnBasedMatchesResourceApi(common_internal.ApiRequester client) : | 2259 TurnBasedMatchesResourceApi(commons.ApiRequester client) : |
2272 _requester = client; | 2260 _requester = client; |
2273 | 2261 |
2274 /** | 2262 /** |
2275 * Cancel a turn-based match. | 2263 * Cancel a turn-based match. |
2276 * | 2264 * |
2277 * Request parameters: | 2265 * Request parameters: |
2278 * | 2266 * |
2279 * [matchId] - The ID of the match. | 2267 * [matchId] - The ID of the match. |
2280 * | 2268 * |
2281 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2269 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2282 * error. | 2270 * error. |
2283 * | 2271 * |
2284 * If the used [http.Client] completes with an error when making a REST call, | 2272 * If the used [http.Client] completes with an error when making a REST call, |
2285 * this method will complete with the same error. | 2273 * this method will complete with the same error. |
2286 */ | 2274 */ |
2287 async.Future cancel(core.String matchId) { | 2275 async.Future cancel(core.String matchId) { |
2288 var _url = null; | 2276 var _url = null; |
2289 var _queryParams = new core.Map(); | 2277 var _queryParams = new core.Map(); |
2290 var _uploadMedia = null; | 2278 var _uploadMedia = null; |
2291 var _uploadOptions = null; | 2279 var _uploadOptions = null; |
2292 var _downloadOptions = common.DownloadOptions.Metadata; | 2280 var _downloadOptions = commons.DownloadOptions.Metadata; |
2293 var _body = null; | 2281 var _body = null; |
2294 | 2282 |
2295 if (matchId == null) { | 2283 if (matchId == null) { |
2296 throw new core.ArgumentError("Parameter matchId is required."); | 2284 throw new core.ArgumentError("Parameter matchId is required."); |
2297 } | 2285 } |
2298 | 2286 |
2299 _downloadOptions = null; | 2287 _downloadOptions = null; |
2300 | 2288 |
2301 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/cancel'; | 2289 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/c
ancel'; |
2302 | 2290 |
2303 var _response = _requester.request(_url, | 2291 var _response = _requester.request(_url, |
2304 "PUT", | 2292 "PUT", |
2305 body: _body, | 2293 body: _body, |
2306 queryParams: _queryParams, | 2294 queryParams: _queryParams, |
2307 uploadOptions: _uploadOptions, | 2295 uploadOptions: _uploadOptions, |
2308 uploadMedia: _uploadMedia, | 2296 uploadMedia: _uploadMedia, |
2309 downloadOptions: _downloadOptions); | 2297 downloadOptions: _downloadOptions); |
2310 return _response.then((data) => null); | 2298 return _response.then((data) => null); |
2311 } | 2299 } |
2312 | 2300 |
2313 /** | 2301 /** |
2314 * Create a turn-based match. | 2302 * Create a turn-based match. |
2315 * | 2303 * |
2316 * [request] - The metadata request object. | 2304 * [request] - The metadata request object. |
2317 * | 2305 * |
2318 * Request parameters: | 2306 * Request parameters: |
2319 * | 2307 * |
2320 * [language] - The preferred language to use for strings returned by this | 2308 * [language] - The preferred language to use for strings returned by this |
2321 * method. | 2309 * method. |
2322 * | 2310 * |
2323 * Completes with a [TurnBasedMatch]. | 2311 * Completes with a [TurnBasedMatch]. |
2324 * | 2312 * |
2325 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2313 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2326 * error. | 2314 * error. |
2327 * | 2315 * |
2328 * If the used [http.Client] completes with an error when making a REST call, | 2316 * If the used [http.Client] completes with an error when making a REST call, |
2329 * this method will complete with the same error. | 2317 * this method will complete with the same error. |
2330 */ | 2318 */ |
2331 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, {core
.String language}) { | 2319 async.Future<TurnBasedMatch> create(TurnBasedMatchCreateRequest request, {core
.String language}) { |
2332 var _url = null; | 2320 var _url = null; |
2333 var _queryParams = new core.Map(); | 2321 var _queryParams = new core.Map(); |
2334 var _uploadMedia = null; | 2322 var _uploadMedia = null; |
2335 var _uploadOptions = null; | 2323 var _uploadOptions = null; |
2336 var _downloadOptions = common.DownloadOptions.Metadata; | 2324 var _downloadOptions = commons.DownloadOptions.Metadata; |
2337 var _body = null; | 2325 var _body = null; |
2338 | 2326 |
2339 if (request != null) { | 2327 if (request != null) { |
2340 _body = convert.JSON.encode((request).toJson()); | 2328 _body = convert.JSON.encode((request).toJson()); |
2341 } | 2329 } |
2342 if (language != null) { | 2330 if (language != null) { |
2343 _queryParams["language"] = [language]; | 2331 _queryParams["language"] = [language]; |
2344 } | 2332 } |
2345 | 2333 |
2346 | 2334 |
(...skipping 14 matching lines...) Expand all Loading... |
2361 * | 2349 * |
2362 * Request parameters: | 2350 * Request parameters: |
2363 * | 2351 * |
2364 * [matchId] - The ID of the match. | 2352 * [matchId] - The ID of the match. |
2365 * | 2353 * |
2366 * [language] - The preferred language to use for strings returned by this | 2354 * [language] - The preferred language to use for strings returned by this |
2367 * method. | 2355 * method. |
2368 * | 2356 * |
2369 * Completes with a [TurnBasedMatch]. | 2357 * Completes with a [TurnBasedMatch]. |
2370 * | 2358 * |
2371 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2372 * error. | 2360 * error. |
2373 * | 2361 * |
2374 * If the used [http.Client] completes with an error when making a REST call, | 2362 * If the used [http.Client] completes with an error when making a REST call, |
2375 * this method will complete with the same error. | 2363 * this method will complete with the same error. |
2376 */ | 2364 */ |
2377 async.Future<TurnBasedMatch> decline(core.String matchId, {core.String languag
e}) { | 2365 async.Future<TurnBasedMatch> decline(core.String matchId, {core.String languag
e}) { |
2378 var _url = null; | 2366 var _url = null; |
2379 var _queryParams = new core.Map(); | 2367 var _queryParams = new core.Map(); |
2380 var _uploadMedia = null; | 2368 var _uploadMedia = null; |
2381 var _uploadOptions = null; | 2369 var _uploadOptions = null; |
2382 var _downloadOptions = common.DownloadOptions.Metadata; | 2370 var _downloadOptions = commons.DownloadOptions.Metadata; |
2383 var _body = null; | 2371 var _body = null; |
2384 | 2372 |
2385 if (matchId == null) { | 2373 if (matchId == null) { |
2386 throw new core.ArgumentError("Parameter matchId is required."); | 2374 throw new core.ArgumentError("Parameter matchId is required."); |
2387 } | 2375 } |
2388 if (language != null) { | 2376 if (language != null) { |
2389 _queryParams["language"] = [language]; | 2377 _queryParams["language"] = [language]; |
2390 } | 2378 } |
2391 | 2379 |
2392 | 2380 |
2393 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/decline'; | 2381 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d
ecline'; |
2394 | 2382 |
2395 var _response = _requester.request(_url, | 2383 var _response = _requester.request(_url, |
2396 "PUT", | 2384 "PUT", |
2397 body: _body, | 2385 body: _body, |
2398 queryParams: _queryParams, | 2386 queryParams: _queryParams, |
2399 uploadOptions: _uploadOptions, | 2387 uploadOptions: _uploadOptions, |
2400 uploadMedia: _uploadMedia, | 2388 uploadMedia: _uploadMedia, |
2401 downloadOptions: _downloadOptions); | 2389 downloadOptions: _downloadOptions); |
2402 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2390 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2403 } | 2391 } |
2404 | 2392 |
2405 /** | 2393 /** |
2406 * Dismiss a turn-based match from the match list. The match will no longer | 2394 * Dismiss a turn-based match from the match list. The match will no longer |
2407 * show up in the list and will not generate notifications. | 2395 * show up in the list and will not generate notifications. |
2408 * | 2396 * |
2409 * Request parameters: | 2397 * Request parameters: |
2410 * | 2398 * |
2411 * [matchId] - The ID of the match. | 2399 * [matchId] - The ID of the match. |
2412 * | 2400 * |
2413 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2401 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2414 * error. | 2402 * error. |
2415 * | 2403 * |
2416 * If the used [http.Client] completes with an error when making a REST call, | 2404 * If the used [http.Client] completes with an error when making a REST call, |
2417 * this method will complete with the same error. | 2405 * this method will complete with the same error. |
2418 */ | 2406 */ |
2419 async.Future dismiss(core.String matchId) { | 2407 async.Future dismiss(core.String matchId) { |
2420 var _url = null; | 2408 var _url = null; |
2421 var _queryParams = new core.Map(); | 2409 var _queryParams = new core.Map(); |
2422 var _uploadMedia = null; | 2410 var _uploadMedia = null; |
2423 var _uploadOptions = null; | 2411 var _uploadOptions = null; |
2424 var _downloadOptions = common.DownloadOptions.Metadata; | 2412 var _downloadOptions = commons.DownloadOptions.Metadata; |
2425 var _body = null; | 2413 var _body = null; |
2426 | 2414 |
2427 if (matchId == null) { | 2415 if (matchId == null) { |
2428 throw new core.ArgumentError("Parameter matchId is required."); | 2416 throw new core.ArgumentError("Parameter matchId is required."); |
2429 } | 2417 } |
2430 | 2418 |
2431 _downloadOptions = null; | 2419 _downloadOptions = null; |
2432 | 2420 |
2433 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/dismiss'; | 2421 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/d
ismiss'; |
2434 | 2422 |
2435 var _response = _requester.request(_url, | 2423 var _response = _requester.request(_url, |
2436 "PUT", | 2424 "PUT", |
2437 body: _body, | 2425 body: _body, |
2438 queryParams: _queryParams, | 2426 queryParams: _queryParams, |
2439 uploadOptions: _uploadOptions, | 2427 uploadOptions: _uploadOptions, |
2440 uploadMedia: _uploadMedia, | 2428 uploadMedia: _uploadMedia, |
2441 downloadOptions: _downloadOptions); | 2429 downloadOptions: _downloadOptions); |
2442 return _response.then((data) => null); | 2430 return _response.then((data) => null); |
2443 } | 2431 } |
2444 | 2432 |
2445 /** | 2433 /** |
2446 * Finish a turn-based match. Each player should make this call once, after | 2434 * Finish a turn-based match. Each player should make this call once, after |
2447 * all results are in. Only the player whose turn it is may make the first | 2435 * all results are in. Only the player whose turn it is may make the first |
2448 * call to Finish, and can pass in the final match state. | 2436 * call to Finish, and can pass in the final match state. |
2449 * | 2437 * |
2450 * [request] - The metadata request object. | 2438 * [request] - The metadata request object. |
2451 * | 2439 * |
2452 * Request parameters: | 2440 * Request parameters: |
2453 * | 2441 * |
2454 * [matchId] - The ID of the match. | 2442 * [matchId] - The ID of the match. |
2455 * | 2443 * |
2456 * [language] - The preferred language to use for strings returned by this | 2444 * [language] - The preferred language to use for strings returned by this |
2457 * method. | 2445 * method. |
2458 * | 2446 * |
2459 * Completes with a [TurnBasedMatch]. | 2447 * Completes with a [TurnBasedMatch]. |
2460 * | 2448 * |
2461 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2449 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2462 * error. | 2450 * error. |
2463 * | 2451 * |
2464 * If the used [http.Client] completes with an error when making a REST call, | 2452 * If the used [http.Client] completes with an error when making a REST call, |
2465 * this method will complete with the same error. | 2453 * this method will complete with the same error. |
2466 */ | 2454 */ |
2467 async.Future<TurnBasedMatch> finish(TurnBasedMatchResults request, core.String
matchId, {core.String language}) { | 2455 async.Future<TurnBasedMatch> finish(TurnBasedMatchResults request, core.String
matchId, {core.String language}) { |
2468 var _url = null; | 2456 var _url = null; |
2469 var _queryParams = new core.Map(); | 2457 var _queryParams = new core.Map(); |
2470 var _uploadMedia = null; | 2458 var _uploadMedia = null; |
2471 var _uploadOptions = null; | 2459 var _uploadOptions = null; |
2472 var _downloadOptions = common.DownloadOptions.Metadata; | 2460 var _downloadOptions = commons.DownloadOptions.Metadata; |
2473 var _body = null; | 2461 var _body = null; |
2474 | 2462 |
2475 if (request != null) { | 2463 if (request != null) { |
2476 _body = convert.JSON.encode((request).toJson()); | 2464 _body = convert.JSON.encode((request).toJson()); |
2477 } | 2465 } |
2478 if (matchId == null) { | 2466 if (matchId == null) { |
2479 throw new core.ArgumentError("Parameter matchId is required."); | 2467 throw new core.ArgumentError("Parameter matchId is required."); |
2480 } | 2468 } |
2481 if (language != null) { | 2469 if (language != null) { |
2482 _queryParams["language"] = [language]; | 2470 _queryParams["language"] = [language]; |
2483 } | 2471 } |
2484 | 2472 |
2485 | 2473 |
2486 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/finish'; | 2474 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/f
inish'; |
2487 | 2475 |
2488 var _response = _requester.request(_url, | 2476 var _response = _requester.request(_url, |
2489 "PUT", | 2477 "PUT", |
2490 body: _body, | 2478 body: _body, |
2491 queryParams: _queryParams, | 2479 queryParams: _queryParams, |
2492 uploadOptions: _uploadOptions, | 2480 uploadOptions: _uploadOptions, |
2493 uploadMedia: _uploadMedia, | 2481 uploadMedia: _uploadMedia, |
2494 downloadOptions: _downloadOptions); | 2482 downloadOptions: _downloadOptions); |
2495 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2483 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2496 } | 2484 } |
2497 | 2485 |
2498 /** | 2486 /** |
2499 * Get the data for a turn-based match. | 2487 * Get the data for a turn-based match. |
2500 * | 2488 * |
2501 * Request parameters: | 2489 * Request parameters: |
2502 * | 2490 * |
2503 * [matchId] - The ID of the match. | 2491 * [matchId] - The ID of the match. |
2504 * | 2492 * |
2505 * [includeMatchData] - Get match data along with metadata. | 2493 * [includeMatchData] - Get match data along with metadata. |
2506 * | 2494 * |
2507 * [language] - The preferred language to use for strings returned by this | 2495 * [language] - The preferred language to use for strings returned by this |
2508 * method. | 2496 * method. |
2509 * | 2497 * |
2510 * Completes with a [TurnBasedMatch]. | 2498 * Completes with a [TurnBasedMatch]. |
2511 * | 2499 * |
2512 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2500 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2513 * error. | 2501 * error. |
2514 * | 2502 * |
2515 * If the used [http.Client] completes with an error when making a REST call, | 2503 * If the used [http.Client] completes with an error when making a REST call, |
2516 * this method will complete with the same error. | 2504 * this method will complete with the same error. |
2517 */ | 2505 */ |
2518 async.Future<TurnBasedMatch> get(core.String matchId, {core.bool includeMatchD
ata, core.String language}) { | 2506 async.Future<TurnBasedMatch> get(core.String matchId, {core.bool includeMatchD
ata, core.String language}) { |
2519 var _url = null; | 2507 var _url = null; |
2520 var _queryParams = new core.Map(); | 2508 var _queryParams = new core.Map(); |
2521 var _uploadMedia = null; | 2509 var _uploadMedia = null; |
2522 var _uploadOptions = null; | 2510 var _uploadOptions = null; |
2523 var _downloadOptions = common.DownloadOptions.Metadata; | 2511 var _downloadOptions = commons.DownloadOptions.Metadata; |
2524 var _body = null; | 2512 var _body = null; |
2525 | 2513 |
2526 if (matchId == null) { | 2514 if (matchId == null) { |
2527 throw new core.ArgumentError("Parameter matchId is required."); | 2515 throw new core.ArgumentError("Parameter matchId is required."); |
2528 } | 2516 } |
2529 if (includeMatchData != null) { | 2517 if (includeMatchData != null) { |
2530 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 2518 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
2531 } | 2519 } |
2532 if (language != null) { | 2520 if (language != null) { |
2533 _queryParams["language"] = [language]; | 2521 _queryParams["language"] = [language]; |
2534 } | 2522 } |
2535 | 2523 |
2536 | 2524 |
2537 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
'); | 2525 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId'); |
2538 | 2526 |
2539 var _response = _requester.request(_url, | 2527 var _response = _requester.request(_url, |
2540 "GET", | 2528 "GET", |
2541 body: _body, | 2529 body: _body, |
2542 queryParams: _queryParams, | 2530 queryParams: _queryParams, |
2543 uploadOptions: _uploadOptions, | 2531 uploadOptions: _uploadOptions, |
2544 uploadMedia: _uploadMedia, | 2532 uploadMedia: _uploadMedia, |
2545 downloadOptions: _downloadOptions); | 2533 downloadOptions: _downloadOptions); |
2546 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2534 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2547 } | 2535 } |
2548 | 2536 |
2549 /** | 2537 /** |
2550 * Join a turn-based match. | 2538 * Join a turn-based match. |
2551 * | 2539 * |
2552 * Request parameters: | 2540 * Request parameters: |
2553 * | 2541 * |
2554 * [matchId] - The ID of the match. | 2542 * [matchId] - The ID of the match. |
2555 * | 2543 * |
2556 * [language] - The preferred language to use for strings returned by this | 2544 * [language] - The preferred language to use for strings returned by this |
2557 * method. | 2545 * method. |
2558 * | 2546 * |
2559 * Completes with a [TurnBasedMatch]. | 2547 * Completes with a [TurnBasedMatch]. |
2560 * | 2548 * |
2561 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2562 * error. | 2550 * error. |
2563 * | 2551 * |
2564 * If the used [http.Client] completes with an error when making a REST call, | 2552 * If the used [http.Client] completes with an error when making a REST call, |
2565 * this method will complete with the same error. | 2553 * this method will complete with the same error. |
2566 */ | 2554 */ |
2567 async.Future<TurnBasedMatch> join(core.String matchId, {core.String language})
{ | 2555 async.Future<TurnBasedMatch> join(core.String matchId, {core.String language})
{ |
2568 var _url = null; | 2556 var _url = null; |
2569 var _queryParams = new core.Map(); | 2557 var _queryParams = new core.Map(); |
2570 var _uploadMedia = null; | 2558 var _uploadMedia = null; |
2571 var _uploadOptions = null; | 2559 var _uploadOptions = null; |
2572 var _downloadOptions = common.DownloadOptions.Metadata; | 2560 var _downloadOptions = commons.DownloadOptions.Metadata; |
2573 var _body = null; | 2561 var _body = null; |
2574 | 2562 |
2575 if (matchId == null) { | 2563 if (matchId == null) { |
2576 throw new core.ArgumentError("Parameter matchId is required."); | 2564 throw new core.ArgumentError("Parameter matchId is required."); |
2577 } | 2565 } |
2578 if (language != null) { | 2566 if (language != null) { |
2579 _queryParams["language"] = [language]; | 2567 _queryParams["language"] = [language]; |
2580 } | 2568 } |
2581 | 2569 |
2582 | 2570 |
2583 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/join'; | 2571 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/j
oin'; |
2584 | 2572 |
2585 var _response = _requester.request(_url, | 2573 var _response = _requester.request(_url, |
2586 "PUT", | 2574 "PUT", |
2587 body: _body, | 2575 body: _body, |
2588 queryParams: _queryParams, | 2576 queryParams: _queryParams, |
2589 uploadOptions: _uploadOptions, | 2577 uploadOptions: _uploadOptions, |
2590 uploadMedia: _uploadMedia, | 2578 uploadMedia: _uploadMedia, |
2591 downloadOptions: _downloadOptions); | 2579 downloadOptions: _downloadOptions); |
2592 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2580 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2593 } | 2581 } |
2594 | 2582 |
2595 /** | 2583 /** |
2596 * Leave a turn-based match when it is not the current player's turn, without | 2584 * Leave a turn-based match when it is not the current player's turn, without |
2597 * canceling the match. | 2585 * canceling the match. |
2598 * | 2586 * |
2599 * Request parameters: | 2587 * Request parameters: |
2600 * | 2588 * |
2601 * [matchId] - The ID of the match. | 2589 * [matchId] - The ID of the match. |
2602 * | 2590 * |
2603 * [language] - The preferred language to use for strings returned by this | 2591 * [language] - The preferred language to use for strings returned by this |
2604 * method. | 2592 * method. |
2605 * | 2593 * |
2606 * Completes with a [TurnBasedMatch]. | 2594 * Completes with a [TurnBasedMatch]. |
2607 * | 2595 * |
2608 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2596 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2609 * error. | 2597 * error. |
2610 * | 2598 * |
2611 * If the used [http.Client] completes with an error when making a REST call, | 2599 * If the used [http.Client] completes with an error when making a REST call, |
2612 * this method will complete with the same error. | 2600 * this method will complete with the same error. |
2613 */ | 2601 */ |
2614 async.Future<TurnBasedMatch> leave(core.String matchId, {core.String language}
) { | 2602 async.Future<TurnBasedMatch> leave(core.String matchId, {core.String language}
) { |
2615 var _url = null; | 2603 var _url = null; |
2616 var _queryParams = new core.Map(); | 2604 var _queryParams = new core.Map(); |
2617 var _uploadMedia = null; | 2605 var _uploadMedia = null; |
2618 var _uploadOptions = null; | 2606 var _uploadOptions = null; |
2619 var _downloadOptions = common.DownloadOptions.Metadata; | 2607 var _downloadOptions = commons.DownloadOptions.Metadata; |
2620 var _body = null; | 2608 var _body = null; |
2621 | 2609 |
2622 if (matchId == null) { | 2610 if (matchId == null) { |
2623 throw new core.ArgumentError("Parameter matchId is required."); | 2611 throw new core.ArgumentError("Parameter matchId is required."); |
2624 } | 2612 } |
2625 if (language != null) { | 2613 if (language != null) { |
2626 _queryParams["language"] = [language]; | 2614 _queryParams["language"] = [language]; |
2627 } | 2615 } |
2628 | 2616 |
2629 | 2617 |
2630 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/leave'; | 2618 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l
eave'; |
2631 | 2619 |
2632 var _response = _requester.request(_url, | 2620 var _response = _requester.request(_url, |
2633 "PUT", | 2621 "PUT", |
2634 body: _body, | 2622 body: _body, |
2635 queryParams: _queryParams, | 2623 queryParams: _queryParams, |
2636 uploadOptions: _uploadOptions, | 2624 uploadOptions: _uploadOptions, |
2637 uploadMedia: _uploadMedia, | 2625 uploadMedia: _uploadMedia, |
2638 downloadOptions: _downloadOptions); | 2626 downloadOptions: _downloadOptions); |
2639 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2627 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2640 } | 2628 } |
(...skipping 11 matching lines...) Expand all Loading... |
2652 * [language] - The preferred language to use for strings returned by this | 2640 * [language] - The preferred language to use for strings returned by this |
2653 * method. | 2641 * method. |
2654 * | 2642 * |
2655 * [pendingParticipantId] - The ID of another participant who should take | 2643 * [pendingParticipantId] - The ID of another participant who should take |
2656 * their turn next. If not set, the match will wait for other player(s) to | 2644 * their turn next. If not set, the match will wait for other player(s) to |
2657 * join via automatching; this is only valid if automatch criteria is set on | 2645 * join via automatching; this is only valid if automatch criteria is set on |
2658 * the match with remaining slots for automatched players. | 2646 * the match with remaining slots for automatched players. |
2659 * | 2647 * |
2660 * Completes with a [TurnBasedMatch]. | 2648 * Completes with a [TurnBasedMatch]. |
2661 * | 2649 * |
2662 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2650 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2663 * error. | 2651 * error. |
2664 * | 2652 * |
2665 * If the used [http.Client] completes with an error when making a REST call, | 2653 * If the used [http.Client] completes with an error when making a REST call, |
2666 * this method will complete with the same error. | 2654 * this method will complete with the same error. |
2667 */ | 2655 */ |
2668 async.Future<TurnBasedMatch> leaveTurn(core.String matchId, core.int matchVers
ion, {core.String language, core.String pendingParticipantId}) { | 2656 async.Future<TurnBasedMatch> leaveTurn(core.String matchId, core.int matchVers
ion, {core.String language, core.String pendingParticipantId}) { |
2669 var _url = null; | 2657 var _url = null; |
2670 var _queryParams = new core.Map(); | 2658 var _queryParams = new core.Map(); |
2671 var _uploadMedia = null; | 2659 var _uploadMedia = null; |
2672 var _uploadOptions = null; | 2660 var _uploadOptions = null; |
2673 var _downloadOptions = common.DownloadOptions.Metadata; | 2661 var _downloadOptions = commons.DownloadOptions.Metadata; |
2674 var _body = null; | 2662 var _body = null; |
2675 | 2663 |
2676 if (matchId == null) { | 2664 if (matchId == null) { |
2677 throw new core.ArgumentError("Parameter matchId is required."); | 2665 throw new core.ArgumentError("Parameter matchId is required."); |
2678 } | 2666 } |
2679 if (matchVersion == null) { | 2667 if (matchVersion == null) { |
2680 throw new core.ArgumentError("Parameter matchVersion is required."); | 2668 throw new core.ArgumentError("Parameter matchVersion is required."); |
2681 } | 2669 } |
2682 _queryParams["matchVersion"] = ["${matchVersion}"]; | 2670 _queryParams["matchVersion"] = ["${matchVersion}"]; |
2683 if (language != null) { | 2671 if (language != null) { |
2684 _queryParams["language"] = [language]; | 2672 _queryParams["language"] = [language]; |
2685 } | 2673 } |
2686 if (pendingParticipantId != null) { | 2674 if (pendingParticipantId != null) { |
2687 _queryParams["pendingParticipantId"] = [pendingParticipantId]; | 2675 _queryParams["pendingParticipantId"] = [pendingParticipantId]; |
2688 } | 2676 } |
2689 | 2677 |
2690 | 2678 |
2691 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/leaveTurn'; | 2679 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/l
eaveTurn'; |
2692 | 2680 |
2693 var _response = _requester.request(_url, | 2681 var _response = _requester.request(_url, |
2694 "PUT", | 2682 "PUT", |
2695 body: _body, | 2683 body: _body, |
2696 queryParams: _queryParams, | 2684 queryParams: _queryParams, |
2697 uploadOptions: _uploadOptions, | 2685 uploadOptions: _uploadOptions, |
2698 uploadMedia: _uploadMedia, | 2686 uploadMedia: _uploadMedia, |
2699 downloadOptions: _downloadOptions); | 2687 downloadOptions: _downloadOptions); |
2700 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2688 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2701 } | 2689 } |
(...skipping 19 matching lines...) Expand all Loading... |
2721 * | 2709 * |
2722 * [maxResults] - The maximum number of matches to return in the response, | 2710 * [maxResults] - The maximum number of matches to return in the response, |
2723 * used for paging. For any response, the actual number of matches to return | 2711 * used for paging. For any response, the actual number of matches to return |
2724 * may be less than the specified maxResults. | 2712 * may be less than the specified maxResults. |
2725 * Value must be between "1" and "500". | 2713 * Value must be between "1" and "500". |
2726 * | 2714 * |
2727 * [pageToken] - The token returned by the previous request. | 2715 * [pageToken] - The token returned by the previous request. |
2728 * | 2716 * |
2729 * Completes with a [TurnBasedMatchList]. | 2717 * Completes with a [TurnBasedMatchList]. |
2730 * | 2718 * |
2731 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2719 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2732 * error. | 2720 * error. |
2733 * | 2721 * |
2734 * If the used [http.Client] completes with an error when making a REST call, | 2722 * If the used [http.Client] completes with an error when making a REST call, |
2735 * this method will complete with the same error. | 2723 * this method will complete with the same error. |
2736 */ | 2724 */ |
2737 async.Future<TurnBasedMatchList> list({core.bool includeMatchData, core.String
language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo
ken}) { | 2725 async.Future<TurnBasedMatchList> list({core.bool includeMatchData, core.String
language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo
ken}) { |
2738 var _url = null; | 2726 var _url = null; |
2739 var _queryParams = new core.Map(); | 2727 var _queryParams = new core.Map(); |
2740 var _uploadMedia = null; | 2728 var _uploadMedia = null; |
2741 var _uploadOptions = null; | 2729 var _uploadOptions = null; |
2742 var _downloadOptions = common.DownloadOptions.Metadata; | 2730 var _downloadOptions = commons.DownloadOptions.Metadata; |
2743 var _body = null; | 2731 var _body = null; |
2744 | 2732 |
2745 if (includeMatchData != null) { | 2733 if (includeMatchData != null) { |
2746 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 2734 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
2747 } | 2735 } |
2748 if (language != null) { | 2736 if (language != null) { |
2749 _queryParams["language"] = [language]; | 2737 _queryParams["language"] = [language]; |
2750 } | 2738 } |
2751 if (maxCompletedMatches != null) { | 2739 if (maxCompletedMatches != null) { |
2752 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; | 2740 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; |
(...skipping 30 matching lines...) Expand all Loading... |
2783 * | 2771 * |
2784 * [language] - The preferred language to use for strings returned by this | 2772 * [language] - The preferred language to use for strings returned by this |
2785 * method. | 2773 * method. |
2786 * | 2774 * |
2787 * [requestId] - A randomly generated numeric ID for each request specified by | 2775 * [requestId] - A randomly generated numeric ID for each request specified by |
2788 * the caller. This number is used at the server to ensure that the request is | 2776 * the caller. This number is used at the server to ensure that the request is |
2789 * handled correctly across retries. | 2777 * handled correctly across retries. |
2790 * | 2778 * |
2791 * Completes with a [TurnBasedMatchRematch]. | 2779 * Completes with a [TurnBasedMatchRematch]. |
2792 * | 2780 * |
2793 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2781 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2794 * error. | 2782 * error. |
2795 * | 2783 * |
2796 * If the used [http.Client] completes with an error when making a REST call, | 2784 * If the used [http.Client] completes with an error when making a REST call, |
2797 * this method will complete with the same error. | 2785 * this method will complete with the same error. |
2798 */ | 2786 */ |
2799 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, {core.String
language, core.String requestId}) { | 2787 async.Future<TurnBasedMatchRematch> rematch(core.String matchId, {core.String
language, core.String requestId}) { |
2800 var _url = null; | 2788 var _url = null; |
2801 var _queryParams = new core.Map(); | 2789 var _queryParams = new core.Map(); |
2802 var _uploadMedia = null; | 2790 var _uploadMedia = null; |
2803 var _uploadOptions = null; | 2791 var _uploadOptions = null; |
2804 var _downloadOptions = common.DownloadOptions.Metadata; | 2792 var _downloadOptions = commons.DownloadOptions.Metadata; |
2805 var _body = null; | 2793 var _body = null; |
2806 | 2794 |
2807 if (matchId == null) { | 2795 if (matchId == null) { |
2808 throw new core.ArgumentError("Parameter matchId is required."); | 2796 throw new core.ArgumentError("Parameter matchId is required."); |
2809 } | 2797 } |
2810 if (language != null) { | 2798 if (language != null) { |
2811 _queryParams["language"] = [language]; | 2799 _queryParams["language"] = [language]; |
2812 } | 2800 } |
2813 if (requestId != null) { | 2801 if (requestId != null) { |
2814 _queryParams["requestId"] = [requestId]; | 2802 _queryParams["requestId"] = [requestId]; |
2815 } | 2803 } |
2816 | 2804 |
2817 | 2805 |
2818 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/rematch'; | 2806 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/r
ematch'; |
2819 | 2807 |
2820 var _response = _requester.request(_url, | 2808 var _response = _requester.request(_url, |
2821 "POST", | 2809 "POST", |
2822 body: _body, | 2810 body: _body, |
2823 queryParams: _queryParams, | 2811 queryParams: _queryParams, |
2824 uploadOptions: _uploadOptions, | 2812 uploadOptions: _uploadOptions, |
2825 uploadMedia: _uploadMedia, | 2813 uploadMedia: _uploadMedia, |
2826 downloadOptions: _downloadOptions); | 2814 downloadOptions: _downloadOptions); |
2827 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data)); | 2815 return _response.then((data) => new TurnBasedMatchRematch.fromJson(data)); |
2828 } | 2816 } |
(...skipping 22 matching lines...) Expand all Loading... |
2851 * | 2839 * |
2852 * [maxResults] - The maximum number of matches to return in the response, | 2840 * [maxResults] - The maximum number of matches to return in the response, |
2853 * used for paging. For any response, the actual number of matches to return | 2841 * used for paging. For any response, the actual number of matches to return |
2854 * may be less than the specified maxResults. | 2842 * may be less than the specified maxResults. |
2855 * Value must be between "1" and "500". | 2843 * Value must be between "1" and "500". |
2856 * | 2844 * |
2857 * [pageToken] - The token returned by the previous request. | 2845 * [pageToken] - The token returned by the previous request. |
2858 * | 2846 * |
2859 * Completes with a [TurnBasedMatchSync]. | 2847 * Completes with a [TurnBasedMatchSync]. |
2860 * | 2848 * |
2861 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2849 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2862 * error. | 2850 * error. |
2863 * | 2851 * |
2864 * If the used [http.Client] completes with an error when making a REST call, | 2852 * If the used [http.Client] completes with an error when making a REST call, |
2865 * this method will complete with the same error. | 2853 * this method will complete with the same error. |
2866 */ | 2854 */ |
2867 async.Future<TurnBasedMatchSync> sync({core.bool includeMatchData, core.String
language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo
ken}) { | 2855 async.Future<TurnBasedMatchSync> sync({core.bool includeMatchData, core.String
language, core.int maxCompletedMatches, core.int maxResults, core.String pageTo
ken}) { |
2868 var _url = null; | 2856 var _url = null; |
2869 var _queryParams = new core.Map(); | 2857 var _queryParams = new core.Map(); |
2870 var _uploadMedia = null; | 2858 var _uploadMedia = null; |
2871 var _uploadOptions = null; | 2859 var _uploadOptions = null; |
2872 var _downloadOptions = common.DownloadOptions.Metadata; | 2860 var _downloadOptions = commons.DownloadOptions.Metadata; |
2873 var _body = null; | 2861 var _body = null; |
2874 | 2862 |
2875 if (includeMatchData != null) { | 2863 if (includeMatchData != null) { |
2876 _queryParams["includeMatchData"] = ["${includeMatchData}"]; | 2864 _queryParams["includeMatchData"] = ["${includeMatchData}"]; |
2877 } | 2865 } |
2878 if (language != null) { | 2866 if (language != null) { |
2879 _queryParams["language"] = [language]; | 2867 _queryParams["language"] = [language]; |
2880 } | 2868 } |
2881 if (maxCompletedMatches != null) { | 2869 if (maxCompletedMatches != null) { |
2882 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; | 2870 _queryParams["maxCompletedMatches"] = ["${maxCompletedMatches}"]; |
(...skipping 25 matching lines...) Expand all Loading... |
2908 * | 2896 * |
2909 * Request parameters: | 2897 * Request parameters: |
2910 * | 2898 * |
2911 * [matchId] - The ID of the match. | 2899 * [matchId] - The ID of the match. |
2912 * | 2900 * |
2913 * [language] - The preferred language to use for strings returned by this | 2901 * [language] - The preferred language to use for strings returned by this |
2914 * method. | 2902 * method. |
2915 * | 2903 * |
2916 * Completes with a [TurnBasedMatch]. | 2904 * Completes with a [TurnBasedMatch]. |
2917 * | 2905 * |
2918 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2906 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2919 * error. | 2907 * error. |
2920 * | 2908 * |
2921 * If the used [http.Client] completes with an error when making a REST call, | 2909 * If the used [http.Client] completes with an error when making a REST call, |
2922 * this method will complete with the same error. | 2910 * this method will complete with the same error. |
2923 */ | 2911 */ |
2924 async.Future<TurnBasedMatch> takeTurn(TurnBasedMatchTurn request, core.String
matchId, {core.String language}) { | 2912 async.Future<TurnBasedMatch> takeTurn(TurnBasedMatchTurn request, core.String
matchId, {core.String language}) { |
2925 var _url = null; | 2913 var _url = null; |
2926 var _queryParams = new core.Map(); | 2914 var _queryParams = new core.Map(); |
2927 var _uploadMedia = null; | 2915 var _uploadMedia = null; |
2928 var _uploadOptions = null; | 2916 var _uploadOptions = null; |
2929 var _downloadOptions = common.DownloadOptions.Metadata; | 2917 var _downloadOptions = commons.DownloadOptions.Metadata; |
2930 var _body = null; | 2918 var _body = null; |
2931 | 2919 |
2932 if (request != null) { | 2920 if (request != null) { |
2933 _body = convert.JSON.encode((request).toJson()); | 2921 _body = convert.JSON.encode((request).toJson()); |
2934 } | 2922 } |
2935 if (matchId == null) { | 2923 if (matchId == null) { |
2936 throw new core.ArgumentError("Parameter matchId is required."); | 2924 throw new core.ArgumentError("Parameter matchId is required."); |
2937 } | 2925 } |
2938 if (language != null) { | 2926 if (language != null) { |
2939 _queryParams["language"] = [language]; | 2927 _queryParams["language"] = [language]; |
2940 } | 2928 } |
2941 | 2929 |
2942 | 2930 |
2943 _url = 'turnbasedmatches/' + common_internal.Escaper.ecapeVariable('$matchId
') + '/turn'; | 2931 _url = 'turnbasedmatches/' + commons.Escaper.ecapeVariable('$matchId') + '/t
urn'; |
2944 | 2932 |
2945 var _response = _requester.request(_url, | 2933 var _response = _requester.request(_url, |
2946 "PUT", | 2934 "PUT", |
2947 body: _body, | 2935 body: _body, |
2948 queryParams: _queryParams, | 2936 queryParams: _queryParams, |
2949 uploadOptions: _uploadOptions, | 2937 uploadOptions: _uploadOptions, |
2950 uploadMedia: _uploadMedia, | 2938 uploadMedia: _uploadMedia, |
2951 downloadOptions: _downloadOptions); | 2939 downloadOptions: _downloadOptions); |
2952 return _response.then((data) => new TurnBasedMatch.fromJson(data)); | 2940 return _response.then((data) => new TurnBasedMatch.fromJson(data)); |
2953 } | 2941 } |
(...skipping 6715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9669 } | 9657 } |
9670 if (pendingParticipantId != null) { | 9658 if (pendingParticipantId != null) { |
9671 _json["pendingParticipantId"] = pendingParticipantId; | 9659 _json["pendingParticipantId"] = pendingParticipantId; |
9672 } | 9660 } |
9673 if (results != null) { | 9661 if (results != null) { |
9674 _json["results"] = results.map((value) => (value).toJson()).toList(); | 9662 _json["results"] = results.map((value) => (value).toJson()).toList(); |
9675 } | 9663 } |
9676 return _json; | 9664 return _json; |
9677 } | 9665 } |
9678 } | 9666 } |
9679 | |
9680 | |
OLD | NEW |