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

Side by Side Diff: generated/googleapis/lib/gamesconfiguration/v1configuration.dart

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project).
2
1 library googleapis.gamesConfiguration.v1configuration; 3 library googleapis.gamesConfiguration.v1configuration;
2 4
3 import "dart:core" as core; 5 import 'dart:core' as core;
4 import "dart:collection" as collection; 6 import 'dart:collection' as collection;
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, Media, UploadOptions,
16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
17 ByteRange;
18
19 const core.String USER_AGENT = 'dart-api-client gamesConfiguration/v1configurati on';
15 20
16 /** The Publishing API for Google Play Game Services. */ 21 /** The Publishing API for Google Play Game Services. */
17 class GamesConfigurationApi { 22 class GamesConfigurationApi {
18 /** View and manage your Google Play Android Developer account */ 23 /** View and manage your Google Play Android Developer account */
19 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp ublisher"; 24 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp ublisher";
20 25
21 26
22 final common_internal.ApiRequester _requester; 27 final commons.ApiRequester _requester;
23 28
24 AchievementConfigurationsResourceApi get achievementConfigurations => new Achi evementConfigurationsResourceApi(_requester); 29 AchievementConfigurationsResourceApi get achievementConfigurations => new Achi evementConfigurationsResourceApi(_requester);
25 ImageConfigurationsResourceApi get imageConfigurations => new ImageConfigurati onsResourceApi(_requester); 30 ImageConfigurationsResourceApi get imageConfigurations => new ImageConfigurati onsResourceApi(_requester);
26 LeaderboardConfigurationsResourceApi get leaderboardConfigurations => new Lead erboardConfigurationsResourceApi(_requester); 31 LeaderboardConfigurationsResourceApi get leaderboardConfigurations => new Lead erboardConfigurationsResourceApi(_requester);
27 32
28 GamesConfigurationApi(http.Client client, {core.String rootUrl: "https://www.g oogleapis.com/", core.String servicePath: "games/v1configuration/"}) : 33 GamesConfigurationApi(http.Client client, {core.String rootUrl: "https://www.g oogleapis.com/", core.String servicePath: "games/v1configuration/"}) :
29 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath ); 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
30 } 35 }
31 36
32 37
33 /** Not documented yet. */
34 class AchievementConfigurationsResourceApi { 38 class AchievementConfigurationsResourceApi {
35 final common_internal.ApiRequester _requester; 39 final commons.ApiRequester _requester;
36 40
37 AchievementConfigurationsResourceApi(common_internal.ApiRequester client) : 41 AchievementConfigurationsResourceApi(commons.ApiRequester client) :
38 _requester = client; 42 _requester = client;
39 43
40 /** 44 /**
41 * Delete the achievement configuration with the given ID. 45 * Delete the achievement configuration with the given ID.
42 * 46 *
43 * Request parameters: 47 * Request parameters:
44 * 48 *
45 * [achievementId] - The ID of the achievement used by this method. 49 * [achievementId] - The ID of the achievement used by this method.
46 * 50 *
47 * Completes with a [common.ApiRequestError] if the API endpoint returned an 51 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
48 * error. 52 * error.
49 * 53 *
50 * If the used [http.Client] completes with an error when making a REST call, 54 * If the used [http.Client] completes with an error when making a REST call,
51 * this method will complete with the same error. 55 * this method will complete with the same error.
52 */ 56 */
53 async.Future delete(core.String achievementId) { 57 async.Future delete(core.String achievementId) {
54 var _url = null; 58 var _url = null;
55 var _queryParams = new core.Map(); 59 var _queryParams = new core.Map();
56 var _uploadMedia = null; 60 var _uploadMedia = null;
57 var _uploadOptions = null; 61 var _uploadOptions = null;
58 var _downloadOptions = common.DownloadOptions.Metadata; 62 var _downloadOptions = commons.DownloadOptions.Metadata;
59 var _body = null; 63 var _body = null;
60 64
61 if (achievementId == null) { 65 if (achievementId == null) {
62 throw new core.ArgumentError("Parameter achievementId is required."); 66 throw new core.ArgumentError("Parameter achievementId is required.");
63 } 67 }
64 68
65 _downloadOptions = null; 69 _downloadOptions = null;
66 70
67 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement Id'); 71 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId');
68 72
69 var _response = _requester.request(_url, 73 var _response = _requester.request(_url,
70 "DELETE", 74 "DELETE",
71 body: _body, 75 body: _body,
72 queryParams: _queryParams, 76 queryParams: _queryParams,
73 uploadOptions: _uploadOptions, 77 uploadOptions: _uploadOptions,
74 uploadMedia: _uploadMedia, 78 uploadMedia: _uploadMedia,
75 downloadOptions: _downloadOptions); 79 downloadOptions: _downloadOptions);
76 return _response.then((data) => null); 80 return _response.then((data) => null);
77 } 81 }
78 82
79 /** 83 /**
80 * Retrieves the metadata of the achievement configuration with the given ID. 84 * Retrieves the metadata of the achievement configuration with the given ID.
81 * 85 *
82 * Request parameters: 86 * Request parameters:
83 * 87 *
84 * [achievementId] - The ID of the achievement used by this method. 88 * [achievementId] - The ID of the achievement used by this method.
85 * 89 *
86 * Completes with a [AchievementConfiguration]. 90 * Completes with a [AchievementConfiguration].
87 * 91 *
88 * Completes with a [common.ApiRequestError] if the API endpoint returned an 92 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
89 * error. 93 * error.
90 * 94 *
91 * If the used [http.Client] completes with an error when making a REST call, 95 * If the used [http.Client] completes with an error when making a REST call,
92 * this method will complete with the same error. 96 * this method will complete with the same error.
93 */ 97 */
94 async.Future<AchievementConfiguration> get(core.String achievementId) { 98 async.Future<AchievementConfiguration> get(core.String achievementId) {
95 var _url = null; 99 var _url = null;
96 var _queryParams = new core.Map(); 100 var _queryParams = new core.Map();
97 var _uploadMedia = null; 101 var _uploadMedia = null;
98 var _uploadOptions = null; 102 var _uploadOptions = null;
99 var _downloadOptions = common.DownloadOptions.Metadata; 103 var _downloadOptions = commons.DownloadOptions.Metadata;
100 var _body = null; 104 var _body = null;
101 105
102 if (achievementId == null) { 106 if (achievementId == null) {
103 throw new core.ArgumentError("Parameter achievementId is required."); 107 throw new core.ArgumentError("Parameter achievementId is required.");
104 } 108 }
105 109
106 110
107 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement Id'); 111 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId');
108 112
109 var _response = _requester.request(_url, 113 var _response = _requester.request(_url,
110 "GET", 114 "GET",
111 body: _body, 115 body: _body,
112 queryParams: _queryParams, 116 queryParams: _queryParams,
113 uploadOptions: _uploadOptions, 117 uploadOptions: _uploadOptions,
114 uploadMedia: _uploadMedia, 118 uploadMedia: _uploadMedia,
115 downloadOptions: _downloadOptions); 119 downloadOptions: _downloadOptions);
116 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ; 120 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ;
117 } 121 }
118 122
119 /** 123 /**
120 * Insert a new achievement configuration in this application. 124 * Insert a new achievement configuration in this application.
121 * 125 *
122 * [request] - The metadata request object. 126 * [request] - The metadata request object.
123 * 127 *
124 * Request parameters: 128 * Request parameters:
125 * 129 *
126 * [applicationId] - The application ID from the Google Play developer 130 * [applicationId] - The application ID from the Google Play developer
127 * console. 131 * console.
128 * 132 *
129 * Completes with a [AchievementConfiguration]. 133 * Completes with a [AchievementConfiguration].
130 * 134 *
131 * Completes with a [common.ApiRequestError] if the API endpoint returned an 135 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
132 * error. 136 * error.
133 * 137 *
134 * If the used [http.Client] completes with an error when making a REST call, 138 * If the used [http.Client] completes with an error when making a REST call,
135 * this method will complete with the same error. 139 * this method will complete with the same error.
136 */ 140 */
137 async.Future<AchievementConfiguration> insert(AchievementConfiguration request , core.String applicationId) { 141 async.Future<AchievementConfiguration> insert(AchievementConfiguration request , core.String applicationId) {
138 var _url = null; 142 var _url = null;
139 var _queryParams = new core.Map(); 143 var _queryParams = new core.Map();
140 var _uploadMedia = null; 144 var _uploadMedia = null;
141 var _uploadOptions = null; 145 var _uploadOptions = null;
142 var _downloadOptions = common.DownloadOptions.Metadata; 146 var _downloadOptions = commons.DownloadOptions.Metadata;
143 var _body = null; 147 var _body = null;
144 148
145 if (request != null) { 149 if (request != null) {
146 _body = convert.JSON.encode((request).toJson()); 150 _body = convert.JSON.encode((request).toJson());
147 } 151 }
148 if (applicationId == null) { 152 if (applicationId == null) {
149 throw new core.ArgumentError("Parameter applicationId is required."); 153 throw new core.ArgumentError("Parameter applicationId is required.");
150 } 154 }
151 155
152 156
153 _url = 'applications/' + common_internal.Escaper.ecapeVariable('$application Id') + '/achievements'; 157 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /achievements';
154 158
155 var _response = _requester.request(_url, 159 var _response = _requester.request(_url,
156 "POST", 160 "POST",
157 body: _body, 161 body: _body,
158 queryParams: _queryParams, 162 queryParams: _queryParams,
159 uploadOptions: _uploadOptions, 163 uploadOptions: _uploadOptions,
160 uploadMedia: _uploadMedia, 164 uploadMedia: _uploadMedia,
161 downloadOptions: _downloadOptions); 165 downloadOptions: _downloadOptions);
162 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ; 166 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ;
163 } 167 }
164 168
165 /** 169 /**
166 * Returns a list of the achievement configurations in this application. 170 * Returns a list of the achievement configurations in this application.
167 * 171 *
168 * Request parameters: 172 * Request parameters:
169 * 173 *
170 * [applicationId] - The application ID from the Google Play developer 174 * [applicationId] - The application ID from the Google Play developer
171 * console. 175 * console.
172 * 176 *
173 * [maxResults] - The maximum number of resource configurations to return in 177 * [maxResults] - The maximum number of resource configurations to return in
174 * the response, used for paging. For any response, the actual number of 178 * the response, used for paging. For any response, the actual number of
175 * resources returned may be less than the specified maxResults. 179 * resources returned may be less than the specified maxResults.
176 * Value must be between "1" and "200". 180 * Value must be between "1" and "200".
177 * 181 *
178 * [pageToken] - The token returned by the previous request. 182 * [pageToken] - The token returned by the previous request.
179 * 183 *
180 * Completes with a [AchievementConfigurationListResponse]. 184 * Completes with a [AchievementConfigurationListResponse].
181 * 185 *
182 * Completes with a [common.ApiRequestError] if the API endpoint returned an 186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
183 * error. 187 * error.
184 * 188 *
185 * If the used [http.Client] completes with an error when making a REST call, 189 * If the used [http.Client] completes with an error when making a REST call,
186 * this method will complete with the same error. 190 * this method will complete with the same error.
187 */ 191 */
188 async.Future<AchievementConfigurationListResponse> list(core.String applicatio nId, {core.int maxResults, core.String pageToken}) { 192 async.Future<AchievementConfigurationListResponse> list(core.String applicatio nId, {core.int maxResults, core.String pageToken}) {
189 var _url = null; 193 var _url = null;
190 var _queryParams = new core.Map(); 194 var _queryParams = new core.Map();
191 var _uploadMedia = null; 195 var _uploadMedia = null;
192 var _uploadOptions = null; 196 var _uploadOptions = null;
193 var _downloadOptions = common.DownloadOptions.Metadata; 197 var _downloadOptions = commons.DownloadOptions.Metadata;
194 var _body = null; 198 var _body = null;
195 199
196 if (applicationId == null) { 200 if (applicationId == null) {
197 throw new core.ArgumentError("Parameter applicationId is required."); 201 throw new core.ArgumentError("Parameter applicationId is required.");
198 } 202 }
199 if (maxResults != null) { 203 if (maxResults != null) {
200 _queryParams["maxResults"] = ["${maxResults}"]; 204 _queryParams["maxResults"] = ["${maxResults}"];
201 } 205 }
202 if (pageToken != null) { 206 if (pageToken != null) {
203 _queryParams["pageToken"] = [pageToken]; 207 _queryParams["pageToken"] = [pageToken];
204 } 208 }
205 209
206 210
207 _url = 'applications/' + common_internal.Escaper.ecapeVariable('$application Id') + '/achievements'; 211 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /achievements';
208 212
209 var _response = _requester.request(_url, 213 var _response = _requester.request(_url,
210 "GET", 214 "GET",
211 body: _body, 215 body: _body,
212 queryParams: _queryParams, 216 queryParams: _queryParams,
213 uploadOptions: _uploadOptions, 217 uploadOptions: _uploadOptions,
214 uploadMedia: _uploadMedia, 218 uploadMedia: _uploadMedia,
215 downloadOptions: _downloadOptions); 219 downloadOptions: _downloadOptions);
216 return _response.then((data) => new AchievementConfigurationListResponse.fro mJson(data)); 220 return _response.then((data) => new AchievementConfigurationListResponse.fro mJson(data));
217 } 221 }
218 222
219 /** 223 /**
220 * Update the metadata of the achievement configuration with the given ID. 224 * Update the metadata of the achievement configuration with the given ID.
221 * This method supports patch semantics. 225 * This method supports patch semantics.
222 * 226 *
223 * [request] - The metadata request object. 227 * [request] - The metadata request object.
224 * 228 *
225 * Request parameters: 229 * Request parameters:
226 * 230 *
227 * [achievementId] - The ID of the achievement used by this method. 231 * [achievementId] - The ID of the achievement used by this method.
228 * 232 *
229 * Completes with a [AchievementConfiguration]. 233 * Completes with a [AchievementConfiguration].
230 * 234 *
231 * Completes with a [common.ApiRequestError] if the API endpoint returned an 235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
232 * error. 236 * error.
233 * 237 *
234 * If the used [http.Client] completes with an error when making a REST call, 238 * If the used [http.Client] completes with an error when making a REST call,
235 * this method will complete with the same error. 239 * this method will complete with the same error.
236 */ 240 */
237 async.Future<AchievementConfiguration> patch(AchievementConfiguration request, core.String achievementId) { 241 async.Future<AchievementConfiguration> patch(AchievementConfiguration request, core.String achievementId) {
238 var _url = null; 242 var _url = null;
239 var _queryParams = new core.Map(); 243 var _queryParams = new core.Map();
240 var _uploadMedia = null; 244 var _uploadMedia = null;
241 var _uploadOptions = null; 245 var _uploadOptions = null;
242 var _downloadOptions = common.DownloadOptions.Metadata; 246 var _downloadOptions = commons.DownloadOptions.Metadata;
243 var _body = null; 247 var _body = null;
244 248
245 if (request != null) { 249 if (request != null) {
246 _body = convert.JSON.encode((request).toJson()); 250 _body = convert.JSON.encode((request).toJson());
247 } 251 }
248 if (achievementId == null) { 252 if (achievementId == null) {
249 throw new core.ArgumentError("Parameter achievementId is required."); 253 throw new core.ArgumentError("Parameter achievementId is required.");
250 } 254 }
251 255
252 256
253 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement Id'); 257 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId');
254 258
255 var _response = _requester.request(_url, 259 var _response = _requester.request(_url,
256 "PATCH", 260 "PATCH",
257 body: _body, 261 body: _body,
258 queryParams: _queryParams, 262 queryParams: _queryParams,
259 uploadOptions: _uploadOptions, 263 uploadOptions: _uploadOptions,
260 uploadMedia: _uploadMedia, 264 uploadMedia: _uploadMedia,
261 downloadOptions: _downloadOptions); 265 downloadOptions: _downloadOptions);
262 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ; 266 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ;
263 } 267 }
264 268
265 /** 269 /**
266 * Update the metadata of the achievement configuration with the given ID. 270 * Update the metadata of the achievement configuration with the given ID.
267 * 271 *
268 * [request] - The metadata request object. 272 * [request] - The metadata request object.
269 * 273 *
270 * Request parameters: 274 * Request parameters:
271 * 275 *
272 * [achievementId] - The ID of the achievement used by this method. 276 * [achievementId] - The ID of the achievement used by this method.
273 * 277 *
274 * Completes with a [AchievementConfiguration]. 278 * Completes with a [AchievementConfiguration].
275 * 279 *
276 * Completes with a [common.ApiRequestError] if the API endpoint returned an 280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
277 * error. 281 * error.
278 * 282 *
279 * If the used [http.Client] completes with an error when making a REST call, 283 * If the used [http.Client] completes with an error when making a REST call,
280 * this method will complete with the same error. 284 * this method will complete with the same error.
281 */ 285 */
282 async.Future<AchievementConfiguration> update(AchievementConfiguration request , core.String achievementId) { 286 async.Future<AchievementConfiguration> update(AchievementConfiguration request , core.String achievementId) {
283 var _url = null; 287 var _url = null;
284 var _queryParams = new core.Map(); 288 var _queryParams = new core.Map();
285 var _uploadMedia = null; 289 var _uploadMedia = null;
286 var _uploadOptions = null; 290 var _uploadOptions = null;
287 var _downloadOptions = common.DownloadOptions.Metadata; 291 var _downloadOptions = commons.DownloadOptions.Metadata;
288 var _body = null; 292 var _body = null;
289 293
290 if (request != null) { 294 if (request != null) {
291 _body = convert.JSON.encode((request).toJson()); 295 _body = convert.JSON.encode((request).toJson());
292 } 296 }
293 if (achievementId == null) { 297 if (achievementId == null) {
294 throw new core.ArgumentError("Parameter achievementId is required."); 298 throw new core.ArgumentError("Parameter achievementId is required.");
295 } 299 }
296 300
297 301
298 _url = 'achievements/' + common_internal.Escaper.ecapeVariable('$achievement Id'); 302 _url = 'achievements/' + commons.Escaper.ecapeVariable('$achievementId');
299 303
300 var _response = _requester.request(_url, 304 var _response = _requester.request(_url,
301 "PUT", 305 "PUT",
302 body: _body, 306 body: _body,
303 queryParams: _queryParams, 307 queryParams: _queryParams,
304 uploadOptions: _uploadOptions, 308 uploadOptions: _uploadOptions,
305 uploadMedia: _uploadMedia, 309 uploadMedia: _uploadMedia,
306 downloadOptions: _downloadOptions); 310 downloadOptions: _downloadOptions);
307 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ; 311 return _response.then((data) => new AchievementConfiguration.fromJson(data)) ;
308 } 312 }
309 313
310 } 314 }
311 315
312 316
313 /** Not documented yet. */
314 class ImageConfigurationsResourceApi { 317 class ImageConfigurationsResourceApi {
315 final common_internal.ApiRequester _requester; 318 final commons.ApiRequester _requester;
316 319
317 ImageConfigurationsResourceApi(common_internal.ApiRequester client) : 320 ImageConfigurationsResourceApi(commons.ApiRequester client) :
318 _requester = client; 321 _requester = client;
319 322
320 /** 323 /**
321 * Uploads an image for a resource with the given ID and image type. 324 * Uploads an image for a resource with the given ID and image type.
322 * 325 *
323 * Request parameters: 326 * Request parameters:
324 * 327 *
325 * [resourceId] - The ID of the resource used by this method. 328 * [resourceId] - The ID of the resource used by this method.
326 * 329 *
327 * [imageType] - Selects which image in a resource for this method. 330 * [imageType] - Selects which image in a resource for this method.
328 * Possible string values are: 331 * Possible string values are:
329 * - "ACHIEVEMENT_ICON" : The icon image for an achievement resource. 332 * - "ACHIEVEMENT_ICON" : The icon image for an achievement resource.
330 * - "LEADERBOARD_ICON" : The icon image for a leaderboard resource. 333 * - "LEADERBOARD_ICON" : The icon image for a leaderboard resource.
331 * 334 *
332 * [uploadMedia] - The media to upload. 335 * [uploadMedia] - The media to upload.
333 * 336 *
334 * [uploadOptions] - Options for the media upload. Streaming Media without the 337 * [uploadOptions] - Options for the media upload. Streaming Media without the
335 * length being known ahead of time is only supported via resumable uploads. 338 * length being known ahead of time is only supported via resumable uploads.
336 * 339 *
337 * Completes with a [ImageConfiguration]. 340 * Completes with a [ImageConfiguration].
338 * 341 *
339 * Completes with a [common.ApiRequestError] if the API endpoint returned an 342 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
340 * error. 343 * error.
341 * 344 *
342 * If the used [http.Client] completes with an error when making a REST call, 345 * If the used [http.Client] completes with an error when making a REST call,
343 * this method will complete with the same error. 346 * this method will complete with the same error.
344 */ 347 */
345 async.Future<ImageConfiguration> upload(core.String resourceId, core.String im ageType, {common.UploadOptions uploadOptions : common.UploadOptions.Default, com mon.Media uploadMedia}) { 348 async.Future<ImageConfiguration> upload(core.String resourceId, core.String im ageType, {commons.UploadOptions uploadOptions : commons.UploadOptions.Default, c ommons.Media uploadMedia}) {
346 var _url = null; 349 var _url = null;
347 var _queryParams = new core.Map(); 350 var _queryParams = new core.Map();
348 var _uploadMedia = null; 351 var _uploadMedia = null;
349 var _uploadOptions = null; 352 var _uploadOptions = null;
350 var _downloadOptions = common.DownloadOptions.Metadata; 353 var _downloadOptions = commons.DownloadOptions.Metadata;
351 var _body = null; 354 var _body = null;
352 355
353 if (resourceId == null) { 356 if (resourceId == null) {
354 throw new core.ArgumentError("Parameter resourceId is required."); 357 throw new core.ArgumentError("Parameter resourceId is required.");
355 } 358 }
356 if (imageType == null) { 359 if (imageType == null) {
357 throw new core.ArgumentError("Parameter imageType is required."); 360 throw new core.ArgumentError("Parameter imageType is required.");
358 } 361 }
359 362
360 _uploadMedia = uploadMedia; 363 _uploadMedia = uploadMedia;
361 _uploadOptions = uploadOptions; 364 _uploadOptions = uploadOptions;
362 365
363 if (_uploadMedia == null) { 366 if (_uploadMedia == null) {
364 _url = 'images/' + common_internal.Escaper.ecapeVariable('$resourceId') + '/imageType/' + common_internal.Escaper.ecapeVariable('$imageType'); 367 _url = 'images/' + commons.Escaper.ecapeVariable('$resourceId') + '/imageT ype/' + commons.Escaper.ecapeVariable('$imageType');
365 } else if (_uploadOptions is common.ResumableUploadOptions) { 368 } else if (_uploadOptions is commons.ResumableUploadOptions) {
366 _url = '/resumable/upload/games/v1configuration/images/' + common_internal .Escaper.ecapeVariable('$resourceId') + '/imageType/' + common_internal.Escaper. ecapeVariable('$imageType'); 369 _url = '/resumable/upload/games/v1configuration/images/' + commons.Escaper .ecapeVariable('$resourceId') + '/imageType/' + commons.Escaper.ecapeVariable('$ imageType');
367 } else { 370 } else {
368 _url = '/upload/games/v1configuration/images/' + common_internal.Escaper.e capeVariable('$resourceId') + '/imageType/' + common_internal.Escaper.ecapeVaria ble('$imageType'); 371 _url = '/upload/games/v1configuration/images/' + commons.Escaper.ecapeVari able('$resourceId') + '/imageType/' + commons.Escaper.ecapeVariable('$imageType' );
369 } 372 }
370 373
371 374
372 var _response = _requester.request(_url, 375 var _response = _requester.request(_url,
373 "POST", 376 "POST",
374 body: _body, 377 body: _body,
375 queryParams: _queryParams, 378 queryParams: _queryParams,
376 uploadOptions: _uploadOptions, 379 uploadOptions: _uploadOptions,
377 uploadMedia: _uploadMedia, 380 uploadMedia: _uploadMedia,
378 downloadOptions: _downloadOptions); 381 downloadOptions: _downloadOptions);
379 return _response.then((data) => new ImageConfiguration.fromJson(data)); 382 return _response.then((data) => new ImageConfiguration.fromJson(data));
380 } 383 }
381 384
382 } 385 }
383 386
384 387
385 /** Not documented yet. */
386 class LeaderboardConfigurationsResourceApi { 388 class LeaderboardConfigurationsResourceApi {
387 final common_internal.ApiRequester _requester; 389 final commons.ApiRequester _requester;
388 390
389 LeaderboardConfigurationsResourceApi(common_internal.ApiRequester client) : 391 LeaderboardConfigurationsResourceApi(commons.ApiRequester client) :
390 _requester = client; 392 _requester = client;
391 393
392 /** 394 /**
393 * Delete the leaderboard configuration with the given ID. 395 * Delete the leaderboard configuration with the given ID.
394 * 396 *
395 * Request parameters: 397 * Request parameters:
396 * 398 *
397 * [leaderboardId] - The ID of the leaderboard. 399 * [leaderboardId] - The ID of the leaderboard.
398 * 400 *
399 * Completes with a [common.ApiRequestError] if the API endpoint returned an 401 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
400 * error. 402 * error.
401 * 403 *
402 * If the used [http.Client] completes with an error when making a REST call, 404 * If the used [http.Client] completes with an error when making a REST call,
403 * this method will complete with the same error. 405 * this method will complete with the same error.
404 */ 406 */
405 async.Future delete(core.String leaderboardId) { 407 async.Future delete(core.String leaderboardId) {
406 var _url = null; 408 var _url = null;
407 var _queryParams = new core.Map(); 409 var _queryParams = new core.Map();
408 var _uploadMedia = null; 410 var _uploadMedia = null;
409 var _uploadOptions = null; 411 var _uploadOptions = null;
410 var _downloadOptions = common.DownloadOptions.Metadata; 412 var _downloadOptions = commons.DownloadOptions.Metadata;
411 var _body = null; 413 var _body = null;
412 414
413 if (leaderboardId == null) { 415 if (leaderboardId == null) {
414 throw new core.ArgumentError("Parameter leaderboardId is required."); 416 throw new core.ArgumentError("Parameter leaderboardId is required.");
415 } 417 }
416 418
417 _downloadOptions = null; 419 _downloadOptions = null;
418 420
419 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard Id'); 421 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId');
420 422
421 var _response = _requester.request(_url, 423 var _response = _requester.request(_url,
422 "DELETE", 424 "DELETE",
423 body: _body, 425 body: _body,
424 queryParams: _queryParams, 426 queryParams: _queryParams,
425 uploadOptions: _uploadOptions, 427 uploadOptions: _uploadOptions,
426 uploadMedia: _uploadMedia, 428 uploadMedia: _uploadMedia,
427 downloadOptions: _downloadOptions); 429 downloadOptions: _downloadOptions);
428 return _response.then((data) => null); 430 return _response.then((data) => null);
429 } 431 }
430 432
431 /** 433 /**
432 * Retrieves the metadata of the leaderboard configuration with the given ID. 434 * Retrieves the metadata of the leaderboard configuration with the given ID.
433 * 435 *
434 * Request parameters: 436 * Request parameters:
435 * 437 *
436 * [leaderboardId] - The ID of the leaderboard. 438 * [leaderboardId] - The ID of the leaderboard.
437 * 439 *
438 * Completes with a [LeaderboardConfiguration]. 440 * Completes with a [LeaderboardConfiguration].
439 * 441 *
440 * Completes with a [common.ApiRequestError] if the API endpoint returned an 442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
441 * error. 443 * error.
442 * 444 *
443 * If the used [http.Client] completes with an error when making a REST call, 445 * If the used [http.Client] completes with an error when making a REST call,
444 * this method will complete with the same error. 446 * this method will complete with the same error.
445 */ 447 */
446 async.Future<LeaderboardConfiguration> get(core.String leaderboardId) { 448 async.Future<LeaderboardConfiguration> get(core.String leaderboardId) {
447 var _url = null; 449 var _url = null;
448 var _queryParams = new core.Map(); 450 var _queryParams = new core.Map();
449 var _uploadMedia = null; 451 var _uploadMedia = null;
450 var _uploadOptions = null; 452 var _uploadOptions = null;
451 var _downloadOptions = common.DownloadOptions.Metadata; 453 var _downloadOptions = commons.DownloadOptions.Metadata;
452 var _body = null; 454 var _body = null;
453 455
454 if (leaderboardId == null) { 456 if (leaderboardId == null) {
455 throw new core.ArgumentError("Parameter leaderboardId is required."); 457 throw new core.ArgumentError("Parameter leaderboardId is required.");
456 } 458 }
457 459
458 460
459 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard Id'); 461 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId');
460 462
461 var _response = _requester.request(_url, 463 var _response = _requester.request(_url,
462 "GET", 464 "GET",
463 body: _body, 465 body: _body,
464 queryParams: _queryParams, 466 queryParams: _queryParams,
465 uploadOptions: _uploadOptions, 467 uploadOptions: _uploadOptions,
466 uploadMedia: _uploadMedia, 468 uploadMedia: _uploadMedia,
467 downloadOptions: _downloadOptions); 469 downloadOptions: _downloadOptions);
468 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ; 470 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ;
469 } 471 }
470 472
471 /** 473 /**
472 * Insert a new leaderboard configuration in this application. 474 * Insert a new leaderboard configuration in this application.
473 * 475 *
474 * [request] - The metadata request object. 476 * [request] - The metadata request object.
475 * 477 *
476 * Request parameters: 478 * Request parameters:
477 * 479 *
478 * [applicationId] - The application ID from the Google Play developer 480 * [applicationId] - The application ID from the Google Play developer
479 * console. 481 * console.
480 * 482 *
481 * Completes with a [LeaderboardConfiguration]. 483 * Completes with a [LeaderboardConfiguration].
482 * 484 *
483 * Completes with a [common.ApiRequestError] if the API endpoint returned an 485 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
484 * error. 486 * error.
485 * 487 *
486 * If the used [http.Client] completes with an error when making a REST call, 488 * If the used [http.Client] completes with an error when making a REST call,
487 * this method will complete with the same error. 489 * this method will complete with the same error.
488 */ 490 */
489 async.Future<LeaderboardConfiguration> insert(LeaderboardConfiguration request , core.String applicationId) { 491 async.Future<LeaderboardConfiguration> insert(LeaderboardConfiguration request , core.String applicationId) {
490 var _url = null; 492 var _url = null;
491 var _queryParams = new core.Map(); 493 var _queryParams = new core.Map();
492 var _uploadMedia = null; 494 var _uploadMedia = null;
493 var _uploadOptions = null; 495 var _uploadOptions = null;
494 var _downloadOptions = common.DownloadOptions.Metadata; 496 var _downloadOptions = commons.DownloadOptions.Metadata;
495 var _body = null; 497 var _body = null;
496 498
497 if (request != null) { 499 if (request != null) {
498 _body = convert.JSON.encode((request).toJson()); 500 _body = convert.JSON.encode((request).toJson());
499 } 501 }
500 if (applicationId == null) { 502 if (applicationId == null) {
501 throw new core.ArgumentError("Parameter applicationId is required."); 503 throw new core.ArgumentError("Parameter applicationId is required.");
502 } 504 }
503 505
504 506
505 _url = 'applications/' + common_internal.Escaper.ecapeVariable('$application Id') + '/leaderboards'; 507 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /leaderboards';
506 508
507 var _response = _requester.request(_url, 509 var _response = _requester.request(_url,
508 "POST", 510 "POST",
509 body: _body, 511 body: _body,
510 queryParams: _queryParams, 512 queryParams: _queryParams,
511 uploadOptions: _uploadOptions, 513 uploadOptions: _uploadOptions,
512 uploadMedia: _uploadMedia, 514 uploadMedia: _uploadMedia,
513 downloadOptions: _downloadOptions); 515 downloadOptions: _downloadOptions);
514 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ; 516 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ;
515 } 517 }
516 518
517 /** 519 /**
518 * Returns a list of the leaderboard configurations in this application. 520 * Returns a list of the leaderboard configurations in this application.
519 * 521 *
520 * Request parameters: 522 * Request parameters:
521 * 523 *
522 * [applicationId] - The application ID from the Google Play developer 524 * [applicationId] - The application ID from the Google Play developer
523 * console. 525 * console.
524 * 526 *
525 * [maxResults] - The maximum number of resource configurations to return in 527 * [maxResults] - The maximum number of resource configurations to return in
526 * the response, used for paging. For any response, the actual number of 528 * the response, used for paging. For any response, the actual number of
527 * resources returned may be less than the specified maxResults. 529 * resources returned may be less than the specified maxResults.
528 * Value must be between "1" and "200". 530 * Value must be between "1" and "200".
529 * 531 *
530 * [pageToken] - The token returned by the previous request. 532 * [pageToken] - The token returned by the previous request.
531 * 533 *
532 * Completes with a [LeaderboardConfigurationListResponse]. 534 * Completes with a [LeaderboardConfigurationListResponse].
533 * 535 *
534 * Completes with a [common.ApiRequestError] if the API endpoint returned an 536 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
535 * error. 537 * error.
536 * 538 *
537 * If the used [http.Client] completes with an error when making a REST call, 539 * If the used [http.Client] completes with an error when making a REST call,
538 * this method will complete with the same error. 540 * this method will complete with the same error.
539 */ 541 */
540 async.Future<LeaderboardConfigurationListResponse> list(core.String applicatio nId, {core.int maxResults, core.String pageToken}) { 542 async.Future<LeaderboardConfigurationListResponse> list(core.String applicatio nId, {core.int maxResults, core.String pageToken}) {
541 var _url = null; 543 var _url = null;
542 var _queryParams = new core.Map(); 544 var _queryParams = new core.Map();
543 var _uploadMedia = null; 545 var _uploadMedia = null;
544 var _uploadOptions = null; 546 var _uploadOptions = null;
545 var _downloadOptions = common.DownloadOptions.Metadata; 547 var _downloadOptions = commons.DownloadOptions.Metadata;
546 var _body = null; 548 var _body = null;
547 549
548 if (applicationId == null) { 550 if (applicationId == null) {
549 throw new core.ArgumentError("Parameter applicationId is required."); 551 throw new core.ArgumentError("Parameter applicationId is required.");
550 } 552 }
551 if (maxResults != null) { 553 if (maxResults != null) {
552 _queryParams["maxResults"] = ["${maxResults}"]; 554 _queryParams["maxResults"] = ["${maxResults}"];
553 } 555 }
554 if (pageToken != null) { 556 if (pageToken != null) {
555 _queryParams["pageToken"] = [pageToken]; 557 _queryParams["pageToken"] = [pageToken];
556 } 558 }
557 559
558 560
559 _url = 'applications/' + common_internal.Escaper.ecapeVariable('$application Id') + '/leaderboards'; 561 _url = 'applications/' + commons.Escaper.ecapeVariable('$applicationId') + ' /leaderboards';
560 562
561 var _response = _requester.request(_url, 563 var _response = _requester.request(_url,
562 "GET", 564 "GET",
563 body: _body, 565 body: _body,
564 queryParams: _queryParams, 566 queryParams: _queryParams,
565 uploadOptions: _uploadOptions, 567 uploadOptions: _uploadOptions,
566 uploadMedia: _uploadMedia, 568 uploadMedia: _uploadMedia,
567 downloadOptions: _downloadOptions); 569 downloadOptions: _downloadOptions);
568 return _response.then((data) => new LeaderboardConfigurationListResponse.fro mJson(data)); 570 return _response.then((data) => new LeaderboardConfigurationListResponse.fro mJson(data));
569 } 571 }
570 572
571 /** 573 /**
572 * Update the metadata of the leaderboard configuration with the given ID. 574 * Update the metadata of the leaderboard configuration with the given ID.
573 * This method supports patch semantics. 575 * This method supports patch semantics.
574 * 576 *
575 * [request] - The metadata request object. 577 * [request] - The metadata request object.
576 * 578 *
577 * Request parameters: 579 * Request parameters:
578 * 580 *
579 * [leaderboardId] - The ID of the leaderboard. 581 * [leaderboardId] - The ID of the leaderboard.
580 * 582 *
581 * Completes with a [LeaderboardConfiguration]. 583 * Completes with a [LeaderboardConfiguration].
582 * 584 *
583 * Completes with a [common.ApiRequestError] if the API endpoint returned an 585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
584 * error. 586 * error.
585 * 587 *
586 * If the used [http.Client] completes with an error when making a REST call, 588 * If the used [http.Client] completes with an error when making a REST call,
587 * this method will complete with the same error. 589 * this method will complete with the same error.
588 */ 590 */
589 async.Future<LeaderboardConfiguration> patch(LeaderboardConfiguration request, core.String leaderboardId) { 591 async.Future<LeaderboardConfiguration> patch(LeaderboardConfiguration request, core.String leaderboardId) {
590 var _url = null; 592 var _url = null;
591 var _queryParams = new core.Map(); 593 var _queryParams = new core.Map();
592 var _uploadMedia = null; 594 var _uploadMedia = null;
593 var _uploadOptions = null; 595 var _uploadOptions = null;
594 var _downloadOptions = common.DownloadOptions.Metadata; 596 var _downloadOptions = commons.DownloadOptions.Metadata;
595 var _body = null; 597 var _body = null;
596 598
597 if (request != null) { 599 if (request != null) {
598 _body = convert.JSON.encode((request).toJson()); 600 _body = convert.JSON.encode((request).toJson());
599 } 601 }
600 if (leaderboardId == null) { 602 if (leaderboardId == null) {
601 throw new core.ArgumentError("Parameter leaderboardId is required."); 603 throw new core.ArgumentError("Parameter leaderboardId is required.");
602 } 604 }
603 605
604 606
605 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard Id'); 607 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId');
606 608
607 var _response = _requester.request(_url, 609 var _response = _requester.request(_url,
608 "PATCH", 610 "PATCH",
609 body: _body, 611 body: _body,
610 queryParams: _queryParams, 612 queryParams: _queryParams,
611 uploadOptions: _uploadOptions, 613 uploadOptions: _uploadOptions,
612 uploadMedia: _uploadMedia, 614 uploadMedia: _uploadMedia,
613 downloadOptions: _downloadOptions); 615 downloadOptions: _downloadOptions);
614 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ; 616 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ;
615 } 617 }
616 618
617 /** 619 /**
618 * Update the metadata of the leaderboard configuration with the given ID. 620 * Update the metadata of the leaderboard configuration with the given ID.
619 * 621 *
620 * [request] - The metadata request object. 622 * [request] - The metadata request object.
621 * 623 *
622 * Request parameters: 624 * Request parameters:
623 * 625 *
624 * [leaderboardId] - The ID of the leaderboard. 626 * [leaderboardId] - The ID of the leaderboard.
625 * 627 *
626 * Completes with a [LeaderboardConfiguration]. 628 * Completes with a [LeaderboardConfiguration].
627 * 629 *
628 * Completes with a [common.ApiRequestError] if the API endpoint returned an 630 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
629 * error. 631 * error.
630 * 632 *
631 * If the used [http.Client] completes with an error when making a REST call, 633 * If the used [http.Client] completes with an error when making a REST call,
632 * this method will complete with the same error. 634 * this method will complete with the same error.
633 */ 635 */
634 async.Future<LeaderboardConfiguration> update(LeaderboardConfiguration request , core.String leaderboardId) { 636 async.Future<LeaderboardConfiguration> update(LeaderboardConfiguration request , core.String leaderboardId) {
635 var _url = null; 637 var _url = null;
636 var _queryParams = new core.Map(); 638 var _queryParams = new core.Map();
637 var _uploadMedia = null; 639 var _uploadMedia = null;
638 var _uploadOptions = null; 640 var _uploadOptions = null;
639 var _downloadOptions = common.DownloadOptions.Metadata; 641 var _downloadOptions = commons.DownloadOptions.Metadata;
640 var _body = null; 642 var _body = null;
641 643
642 if (request != null) { 644 if (request != null) {
643 _body = convert.JSON.encode((request).toJson()); 645 _body = convert.JSON.encode((request).toJson());
644 } 646 }
645 if (leaderboardId == null) { 647 if (leaderboardId == null) {
646 throw new core.ArgumentError("Parameter leaderboardId is required."); 648 throw new core.ArgumentError("Parameter leaderboardId is required.");
647 } 649 }
648 650
649 651
650 _url = 'leaderboards/' + common_internal.Escaper.ecapeVariable('$leaderboard Id'); 652 _url = 'leaderboards/' + commons.Escaper.ecapeVariable('$leaderboardId');
651 653
652 var _response = _requester.request(_url, 654 var _response = _requester.request(_url,
653 "PUT", 655 "PUT",
654 body: _body, 656 body: _body,
655 queryParams: _queryParams, 657 queryParams: _queryParams,
656 uploadOptions: _uploadOptions, 658 uploadOptions: _uploadOptions,
657 uploadMedia: _uploadMedia, 659 uploadMedia: _uploadMedia,
658 downloadOptions: _downloadOptions); 660 downloadOptions: _downloadOptions);
659 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ; 661 return _response.then((data) => new LeaderboardConfiguration.fromJson(data)) ;
660 } 662 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 var _json = new core.Map(); 1365 var _json = new core.Map();
1364 if (kind != null) { 1366 if (kind != null) {
1365 _json["kind"] = kind; 1367 _json["kind"] = kind;
1366 } 1368 }
1367 if (translations != null) { 1369 if (translations != null) {
1368 _json["translations"] = translations.map((value) => (value).toJson()).toLi st(); 1370 _json["translations"] = translations.map((value) => (value).toJson()).toLi st();
1369 } 1371 }
1370 return _json; 1372 return _json;
1371 } 1373 }
1372 } 1374 }
1373
1374
OLDNEW
« no previous file with comments | « generated/googleapis/lib/games/v1.dart ('k') | generated/googleapis/lib/gamesmanagement/v1management.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698