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

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

Issue 2987103002: Api-Roll 52: 2017-07-31 (Closed)
Patch Set: Created 3 years, 4 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
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.playcustomapp.v1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http;
11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions,
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
15 ByteRange;
16
17 const core.String USER_AGENT = 'dart-api-client playcustomapp/v1';
18
19 /** An API to publish custom Android apps. */
20 class PlaycustomappApi {
21 /** View and manage your Google Play Developer account */
22 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp ublisher";
23
24
25 final commons.ApiRequester _requester;
26
27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester);
28
29 PlaycustomappApi(http.Client client, {core.String rootUrl: "https://www.google apis.com/", core.String servicePath: "playcustomapp/v1/accounts/"}) :
30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
31 }
32
33
34 class AccountsResourceApi {
35 final commons.ApiRequester _requester;
36
37 AccountsCustomAppsResourceApi get customApps => new AccountsCustomAppsResource Api(_requester);
38
39 AccountsResourceApi(commons.ApiRequester client) :
40 _requester = client;
41 }
42
43
44 class AccountsCustomAppsResourceApi {
45 final commons.ApiRequester _requester;
46
47 AccountsCustomAppsResourceApi(commons.ApiRequester client) :
48 _requester = client;
49
50 /**
51 * Create and publish a new custom app.
52 *
53 * [request] - The metadata request object.
54 *
55 * Request parameters:
56 *
57 * [account] - Developer account ID.
58 *
59 * [uploadMedia] - The media to upload.
60 *
61 * [uploadOptions] - Options for the media upload. Streaming Media without the
62 * length being known ahead of time is only supported via resumable uploads.
63 *
64 * Completes with a [CustomApp].
65 *
66 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
67 * error.
68 *
69 * If the used [http.Client] completes with an error when making a REST call,
70 * this method will complete with the same error.
71 */
72 async.Future<CustomApp> create(CustomApp request, core.String account, {common s.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media upl oadMedia}) {
73 var _url = null;
74 var _queryParams = new core.Map();
75 var _uploadMedia = null;
76 var _uploadOptions = null;
77 var _downloadOptions = commons.DownloadOptions.Metadata;
78 var _body = null;
79
80 if (request != null) {
81 _body = convert.JSON.encode((request).toJson());
82 }
83 if (account == null) {
84 throw new core.ArgumentError("Parameter account is required.");
85 }
86
87 _uploadMedia = uploadMedia;
88 _uploadOptions = uploadOptions;
89
90 if (_uploadMedia == null) {
91 _url = commons.Escaper.ecapeVariable('$account') + '/customApps';
92 } else if (_uploadOptions is commons.ResumableUploadOptions) {
93 _url = '/resumable/upload/playcustomapp/v1/accounts/' + commons.Escaper.ec apeVariable('$account') + '/customApps';
94 } else {
95 _url = '/upload/playcustomapp/v1/accounts/' + commons.Escaper.ecapeVariabl e('$account') + '/customApps';
96 }
97
98
99 var _response = _requester.request(_url,
100 "POST",
101 body: _body,
102 queryParams: _queryParams,
103 uploadOptions: _uploadOptions,
104 uploadMedia: _uploadMedia,
105 downloadOptions: _downloadOptions);
106 return _response.then((data) => new CustomApp.fromJson(data));
107 }
108
109 }
110
111
112
113 /** This resource represents a custom app. */
114 class CustomApp {
115 /** Default listing language in BCP 47 format. */
116 core.String languageCode;
117 /** Title for the Android app. */
118 core.String title;
119
120 CustomApp();
121
122 CustomApp.fromJson(core.Map _json) {
123 if (_json.containsKey("languageCode")) {
124 languageCode = _json["languageCode"];
125 }
126 if (_json.containsKey("title")) {
127 title = _json["title"];
128 }
129 }
130
131 core.Map<core.String, core.Object> toJson() {
132 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
133 if (languageCode != null) {
134 _json["languageCode"] = languageCode;
135 }
136 if (title != null) {
137 _json["title"] = title;
138 }
139 return _json;
140 }
141 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/people/v1.dart ('k') | generated/googleapis/lib/playmoviespartner/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698