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

Side by Side Diff: generated/googleapis/lib/blogger/v3.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.blogger.v3; 3 library googleapis.blogger.v3;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client blogger/v3'; 15 const core.String USER_AGENT = 'dart-api-client blogger/v3';
16 16
17 /** API for access to the data within Blogger. */ 17 /// API for access to the data within Blogger.
18 class BloggerApi { 18 class BloggerApi {
19 /** Manage your Blogger account */ 19 /// Manage your Blogger account
20 static const BloggerScope = "https://www.googleapis.com/auth/blogger"; 20 static const BloggerScope = "https://www.googleapis.com/auth/blogger";
21 21
22 /** View your Blogger account */ 22 /// View your Blogger account
23 static const BloggerReadonlyScope = "https://www.googleapis.com/auth/blogger.r eadonly"; 23 static const BloggerReadonlyScope =
24 24 "https://www.googleapis.com/auth/blogger.readonly";
25 25
26 final commons.ApiRequester _requester; 26 final commons.ApiRequester _requester;
27 27
28 BlogUserInfosResourceApi get blogUserInfos => new BlogUserInfosResourceApi(_re quester); 28 BlogUserInfosResourceApi get blogUserInfos =>
29 new BlogUserInfosResourceApi(_requester);
29 BlogsResourceApi get blogs => new BlogsResourceApi(_requester); 30 BlogsResourceApi get blogs => new BlogsResourceApi(_requester);
30 CommentsResourceApi get comments => new CommentsResourceApi(_requester); 31 CommentsResourceApi get comments => new CommentsResourceApi(_requester);
31 PageViewsResourceApi get pageViews => new PageViewsResourceApi(_requester); 32 PageViewsResourceApi get pageViews => new PageViewsResourceApi(_requester);
32 PagesResourceApi get pages => new PagesResourceApi(_requester); 33 PagesResourceApi get pages => new PagesResourceApi(_requester);
33 PostUserInfosResourceApi get postUserInfos => new PostUserInfosResourceApi(_re quester); 34 PostUserInfosResourceApi get postUserInfos =>
35 new PostUserInfosResourceApi(_requester);
34 PostsResourceApi get posts => new PostsResourceApi(_requester); 36 PostsResourceApi get posts => new PostsResourceApi(_requester);
35 UsersResourceApi get users => new UsersResourceApi(_requester); 37 UsersResourceApi get users => new UsersResourceApi(_requester);
36 38
37 BloggerApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c om/", core.String servicePath: "blogger/v3/"}) : 39 BloggerApi(http.Client client,
38 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 40 {core.String rootUrl: "https://www.googleapis.com/",
41 core.String servicePath: "blogger/v3/"})
42 : _requester =
43 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
39 } 44 }
40 45
41
42 class BlogUserInfosResourceApi { 46 class BlogUserInfosResourceApi {
43 final commons.ApiRequester _requester; 47 final commons.ApiRequester _requester;
44 48
45 BlogUserInfosResourceApi(commons.ApiRequester client) : 49 BlogUserInfosResourceApi(commons.ApiRequester client) : _requester = client;
46 _requester = client;
47 50
48 /** 51 /// Gets one blog and user info pair by blogId and userId.
49 * Gets one blog and user info pair by blogId and userId. 52 ///
50 * 53 /// Request parameters:
51 * Request parameters: 54 ///
52 * 55 /// [userId] - ID of the user whose blogs are to be fetched. Either the word
53 * [userId] - ID of the user whose blogs are to be fetched. Either the word 56 /// 'self' (sans quote marks) or the user's profile identifier.
54 * 'self' (sans quote marks) or the user's profile identifier. 57 ///
55 * 58 /// [blogId] - The ID of the blog to get.
56 * [blogId] - The ID of the blog to get. 59 ///
57 * 60 /// [maxPosts] - Maximum number of posts to pull back with the blog.
58 * [maxPosts] - Maximum number of posts to pull back with the blog. 61 ///
59 * 62 /// Completes with a [BlogUserInfo].
60 * Completes with a [BlogUserInfo]. 63 ///
61 * 64 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
62 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 65 /// an error.
63 * error. 66 ///
64 * 67 /// If the used [http.Client] completes with an error when making a REST
65 * If the used [http.Client] completes with an error when making a REST call, 68 /// call, this method will complete with the same error.
66 * this method will complete with the same error. 69 async.Future<BlogUserInfo> get(core.String userId, core.String blogId,
67 */ 70 {core.int maxPosts}) {
68 async.Future<BlogUserInfo> get(core.String userId, core.String blogId, {core.i nt maxPosts}) {
69 var _url = null; 71 var _url = null;
70 var _queryParams = new core.Map(); 72 var _queryParams = new core.Map();
71 var _uploadMedia = null; 73 var _uploadMedia = null;
72 var _uploadOptions = null; 74 var _uploadOptions = null;
73 var _downloadOptions = commons.DownloadOptions.Metadata; 75 var _downloadOptions = commons.DownloadOptions.Metadata;
74 var _body = null; 76 var _body = null;
75 77
76 if (userId == null) { 78 if (userId == null) {
77 throw new core.ArgumentError("Parameter userId is required."); 79 throw new core.ArgumentError("Parameter userId is required.");
78 } 80 }
79 if (blogId == null) { 81 if (blogId == null) {
80 throw new core.ArgumentError("Parameter blogId is required."); 82 throw new core.ArgumentError("Parameter blogId is required.");
81 } 83 }
82 if (maxPosts != null) { 84 if (maxPosts != null) {
83 _queryParams["maxPosts"] = ["${maxPosts}"]; 85 _queryParams["maxPosts"] = ["${maxPosts}"];
84 } 86 }
85 87
86 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com mons.Escaper.ecapeVariable('$blogId'); 88 _url = 'users/' +
89 commons.Escaper.ecapeVariable('$userId') +
90 '/blogs/' +
91 commons.Escaper.ecapeVariable('$blogId');
87 92
88 var _response = _requester.request(_url, 93 var _response = _requester.request(_url, "GET",
89 "GET", 94 body: _body,
90 body: _body, 95 queryParams: _queryParams,
91 queryParams: _queryParams, 96 uploadOptions: _uploadOptions,
92 uploadOptions: _uploadOptions, 97 uploadMedia: _uploadMedia,
93 uploadMedia: _uploadMedia, 98 downloadOptions: _downloadOptions);
94 downloadOptions: _downloadOptions);
95 return _response.then((data) => new BlogUserInfo.fromJson(data)); 99 return _response.then((data) => new BlogUserInfo.fromJson(data));
96 } 100 }
97
98 } 101 }
99 102
100
101 class BlogsResourceApi { 103 class BlogsResourceApi {
102 final commons.ApiRequester _requester; 104 final commons.ApiRequester _requester;
103 105
104 BlogsResourceApi(commons.ApiRequester client) : 106 BlogsResourceApi(commons.ApiRequester client) : _requester = client;
105 _requester = client;
106 107
107 /** 108 /// Gets one blog by ID.
108 * Gets one blog by ID. 109 ///
109 * 110 /// Request parameters:
110 * Request parameters: 111 ///
111 * 112 /// [blogId] - The ID of the blog to get.
112 * [blogId] - The ID of the blog to get. 113 ///
113 * 114 /// [maxPosts] - Maximum number of posts to pull back with the blog.
114 * [maxPosts] - Maximum number of posts to pull back with the blog. 115 ///
115 * 116 /// [view] - Access level with which to view the blog. Note that some fields
116 * [view] - Access level with which to view the blog. Note that some fields 117 /// require elevated access.
117 * require elevated access. 118 /// Possible string values are:
118 * Possible string values are: 119 /// - "ADMIN" : Admin level detail.
119 * - "ADMIN" : Admin level detail. 120 /// - "AUTHOR" : Author level detail.
120 * - "AUTHOR" : Author level detail. 121 /// - "READER" : Reader level detail.
121 * - "READER" : Reader level detail. 122 ///
122 * 123 /// Completes with a [Blog].
123 * Completes with a [Blog]. 124 ///
124 * 125 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 126 /// an error.
126 * error. 127 ///
127 * 128 /// If the used [http.Client] completes with an error when making a REST
128 * If the used [http.Client] completes with an error when making a REST call, 129 /// call, this method will complete with the same error.
129 * this method will complete with the same error. 130 async.Future<Blog> get(core.String blogId,
130 */ 131 {core.int maxPosts, core.String view}) {
131 async.Future<Blog> get(core.String blogId, {core.int maxPosts, core.String vie w}) {
132 var _url = null; 132 var _url = null;
133 var _queryParams = new core.Map(); 133 var _queryParams = new core.Map();
134 var _uploadMedia = null; 134 var _uploadMedia = null;
135 var _uploadOptions = null; 135 var _uploadOptions = null;
136 var _downloadOptions = commons.DownloadOptions.Metadata; 136 var _downloadOptions = commons.DownloadOptions.Metadata;
137 var _body = null; 137 var _body = null;
138 138
139 if (blogId == null) { 139 if (blogId == null) {
140 throw new core.ArgumentError("Parameter blogId is required."); 140 throw new core.ArgumentError("Parameter blogId is required.");
141 } 141 }
142 if (maxPosts != null) { 142 if (maxPosts != null) {
143 _queryParams["maxPosts"] = ["${maxPosts}"]; 143 _queryParams["maxPosts"] = ["${maxPosts}"];
144 } 144 }
145 if (view != null) { 145 if (view != null) {
146 _queryParams["view"] = [view]; 146 _queryParams["view"] = [view];
147 } 147 }
148 148
149 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId'); 149 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId');
150 150
151 var _response = _requester.request(_url, 151 var _response = _requester.request(_url, "GET",
152 "GET", 152 body: _body,
153 body: _body, 153 queryParams: _queryParams,
154 queryParams: _queryParams, 154 uploadOptions: _uploadOptions,
155 uploadOptions: _uploadOptions, 155 uploadMedia: _uploadMedia,
156 uploadMedia: _uploadMedia, 156 downloadOptions: _downloadOptions);
157 downloadOptions: _downloadOptions);
158 return _response.then((data) => new Blog.fromJson(data)); 157 return _response.then((data) => new Blog.fromJson(data));
159 } 158 }
160 159
161 /** 160 /// Retrieve a Blog by URL.
162 * Retrieve a Blog by URL. 161 ///
163 * 162 /// Request parameters:
164 * Request parameters: 163 ///
165 * 164 /// [url] - The URL of the blog to retrieve.
166 * [url] - The URL of the blog to retrieve. 165 ///
167 * 166 /// [view] - Access level with which to view the blog. Note that some fields
168 * [view] - Access level with which to view the blog. Note that some fields 167 /// require elevated access.
169 * require elevated access. 168 /// Possible string values are:
170 * Possible string values are: 169 /// - "ADMIN" : Admin level detail.
171 * - "ADMIN" : Admin level detail. 170 /// - "AUTHOR" : Author level detail.
172 * - "AUTHOR" : Author level detail. 171 /// - "READER" : Reader level detail.
173 * - "READER" : Reader level detail. 172 ///
174 * 173 /// Completes with a [Blog].
175 * Completes with a [Blog]. 174 ///
176 * 175 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
177 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 176 /// an error.
178 * error. 177 ///
179 * 178 /// If the used [http.Client] completes with an error when making a REST
180 * If the used [http.Client] completes with an error when making a REST call, 179 /// call, this method will complete with the same error.
181 * this method will complete with the same error.
182 */
183 async.Future<Blog> getByUrl(core.String url, {core.String view}) { 180 async.Future<Blog> getByUrl(core.String url, {core.String view}) {
184 var _url = null; 181 var _url = null;
185 var _queryParams = new core.Map(); 182 var _queryParams = new core.Map();
186 var _uploadMedia = null; 183 var _uploadMedia = null;
187 var _uploadOptions = null; 184 var _uploadOptions = null;
188 var _downloadOptions = commons.DownloadOptions.Metadata; 185 var _downloadOptions = commons.DownloadOptions.Metadata;
189 var _body = null; 186 var _body = null;
190 187
191 if (url == null) { 188 if (url == null) {
192 throw new core.ArgumentError("Parameter url is required."); 189 throw new core.ArgumentError("Parameter url is required.");
193 } 190 }
194 _queryParams["url"] = [url]; 191 _queryParams["url"] = [url];
195 if (view != null) { 192 if (view != null) {
196 _queryParams["view"] = [view]; 193 _queryParams["view"] = [view];
197 } 194 }
198 195
199 _url = 'blogs/byurl'; 196 _url = 'blogs/byurl';
200 197
201 var _response = _requester.request(_url, 198 var _response = _requester.request(_url, "GET",
202 "GET", 199 body: _body,
203 body: _body, 200 queryParams: _queryParams,
204 queryParams: _queryParams, 201 uploadOptions: _uploadOptions,
205 uploadOptions: _uploadOptions, 202 uploadMedia: _uploadMedia,
206 uploadMedia: _uploadMedia, 203 downloadOptions: _downloadOptions);
207 downloadOptions: _downloadOptions);
208 return _response.then((data) => new Blog.fromJson(data)); 204 return _response.then((data) => new Blog.fromJson(data));
209 } 205 }
210 206
211 /** 207 /// Retrieves a list of blogs, possibly filtered.
212 * Retrieves a list of blogs, possibly filtered. 208 ///
213 * 209 /// Request parameters:
214 * Request parameters: 210 ///
215 * 211 /// [userId] - ID of the user whose blogs are to be fetched. Either the word
216 * [userId] - ID of the user whose blogs are to be fetched. Either the word 212 /// 'self' (sans quote marks) or the user's profile identifier.
217 * 'self' (sans quote marks) or the user's profile identifier. 213 ///
218 * 214 /// [fetchUserInfo] - Whether the response is a list of blogs with per-user
219 * [fetchUserInfo] - Whether the response is a list of blogs with per-user 215 /// information instead of just blogs.
220 * information instead of just blogs. 216 ///
221 * 217 /// [role] - User access types for blogs to include in the results, e.g.
222 * [role] - User access types for blogs to include in the results, e.g. AUTHOR 218 /// AUTHOR will return blogs where the user has author level access. If no
223 * will return blogs where the user has author level access. If no roles are 219 /// roles are specified, defaults to ADMIN and AUTHOR roles.
224 * specified, defaults to ADMIN and AUTHOR roles. 220 ///
225 * 221 /// [status] - Blog statuses to include in the result (default: Live blogs
226 * [status] - Blog statuses to include in the result (default: Live blogs 222 /// only). Note that ADMIN access is required to view deleted blogs.
227 * only). Note that ADMIN access is required to view deleted blogs. 223 ///
228 * 224 /// [view] - Access level with which to view the blogs. Note that some fields
229 * [view] - Access level with which to view the blogs. Note that some fields 225 /// require elevated access.
230 * require elevated access. 226 /// Possible string values are:
231 * Possible string values are: 227 /// - "ADMIN" : Admin level detail.
232 * - "ADMIN" : Admin level detail. 228 /// - "AUTHOR" : Author level detail.
233 * - "AUTHOR" : Author level detail. 229 /// - "READER" : Reader level detail.
234 * - "READER" : Reader level detail. 230 ///
235 * 231 /// Completes with a [BlogList].
236 * Completes with a [BlogList]. 232 ///
237 * 233 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
238 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 234 /// an error.
239 * error. 235 ///
240 * 236 /// If the used [http.Client] completes with an error when making a REST
241 * If the used [http.Client] completes with an error when making a REST call, 237 /// call, this method will complete with the same error.
242 * this method will complete with the same error. 238 async.Future<BlogList> listByUser(core.String userId,
243 */ 239 {core.bool fetchUserInfo,
244 async.Future<BlogList> listByUser(core.String userId, {core.bool fetchUserInfo , core.List<core.String> role, core.List<core.String> status, core.String view}) { 240 core.List<core.String> role,
241 core.List<core.String> status,
242 core.String view}) {
245 var _url = null; 243 var _url = null;
246 var _queryParams = new core.Map(); 244 var _queryParams = new core.Map();
247 var _uploadMedia = null; 245 var _uploadMedia = null;
248 var _uploadOptions = null; 246 var _uploadOptions = null;
249 var _downloadOptions = commons.DownloadOptions.Metadata; 247 var _downloadOptions = commons.DownloadOptions.Metadata;
250 var _body = null; 248 var _body = null;
251 249
252 if (userId == null) { 250 if (userId == null) {
253 throw new core.ArgumentError("Parameter userId is required."); 251 throw new core.ArgumentError("Parameter userId is required.");
254 } 252 }
255 if (fetchUserInfo != null) { 253 if (fetchUserInfo != null) {
256 _queryParams["fetchUserInfo"] = ["${fetchUserInfo}"]; 254 _queryParams["fetchUserInfo"] = ["${fetchUserInfo}"];
257 } 255 }
258 if (role != null) { 256 if (role != null) {
259 _queryParams["role"] = role; 257 _queryParams["role"] = role;
260 } 258 }
261 if (status != null) { 259 if (status != null) {
262 _queryParams["status"] = status; 260 _queryParams["status"] = status;
263 } 261 }
264 if (view != null) { 262 if (view != null) {
265 _queryParams["view"] = [view]; 263 _queryParams["view"] = [view];
266 } 264 }
267 265
268 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs'; 266 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs';
269 267
270 var _response = _requester.request(_url, 268 var _response = _requester.request(_url, "GET",
271 "GET", 269 body: _body,
272 body: _body, 270 queryParams: _queryParams,
273 queryParams: _queryParams, 271 uploadOptions: _uploadOptions,
274 uploadOptions: _uploadOptions, 272 uploadMedia: _uploadMedia,
275 uploadMedia: _uploadMedia, 273 downloadOptions: _downloadOptions);
276 downloadOptions: _downloadOptions);
277 return _response.then((data) => new BlogList.fromJson(data)); 274 return _response.then((data) => new BlogList.fromJson(data));
278 } 275 }
279
280 } 276 }
281 277
282
283 class CommentsResourceApi { 278 class CommentsResourceApi {
284 final commons.ApiRequester _requester; 279 final commons.ApiRequester _requester;
285 280
286 CommentsResourceApi(commons.ApiRequester client) : 281 CommentsResourceApi(commons.ApiRequester client) : _requester = client;
287 _requester = client;
288 282
289 /** 283 /// Marks a comment as not spam.
290 * Marks a comment as not spam. 284 ///
291 * 285 /// Request parameters:
292 * Request parameters: 286 ///
293 * 287 /// [blogId] - The ID of the Blog.
294 * [blogId] - The ID of the Blog. 288 ///
295 * 289 /// [postId] - The ID of the Post.
296 * [postId] - The ID of the Post. 290 ///
297 * 291 /// [commentId] - The ID of the comment to mark as not spam.
298 * [commentId] - The ID of the comment to mark as not spam. 292 ///
299 * 293 /// Completes with a [Comment].
300 * Completes with a [Comment]. 294 ///
301 * 295 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 296 /// an error.
303 * error. 297 ///
304 * 298 /// If the used [http.Client] completes with an error when making a REST
305 * If the used [http.Client] completes with an error when making a REST call, 299 /// call, this method will complete with the same error.
306 * this method will complete with the same error. 300 async.Future<Comment> approve(
307 */ 301 core.String blogId, core.String postId, core.String commentId) {
308 async.Future<Comment> approve(core.String blogId, core.String postId, core.Str ing commentId) {
309 var _url = null; 302 var _url = null;
310 var _queryParams = new core.Map(); 303 var _queryParams = new core.Map();
311 var _uploadMedia = null; 304 var _uploadMedia = null;
312 var _uploadOptions = null; 305 var _uploadOptions = null;
313 var _downloadOptions = commons.DownloadOptions.Metadata; 306 var _downloadOptions = commons.DownloadOptions.Metadata;
314 var _body = null; 307 var _body = null;
315 308
316 if (blogId == null) { 309 if (blogId == null) {
317 throw new core.ArgumentError("Parameter blogId is required."); 310 throw new core.ArgumentError("Parameter blogId is required.");
318 } 311 }
319 if (postId == null) { 312 if (postId == null) {
320 throw new core.ArgumentError("Parameter postId is required."); 313 throw new core.ArgumentError("Parameter postId is required.");
321 } 314 }
322 if (commentId == null) { 315 if (commentId == null) {
323 throw new core.ArgumentError("Parameter commentId is required."); 316 throw new core.ArgumentError("Parameter commentId is required.");
324 } 317 }
325 318
326 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari able('$commentId') + '/approve'; 319 _url = 'blogs/' +
320 commons.Escaper.ecapeVariable('$blogId') +
321 '/posts/' +
322 commons.Escaper.ecapeVariable('$postId') +
323 '/comments/' +
324 commons.Escaper.ecapeVariable('$commentId') +
325 '/approve';
327 326
328 var _response = _requester.request(_url, 327 var _response = _requester.request(_url, "POST",
329 "POST", 328 body: _body,
330 body: _body, 329 queryParams: _queryParams,
331 queryParams: _queryParams, 330 uploadOptions: _uploadOptions,
332 uploadOptions: _uploadOptions, 331 uploadMedia: _uploadMedia,
333 uploadMedia: _uploadMedia, 332 downloadOptions: _downloadOptions);
334 downloadOptions: _downloadOptions);
335 return _response.then((data) => new Comment.fromJson(data)); 333 return _response.then((data) => new Comment.fromJson(data));
336 } 334 }
337 335
338 /** 336 /// Delete a comment by ID.
339 * Delete a comment by ID. 337 ///
340 * 338 /// Request parameters:
341 * Request parameters: 339 ///
342 * 340 /// [blogId] - The ID of the Blog.
343 * [blogId] - The ID of the Blog. 341 ///
344 * 342 /// [postId] - The ID of the Post.
345 * [postId] - The ID of the Post. 343 ///
346 * 344 /// [commentId] - The ID of the comment to delete.
347 * [commentId] - The ID of the comment to delete. 345 ///
348 * 346 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 347 /// an error.
350 * error. 348 ///
351 * 349 /// If the used [http.Client] completes with an error when making a REST
352 * If the used [http.Client] completes with an error when making a REST call, 350 /// call, this method will complete with the same error.
353 * this method will complete with the same error. 351 async.Future delete(
354 */ 352 core.String blogId, core.String postId, core.String commentId) {
355 async.Future delete(core.String blogId, core.String postId, core.String commen tId) {
356 var _url = null; 353 var _url = null;
357 var _queryParams = new core.Map(); 354 var _queryParams = new core.Map();
358 var _uploadMedia = null; 355 var _uploadMedia = null;
359 var _uploadOptions = null; 356 var _uploadOptions = null;
360 var _downloadOptions = commons.DownloadOptions.Metadata; 357 var _downloadOptions = commons.DownloadOptions.Metadata;
361 var _body = null; 358 var _body = null;
362 359
363 if (blogId == null) { 360 if (blogId == null) {
364 throw new core.ArgumentError("Parameter blogId is required."); 361 throw new core.ArgumentError("Parameter blogId is required.");
365 } 362 }
366 if (postId == null) { 363 if (postId == null) {
367 throw new core.ArgumentError("Parameter postId is required."); 364 throw new core.ArgumentError("Parameter postId is required.");
368 } 365 }
369 if (commentId == null) { 366 if (commentId == null) {
370 throw new core.ArgumentError("Parameter commentId is required."); 367 throw new core.ArgumentError("Parameter commentId is required.");
371 } 368 }
372 369
373 _downloadOptions = null; 370 _downloadOptions = null;
374 371
375 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari able('$commentId'); 372 _url = 'blogs/' +
373 commons.Escaper.ecapeVariable('$blogId') +
374 '/posts/' +
375 commons.Escaper.ecapeVariable('$postId') +
376 '/comments/' +
377 commons.Escaper.ecapeVariable('$commentId');
376 378
377 var _response = _requester.request(_url, 379 var _response = _requester.request(_url, "DELETE",
378 "DELETE", 380 body: _body,
379 body: _body, 381 queryParams: _queryParams,
380 queryParams: _queryParams, 382 uploadOptions: _uploadOptions,
381 uploadOptions: _uploadOptions, 383 uploadMedia: _uploadMedia,
382 uploadMedia: _uploadMedia, 384 downloadOptions: _downloadOptions);
383 downloadOptions: _downloadOptions);
384 return _response.then((data) => null); 385 return _response.then((data) => null);
385 } 386 }
386 387
387 /** 388 /// Gets one comment by ID.
388 * Gets one comment by ID. 389 ///
389 * 390 /// Request parameters:
390 * Request parameters: 391 ///
391 * 392 /// [blogId] - ID of the blog to containing the comment.
392 * [blogId] - ID of the blog to containing the comment. 393 ///
393 * 394 /// [postId] - ID of the post to fetch posts from.
394 * [postId] - ID of the post to fetch posts from. 395 ///
395 * 396 /// [commentId] - The ID of the comment to get.
396 * [commentId] - The ID of the comment to get. 397 ///
397 * 398 /// [view] - Access level for the requested comment (default: READER). Note
398 * [view] - Access level for the requested comment (default: READER). Note 399 /// that some comments will require elevated permissions, for example
399 * that some comments will require elevated permissions, for example comments 400 /// comments where the parent posts which is in a draft state, or comments
400 * where the parent posts which is in a draft state, or comments that are 401 /// that are pending moderation.
401 * pending moderation. 402 /// Possible string values are:
402 * Possible string values are: 403 /// - "ADMIN" : Admin level detail
403 * - "ADMIN" : Admin level detail 404 /// - "AUTHOR" : Author level detail
404 * - "AUTHOR" : Author level detail 405 /// - "READER" : Admin level detail
405 * - "READER" : Admin level detail 406 ///
406 * 407 /// Completes with a [Comment].
407 * Completes with a [Comment]. 408 ///
408 * 409 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
409 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 410 /// an error.
410 * error. 411 ///
411 * 412 /// If the used [http.Client] completes with an error when making a REST
412 * If the used [http.Client] completes with an error when making a REST call, 413 /// call, this method will complete with the same error.
413 * this method will complete with the same error. 414 async.Future<Comment> get(
414 */ 415 core.String blogId, core.String postId, core.String commentId,
415 async.Future<Comment> get(core.String blogId, core.String postId, core.String commentId, {core.String view}) { 416 {core.String view}) {
416 var _url = null; 417 var _url = null;
417 var _queryParams = new core.Map(); 418 var _queryParams = new core.Map();
418 var _uploadMedia = null; 419 var _uploadMedia = null;
419 var _uploadOptions = null; 420 var _uploadOptions = null;
420 var _downloadOptions = commons.DownloadOptions.Metadata; 421 var _downloadOptions = commons.DownloadOptions.Metadata;
421 var _body = null; 422 var _body = null;
422 423
423 if (blogId == null) { 424 if (blogId == null) {
424 throw new core.ArgumentError("Parameter blogId is required."); 425 throw new core.ArgumentError("Parameter blogId is required.");
425 } 426 }
426 if (postId == null) { 427 if (postId == null) {
427 throw new core.ArgumentError("Parameter postId is required."); 428 throw new core.ArgumentError("Parameter postId is required.");
428 } 429 }
429 if (commentId == null) { 430 if (commentId == null) {
430 throw new core.ArgumentError("Parameter commentId is required."); 431 throw new core.ArgumentError("Parameter commentId is required.");
431 } 432 }
432 if (view != null) { 433 if (view != null) {
433 _queryParams["view"] = [view]; 434 _queryParams["view"] = [view];
434 } 435 }
435 436
436 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari able('$commentId'); 437 _url = 'blogs/' +
438 commons.Escaper.ecapeVariable('$blogId') +
439 '/posts/' +
440 commons.Escaper.ecapeVariable('$postId') +
441 '/comments/' +
442 commons.Escaper.ecapeVariable('$commentId');
437 443
438 var _response = _requester.request(_url, 444 var _response = _requester.request(_url, "GET",
439 "GET", 445 body: _body,
440 body: _body, 446 queryParams: _queryParams,
441 queryParams: _queryParams, 447 uploadOptions: _uploadOptions,
442 uploadOptions: _uploadOptions, 448 uploadMedia: _uploadMedia,
443 uploadMedia: _uploadMedia, 449 downloadOptions: _downloadOptions);
444 downloadOptions: _downloadOptions);
445 return _response.then((data) => new Comment.fromJson(data)); 450 return _response.then((data) => new Comment.fromJson(data));
446 } 451 }
447 452
448 /** 453 /// Retrieves the comments for a post, possibly filtered.
449 * Retrieves the comments for a post, possibly filtered. 454 ///
450 * 455 /// Request parameters:
451 * Request parameters: 456 ///
452 * 457 /// [blogId] - ID of the blog to fetch comments from.
453 * [blogId] - ID of the blog to fetch comments from. 458 ///
454 * 459 /// [postId] - ID of the post to fetch posts from.
455 * [postId] - ID of the post to fetch posts from. 460 ///
456 * 461 /// [endDate] - Latest date of comment to fetch, a date-time with RFC 3339
457 * [endDate] - Latest date of comment to fetch, a date-time with RFC 3339 462 /// formatting.
458 * formatting. 463 ///
459 * 464 /// [fetchBodies] - Whether the body content of the comments is included.
460 * [fetchBodies] - Whether the body content of the comments is included. 465 ///
461 * 466 /// [maxResults] - Maximum number of comments to include in the result.
462 * [maxResults] - Maximum number of comments to include in the result. 467 ///
463 * 468 /// [pageToken] - Continuation token if request is paged.
464 * [pageToken] - Continuation token if request is paged. 469 ///
465 * 470 /// [startDate] - Earliest date of comment to fetch, a date-time with RFC
466 * [startDate] - Earliest date of comment to fetch, a date-time with RFC 3339 471 /// 3339 formatting.
467 * formatting. 472 ///
468 * 473 /// [status] - null
469 * [status] - null 474 ///
470 * 475 /// [view] - Access level with which to view the returned result. Note that
471 * [view] - Access level with which to view the returned result. Note that 476 /// some fields require elevated access.
472 * some fields require elevated access. 477 /// Possible string values are:
473 * Possible string values are: 478 /// - "ADMIN" : Admin level detail
474 * - "ADMIN" : Admin level detail 479 /// - "AUTHOR" : Author level detail
475 * - "AUTHOR" : Author level detail 480 /// - "READER" : Reader level detail
476 * - "READER" : Reader level detail 481 ///
477 * 482 /// Completes with a [CommentList].
478 * Completes with a [CommentList]. 483 ///
479 * 484 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
480 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 485 /// an error.
481 * error. 486 ///
482 * 487 /// If the used [http.Client] completes with an error when making a REST
483 * If the used [http.Client] completes with an error when making a REST call, 488 /// call, this method will complete with the same error.
484 * this method will complete with the same error. 489 async.Future<CommentList> list(core.String blogId, core.String postId,
485 */ 490 {core.DateTime endDate,
486 async.Future<CommentList> list(core.String blogId, core.String postId, {core.D ateTime endDate, core.bool fetchBodies, core.int maxResults, core.String pageTok en, core.DateTime startDate, core.List<core.String> status, core.String view}) { 491 core.bool fetchBodies,
492 core.int maxResults,
493 core.String pageToken,
494 core.DateTime startDate,
495 core.List<core.String> status,
496 core.String view}) {
487 var _url = null; 497 var _url = null;
488 var _queryParams = new core.Map(); 498 var _queryParams = new core.Map();
489 var _uploadMedia = null; 499 var _uploadMedia = null;
490 var _uploadOptions = null; 500 var _uploadOptions = null;
491 var _downloadOptions = commons.DownloadOptions.Metadata; 501 var _downloadOptions = commons.DownloadOptions.Metadata;
492 var _body = null; 502 var _body = null;
493 503
494 if (blogId == null) { 504 if (blogId == null) {
495 throw new core.ArgumentError("Parameter blogId is required."); 505 throw new core.ArgumentError("Parameter blogId is required.");
496 } 506 }
(...skipping 15 matching lines...) Expand all
512 if (startDate != null) { 522 if (startDate != null) {
513 _queryParams["startDate"] = [(startDate).toIso8601String()]; 523 _queryParams["startDate"] = [(startDate).toIso8601String()];
514 } 524 }
515 if (status != null) { 525 if (status != null) {
516 _queryParams["status"] = status; 526 _queryParams["status"] = status;
517 } 527 }
518 if (view != null) { 528 if (view != null) {
519 _queryParams["view"] = [view]; 529 _queryParams["view"] = [view];
520 } 530 }
521 531
522 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments'; 532 _url = 'blogs/' +
533 commons.Escaper.ecapeVariable('$blogId') +
534 '/posts/' +
535 commons.Escaper.ecapeVariable('$postId') +
536 '/comments';
523 537
524 var _response = _requester.request(_url, 538 var _response = _requester.request(_url, "GET",
525 "GET", 539 body: _body,
526 body: _body, 540 queryParams: _queryParams,
527 queryParams: _queryParams, 541 uploadOptions: _uploadOptions,
528 uploadOptions: _uploadOptions, 542 uploadMedia: _uploadMedia,
529 uploadMedia: _uploadMedia, 543 downloadOptions: _downloadOptions);
530 downloadOptions: _downloadOptions);
531 return _response.then((data) => new CommentList.fromJson(data)); 544 return _response.then((data) => new CommentList.fromJson(data));
532 } 545 }
533 546
534 /** 547 /// Retrieves the comments for a blog, across all posts, possibly filtered.
535 * Retrieves the comments for a blog, across all posts, possibly filtered. 548 ///
536 * 549 /// Request parameters:
537 * Request parameters: 550 ///
538 * 551 /// [blogId] - ID of the blog to fetch comments from.
539 * [blogId] - ID of the blog to fetch comments from. 552 ///
540 * 553 /// [endDate] - Latest date of comment to fetch, a date-time with RFC 3339
541 * [endDate] - Latest date of comment to fetch, a date-time with RFC 3339 554 /// formatting.
542 * formatting. 555 ///
543 * 556 /// [fetchBodies] - Whether the body content of the comments is included.
544 * [fetchBodies] - Whether the body content of the comments is included. 557 ///
545 * 558 /// [maxResults] - Maximum number of comments to include in the result.
546 * [maxResults] - Maximum number of comments to include in the result. 559 ///
547 * 560 /// [pageToken] - Continuation token if request is paged.
548 * [pageToken] - Continuation token if request is paged. 561 ///
549 * 562 /// [startDate] - Earliest date of comment to fetch, a date-time with RFC
550 * [startDate] - Earliest date of comment to fetch, a date-time with RFC 3339 563 /// 3339 formatting.
551 * formatting. 564 ///
552 * 565 /// [status] - null
553 * [status] - null 566 ///
554 * 567 /// Completes with a [CommentList].
555 * Completes with a [CommentList]. 568 ///
556 * 569 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 570 /// an error.
558 * error. 571 ///
559 * 572 /// If the used [http.Client] completes with an error when making a REST
560 * If the used [http.Client] completes with an error when making a REST call, 573 /// call, this method will complete with the same error.
561 * this method will complete with the same error. 574 async.Future<CommentList> listByBlog(core.String blogId,
562 */ 575 {core.DateTime endDate,
563 async.Future<CommentList> listByBlog(core.String blogId, {core.DateTime endDat e, core.bool fetchBodies, core.int maxResults, core.String pageToken, core.DateT ime startDate, core.List<core.String> status}) { 576 core.bool fetchBodies,
577 core.int maxResults,
578 core.String pageToken,
579 core.DateTime startDate,
580 core.List<core.String> status}) {
564 var _url = null; 581 var _url = null;
565 var _queryParams = new core.Map(); 582 var _queryParams = new core.Map();
566 var _uploadMedia = null; 583 var _uploadMedia = null;
567 var _uploadOptions = null; 584 var _uploadOptions = null;
568 var _downloadOptions = commons.DownloadOptions.Metadata; 585 var _downloadOptions = commons.DownloadOptions.Metadata;
569 var _body = null; 586 var _body = null;
570 587
571 if (blogId == null) { 588 if (blogId == null) {
572 throw new core.ArgumentError("Parameter blogId is required."); 589 throw new core.ArgumentError("Parameter blogId is required.");
573 } 590 }
(...skipping 11 matching lines...) Expand all
585 } 602 }
586 if (startDate != null) { 603 if (startDate != null) {
587 _queryParams["startDate"] = [(startDate).toIso8601String()]; 604 _queryParams["startDate"] = [(startDate).toIso8601String()];
588 } 605 }
589 if (status != null) { 606 if (status != null) {
590 _queryParams["status"] = status; 607 _queryParams["status"] = status;
591 } 608 }
592 609
593 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/comments'; 610 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/comments';
594 611
595 var _response = _requester.request(_url, 612 var _response = _requester.request(_url, "GET",
596 "GET", 613 body: _body,
597 body: _body, 614 queryParams: _queryParams,
598 queryParams: _queryParams, 615 uploadOptions: _uploadOptions,
599 uploadOptions: _uploadOptions, 616 uploadMedia: _uploadMedia,
600 uploadMedia: _uploadMedia, 617 downloadOptions: _downloadOptions);
601 downloadOptions: _downloadOptions);
602 return _response.then((data) => new CommentList.fromJson(data)); 618 return _response.then((data) => new CommentList.fromJson(data));
603 } 619 }
604 620
605 /** 621 /// Marks a comment as spam.
606 * Marks a comment as spam. 622 ///
607 * 623 /// Request parameters:
608 * Request parameters: 624 ///
609 * 625 /// [blogId] - The ID of the Blog.
610 * [blogId] - The ID of the Blog. 626 ///
611 * 627 /// [postId] - The ID of the Post.
612 * [postId] - The ID of the Post. 628 ///
613 * 629 /// [commentId] - The ID of the comment to mark as spam.
614 * [commentId] - The ID of the comment to mark as spam. 630 ///
615 * 631 /// Completes with a [Comment].
616 * Completes with a [Comment]. 632 ///
617 * 633 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
618 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 634 /// an error.
619 * error. 635 ///
620 * 636 /// If the used [http.Client] completes with an error when making a REST
621 * If the used [http.Client] completes with an error when making a REST call, 637 /// call, this method will complete with the same error.
622 * this method will complete with the same error. 638 async.Future<Comment> markAsSpam(
623 */ 639 core.String blogId, core.String postId, core.String commentId) {
624 async.Future<Comment> markAsSpam(core.String blogId, core.String postId, core. String commentId) {
625 var _url = null; 640 var _url = null;
626 var _queryParams = new core.Map(); 641 var _queryParams = new core.Map();
627 var _uploadMedia = null; 642 var _uploadMedia = null;
628 var _uploadOptions = null; 643 var _uploadOptions = null;
629 var _downloadOptions = commons.DownloadOptions.Metadata; 644 var _downloadOptions = commons.DownloadOptions.Metadata;
630 var _body = null; 645 var _body = null;
631 646
632 if (blogId == null) { 647 if (blogId == null) {
633 throw new core.ArgumentError("Parameter blogId is required."); 648 throw new core.ArgumentError("Parameter blogId is required.");
634 } 649 }
635 if (postId == null) { 650 if (postId == null) {
636 throw new core.ArgumentError("Parameter postId is required."); 651 throw new core.ArgumentError("Parameter postId is required.");
637 } 652 }
638 if (commentId == null) { 653 if (commentId == null) {
639 throw new core.ArgumentError("Parameter commentId is required."); 654 throw new core.ArgumentError("Parameter commentId is required.");
640 } 655 }
641 656
642 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari able('$commentId') + '/spam'; 657 _url = 'blogs/' +
658 commons.Escaper.ecapeVariable('$blogId') +
659 '/posts/' +
660 commons.Escaper.ecapeVariable('$postId') +
661 '/comments/' +
662 commons.Escaper.ecapeVariable('$commentId') +
663 '/spam';
643 664
644 var _response = _requester.request(_url, 665 var _response = _requester.request(_url, "POST",
645 "POST", 666 body: _body,
646 body: _body, 667 queryParams: _queryParams,
647 queryParams: _queryParams, 668 uploadOptions: _uploadOptions,
648 uploadOptions: _uploadOptions, 669 uploadMedia: _uploadMedia,
649 uploadMedia: _uploadMedia, 670 downloadOptions: _downloadOptions);
650 downloadOptions: _downloadOptions);
651 return _response.then((data) => new Comment.fromJson(data)); 671 return _response.then((data) => new Comment.fromJson(data));
652 } 672 }
653 673
654 /** 674 /// Removes the content of a comment.
655 * Removes the content of a comment. 675 ///
656 * 676 /// Request parameters:
657 * Request parameters: 677 ///
658 * 678 /// [blogId] - The ID of the Blog.
659 * [blogId] - The ID of the Blog. 679 ///
660 * 680 /// [postId] - The ID of the Post.
661 * [postId] - The ID of the Post. 681 ///
662 * 682 /// [commentId] - The ID of the comment to delete content from.
663 * [commentId] - The ID of the comment to delete content from. 683 ///
664 * 684 /// Completes with a [Comment].
665 * Completes with a [Comment]. 685 ///
666 * 686 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 687 /// an error.
668 * error. 688 ///
669 * 689 /// If the used [http.Client] completes with an error when making a REST
670 * If the used [http.Client] completes with an error when making a REST call, 690 /// call, this method will complete with the same error.
671 * this method will complete with the same error. 691 async.Future<Comment> removeContent(
672 */ 692 core.String blogId, core.String postId, core.String commentId) {
673 async.Future<Comment> removeContent(core.String blogId, core.String postId, co re.String commentId) {
674 var _url = null; 693 var _url = null;
675 var _queryParams = new core.Map(); 694 var _queryParams = new core.Map();
676 var _uploadMedia = null; 695 var _uploadMedia = null;
677 var _uploadOptions = null; 696 var _uploadOptions = null;
678 var _downloadOptions = commons.DownloadOptions.Metadata; 697 var _downloadOptions = commons.DownloadOptions.Metadata;
679 var _body = null; 698 var _body = null;
680 699
681 if (blogId == null) { 700 if (blogId == null) {
682 throw new core.ArgumentError("Parameter blogId is required."); 701 throw new core.ArgumentError("Parameter blogId is required.");
683 } 702 }
684 if (postId == null) { 703 if (postId == null) {
685 throw new core.ArgumentError("Parameter postId is required."); 704 throw new core.ArgumentError("Parameter postId is required.");
686 } 705 }
687 if (commentId == null) { 706 if (commentId == null) {
688 throw new core.ArgumentError("Parameter commentId is required."); 707 throw new core.ArgumentError("Parameter commentId is required.");
689 } 708 }
690 709
691 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari able('$commentId') + '/removecontent'; 710 _url = 'blogs/' +
711 commons.Escaper.ecapeVariable('$blogId') +
712 '/posts/' +
713 commons.Escaper.ecapeVariable('$postId') +
714 '/comments/' +
715 commons.Escaper.ecapeVariable('$commentId') +
716 '/removecontent';
692 717
693 var _response = _requester.request(_url, 718 var _response = _requester.request(_url, "POST",
694 "POST", 719 body: _body,
695 body: _body, 720 queryParams: _queryParams,
696 queryParams: _queryParams, 721 uploadOptions: _uploadOptions,
697 uploadOptions: _uploadOptions, 722 uploadMedia: _uploadMedia,
698 uploadMedia: _uploadMedia, 723 downloadOptions: _downloadOptions);
699 downloadOptions: _downloadOptions);
700 return _response.then((data) => new Comment.fromJson(data)); 724 return _response.then((data) => new Comment.fromJson(data));
701 } 725 }
702
703 } 726 }
704 727
705
706 class PageViewsResourceApi { 728 class PageViewsResourceApi {
707 final commons.ApiRequester _requester; 729 final commons.ApiRequester _requester;
708 730
709 PageViewsResourceApi(commons.ApiRequester client) : 731 PageViewsResourceApi(commons.ApiRequester client) : _requester = client;
710 _requester = client;
711 732
712 /** 733 /// Retrieve pageview stats for a Blog.
713 * Retrieve pageview stats for a Blog. 734 ///
714 * 735 /// Request parameters:
715 * Request parameters: 736 ///
716 * 737 /// [blogId] - The ID of the blog to get.
717 * [blogId] - The ID of the blog to get. 738 ///
718 * 739 /// [range] - null
719 * [range] - null 740 ///
720 * 741 /// Completes with a [Pageviews].
721 * Completes with a [Pageviews]. 742 ///
722 * 743 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 744 /// an error.
724 * error. 745 ///
725 * 746 /// If the used [http.Client] completes with an error when making a REST
726 * If the used [http.Client] completes with an error when making a REST call, 747 /// call, this method will complete with the same error.
727 * this method will complete with the same error. 748 async.Future<Pageviews> get(core.String blogId,
728 */ 749 {core.List<core.String> range}) {
729 async.Future<Pageviews> get(core.String blogId, {core.List<core.String> range} ) {
730 var _url = null; 750 var _url = null;
731 var _queryParams = new core.Map(); 751 var _queryParams = new core.Map();
732 var _uploadMedia = null; 752 var _uploadMedia = null;
733 var _uploadOptions = null; 753 var _uploadOptions = null;
734 var _downloadOptions = commons.DownloadOptions.Metadata; 754 var _downloadOptions = commons.DownloadOptions.Metadata;
735 var _body = null; 755 var _body = null;
736 756
737 if (blogId == null) { 757 if (blogId == null) {
738 throw new core.ArgumentError("Parameter blogId is required."); 758 throw new core.ArgumentError("Parameter blogId is required.");
739 } 759 }
740 if (range != null) { 760 if (range != null) {
741 _queryParams["range"] = range; 761 _queryParams["range"] = range;
742 } 762 }
743 763
744 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pageviews'; 764 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pageviews';
745 765
746 var _response = _requester.request(_url, 766 var _response = _requester.request(_url, "GET",
747 "GET", 767 body: _body,
748 body: _body, 768 queryParams: _queryParams,
749 queryParams: _queryParams, 769 uploadOptions: _uploadOptions,
750 uploadOptions: _uploadOptions, 770 uploadMedia: _uploadMedia,
751 uploadMedia: _uploadMedia, 771 downloadOptions: _downloadOptions);
752 downloadOptions: _downloadOptions);
753 return _response.then((data) => new Pageviews.fromJson(data)); 772 return _response.then((data) => new Pageviews.fromJson(data));
754 } 773 }
755
756 } 774 }
757 775
758
759 class PagesResourceApi { 776 class PagesResourceApi {
760 final commons.ApiRequester _requester; 777 final commons.ApiRequester _requester;
761 778
762 PagesResourceApi(commons.ApiRequester client) : 779 PagesResourceApi(commons.ApiRequester client) : _requester = client;
763 _requester = client;
764 780
765 /** 781 /// Delete a page by ID.
766 * Delete a page by ID. 782 ///
767 * 783 /// Request parameters:
768 * Request parameters: 784 ///
769 * 785 /// [blogId] - The ID of the Blog.
770 * [blogId] - The ID of the Blog. 786 ///
771 * 787 /// [pageId] - The ID of the Page.
772 * [pageId] - The ID of the Page. 788 ///
773 * 789 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
774 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 790 /// an error.
775 * error. 791 ///
776 * 792 /// If the used [http.Client] completes with an error when making a REST
777 * If the used [http.Client] completes with an error when making a REST call, 793 /// call, this method will complete with the same error.
778 * this method will complete with the same error.
779 */
780 async.Future delete(core.String blogId, core.String pageId) { 794 async.Future delete(core.String blogId, core.String pageId) {
781 var _url = null; 795 var _url = null;
782 var _queryParams = new core.Map(); 796 var _queryParams = new core.Map();
783 var _uploadMedia = null; 797 var _uploadMedia = null;
784 var _uploadOptions = null; 798 var _uploadOptions = null;
785 var _downloadOptions = commons.DownloadOptions.Metadata; 799 var _downloadOptions = commons.DownloadOptions.Metadata;
786 var _body = null; 800 var _body = null;
787 801
788 if (blogId == null) { 802 if (blogId == null) {
789 throw new core.ArgumentError("Parameter blogId is required."); 803 throw new core.ArgumentError("Parameter blogId is required.");
790 } 804 }
791 if (pageId == null) { 805 if (pageId == null) {
792 throw new core.ArgumentError("Parameter pageId is required."); 806 throw new core.ArgumentError("Parameter pageId is required.");
793 } 807 }
794 808
795 _downloadOptions = null; 809 _downloadOptions = null;
796 810
797 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId'); 811 _url = 'blogs/' +
812 commons.Escaper.ecapeVariable('$blogId') +
813 '/pages/' +
814 commons.Escaper.ecapeVariable('$pageId');
798 815
799 var _response = _requester.request(_url, 816 var _response = _requester.request(_url, "DELETE",
800 "DELETE", 817 body: _body,
801 body: _body, 818 queryParams: _queryParams,
802 queryParams: _queryParams, 819 uploadOptions: _uploadOptions,
803 uploadOptions: _uploadOptions, 820 uploadMedia: _uploadMedia,
804 uploadMedia: _uploadMedia, 821 downloadOptions: _downloadOptions);
805 downloadOptions: _downloadOptions);
806 return _response.then((data) => null); 822 return _response.then((data) => null);
807 } 823 }
808 824
809 /** 825 /// Gets one blog page by ID.
810 * Gets one blog page by ID. 826 ///
811 * 827 /// Request parameters:
812 * Request parameters: 828 ///
813 * 829 /// [blogId] - ID of the blog containing the page.
814 * [blogId] - ID of the blog containing the page. 830 ///
815 * 831 /// [pageId] - The ID of the page to get.
816 * [pageId] - The ID of the page to get. 832 ///
817 * 833 /// [view] - null
818 * [view] - null 834 /// Possible string values are:
819 * Possible string values are: 835 /// - "ADMIN" : Admin level detail
820 * - "ADMIN" : Admin level detail 836 /// - "AUTHOR" : Author level detail
821 * - "AUTHOR" : Author level detail 837 /// - "READER" : Reader level detail
822 * - "READER" : Reader level detail 838 ///
823 * 839 /// Completes with a [Page].
824 * Completes with a [Page]. 840 ///
825 * 841 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
826 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 842 /// an error.
827 * error. 843 ///
828 * 844 /// If the used [http.Client] completes with an error when making a REST
829 * If the used [http.Client] completes with an error when making a REST call, 845 /// call, this method will complete with the same error.
830 * this method will complete with the same error. 846 async.Future<Page> get(core.String blogId, core.String pageId,
831 */ 847 {core.String view}) {
832 async.Future<Page> get(core.String blogId, core.String pageId, {core.String vi ew}) {
833 var _url = null; 848 var _url = null;
834 var _queryParams = new core.Map(); 849 var _queryParams = new core.Map();
835 var _uploadMedia = null; 850 var _uploadMedia = null;
836 var _uploadOptions = null; 851 var _uploadOptions = null;
837 var _downloadOptions = commons.DownloadOptions.Metadata; 852 var _downloadOptions = commons.DownloadOptions.Metadata;
838 var _body = null; 853 var _body = null;
839 854
840 if (blogId == null) { 855 if (blogId == null) {
841 throw new core.ArgumentError("Parameter blogId is required."); 856 throw new core.ArgumentError("Parameter blogId is required.");
842 } 857 }
843 if (pageId == null) { 858 if (pageId == null) {
844 throw new core.ArgumentError("Parameter pageId is required."); 859 throw new core.ArgumentError("Parameter pageId is required.");
845 } 860 }
846 if (view != null) { 861 if (view != null) {
847 _queryParams["view"] = [view]; 862 _queryParams["view"] = [view];
848 } 863 }
849 864
850 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId'); 865 _url = 'blogs/' +
866 commons.Escaper.ecapeVariable('$blogId') +
867 '/pages/' +
868 commons.Escaper.ecapeVariable('$pageId');
851 869
852 var _response = _requester.request(_url, 870 var _response = _requester.request(_url, "GET",
853 "GET", 871 body: _body,
854 body: _body, 872 queryParams: _queryParams,
855 queryParams: _queryParams, 873 uploadOptions: _uploadOptions,
856 uploadOptions: _uploadOptions, 874 uploadMedia: _uploadMedia,
857 uploadMedia: _uploadMedia, 875 downloadOptions: _downloadOptions);
858 downloadOptions: _downloadOptions);
859 return _response.then((data) => new Page.fromJson(data)); 876 return _response.then((data) => new Page.fromJson(data));
860 } 877 }
861 878
862 /** 879 /// Add a page.
863 * Add a page. 880 ///
864 * 881 /// [request] - The metadata request object.
865 * [request] - The metadata request object. 882 ///
866 * 883 /// Request parameters:
867 * Request parameters: 884 ///
868 * 885 /// [blogId] - ID of the blog to add the page to.
869 * [blogId] - ID of the blog to add the page to. 886 ///
870 * 887 /// [isDraft] - Whether to create the page as a draft (default: false).
871 * [isDraft] - Whether to create the page as a draft (default: false). 888 ///
872 * 889 /// Completes with a [Page].
873 * Completes with a [Page]. 890 ///
874 * 891 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
875 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 892 /// an error.
876 * error. 893 ///
877 * 894 /// If the used [http.Client] completes with an error when making a REST
878 * If the used [http.Client] completes with an error when making a REST call, 895 /// call, this method will complete with the same error.
879 * this method will complete with the same error. 896 async.Future<Page> insert(Page request, core.String blogId,
880 */ 897 {core.bool isDraft}) {
881 async.Future<Page> insert(Page request, core.String blogId, {core.bool isDraft }) {
882 var _url = null; 898 var _url = null;
883 var _queryParams = new core.Map(); 899 var _queryParams = new core.Map();
884 var _uploadMedia = null; 900 var _uploadMedia = null;
885 var _uploadOptions = null; 901 var _uploadOptions = null;
886 var _downloadOptions = commons.DownloadOptions.Metadata; 902 var _downloadOptions = commons.DownloadOptions.Metadata;
887 var _body = null; 903 var _body = null;
888 904
889 if (request != null) { 905 if (request != null) {
890 _body = convert.JSON.encode((request).toJson()); 906 _body = convert.JSON.encode((request).toJson());
891 } 907 }
892 if (blogId == null) { 908 if (blogId == null) {
893 throw new core.ArgumentError("Parameter blogId is required."); 909 throw new core.ArgumentError("Parameter blogId is required.");
894 } 910 }
895 if (isDraft != null) { 911 if (isDraft != null) {
896 _queryParams["isDraft"] = ["${isDraft}"]; 912 _queryParams["isDraft"] = ["${isDraft}"];
897 } 913 }
898 914
899 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages'; 915 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages';
900 916
901 var _response = _requester.request(_url, 917 var _response = _requester.request(_url, "POST",
902 "POST", 918 body: _body,
903 body: _body, 919 queryParams: _queryParams,
904 queryParams: _queryParams, 920 uploadOptions: _uploadOptions,
905 uploadOptions: _uploadOptions, 921 uploadMedia: _uploadMedia,
906 uploadMedia: _uploadMedia, 922 downloadOptions: _downloadOptions);
907 downloadOptions: _downloadOptions);
908 return _response.then((data) => new Page.fromJson(data)); 923 return _response.then((data) => new Page.fromJson(data));
909 } 924 }
910 925
911 /** 926 /// Retrieves the pages for a blog, optionally including non-LIVE statuses.
912 * Retrieves the pages for a blog, optionally including non-LIVE statuses. 927 ///
913 * 928 /// Request parameters:
914 * Request parameters: 929 ///
915 * 930 /// [blogId] - ID of the blog to fetch Pages from.
916 * [blogId] - ID of the blog to fetch Pages from. 931 ///
917 * 932 /// [fetchBodies] - Whether to retrieve the Page bodies.
918 * [fetchBodies] - Whether to retrieve the Page bodies. 933 ///
919 * 934 /// [maxResults] - Maximum number of Pages to fetch.
920 * [maxResults] - Maximum number of Pages to fetch. 935 ///
921 * 936 /// [pageToken] - Continuation token if the request is paged.
922 * [pageToken] - Continuation token if the request is paged. 937 ///
923 * 938 /// [status] - null
924 * [status] - null 939 ///
925 * 940 /// [view] - Access level with which to view the returned result. Note that
926 * [view] - Access level with which to view the returned result. Note that 941 /// some fields require elevated access.
927 * some fields require elevated access. 942 /// Possible string values are:
928 * Possible string values are: 943 /// - "ADMIN" : Admin level detail
929 * - "ADMIN" : Admin level detail 944 /// - "AUTHOR" : Author level detail
930 * - "AUTHOR" : Author level detail 945 /// - "READER" : Reader level detail
931 * - "READER" : Reader level detail 946 ///
932 * 947 /// Completes with a [PageList].
933 * Completes with a [PageList]. 948 ///
934 * 949 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
935 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 950 /// an error.
936 * error. 951 ///
937 * 952 /// If the used [http.Client] completes with an error when making a REST
938 * If the used [http.Client] completes with an error when making a REST call, 953 /// call, this method will complete with the same error.
939 * this method will complete with the same error. 954 async.Future<PageList> list(core.String blogId,
940 */ 955 {core.bool fetchBodies,
941 async.Future<PageList> list(core.String blogId, {core.bool fetchBodies, core.i nt maxResults, core.String pageToken, core.List<core.String> status, core.String view}) { 956 core.int maxResults,
957 core.String pageToken,
958 core.List<core.String> status,
959 core.String view}) {
942 var _url = null; 960 var _url = null;
943 var _queryParams = new core.Map(); 961 var _queryParams = new core.Map();
944 var _uploadMedia = null; 962 var _uploadMedia = null;
945 var _uploadOptions = null; 963 var _uploadOptions = null;
946 var _downloadOptions = commons.DownloadOptions.Metadata; 964 var _downloadOptions = commons.DownloadOptions.Metadata;
947 var _body = null; 965 var _body = null;
948 966
949 if (blogId == null) { 967 if (blogId == null) {
950 throw new core.ArgumentError("Parameter blogId is required."); 968 throw new core.ArgumentError("Parameter blogId is required.");
951 } 969 }
952 if (fetchBodies != null) { 970 if (fetchBodies != null) {
953 _queryParams["fetchBodies"] = ["${fetchBodies}"]; 971 _queryParams["fetchBodies"] = ["${fetchBodies}"];
954 } 972 }
955 if (maxResults != null) { 973 if (maxResults != null) {
956 _queryParams["maxResults"] = ["${maxResults}"]; 974 _queryParams["maxResults"] = ["${maxResults}"];
957 } 975 }
958 if (pageToken != null) { 976 if (pageToken != null) {
959 _queryParams["pageToken"] = [pageToken]; 977 _queryParams["pageToken"] = [pageToken];
960 } 978 }
961 if (status != null) { 979 if (status != null) {
962 _queryParams["status"] = status; 980 _queryParams["status"] = status;
963 } 981 }
964 if (view != null) { 982 if (view != null) {
965 _queryParams["view"] = [view]; 983 _queryParams["view"] = [view];
966 } 984 }
967 985
968 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages'; 986 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages';
969 987
970 var _response = _requester.request(_url, 988 var _response = _requester.request(_url, "GET",
971 "GET", 989 body: _body,
972 body: _body, 990 queryParams: _queryParams,
973 queryParams: _queryParams, 991 uploadOptions: _uploadOptions,
974 uploadOptions: _uploadOptions, 992 uploadMedia: _uploadMedia,
975 uploadMedia: _uploadMedia, 993 downloadOptions: _downloadOptions);
976 downloadOptions: _downloadOptions);
977 return _response.then((data) => new PageList.fromJson(data)); 994 return _response.then((data) => new PageList.fromJson(data));
978 } 995 }
979 996
980 /** 997 /// Update a page. This method supports patch semantics.
981 * Update a page. This method supports patch semantics. 998 ///
982 * 999 /// [request] - The metadata request object.
983 * [request] - The metadata request object. 1000 ///
984 * 1001 /// Request parameters:
985 * Request parameters: 1002 ///
986 * 1003 /// [blogId] - The ID of the Blog.
987 * [blogId] - The ID of the Blog. 1004 ///
988 * 1005 /// [pageId] - The ID of the Page.
989 * [pageId] - The ID of the Page. 1006 ///
990 * 1007 /// [publish_1] - Whether a publish action should be performed when the page
991 * [publish_1] - Whether a publish action should be performed when the page is 1008 /// is updated (default: false).
992 * updated (default: false). 1009 ///
993 * 1010 /// [revert_1] - Whether a revert action should be performed when the page is
994 * [revert_1] - Whether a revert action should be performed when the page is 1011 /// updated (default: false).
995 * updated (default: false). 1012 ///
996 * 1013 /// Completes with a [Page].
997 * Completes with a [Page]. 1014 ///
998 * 1015 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
999 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1016 /// an error.
1000 * error. 1017 ///
1001 * 1018 /// If the used [http.Client] completes with an error when making a REST
1002 * If the used [http.Client] completes with an error when making a REST call, 1019 /// call, this method will complete with the same error.
1003 * this method will complete with the same error. 1020 async.Future<Page> patch(Page request, core.String blogId, core.String pageId,
1004 */ 1021 {core.bool publish_1, core.bool revert_1}) {
1005 async.Future<Page> patch(Page request, core.String blogId, core.String pageId, {core.bool publish_1, core.bool revert_1}) {
1006 var _url = null; 1022 var _url = null;
1007 var _queryParams = new core.Map(); 1023 var _queryParams = new core.Map();
1008 var _uploadMedia = null; 1024 var _uploadMedia = null;
1009 var _uploadOptions = null; 1025 var _uploadOptions = null;
1010 var _downloadOptions = commons.DownloadOptions.Metadata; 1026 var _downloadOptions = commons.DownloadOptions.Metadata;
1011 var _body = null; 1027 var _body = null;
1012 1028
1013 if (request != null) { 1029 if (request != null) {
1014 _body = convert.JSON.encode((request).toJson()); 1030 _body = convert.JSON.encode((request).toJson());
1015 } 1031 }
1016 if (blogId == null) { 1032 if (blogId == null) {
1017 throw new core.ArgumentError("Parameter blogId is required."); 1033 throw new core.ArgumentError("Parameter blogId is required.");
1018 } 1034 }
1019 if (pageId == null) { 1035 if (pageId == null) {
1020 throw new core.ArgumentError("Parameter pageId is required."); 1036 throw new core.ArgumentError("Parameter pageId is required.");
1021 } 1037 }
1022 if (publish_1 != null) { 1038 if (publish_1 != null) {
1023 _queryParams["publish"] = ["${publish_1}"]; 1039 _queryParams["publish"] = ["${publish_1}"];
1024 } 1040 }
1025 if (revert_1 != null) { 1041 if (revert_1 != null) {
1026 _queryParams["revert"] = ["${revert_1}"]; 1042 _queryParams["revert"] = ["${revert_1}"];
1027 } 1043 }
1028 1044
1029 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId'); 1045 _url = 'blogs/' +
1046 commons.Escaper.ecapeVariable('$blogId') +
1047 '/pages/' +
1048 commons.Escaper.ecapeVariable('$pageId');
1030 1049
1031 var _response = _requester.request(_url, 1050 var _response = _requester.request(_url, "PATCH",
1032 "PATCH", 1051 body: _body,
1033 body: _body, 1052 queryParams: _queryParams,
1034 queryParams: _queryParams, 1053 uploadOptions: _uploadOptions,
1035 uploadOptions: _uploadOptions, 1054 uploadMedia: _uploadMedia,
1036 uploadMedia: _uploadMedia, 1055 downloadOptions: _downloadOptions);
1037 downloadOptions: _downloadOptions);
1038 return _response.then((data) => new Page.fromJson(data)); 1056 return _response.then((data) => new Page.fromJson(data));
1039 } 1057 }
1040 1058
1041 /** 1059 /// Publishes a draft page.
1042 * Publishes a draft page. 1060 ///
1043 * 1061 /// Request parameters:
1044 * Request parameters: 1062 ///
1045 * 1063 /// [blogId] - The ID of the blog.
1046 * [blogId] - The ID of the blog. 1064 ///
1047 * 1065 /// [pageId] - The ID of the page.
1048 * [pageId] - The ID of the page. 1066 ///
1049 * 1067 /// Completes with a [Page].
1050 * Completes with a [Page]. 1068 ///
1051 * 1069 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1052 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1070 /// an error.
1053 * error. 1071 ///
1054 * 1072 /// If the used [http.Client] completes with an error when making a REST
1055 * If the used [http.Client] completes with an error when making a REST call, 1073 /// call, this method will complete with the same error.
1056 * this method will complete with the same error.
1057 */
1058 async.Future<Page> publish(core.String blogId, core.String pageId) { 1074 async.Future<Page> publish(core.String blogId, core.String pageId) {
1059 var _url = null; 1075 var _url = null;
1060 var _queryParams = new core.Map(); 1076 var _queryParams = new core.Map();
1061 var _uploadMedia = null; 1077 var _uploadMedia = null;
1062 var _uploadOptions = null; 1078 var _uploadOptions = null;
1063 var _downloadOptions = commons.DownloadOptions.Metadata; 1079 var _downloadOptions = commons.DownloadOptions.Metadata;
1064 var _body = null; 1080 var _body = null;
1065 1081
1066 if (blogId == null) { 1082 if (blogId == null) {
1067 throw new core.ArgumentError("Parameter blogId is required."); 1083 throw new core.ArgumentError("Parameter blogId is required.");
1068 } 1084 }
1069 if (pageId == null) { 1085 if (pageId == null) {
1070 throw new core.ArgumentError("Parameter pageId is required."); 1086 throw new core.ArgumentError("Parameter pageId is required.");
1071 } 1087 }
1072 1088
1073 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId') + '/publish'; 1089 _url = 'blogs/' +
1090 commons.Escaper.ecapeVariable('$blogId') +
1091 '/pages/' +
1092 commons.Escaper.ecapeVariable('$pageId') +
1093 '/publish';
1074 1094
1075 var _response = _requester.request(_url, 1095 var _response = _requester.request(_url, "POST",
1076 "POST", 1096 body: _body,
1077 body: _body, 1097 queryParams: _queryParams,
1078 queryParams: _queryParams, 1098 uploadOptions: _uploadOptions,
1079 uploadOptions: _uploadOptions, 1099 uploadMedia: _uploadMedia,
1080 uploadMedia: _uploadMedia, 1100 downloadOptions: _downloadOptions);
1081 downloadOptions: _downloadOptions);
1082 return _response.then((data) => new Page.fromJson(data)); 1101 return _response.then((data) => new Page.fromJson(data));
1083 } 1102 }
1084 1103
1085 /** 1104 /// Revert a published or scheduled page to draft state.
1086 * Revert a published or scheduled page to draft state. 1105 ///
1087 * 1106 /// Request parameters:
1088 * Request parameters: 1107 ///
1089 * 1108 /// [blogId] - The ID of the blog.
1090 * [blogId] - The ID of the blog. 1109 ///
1091 * 1110 /// [pageId] - The ID of the page.
1092 * [pageId] - The ID of the page. 1111 ///
1093 * 1112 /// Completes with a [Page].
1094 * Completes with a [Page]. 1113 ///
1095 * 1114 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1096 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1115 /// an error.
1097 * error. 1116 ///
1098 * 1117 /// If the used [http.Client] completes with an error when making a REST
1099 * If the used [http.Client] completes with an error when making a REST call, 1118 /// call, this method will complete with the same error.
1100 * this method will complete with the same error.
1101 */
1102 async.Future<Page> revert(core.String blogId, core.String pageId) { 1119 async.Future<Page> revert(core.String blogId, core.String pageId) {
1103 var _url = null; 1120 var _url = null;
1104 var _queryParams = new core.Map(); 1121 var _queryParams = new core.Map();
1105 var _uploadMedia = null; 1122 var _uploadMedia = null;
1106 var _uploadOptions = null; 1123 var _uploadOptions = null;
1107 var _downloadOptions = commons.DownloadOptions.Metadata; 1124 var _downloadOptions = commons.DownloadOptions.Metadata;
1108 var _body = null; 1125 var _body = null;
1109 1126
1110 if (blogId == null) { 1127 if (blogId == null) {
1111 throw new core.ArgumentError("Parameter blogId is required."); 1128 throw new core.ArgumentError("Parameter blogId is required.");
1112 } 1129 }
1113 if (pageId == null) { 1130 if (pageId == null) {
1114 throw new core.ArgumentError("Parameter pageId is required."); 1131 throw new core.ArgumentError("Parameter pageId is required.");
1115 } 1132 }
1116 1133
1117 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId') + '/revert'; 1134 _url = 'blogs/' +
1135 commons.Escaper.ecapeVariable('$blogId') +
1136 '/pages/' +
1137 commons.Escaper.ecapeVariable('$pageId') +
1138 '/revert';
1118 1139
1119 var _response = _requester.request(_url, 1140 var _response = _requester.request(_url, "POST",
1120 "POST", 1141 body: _body,
1121 body: _body, 1142 queryParams: _queryParams,
1122 queryParams: _queryParams, 1143 uploadOptions: _uploadOptions,
1123 uploadOptions: _uploadOptions, 1144 uploadMedia: _uploadMedia,
1124 uploadMedia: _uploadMedia, 1145 downloadOptions: _downloadOptions);
1125 downloadOptions: _downloadOptions);
1126 return _response.then((data) => new Page.fromJson(data)); 1146 return _response.then((data) => new Page.fromJson(data));
1127 } 1147 }
1128 1148
1129 /** 1149 /// Update a page.
1130 * Update a page. 1150 ///
1131 * 1151 /// [request] - The metadata request object.
1132 * [request] - The metadata request object. 1152 ///
1133 * 1153 /// Request parameters:
1134 * Request parameters: 1154 ///
1135 * 1155 /// [blogId] - The ID of the Blog.
1136 * [blogId] - The ID of the Blog. 1156 ///
1137 * 1157 /// [pageId] - The ID of the Page.
1138 * [pageId] - The ID of the Page. 1158 ///
1139 * 1159 /// [publish_1] - Whether a publish action should be performed when the page
1140 * [publish_1] - Whether a publish action should be performed when the page is 1160 /// is updated (default: false).
1141 * updated (default: false). 1161 ///
1142 * 1162 /// [revert_1] - Whether a revert action should be performed when the page is
1143 * [revert_1] - Whether a revert action should be performed when the page is 1163 /// updated (default: false).
1144 * updated (default: false). 1164 ///
1145 * 1165 /// Completes with a [Page].
1146 * Completes with a [Page]. 1166 ///
1147 * 1167 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1168 /// an error.
1149 * error. 1169 ///
1150 * 1170 /// If the used [http.Client] completes with an error when making a REST
1151 * If the used [http.Client] completes with an error when making a REST call, 1171 /// call, this method will complete with the same error.
1152 * this method will complete with the same error. 1172 async.Future<Page> update(
1153 */ 1173 Page request, core.String blogId, core.String pageId,
1154 async.Future<Page> update(Page request, core.String blogId, core.String pageId , {core.bool publish_1, core.bool revert_1}) { 1174 {core.bool publish_1, core.bool revert_1}) {
1155 var _url = null; 1175 var _url = null;
1156 var _queryParams = new core.Map(); 1176 var _queryParams = new core.Map();
1157 var _uploadMedia = null; 1177 var _uploadMedia = null;
1158 var _uploadOptions = null; 1178 var _uploadOptions = null;
1159 var _downloadOptions = commons.DownloadOptions.Metadata; 1179 var _downloadOptions = commons.DownloadOptions.Metadata;
1160 var _body = null; 1180 var _body = null;
1161 1181
1162 if (request != null) { 1182 if (request != null) {
1163 _body = convert.JSON.encode((request).toJson()); 1183 _body = convert.JSON.encode((request).toJson());
1164 } 1184 }
1165 if (blogId == null) { 1185 if (blogId == null) {
1166 throw new core.ArgumentError("Parameter blogId is required."); 1186 throw new core.ArgumentError("Parameter blogId is required.");
1167 } 1187 }
1168 if (pageId == null) { 1188 if (pageId == null) {
1169 throw new core.ArgumentError("Parameter pageId is required."); 1189 throw new core.ArgumentError("Parameter pageId is required.");
1170 } 1190 }
1171 if (publish_1 != null) { 1191 if (publish_1 != null) {
1172 _queryParams["publish"] = ["${publish_1}"]; 1192 _queryParams["publish"] = ["${publish_1}"];
1173 } 1193 }
1174 if (revert_1 != null) { 1194 if (revert_1 != null) {
1175 _queryParams["revert"] = ["${revert_1}"]; 1195 _queryParams["revert"] = ["${revert_1}"];
1176 } 1196 }
1177 1197
1178 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com mons.Escaper.ecapeVariable('$pageId'); 1198 _url = 'blogs/' +
1199 commons.Escaper.ecapeVariable('$blogId') +
1200 '/pages/' +
1201 commons.Escaper.ecapeVariable('$pageId');
1179 1202
1180 var _response = _requester.request(_url, 1203 var _response = _requester.request(_url, "PUT",
1181 "PUT", 1204 body: _body,
1182 body: _body, 1205 queryParams: _queryParams,
1183 queryParams: _queryParams, 1206 uploadOptions: _uploadOptions,
1184 uploadOptions: _uploadOptions, 1207 uploadMedia: _uploadMedia,
1185 uploadMedia: _uploadMedia, 1208 downloadOptions: _downloadOptions);
1186 downloadOptions: _downloadOptions);
1187 return _response.then((data) => new Page.fromJson(data)); 1209 return _response.then((data) => new Page.fromJson(data));
1188 } 1210 }
1189
1190 } 1211 }
1191 1212
1192
1193 class PostUserInfosResourceApi { 1213 class PostUserInfosResourceApi {
1194 final commons.ApiRequester _requester; 1214 final commons.ApiRequester _requester;
1195 1215
1196 PostUserInfosResourceApi(commons.ApiRequester client) : 1216 PostUserInfosResourceApi(commons.ApiRequester client) : _requester = client;
1197 _requester = client;
1198 1217
1199 /** 1218 /// Gets one post and user info pair, by post ID and user ID. The post user
1200 * Gets one post and user info pair, by post ID and user ID. The post user 1219 /// info contains per-user information about the post, such as access rights,
1201 * info contains per-user information about the post, such as access rights, 1220 /// specific to the user.
1202 * specific to the user. 1221 ///
1203 * 1222 /// Request parameters:
1204 * Request parameters: 1223 ///
1205 * 1224 /// [userId] - ID of the user for the per-user information to be fetched.
1206 * [userId] - ID of the user for the per-user information to be fetched. 1225 /// Either the word 'self' (sans quote marks) or the user's profile
1207 * Either the word 'self' (sans quote marks) or the user's profile identifier. 1226 /// identifier.
1208 * 1227 ///
1209 * [blogId] - The ID of the blog. 1228 /// [blogId] - The ID of the blog.
1210 * 1229 ///
1211 * [postId] - The ID of the post to get. 1230 /// [postId] - The ID of the post to get.
1212 * 1231 ///
1213 * [maxComments] - Maximum number of comments to pull back on a post. 1232 /// [maxComments] - Maximum number of comments to pull back on a post.
1214 * 1233 ///
1215 * Completes with a [PostUserInfo]. 1234 /// Completes with a [PostUserInfo].
1216 * 1235 ///
1217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1236 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1218 * error. 1237 /// an error.
1219 * 1238 ///
1220 * If the used [http.Client] completes with an error when making a REST call, 1239 /// If the used [http.Client] completes with an error when making a REST
1221 * this method will complete with the same error. 1240 /// call, this method will complete with the same error.
1222 */ 1241 async.Future<PostUserInfo> get(
1223 async.Future<PostUserInfo> get(core.String userId, core.String blogId, core.St ring postId, {core.int maxComments}) { 1242 core.String userId, core.String blogId, core.String postId,
1243 {core.int maxComments}) {
1224 var _url = null; 1244 var _url = null;
1225 var _queryParams = new core.Map(); 1245 var _queryParams = new core.Map();
1226 var _uploadMedia = null; 1246 var _uploadMedia = null;
1227 var _uploadOptions = null; 1247 var _uploadOptions = null;
1228 var _downloadOptions = commons.DownloadOptions.Metadata; 1248 var _downloadOptions = commons.DownloadOptions.Metadata;
1229 var _body = null; 1249 var _body = null;
1230 1250
1231 if (userId == null) { 1251 if (userId == null) {
1232 throw new core.ArgumentError("Parameter userId is required."); 1252 throw new core.ArgumentError("Parameter userId is required.");
1233 } 1253 }
1234 if (blogId == null) { 1254 if (blogId == null) {
1235 throw new core.ArgumentError("Parameter blogId is required."); 1255 throw new core.ArgumentError("Parameter blogId is required.");
1236 } 1256 }
1237 if (postId == null) { 1257 if (postId == null) {
1238 throw new core.ArgumentError("Parameter postId is required."); 1258 throw new core.ArgumentError("Parameter postId is required.");
1239 } 1259 }
1240 if (maxComments != null) { 1260 if (maxComments != null) {
1241 _queryParams["maxComments"] = ["${maxComments}"]; 1261 _queryParams["maxComments"] = ["${maxComments}"];
1242 } 1262 }
1243 1263
1244 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com mons.Escaper.ecapeVariable('$blogId') + '/posts/' + commons.Escaper.ecapeVariabl e('$postId'); 1264 _url = 'users/' +
1265 commons.Escaper.ecapeVariable('$userId') +
1266 '/blogs/' +
1267 commons.Escaper.ecapeVariable('$blogId') +
1268 '/posts/' +
1269 commons.Escaper.ecapeVariable('$postId');
1245 1270
1246 var _response = _requester.request(_url, 1271 var _response = _requester.request(_url, "GET",
1247 "GET", 1272 body: _body,
1248 body: _body, 1273 queryParams: _queryParams,
1249 queryParams: _queryParams, 1274 uploadOptions: _uploadOptions,
1250 uploadOptions: _uploadOptions, 1275 uploadMedia: _uploadMedia,
1251 uploadMedia: _uploadMedia, 1276 downloadOptions: _downloadOptions);
1252 downloadOptions: _downloadOptions);
1253 return _response.then((data) => new PostUserInfo.fromJson(data)); 1277 return _response.then((data) => new PostUserInfo.fromJson(data));
1254 } 1278 }
1255 1279
1256 /** 1280 /// Retrieves a list of post and post user info pairs, possibly filtered. The
1257 * Retrieves a list of post and post user info pairs, possibly filtered. The 1281 /// post user info contains per-user information about the post, such as
1258 * post user info contains per-user information about the post, such as access 1282 /// access rights, specific to the user.
1259 * rights, specific to the user. 1283 ///
1260 * 1284 /// Request parameters:
1261 * Request parameters: 1285 ///
1262 * 1286 /// [userId] - ID of the user for the per-user information to be fetched.
1263 * [userId] - ID of the user for the per-user information to be fetched. 1287 /// Either the word 'self' (sans quote marks) or the user's profile
1264 * Either the word 'self' (sans quote marks) or the user's profile identifier. 1288 /// identifier.
1265 * 1289 ///
1266 * [blogId] - ID of the blog to fetch posts from. 1290 /// [blogId] - ID of the blog to fetch posts from.
1267 * 1291 ///
1268 * [endDate] - Latest post date to fetch, a date-time with RFC 3339 1292 /// [endDate] - Latest post date to fetch, a date-time with RFC 3339
1269 * formatting. 1293 /// formatting.
1270 * 1294 ///
1271 * [fetchBodies] - Whether the body content of posts is included. Default is 1295 /// [fetchBodies] - Whether the body content of posts is included. Default is
1272 * false. 1296 /// false.
1273 * 1297 ///
1274 * [labels] - Comma-separated list of labels to search for. 1298 /// [labels] - Comma-separated list of labels to search for.
1275 * 1299 ///
1276 * [maxResults] - Maximum number of posts to fetch. 1300 /// [maxResults] - Maximum number of posts to fetch.
1277 * 1301 ///
1278 * [orderBy] - Sort order applied to search results. Default is published. 1302 /// [orderBy] - Sort order applied to search results. Default is published.
1279 * Possible string values are: 1303 /// Possible string values are:
1280 * - "published" : Order by the date the post was published 1304 /// - "published" : Order by the date the post was published
1281 * - "updated" : Order by the date the post was last updated 1305 /// - "updated" : Order by the date the post was last updated
1282 * 1306 ///
1283 * [pageToken] - Continuation token if the request is paged. 1307 /// [pageToken] - Continuation token if the request is paged.
1284 * 1308 ///
1285 * [startDate] - Earliest post date to fetch, a date-time with RFC 3339 1309 /// [startDate] - Earliest post date to fetch, a date-time with RFC 3339
1286 * formatting. 1310 /// formatting.
1287 * 1311 ///
1288 * [status] - null 1312 /// [status] - null
1289 * 1313 ///
1290 * [view] - Access level with which to view the returned result. Note that 1314 /// [view] - Access level with which to view the returned result. Note that
1291 * some fields require elevated access. 1315 /// some fields require elevated access.
1292 * Possible string values are: 1316 /// Possible string values are:
1293 * - "ADMIN" : Admin level detail 1317 /// - "ADMIN" : Admin level detail
1294 * - "AUTHOR" : Author level detail 1318 /// - "AUTHOR" : Author level detail
1295 * - "READER" : Reader level detail 1319 /// - "READER" : Reader level detail
1296 * 1320 ///
1297 * Completes with a [PostUserInfosList]. 1321 /// Completes with a [PostUserInfosList].
1298 * 1322 ///
1299 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1323 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1300 * error. 1324 /// an error.
1301 * 1325 ///
1302 * If the used [http.Client] completes with an error when making a REST call, 1326 /// If the used [http.Client] completes with an error when making a REST
1303 * this method will complete with the same error. 1327 /// call, this method will complete with the same error.
1304 */ 1328 async.Future<PostUserInfosList> list(core.String userId, core.String blogId,
1305 async.Future<PostUserInfosList> list(core.String userId, core.String blogId, { core.DateTime endDate, core.bool fetchBodies, core.String labels, core.int maxRe sults, core.String orderBy, core.String pageToken, core.DateTime startDate, core .List<core.String> status, core.String view}) { 1329 {core.DateTime endDate,
1330 core.bool fetchBodies,
1331 core.String labels,
1332 core.int maxResults,
1333 core.String orderBy,
1334 core.String pageToken,
1335 core.DateTime startDate,
1336 core.List<core.String> status,
1337 core.String view}) {
1306 var _url = null; 1338 var _url = null;
1307 var _queryParams = new core.Map(); 1339 var _queryParams = new core.Map();
1308 var _uploadMedia = null; 1340 var _uploadMedia = null;
1309 var _uploadOptions = null; 1341 var _uploadOptions = null;
1310 var _downloadOptions = commons.DownloadOptions.Metadata; 1342 var _downloadOptions = commons.DownloadOptions.Metadata;
1311 var _body = null; 1343 var _body = null;
1312 1344
1313 if (userId == null) { 1345 if (userId == null) {
1314 throw new core.ArgumentError("Parameter userId is required."); 1346 throw new core.ArgumentError("Parameter userId is required.");
1315 } 1347 }
(...skipping 21 matching lines...) Expand all
1337 if (startDate != null) { 1369 if (startDate != null) {
1338 _queryParams["startDate"] = [(startDate).toIso8601String()]; 1370 _queryParams["startDate"] = [(startDate).toIso8601String()];
1339 } 1371 }
1340 if (status != null) { 1372 if (status != null) {
1341 _queryParams["status"] = status; 1373 _queryParams["status"] = status;
1342 } 1374 }
1343 if (view != null) { 1375 if (view != null) {
1344 _queryParams["view"] = [view]; 1376 _queryParams["view"] = [view];
1345 } 1377 }
1346 1378
1347 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com mons.Escaper.ecapeVariable('$blogId') + '/posts'; 1379 _url = 'users/' +
1380 commons.Escaper.ecapeVariable('$userId') +
1381 '/blogs/' +
1382 commons.Escaper.ecapeVariable('$blogId') +
1383 '/posts';
1348 1384
1349 var _response = _requester.request(_url, 1385 var _response = _requester.request(_url, "GET",
1350 "GET", 1386 body: _body,
1351 body: _body, 1387 queryParams: _queryParams,
1352 queryParams: _queryParams, 1388 uploadOptions: _uploadOptions,
1353 uploadOptions: _uploadOptions, 1389 uploadMedia: _uploadMedia,
1354 uploadMedia: _uploadMedia, 1390 downloadOptions: _downloadOptions);
1355 downloadOptions: _downloadOptions);
1356 return _response.then((data) => new PostUserInfosList.fromJson(data)); 1391 return _response.then((data) => new PostUserInfosList.fromJson(data));
1357 } 1392 }
1358
1359 } 1393 }
1360 1394
1361
1362 class PostsResourceApi { 1395 class PostsResourceApi {
1363 final commons.ApiRequester _requester; 1396 final commons.ApiRequester _requester;
1364 1397
1365 PostsResourceApi(commons.ApiRequester client) : 1398 PostsResourceApi(commons.ApiRequester client) : _requester = client;
1366 _requester = client;
1367 1399
1368 /** 1400 /// Delete a post by ID.
1369 * Delete a post by ID. 1401 ///
1370 * 1402 /// Request parameters:
1371 * Request parameters: 1403 ///
1372 * 1404 /// [blogId] - The ID of the Blog.
1373 * [blogId] - The ID of the Blog. 1405 ///
1374 * 1406 /// [postId] - The ID of the Post.
1375 * [postId] - The ID of the Post. 1407 ///
1376 * 1408 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1409 /// an error.
1378 * error. 1410 ///
1379 * 1411 /// If the used [http.Client] completes with an error when making a REST
1380 * If the used [http.Client] completes with an error when making a REST call, 1412 /// call, this method will complete with the same error.
1381 * this method will complete with the same error.
1382 */
1383 async.Future delete(core.String blogId, core.String postId) { 1413 async.Future delete(core.String blogId, core.String postId) {
1384 var _url = null; 1414 var _url = null;
1385 var _queryParams = new core.Map(); 1415 var _queryParams = new core.Map();
1386 var _uploadMedia = null; 1416 var _uploadMedia = null;
1387 var _uploadOptions = null; 1417 var _uploadOptions = null;
1388 var _downloadOptions = commons.DownloadOptions.Metadata; 1418 var _downloadOptions = commons.DownloadOptions.Metadata;
1389 var _body = null; 1419 var _body = null;
1390 1420
1391 if (blogId == null) { 1421 if (blogId == null) {
1392 throw new core.ArgumentError("Parameter blogId is required."); 1422 throw new core.ArgumentError("Parameter blogId is required.");
1393 } 1423 }
1394 if (postId == null) { 1424 if (postId == null) {
1395 throw new core.ArgumentError("Parameter postId is required."); 1425 throw new core.ArgumentError("Parameter postId is required.");
1396 } 1426 }
1397 1427
1398 _downloadOptions = null; 1428 _downloadOptions = null;
1399 1429
1400 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId'); 1430 _url = 'blogs/' +
1431 commons.Escaper.ecapeVariable('$blogId') +
1432 '/posts/' +
1433 commons.Escaper.ecapeVariable('$postId');
1401 1434
1402 var _response = _requester.request(_url, 1435 var _response = _requester.request(_url, "DELETE",
1403 "DELETE", 1436 body: _body,
1404 body: _body, 1437 queryParams: _queryParams,
1405 queryParams: _queryParams, 1438 uploadOptions: _uploadOptions,
1406 uploadOptions: _uploadOptions, 1439 uploadMedia: _uploadMedia,
1407 uploadMedia: _uploadMedia, 1440 downloadOptions: _downloadOptions);
1408 downloadOptions: _downloadOptions);
1409 return _response.then((data) => null); 1441 return _response.then((data) => null);
1410 } 1442 }
1411 1443
1412 /** 1444 /// Get a post by ID.
1413 * Get a post by ID. 1445 ///
1414 * 1446 /// Request parameters:
1415 * Request parameters: 1447 ///
1416 * 1448 /// [blogId] - ID of the blog to fetch the post from.
1417 * [blogId] - ID of the blog to fetch the post from. 1449 ///
1418 * 1450 /// [postId] - The ID of the post
1419 * [postId] - The ID of the post 1451 ///
1420 * 1452 /// [fetchBody] - Whether the body content of the post is included (default:
1421 * [fetchBody] - Whether the body content of the post is included (default: 1453 /// true). This should be set to false when the post bodies are not required,
1422 * true). This should be set to false when the post bodies are not required, 1454 /// to help minimize traffic.
1423 * to help minimize traffic. 1455 ///
1424 * 1456 /// [fetchImages] - Whether image URL metadata for each post is included
1425 * [fetchImages] - Whether image URL metadata for each post is included 1457 /// (default: false).
1426 * (default: false). 1458 ///
1427 * 1459 /// [maxComments] - Maximum number of comments to pull back on a post.
1428 * [maxComments] - Maximum number of comments to pull back on a post. 1460 ///
1429 * 1461 /// [view] - Access level with which to view the returned result. Note that
1430 * [view] - Access level with which to view the returned result. Note that 1462 /// some fields require elevated access.
1431 * some fields require elevated access. 1463 /// Possible string values are:
1432 * Possible string values are: 1464 /// - "ADMIN" : Admin level detail
1433 * - "ADMIN" : Admin level detail 1465 /// - "AUTHOR" : Author level detail
1434 * - "AUTHOR" : Author level detail 1466 /// - "READER" : Reader level detail
1435 * - "READER" : Reader level detail 1467 ///
1436 * 1468 /// Completes with a [Post].
1437 * Completes with a [Post]. 1469 ///
1438 * 1470 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1439 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1471 /// an error.
1440 * error. 1472 ///
1441 * 1473 /// If the used [http.Client] completes with an error when making a REST
1442 * If the used [http.Client] completes with an error when making a REST call, 1474 /// call, this method will complete with the same error.
1443 * this method will complete with the same error. 1475 async.Future<Post> get(core.String blogId, core.String postId,
1444 */ 1476 {core.bool fetchBody,
1445 async.Future<Post> get(core.String blogId, core.String postId, {core.bool fetc hBody, core.bool fetchImages, core.int maxComments, core.String view}) { 1477 core.bool fetchImages,
1478 core.int maxComments,
1479 core.String view}) {
1446 var _url = null; 1480 var _url = null;
1447 var _queryParams = new core.Map(); 1481 var _queryParams = new core.Map();
1448 var _uploadMedia = null; 1482 var _uploadMedia = null;
1449 var _uploadOptions = null; 1483 var _uploadOptions = null;
1450 var _downloadOptions = commons.DownloadOptions.Metadata; 1484 var _downloadOptions = commons.DownloadOptions.Metadata;
1451 var _body = null; 1485 var _body = null;
1452 1486
1453 if (blogId == null) { 1487 if (blogId == null) {
1454 throw new core.ArgumentError("Parameter blogId is required."); 1488 throw new core.ArgumentError("Parameter blogId is required.");
1455 } 1489 }
1456 if (postId == null) { 1490 if (postId == null) {
1457 throw new core.ArgumentError("Parameter postId is required."); 1491 throw new core.ArgumentError("Parameter postId is required.");
1458 } 1492 }
1459 if (fetchBody != null) { 1493 if (fetchBody != null) {
1460 _queryParams["fetchBody"] = ["${fetchBody}"]; 1494 _queryParams["fetchBody"] = ["${fetchBody}"];
1461 } 1495 }
1462 if (fetchImages != null) { 1496 if (fetchImages != null) {
1463 _queryParams["fetchImages"] = ["${fetchImages}"]; 1497 _queryParams["fetchImages"] = ["${fetchImages}"];
1464 } 1498 }
1465 if (maxComments != null) { 1499 if (maxComments != null) {
1466 _queryParams["maxComments"] = ["${maxComments}"]; 1500 _queryParams["maxComments"] = ["${maxComments}"];
1467 } 1501 }
1468 if (view != null) { 1502 if (view != null) {
1469 _queryParams["view"] = [view]; 1503 _queryParams["view"] = [view];
1470 } 1504 }
1471 1505
1472 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId'); 1506 _url = 'blogs/' +
1507 commons.Escaper.ecapeVariable('$blogId') +
1508 '/posts/' +
1509 commons.Escaper.ecapeVariable('$postId');
1473 1510
1474 var _response = _requester.request(_url, 1511 var _response = _requester.request(_url, "GET",
1475 "GET", 1512 body: _body,
1476 body: _body, 1513 queryParams: _queryParams,
1477 queryParams: _queryParams, 1514 uploadOptions: _uploadOptions,
1478 uploadOptions: _uploadOptions, 1515 uploadMedia: _uploadMedia,
1479 uploadMedia: _uploadMedia, 1516 downloadOptions: _downloadOptions);
1480 downloadOptions: _downloadOptions);
1481 return _response.then((data) => new Post.fromJson(data)); 1517 return _response.then((data) => new Post.fromJson(data));
1482 } 1518 }
1483 1519
1484 /** 1520 /// Retrieve a Post by Path.
1485 * Retrieve a Post by Path. 1521 ///
1486 * 1522 /// Request parameters:
1487 * Request parameters: 1523 ///
1488 * 1524 /// [blogId] - ID of the blog to fetch the post from.
1489 * [blogId] - ID of the blog to fetch the post from. 1525 ///
1490 * 1526 /// [path] - Path of the Post to retrieve.
1491 * [path] - Path of the Post to retrieve. 1527 ///
1492 * 1528 /// [maxComments] - Maximum number of comments to pull back on a post.
1493 * [maxComments] - Maximum number of comments to pull back on a post. 1529 ///
1494 * 1530 /// [view] - Access level with which to view the returned result. Note that
1495 * [view] - Access level with which to view the returned result. Note that 1531 /// some fields require elevated access.
1496 * some fields require elevated access. 1532 /// Possible string values are:
1497 * Possible string values are: 1533 /// - "ADMIN" : Admin level detail
1498 * - "ADMIN" : Admin level detail 1534 /// - "AUTHOR" : Author level detail
1499 * - "AUTHOR" : Author level detail 1535 /// - "READER" : Reader level detail
1500 * - "READER" : Reader level detail 1536 ///
1501 * 1537 /// Completes with a [Post].
1502 * Completes with a [Post]. 1538 ///
1503 * 1539 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1504 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1540 /// an error.
1505 * error. 1541 ///
1506 * 1542 /// If the used [http.Client] completes with an error when making a REST
1507 * If the used [http.Client] completes with an error when making a REST call, 1543 /// call, this method will complete with the same error.
1508 * this method will complete with the same error. 1544 async.Future<Post> getByPath(core.String blogId, core.String path,
1509 */ 1545 {core.int maxComments, core.String view}) {
1510 async.Future<Post> getByPath(core.String blogId, core.String path, {core.int m axComments, core.String view}) {
1511 var _url = null; 1546 var _url = null;
1512 var _queryParams = new core.Map(); 1547 var _queryParams = new core.Map();
1513 var _uploadMedia = null; 1548 var _uploadMedia = null;
1514 var _uploadOptions = null; 1549 var _uploadOptions = null;
1515 var _downloadOptions = commons.DownloadOptions.Metadata; 1550 var _downloadOptions = commons.DownloadOptions.Metadata;
1516 var _body = null; 1551 var _body = null;
1517 1552
1518 if (blogId == null) { 1553 if (blogId == null) {
1519 throw new core.ArgumentError("Parameter blogId is required."); 1554 throw new core.ArgumentError("Parameter blogId is required.");
1520 } 1555 }
1521 if (path == null) { 1556 if (path == null) {
1522 throw new core.ArgumentError("Parameter path is required."); 1557 throw new core.ArgumentError("Parameter path is required.");
1523 } 1558 }
1524 _queryParams["path"] = [path]; 1559 _queryParams["path"] = [path];
1525 if (maxComments != null) { 1560 if (maxComments != null) {
1526 _queryParams["maxComments"] = ["${maxComments}"]; 1561 _queryParams["maxComments"] = ["${maxComments}"];
1527 } 1562 }
1528 if (view != null) { 1563 if (view != null) {
1529 _queryParams["view"] = [view]; 1564 _queryParams["view"] = [view];
1530 } 1565 }
1531 1566
1532 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/bypath' ; 1567 _url =
1568 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/bypath';
1533 1569
1534 var _response = _requester.request(_url, 1570 var _response = _requester.request(_url, "GET",
1535 "GET", 1571 body: _body,
1536 body: _body, 1572 queryParams: _queryParams,
1537 queryParams: _queryParams, 1573 uploadOptions: _uploadOptions,
1538 uploadOptions: _uploadOptions, 1574 uploadMedia: _uploadMedia,
1539 uploadMedia: _uploadMedia, 1575 downloadOptions: _downloadOptions);
1540 downloadOptions: _downloadOptions);
1541 return _response.then((data) => new Post.fromJson(data)); 1576 return _response.then((data) => new Post.fromJson(data));
1542 } 1577 }
1543 1578
1544 /** 1579 /// Add a post.
1545 * Add a post. 1580 ///
1546 * 1581 /// [request] - The metadata request object.
1547 * [request] - The metadata request object. 1582 ///
1548 * 1583 /// Request parameters:
1549 * Request parameters: 1584 ///
1550 * 1585 /// [blogId] - ID of the blog to add the post to.
1551 * [blogId] - ID of the blog to add the post to. 1586 ///
1552 * 1587 /// [fetchBody] - Whether the body content of the post is included with the
1553 * [fetchBody] - Whether the body content of the post is included with the 1588 /// result (default: true).
1554 * result (default: true). 1589 ///
1555 * 1590 /// [fetchImages] - Whether image URL metadata for each post is included in
1556 * [fetchImages] - Whether image URL metadata for each post is included in the 1591 /// the returned result (default: false).
1557 * returned result (default: false). 1592 ///
1558 * 1593 /// [isDraft] - Whether to create the post as a draft (default: false).
1559 * [isDraft] - Whether to create the post as a draft (default: false). 1594 ///
1560 * 1595 /// Completes with a [Post].
1561 * Completes with a [Post]. 1596 ///
1562 * 1597 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1563 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1598 /// an error.
1564 * error. 1599 ///
1565 * 1600 /// If the used [http.Client] completes with an error when making a REST
1566 * If the used [http.Client] completes with an error when making a REST call, 1601 /// call, this method will complete with the same error.
1567 * this method will complete with the same error. 1602 async.Future<Post> insert(Post request, core.String blogId,
1568 */ 1603 {core.bool fetchBody, core.bool fetchImages, core.bool isDraft}) {
1569 async.Future<Post> insert(Post request, core.String blogId, {core.bool fetchBo dy, core.bool fetchImages, core.bool isDraft}) {
1570 var _url = null; 1604 var _url = null;
1571 var _queryParams = new core.Map(); 1605 var _queryParams = new core.Map();
1572 var _uploadMedia = null; 1606 var _uploadMedia = null;
1573 var _uploadOptions = null; 1607 var _uploadOptions = null;
1574 var _downloadOptions = commons.DownloadOptions.Metadata; 1608 var _downloadOptions = commons.DownloadOptions.Metadata;
1575 var _body = null; 1609 var _body = null;
1576 1610
1577 if (request != null) { 1611 if (request != null) {
1578 _body = convert.JSON.encode((request).toJson()); 1612 _body = convert.JSON.encode((request).toJson());
1579 } 1613 }
1580 if (blogId == null) { 1614 if (blogId == null) {
1581 throw new core.ArgumentError("Parameter blogId is required."); 1615 throw new core.ArgumentError("Parameter blogId is required.");
1582 } 1616 }
1583 if (fetchBody != null) { 1617 if (fetchBody != null) {
1584 _queryParams["fetchBody"] = ["${fetchBody}"]; 1618 _queryParams["fetchBody"] = ["${fetchBody}"];
1585 } 1619 }
1586 if (fetchImages != null) { 1620 if (fetchImages != null) {
1587 _queryParams["fetchImages"] = ["${fetchImages}"]; 1621 _queryParams["fetchImages"] = ["${fetchImages}"];
1588 } 1622 }
1589 if (isDraft != null) { 1623 if (isDraft != null) {
1590 _queryParams["isDraft"] = ["${isDraft}"]; 1624 _queryParams["isDraft"] = ["${isDraft}"];
1591 } 1625 }
1592 1626
1593 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts'; 1627 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts';
1594 1628
1595 var _response = _requester.request(_url, 1629 var _response = _requester.request(_url, "POST",
1596 "POST", 1630 body: _body,
1597 body: _body, 1631 queryParams: _queryParams,
1598 queryParams: _queryParams, 1632 uploadOptions: _uploadOptions,
1599 uploadOptions: _uploadOptions, 1633 uploadMedia: _uploadMedia,
1600 uploadMedia: _uploadMedia, 1634 downloadOptions: _downloadOptions);
1601 downloadOptions: _downloadOptions);
1602 return _response.then((data) => new Post.fromJson(data)); 1635 return _response.then((data) => new Post.fromJson(data));
1603 } 1636 }
1604 1637
1605 /** 1638 /// Retrieves a list of posts, possibly filtered.
1606 * Retrieves a list of posts, possibly filtered. 1639 ///
1607 * 1640 /// Request parameters:
1608 * Request parameters: 1641 ///
1609 * 1642 /// [blogId] - ID of the blog to fetch posts from.
1610 * [blogId] - ID of the blog to fetch posts from. 1643 ///
1611 * 1644 /// [endDate] - Latest post date to fetch, a date-time with RFC 3339
1612 * [endDate] - Latest post date to fetch, a date-time with RFC 3339 1645 /// formatting.
1613 * formatting. 1646 ///
1614 * 1647 /// [fetchBodies] - Whether the body content of posts is included (default:
1615 * [fetchBodies] - Whether the body content of posts is included (default: 1648 /// true). This should be set to false when the post bodies are not required,
1616 * true). This should be set to false when the post bodies are not required, 1649 /// to help minimize traffic.
1617 * to help minimize traffic. 1650 ///
1618 * 1651 /// [fetchImages] - Whether image URL metadata for each post is included.
1619 * [fetchImages] - Whether image URL metadata for each post is included. 1652 ///
1620 * 1653 /// [labels] - Comma-separated list of labels to search for.
1621 * [labels] - Comma-separated list of labels to search for. 1654 ///
1622 * 1655 /// [maxResults] - Maximum number of posts to fetch.
1623 * [maxResults] - Maximum number of posts to fetch. 1656 ///
1624 * 1657 /// [orderBy] - Sort search results
1625 * [orderBy] - Sort search results 1658 /// Possible string values are:
1626 * Possible string values are: 1659 /// - "published" : Order by the date the post was published
1627 * - "published" : Order by the date the post was published 1660 /// - "updated" : Order by the date the post was last updated
1628 * - "updated" : Order by the date the post was last updated 1661 ///
1629 * 1662 /// [pageToken] - Continuation token if the request is paged.
1630 * [pageToken] - Continuation token if the request is paged. 1663 ///
1631 * 1664 /// [startDate] - Earliest post date to fetch, a date-time with RFC 3339
1632 * [startDate] - Earliest post date to fetch, a date-time with RFC 3339 1665 /// formatting.
1633 * formatting. 1666 ///
1634 * 1667 /// [status] - Statuses to include in the results.
1635 * [status] - Statuses to include in the results. 1668 ///
1636 * 1669 /// [view] - Access level with which to view the returned result. Note that
1637 * [view] - Access level with which to view the returned result. Note that 1670 /// some fields require escalated access.
1638 * some fields require escalated access. 1671 /// Possible string values are:
1639 * Possible string values are: 1672 /// - "ADMIN" : Admin level detail
1640 * - "ADMIN" : Admin level detail 1673 /// - "AUTHOR" : Author level detail
1641 * - "AUTHOR" : Author level detail 1674 /// - "READER" : Reader level detail
1642 * - "READER" : Reader level detail 1675 ///
1643 * 1676 /// Completes with a [PostList].
1644 * Completes with a [PostList]. 1677 ///
1645 * 1678 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1679 /// an error.
1647 * error. 1680 ///
1648 * 1681 /// If the used [http.Client] completes with an error when making a REST
1649 * If the used [http.Client] completes with an error when making a REST call, 1682 /// call, this method will complete with the same error.
1650 * this method will complete with the same error. 1683 async.Future<PostList> list(core.String blogId,
1651 */ 1684 {core.DateTime endDate,
1652 async.Future<PostList> list(core.String blogId, {core.DateTime endDate, core.b ool fetchBodies, core.bool fetchImages, core.String labels, core.int maxResults, core.String orderBy, core.String pageToken, core.DateTime startDate, core.List< core.String> status, core.String view}) { 1685 core.bool fetchBodies,
1686 core.bool fetchImages,
1687 core.String labels,
1688 core.int maxResults,
1689 core.String orderBy,
1690 core.String pageToken,
1691 core.DateTime startDate,
1692 core.List<core.String> status,
1693 core.String view}) {
1653 var _url = null; 1694 var _url = null;
1654 var _queryParams = new core.Map(); 1695 var _queryParams = new core.Map();
1655 var _uploadMedia = null; 1696 var _uploadMedia = null;
1656 var _uploadOptions = null; 1697 var _uploadOptions = null;
1657 var _downloadOptions = commons.DownloadOptions.Metadata; 1698 var _downloadOptions = commons.DownloadOptions.Metadata;
1658 var _body = null; 1699 var _body = null;
1659 1700
1660 if (blogId == null) { 1701 if (blogId == null) {
1661 throw new core.ArgumentError("Parameter blogId is required."); 1702 throw new core.ArgumentError("Parameter blogId is required.");
1662 } 1703 }
(...skipping 23 matching lines...) Expand all
1686 } 1727 }
1687 if (status != null) { 1728 if (status != null) {
1688 _queryParams["status"] = status; 1729 _queryParams["status"] = status;
1689 } 1730 }
1690 if (view != null) { 1731 if (view != null) {
1691 _queryParams["view"] = [view]; 1732 _queryParams["view"] = [view];
1692 } 1733 }
1693 1734
1694 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts'; 1735 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts';
1695 1736
1696 var _response = _requester.request(_url, 1737 var _response = _requester.request(_url, "GET",
1697 "GET", 1738 body: _body,
1698 body: _body, 1739 queryParams: _queryParams,
1699 queryParams: _queryParams, 1740 uploadOptions: _uploadOptions,
1700 uploadOptions: _uploadOptions, 1741 uploadMedia: _uploadMedia,
1701 uploadMedia: _uploadMedia, 1742 downloadOptions: _downloadOptions);
1702 downloadOptions: _downloadOptions);
1703 return _response.then((data) => new PostList.fromJson(data)); 1743 return _response.then((data) => new PostList.fromJson(data));
1704 } 1744 }
1705 1745
1706 /** 1746 /// Update a post. This method supports patch semantics.
1707 * Update a post. This method supports patch semantics. 1747 ///
1708 * 1748 /// [request] - The metadata request object.
1709 * [request] - The metadata request object. 1749 ///
1710 * 1750 /// Request parameters:
1711 * Request parameters: 1751 ///
1712 * 1752 /// [blogId] - The ID of the Blog.
1713 * [blogId] - The ID of the Blog. 1753 ///
1714 * 1754 /// [postId] - The ID of the Post.
1715 * [postId] - The ID of the Post. 1755 ///
1716 * 1756 /// [fetchBody] - Whether the body content of the post is included with the
1717 * [fetchBody] - Whether the body content of the post is included with the 1757 /// result (default: true).
1718 * result (default: true). 1758 ///
1719 * 1759 /// [fetchImages] - Whether image URL metadata for each post is included in
1720 * [fetchImages] - Whether image URL metadata for each post is included in the 1760 /// the returned result (default: false).
1721 * returned result (default: false). 1761 ///
1722 * 1762 /// [maxComments] - Maximum number of comments to retrieve with the returned
1723 * [maxComments] - Maximum number of comments to retrieve with the returned 1763 /// post.
1724 * post. 1764 ///
1725 * 1765 /// [publish_1] - Whether a publish action should be performed when the post
1726 * [publish_1] - Whether a publish action should be performed when the post is 1766 /// is updated (default: false).
1727 * updated (default: false). 1767 ///
1728 * 1768 /// [revert_1] - Whether a revert action should be performed when the post is
1729 * [revert_1] - Whether a revert action should be performed when the post is 1769 /// updated (default: false).
1730 * updated (default: false). 1770 ///
1731 * 1771 /// Completes with a [Post].
1732 * Completes with a [Post]. 1772 ///
1733 * 1773 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1774 /// an error.
1735 * error. 1775 ///
1736 * 1776 /// If the used [http.Client] completes with an error when making a REST
1737 * If the used [http.Client] completes with an error when making a REST call, 1777 /// call, this method will complete with the same error.
1738 * this method will complete with the same error. 1778 async.Future<Post> patch(Post request, core.String blogId, core.String postId,
1739 */ 1779 {core.bool fetchBody,
1740 async.Future<Post> patch(Post request, core.String blogId, core.String postId, {core.bool fetchBody, core.bool fetchImages, core.int maxComments, core.bool pu blish_1, core.bool revert_1}) { 1780 core.bool fetchImages,
1781 core.int maxComments,
1782 core.bool publish_1,
1783 core.bool revert_1}) {
1741 var _url = null; 1784 var _url = null;
1742 var _queryParams = new core.Map(); 1785 var _queryParams = new core.Map();
1743 var _uploadMedia = null; 1786 var _uploadMedia = null;
1744 var _uploadOptions = null; 1787 var _uploadOptions = null;
1745 var _downloadOptions = commons.DownloadOptions.Metadata; 1788 var _downloadOptions = commons.DownloadOptions.Metadata;
1746 var _body = null; 1789 var _body = null;
1747 1790
1748 if (request != null) { 1791 if (request != null) {
1749 _body = convert.JSON.encode((request).toJson()); 1792 _body = convert.JSON.encode((request).toJson());
1750 } 1793 }
(...skipping 12 matching lines...) Expand all
1763 if (maxComments != null) { 1806 if (maxComments != null) {
1764 _queryParams["maxComments"] = ["${maxComments}"]; 1807 _queryParams["maxComments"] = ["${maxComments}"];
1765 } 1808 }
1766 if (publish_1 != null) { 1809 if (publish_1 != null) {
1767 _queryParams["publish"] = ["${publish_1}"]; 1810 _queryParams["publish"] = ["${publish_1}"];
1768 } 1811 }
1769 if (revert_1 != null) { 1812 if (revert_1 != null) {
1770 _queryParams["revert"] = ["${revert_1}"]; 1813 _queryParams["revert"] = ["${revert_1}"];
1771 } 1814 }
1772 1815
1773 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId'); 1816 _url = 'blogs/' +
1817 commons.Escaper.ecapeVariable('$blogId') +
1818 '/posts/' +
1819 commons.Escaper.ecapeVariable('$postId');
1774 1820
1775 var _response = _requester.request(_url, 1821 var _response = _requester.request(_url, "PATCH",
1776 "PATCH", 1822 body: _body,
1777 body: _body, 1823 queryParams: _queryParams,
1778 queryParams: _queryParams, 1824 uploadOptions: _uploadOptions,
1779 uploadOptions: _uploadOptions, 1825 uploadMedia: _uploadMedia,
1780 uploadMedia: _uploadMedia, 1826 downloadOptions: _downloadOptions);
1781 downloadOptions: _downloadOptions);
1782 return _response.then((data) => new Post.fromJson(data)); 1827 return _response.then((data) => new Post.fromJson(data));
1783 } 1828 }
1784 1829
1785 /** 1830 /// Publishes a draft post, optionally at the specific time of the given
1786 * Publishes a draft post, optionally at the specific time of the given 1831 /// publishDate parameter.
1787 * publishDate parameter. 1832 ///
1788 * 1833 /// Request parameters:
1789 * Request parameters: 1834 ///
1790 * 1835 /// [blogId] - The ID of the Blog.
1791 * [blogId] - The ID of the Blog. 1836 ///
1792 * 1837 /// [postId] - The ID of the Post.
1793 * [postId] - The ID of the Post. 1838 ///
1794 * 1839 /// [publishDate] - Optional date and time to schedule the publishing of the
1795 * [publishDate] - Optional date and time to schedule the publishing of the 1840 /// Blog. If no publishDate parameter is given, the post is either published
1796 * Blog. If no publishDate parameter is given, the post is either published at 1841 /// at the a previously saved schedule date (if present), or the current
1797 * the a previously saved schedule date (if present), or the current time. If 1842 /// time. If a future date is given, the post will be scheduled to be
1798 * a future date is given, the post will be scheduled to be published. 1843 /// published.
1799 * 1844 ///
1800 * Completes with a [Post]. 1845 /// Completes with a [Post].
1801 * 1846 ///
1802 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1847 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1803 * error. 1848 /// an error.
1804 * 1849 ///
1805 * If the used [http.Client] completes with an error when making a REST call, 1850 /// If the used [http.Client] completes with an error when making a REST
1806 * this method will complete with the same error. 1851 /// call, this method will complete with the same error.
1807 */ 1852 async.Future<Post> publish(core.String blogId, core.String postId,
1808 async.Future<Post> publish(core.String blogId, core.String postId, {core.DateT ime publishDate}) { 1853 {core.DateTime publishDate}) {
1809 var _url = null; 1854 var _url = null;
1810 var _queryParams = new core.Map(); 1855 var _queryParams = new core.Map();
1811 var _uploadMedia = null; 1856 var _uploadMedia = null;
1812 var _uploadOptions = null; 1857 var _uploadOptions = null;
1813 var _downloadOptions = commons.DownloadOptions.Metadata; 1858 var _downloadOptions = commons.DownloadOptions.Metadata;
1814 var _body = null; 1859 var _body = null;
1815 1860
1816 if (blogId == null) { 1861 if (blogId == null) {
1817 throw new core.ArgumentError("Parameter blogId is required."); 1862 throw new core.ArgumentError("Parameter blogId is required.");
1818 } 1863 }
1819 if (postId == null) { 1864 if (postId == null) {
1820 throw new core.ArgumentError("Parameter postId is required."); 1865 throw new core.ArgumentError("Parameter postId is required.");
1821 } 1866 }
1822 if (publishDate != null) { 1867 if (publishDate != null) {
1823 _queryParams["publishDate"] = [(publishDate).toIso8601String()]; 1868 _queryParams["publishDate"] = [(publishDate).toIso8601String()];
1824 } 1869 }
1825 1870
1826 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/publish'; 1871 _url = 'blogs/' +
1872 commons.Escaper.ecapeVariable('$blogId') +
1873 '/posts/' +
1874 commons.Escaper.ecapeVariable('$postId') +
1875 '/publish';
1827 1876
1828 var _response = _requester.request(_url, 1877 var _response = _requester.request(_url, "POST",
1829 "POST", 1878 body: _body,
1830 body: _body, 1879 queryParams: _queryParams,
1831 queryParams: _queryParams, 1880 uploadOptions: _uploadOptions,
1832 uploadOptions: _uploadOptions, 1881 uploadMedia: _uploadMedia,
1833 uploadMedia: _uploadMedia, 1882 downloadOptions: _downloadOptions);
1834 downloadOptions: _downloadOptions);
1835 return _response.then((data) => new Post.fromJson(data)); 1883 return _response.then((data) => new Post.fromJson(data));
1836 } 1884 }
1837 1885
1838 /** 1886 /// Revert a published or scheduled post to draft state.
1839 * Revert a published or scheduled post to draft state. 1887 ///
1840 * 1888 /// Request parameters:
1841 * Request parameters: 1889 ///
1842 * 1890 /// [blogId] - The ID of the Blog.
1843 * [blogId] - The ID of the Blog. 1891 ///
1844 * 1892 /// [postId] - The ID of the Post.
1845 * [postId] - The ID of the Post. 1893 ///
1846 * 1894 /// Completes with a [Post].
1847 * Completes with a [Post]. 1895 ///
1848 * 1896 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1849 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1897 /// an error.
1850 * error. 1898 ///
1851 * 1899 /// If the used [http.Client] completes with an error when making a REST
1852 * If the used [http.Client] completes with an error when making a REST call, 1900 /// call, this method will complete with the same error.
1853 * this method will complete with the same error.
1854 */
1855 async.Future<Post> revert(core.String blogId, core.String postId) { 1901 async.Future<Post> revert(core.String blogId, core.String postId) {
1856 var _url = null; 1902 var _url = null;
1857 var _queryParams = new core.Map(); 1903 var _queryParams = new core.Map();
1858 var _uploadMedia = null; 1904 var _uploadMedia = null;
1859 var _uploadOptions = null; 1905 var _uploadOptions = null;
1860 var _downloadOptions = commons.DownloadOptions.Metadata; 1906 var _downloadOptions = commons.DownloadOptions.Metadata;
1861 var _body = null; 1907 var _body = null;
1862 1908
1863 if (blogId == null) { 1909 if (blogId == null) {
1864 throw new core.ArgumentError("Parameter blogId is required."); 1910 throw new core.ArgumentError("Parameter blogId is required.");
1865 } 1911 }
1866 if (postId == null) { 1912 if (postId == null) {
1867 throw new core.ArgumentError("Parameter postId is required."); 1913 throw new core.ArgumentError("Parameter postId is required.");
1868 } 1914 }
1869 1915
1870 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId') + '/revert'; 1916 _url = 'blogs/' +
1917 commons.Escaper.ecapeVariable('$blogId') +
1918 '/posts/' +
1919 commons.Escaper.ecapeVariable('$postId') +
1920 '/revert';
1871 1921
1872 var _response = _requester.request(_url, 1922 var _response = _requester.request(_url, "POST",
1873 "POST", 1923 body: _body,
1874 body: _body, 1924 queryParams: _queryParams,
1875 queryParams: _queryParams, 1925 uploadOptions: _uploadOptions,
1876 uploadOptions: _uploadOptions, 1926 uploadMedia: _uploadMedia,
1877 uploadMedia: _uploadMedia, 1927 downloadOptions: _downloadOptions);
1878 downloadOptions: _downloadOptions);
1879 return _response.then((data) => new Post.fromJson(data)); 1928 return _response.then((data) => new Post.fromJson(data));
1880 } 1929 }
1881 1930
1882 /** 1931 /// Search for a post.
1883 * Search for a post. 1932 ///
1884 * 1933 /// Request parameters:
1885 * Request parameters: 1934 ///
1886 * 1935 /// [blogId] - ID of the blog to fetch the post from.
1887 * [blogId] - ID of the blog to fetch the post from. 1936 ///
1888 * 1937 /// [q] - Query terms to search this blog for matching posts.
1889 * [q] - Query terms to search this blog for matching posts. 1938 ///
1890 * 1939 /// [fetchBodies] - Whether the body content of posts is included (default:
1891 * [fetchBodies] - Whether the body content of posts is included (default: 1940 /// true). This should be set to false when the post bodies are not required,
1892 * true). This should be set to false when the post bodies are not required, 1941 /// to help minimize traffic.
1893 * to help minimize traffic. 1942 ///
1894 * 1943 /// [orderBy] - Sort search results
1895 * [orderBy] - Sort search results 1944 /// Possible string values are:
1896 * Possible string values are: 1945 /// - "published" : Order by the date the post was published
1897 * - "published" : Order by the date the post was published 1946 /// - "updated" : Order by the date the post was last updated
1898 * - "updated" : Order by the date the post was last updated 1947 ///
1899 * 1948 /// Completes with a [PostList].
1900 * Completes with a [PostList]. 1949 ///
1901 * 1950 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1902 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1951 /// an error.
1903 * error. 1952 ///
1904 * 1953 /// If the used [http.Client] completes with an error when making a REST
1905 * If the used [http.Client] completes with an error when making a REST call, 1954 /// call, this method will complete with the same error.
1906 * this method will complete with the same error. 1955 async.Future<PostList> search(core.String blogId, core.String q,
1907 */ 1956 {core.bool fetchBodies, core.String orderBy}) {
1908 async.Future<PostList> search(core.String blogId, core.String q, {core.bool fe tchBodies, core.String orderBy}) {
1909 var _url = null; 1957 var _url = null;
1910 var _queryParams = new core.Map(); 1958 var _queryParams = new core.Map();
1911 var _uploadMedia = null; 1959 var _uploadMedia = null;
1912 var _uploadOptions = null; 1960 var _uploadOptions = null;
1913 var _downloadOptions = commons.DownloadOptions.Metadata; 1961 var _downloadOptions = commons.DownloadOptions.Metadata;
1914 var _body = null; 1962 var _body = null;
1915 1963
1916 if (blogId == null) { 1964 if (blogId == null) {
1917 throw new core.ArgumentError("Parameter blogId is required."); 1965 throw new core.ArgumentError("Parameter blogId is required.");
1918 } 1966 }
1919 if (q == null) { 1967 if (q == null) {
1920 throw new core.ArgumentError("Parameter q is required."); 1968 throw new core.ArgumentError("Parameter q is required.");
1921 } 1969 }
1922 _queryParams["q"] = [q]; 1970 _queryParams["q"] = [q];
1923 if (fetchBodies != null) { 1971 if (fetchBodies != null) {
1924 _queryParams["fetchBodies"] = ["${fetchBodies}"]; 1972 _queryParams["fetchBodies"] = ["${fetchBodies}"];
1925 } 1973 }
1926 if (orderBy != null) { 1974 if (orderBy != null) {
1927 _queryParams["orderBy"] = [orderBy]; 1975 _queryParams["orderBy"] = [orderBy];
1928 } 1976 }
1929 1977
1930 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/search' ; 1978 _url =
1979 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/search';
1931 1980
1932 var _response = _requester.request(_url, 1981 var _response = _requester.request(_url, "GET",
1933 "GET", 1982 body: _body,
1934 body: _body, 1983 queryParams: _queryParams,
1935 queryParams: _queryParams, 1984 uploadOptions: _uploadOptions,
1936 uploadOptions: _uploadOptions, 1985 uploadMedia: _uploadMedia,
1937 uploadMedia: _uploadMedia, 1986 downloadOptions: _downloadOptions);
1938 downloadOptions: _downloadOptions);
1939 return _response.then((data) => new PostList.fromJson(data)); 1987 return _response.then((data) => new PostList.fromJson(data));
1940 } 1988 }
1941 1989
1942 /** 1990 /// Update a post.
1943 * Update a post. 1991 ///
1944 * 1992 /// [request] - The metadata request object.
1945 * [request] - The metadata request object. 1993 ///
1946 * 1994 /// Request parameters:
1947 * Request parameters: 1995 ///
1948 * 1996 /// [blogId] - The ID of the Blog.
1949 * [blogId] - The ID of the Blog. 1997 ///
1950 * 1998 /// [postId] - The ID of the Post.
1951 * [postId] - The ID of the Post. 1999 ///
1952 * 2000 /// [fetchBody] - Whether the body content of the post is included with the
1953 * [fetchBody] - Whether the body content of the post is included with the 2001 /// result (default: true).
1954 * result (default: true). 2002 ///
1955 * 2003 /// [fetchImages] - Whether image URL metadata for each post is included in
1956 * [fetchImages] - Whether image URL metadata for each post is included in the 2004 /// the returned result (default: false).
1957 * returned result (default: false). 2005 ///
1958 * 2006 /// [maxComments] - Maximum number of comments to retrieve with the returned
1959 * [maxComments] - Maximum number of comments to retrieve with the returned 2007 /// post.
1960 * post. 2008 ///
1961 * 2009 /// [publish_1] - Whether a publish action should be performed when the post
1962 * [publish_1] - Whether a publish action should be performed when the post is 2010 /// is updated (default: false).
1963 * updated (default: false). 2011 ///
1964 * 2012 /// [revert_1] - Whether a revert action should be performed when the post is
1965 * [revert_1] - Whether a revert action should be performed when the post is 2013 /// updated (default: false).
1966 * updated (default: false). 2014 ///
1967 * 2015 /// Completes with a [Post].
1968 * Completes with a [Post]. 2016 ///
1969 * 2017 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1970 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2018 /// an error.
1971 * error. 2019 ///
1972 * 2020 /// If the used [http.Client] completes with an error when making a REST
1973 * If the used [http.Client] completes with an error when making a REST call, 2021 /// call, this method will complete with the same error.
1974 * this method will complete with the same error. 2022 async.Future<Post> update(
1975 */ 2023 Post request, core.String blogId, core.String postId,
1976 async.Future<Post> update(Post request, core.String blogId, core.String postId , {core.bool fetchBody, core.bool fetchImages, core.int maxComments, core.bool p ublish_1, core.bool revert_1}) { 2024 {core.bool fetchBody,
2025 core.bool fetchImages,
2026 core.int maxComments,
2027 core.bool publish_1,
2028 core.bool revert_1}) {
1977 var _url = null; 2029 var _url = null;
1978 var _queryParams = new core.Map(); 2030 var _queryParams = new core.Map();
1979 var _uploadMedia = null; 2031 var _uploadMedia = null;
1980 var _uploadOptions = null; 2032 var _uploadOptions = null;
1981 var _downloadOptions = commons.DownloadOptions.Metadata; 2033 var _downloadOptions = commons.DownloadOptions.Metadata;
1982 var _body = null; 2034 var _body = null;
1983 2035
1984 if (request != null) { 2036 if (request != null) {
1985 _body = convert.JSON.encode((request).toJson()); 2037 _body = convert.JSON.encode((request).toJson());
1986 } 2038 }
(...skipping 12 matching lines...) Expand all
1999 if (maxComments != null) { 2051 if (maxComments != null) {
2000 _queryParams["maxComments"] = ["${maxComments}"]; 2052 _queryParams["maxComments"] = ["${maxComments}"];
2001 } 2053 }
2002 if (publish_1 != null) { 2054 if (publish_1 != null) {
2003 _queryParams["publish"] = ["${publish_1}"]; 2055 _queryParams["publish"] = ["${publish_1}"];
2004 } 2056 }
2005 if (revert_1 != null) { 2057 if (revert_1 != null) {
2006 _queryParams["revert"] = ["${revert_1}"]; 2058 _queryParams["revert"] = ["${revert_1}"];
2007 } 2059 }
2008 2060
2009 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com mons.Escaper.ecapeVariable('$postId'); 2061 _url = 'blogs/' +
2062 commons.Escaper.ecapeVariable('$blogId') +
2063 '/posts/' +
2064 commons.Escaper.ecapeVariable('$postId');
2010 2065
2011 var _response = _requester.request(_url, 2066 var _response = _requester.request(_url, "PUT",
2012 "PUT", 2067 body: _body,
2013 body: _body, 2068 queryParams: _queryParams,
2014 queryParams: _queryParams, 2069 uploadOptions: _uploadOptions,
2015 uploadOptions: _uploadOptions, 2070 uploadMedia: _uploadMedia,
2016 uploadMedia: _uploadMedia, 2071 downloadOptions: _downloadOptions);
2017 downloadOptions: _downloadOptions);
2018 return _response.then((data) => new Post.fromJson(data)); 2072 return _response.then((data) => new Post.fromJson(data));
2019 } 2073 }
2020
2021 } 2074 }
2022 2075
2023
2024 class UsersResourceApi { 2076 class UsersResourceApi {
2025 final commons.ApiRequester _requester; 2077 final commons.ApiRequester _requester;
2026 2078
2027 UsersResourceApi(commons.ApiRequester client) : 2079 UsersResourceApi(commons.ApiRequester client) : _requester = client;
2028 _requester = client;
2029 2080
2030 /** 2081 /// Gets one user by ID.
2031 * Gets one user by ID. 2082 ///
2032 * 2083 /// Request parameters:
2033 * Request parameters: 2084 ///
2034 * 2085 /// [userId] - The ID of the user to get.
2035 * [userId] - The ID of the user to get. 2086 ///
2036 * 2087 /// Completes with a [User].
2037 * Completes with a [User]. 2088 ///
2038 * 2089 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
2039 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2090 /// an error.
2040 * error. 2091 ///
2041 * 2092 /// If the used [http.Client] completes with an error when making a REST
2042 * If the used [http.Client] completes with an error when making a REST call, 2093 /// call, this method will complete with the same error.
2043 * this method will complete with the same error.
2044 */
2045 async.Future<User> get(core.String userId) { 2094 async.Future<User> get(core.String userId) {
2046 var _url = null; 2095 var _url = null;
2047 var _queryParams = new core.Map(); 2096 var _queryParams = new core.Map();
2048 var _uploadMedia = null; 2097 var _uploadMedia = null;
2049 var _uploadOptions = null; 2098 var _uploadOptions = null;
2050 var _downloadOptions = commons.DownloadOptions.Metadata; 2099 var _downloadOptions = commons.DownloadOptions.Metadata;
2051 var _body = null; 2100 var _body = null;
2052 2101
2053 if (userId == null) { 2102 if (userId == null) {
2054 throw new core.ArgumentError("Parameter userId is required."); 2103 throw new core.ArgumentError("Parameter userId is required.");
2055 } 2104 }
2056 2105
2057 _url = 'users/' + commons.Escaper.ecapeVariable('$userId'); 2106 _url = 'users/' + commons.Escaper.ecapeVariable('$userId');
2058 2107
2059 var _response = _requester.request(_url, 2108 var _response = _requester.request(_url, "GET",
2060 "GET", 2109 body: _body,
2061 body: _body, 2110 queryParams: _queryParams,
2062 queryParams: _queryParams, 2111 uploadOptions: _uploadOptions,
2063 uploadOptions: _uploadOptions, 2112 uploadMedia: _uploadMedia,
2064 uploadMedia: _uploadMedia, 2113 downloadOptions: _downloadOptions);
2065 downloadOptions: _downloadOptions);
2066 return _response.then((data) => new User.fromJson(data)); 2114 return _response.then((data) => new User.fromJson(data));
2067 } 2115 }
2068
2069 } 2116 }
2070 2117
2118 /// The locale this Blog is set to.
2119 class BlogLocale {
2120 /// The country this blog's locale is set to.
2121 core.String country;
2071 2122
2123 /// The language this blog is authored in.
2124 core.String language;
2072 2125
2073 /** The locale this Blog is set to. */ 2126 /// The language variant this blog is authored in.
2074 class BlogLocale {
2075 /** The country this blog's locale is set to. */
2076 core.String country;
2077 /** The language this blog is authored in. */
2078 core.String language;
2079 /** The language variant this blog is authored in. */
2080 core.String variant; 2127 core.String variant;
2081 2128
2082 BlogLocale(); 2129 BlogLocale();
2083 2130
2084 BlogLocale.fromJson(core.Map _json) { 2131 BlogLocale.fromJson(core.Map _json) {
2085 if (_json.containsKey("country")) { 2132 if (_json.containsKey("country")) {
2086 country = _json["country"]; 2133 country = _json["country"];
2087 } 2134 }
2088 if (_json.containsKey("language")) { 2135 if (_json.containsKey("language")) {
2089 language = _json["language"]; 2136 language = _json["language"];
2090 } 2137 }
2091 if (_json.containsKey("variant")) { 2138 if (_json.containsKey("variant")) {
2092 variant = _json["variant"]; 2139 variant = _json["variant"];
2093 } 2140 }
2094 } 2141 }
2095 2142
2096 core.Map<core.String, core.Object> toJson() { 2143 core.Map<core.String, core.Object> toJson() {
2097 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2144 final core.Map<core.String, core.Object> _json =
2145 new core.Map<core.String, core.Object>();
2098 if (country != null) { 2146 if (country != null) {
2099 _json["country"] = country; 2147 _json["country"] = country;
2100 } 2148 }
2101 if (language != null) { 2149 if (language != null) {
2102 _json["language"] = language; 2150 _json["language"] = language;
2103 } 2151 }
2104 if (variant != null) { 2152 if (variant != null) {
2105 _json["variant"] = variant; 2153 _json["variant"] = variant;
2106 } 2154 }
2107 return _json; 2155 return _json;
2108 } 2156 }
2109 } 2157 }
2110 2158
2111 /** The container of pages in this blog. */ 2159 /// The container of pages in this blog.
2112 class BlogPages { 2160 class BlogPages {
2113 /** The URL of the container for pages in this blog. */ 2161 /// The URL of the container for pages in this blog.
2114 core.String selfLink; 2162 core.String selfLink;
2115 /** The count of pages in this blog. */ 2163
2164 /// The count of pages in this blog.
2116 core.int totalItems; 2165 core.int totalItems;
2117 2166
2118 BlogPages(); 2167 BlogPages();
2119 2168
2120 BlogPages.fromJson(core.Map _json) { 2169 BlogPages.fromJson(core.Map _json) {
2121 if (_json.containsKey("selfLink")) { 2170 if (_json.containsKey("selfLink")) {
2122 selfLink = _json["selfLink"]; 2171 selfLink = _json["selfLink"];
2123 } 2172 }
2124 if (_json.containsKey("totalItems")) { 2173 if (_json.containsKey("totalItems")) {
2125 totalItems = _json["totalItems"]; 2174 totalItems = _json["totalItems"];
2126 } 2175 }
2127 } 2176 }
2128 2177
2129 core.Map<core.String, core.Object> toJson() { 2178 core.Map<core.String, core.Object> toJson() {
2130 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2179 final core.Map<core.String, core.Object> _json =
2180 new core.Map<core.String, core.Object>();
2131 if (selfLink != null) { 2181 if (selfLink != null) {
2132 _json["selfLink"] = selfLink; 2182 _json["selfLink"] = selfLink;
2133 } 2183 }
2134 if (totalItems != null) { 2184 if (totalItems != null) {
2135 _json["totalItems"] = totalItems; 2185 _json["totalItems"] = totalItems;
2136 } 2186 }
2137 return _json; 2187 return _json;
2138 } 2188 }
2139 } 2189 }
2140 2190
2141 /** The container of posts in this blog. */ 2191 /// The container of posts in this blog.
2142 class BlogPosts { 2192 class BlogPosts {
2143 /** The List of Posts for this Blog. */ 2193 /// The List of Posts for this Blog.
2144 core.List<Post> items; 2194 core.List<Post> items;
2145 /** The URL of the container for posts in this blog. */ 2195
2196 /// The URL of the container for posts in this blog.
2146 core.String selfLink; 2197 core.String selfLink;
2147 /** The count of posts in this blog. */ 2198
2199 /// The count of posts in this blog.
2148 core.int totalItems; 2200 core.int totalItems;
2149 2201
2150 BlogPosts(); 2202 BlogPosts();
2151 2203
2152 BlogPosts.fromJson(core.Map _json) { 2204 BlogPosts.fromJson(core.Map _json) {
2153 if (_json.containsKey("items")) { 2205 if (_json.containsKey("items")) {
2154 items = _json["items"].map((value) => new Post.fromJson(value)).toList(); 2206 items = _json["items"].map((value) => new Post.fromJson(value)).toList();
2155 } 2207 }
2156 if (_json.containsKey("selfLink")) { 2208 if (_json.containsKey("selfLink")) {
2157 selfLink = _json["selfLink"]; 2209 selfLink = _json["selfLink"];
2158 } 2210 }
2159 if (_json.containsKey("totalItems")) { 2211 if (_json.containsKey("totalItems")) {
2160 totalItems = _json["totalItems"]; 2212 totalItems = _json["totalItems"];
2161 } 2213 }
2162 } 2214 }
2163 2215
2164 core.Map<core.String, core.Object> toJson() { 2216 core.Map<core.String, core.Object> toJson() {
2165 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2217 final core.Map<core.String, core.Object> _json =
2218 new core.Map<core.String, core.Object>();
2166 if (items != null) { 2219 if (items != null) {
2167 _json["items"] = items.map((value) => (value).toJson()).toList(); 2220 _json["items"] = items.map((value) => (value).toJson()).toList();
2168 } 2221 }
2169 if (selfLink != null) { 2222 if (selfLink != null) {
2170 _json["selfLink"] = selfLink; 2223 _json["selfLink"] = selfLink;
2171 } 2224 }
2172 if (totalItems != null) { 2225 if (totalItems != null) {
2173 _json["totalItems"] = totalItems; 2226 _json["totalItems"] = totalItems;
2174 } 2227 }
2175 return _json; 2228 return _json;
2176 } 2229 }
2177 } 2230 }
2178 2231
2179 class Blog { 2232 class Blog {
2180 /** The JSON custom meta-data for the Blog */ 2233 /// The JSON custom meta-data for the Blog
2181 core.String customMetaData; 2234 core.String customMetaData;
2182 /** The description of this blog. This is displayed underneath the title. */ 2235
2236 /// The description of this blog. This is displayed underneath the title.
2183 core.String description; 2237 core.String description;
2184 /** The identifier for this resource. */ 2238
2239 /// The identifier for this resource.
2185 core.String id; 2240 core.String id;
2186 /** The kind of this entry. Always blogger#blog */ 2241
2242 /// The kind of this entry. Always blogger#blog
2187 core.String kind; 2243 core.String kind;
2188 /** The locale this Blog is set to. */ 2244
2245 /// The locale this Blog is set to.
2189 BlogLocale locale; 2246 BlogLocale locale;
2190 /** The name of this blog. This is displayed as the title. */ 2247
2248 /// The name of this blog. This is displayed as the title.
2191 core.String name; 2249 core.String name;
2192 /** The container of pages in this blog. */ 2250
2251 /// The container of pages in this blog.
2193 BlogPages pages; 2252 BlogPages pages;
2194 /** The container of posts in this blog. */ 2253
2254 /// The container of posts in this blog.
2195 BlogPosts posts; 2255 BlogPosts posts;
2196 /** RFC 3339 date-time when this blog was published. */ 2256
2257 /// RFC 3339 date-time when this blog was published.
2197 core.DateTime published; 2258 core.DateTime published;
2198 /** The API REST URL to fetch this resource from. */ 2259
2260 /// The API REST URL to fetch this resource from.
2199 core.String selfLink; 2261 core.String selfLink;
2200 /** The status of the blog. */ 2262
2263 /// The status of the blog.
2201 core.String status; 2264 core.String status;
2202 /** RFC 3339 date-time when this blog was last updated. */ 2265
2266 /// RFC 3339 date-time when this blog was last updated.
2203 core.DateTime updated; 2267 core.DateTime updated;
2204 /** The URL where this blog is published. */ 2268
2269 /// The URL where this blog is published.
2205 core.String url; 2270 core.String url;
2206 2271
2207 Blog(); 2272 Blog();
2208 2273
2209 Blog.fromJson(core.Map _json) { 2274 Blog.fromJson(core.Map _json) {
2210 if (_json.containsKey("customMetaData")) { 2275 if (_json.containsKey("customMetaData")) {
2211 customMetaData = _json["customMetaData"]; 2276 customMetaData = _json["customMetaData"];
2212 } 2277 }
2213 if (_json.containsKey("description")) { 2278 if (_json.containsKey("description")) {
2214 description = _json["description"]; 2279 description = _json["description"];
(...skipping 27 matching lines...) Expand all
2242 } 2307 }
2243 if (_json.containsKey("updated")) { 2308 if (_json.containsKey("updated")) {
2244 updated = core.DateTime.parse(_json["updated"]); 2309 updated = core.DateTime.parse(_json["updated"]);
2245 } 2310 }
2246 if (_json.containsKey("url")) { 2311 if (_json.containsKey("url")) {
2247 url = _json["url"]; 2312 url = _json["url"];
2248 } 2313 }
2249 } 2314 }
2250 2315
2251 core.Map<core.String, core.Object> toJson() { 2316 core.Map<core.String, core.Object> toJson() {
2252 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2317 final core.Map<core.String, core.Object> _json =
2318 new core.Map<core.String, core.Object>();
2253 if (customMetaData != null) { 2319 if (customMetaData != null) {
2254 _json["customMetaData"] = customMetaData; 2320 _json["customMetaData"] = customMetaData;
2255 } 2321 }
2256 if (description != null) { 2322 if (description != null) {
2257 _json["description"] = description; 2323 _json["description"] = description;
2258 } 2324 }
2259 if (id != null) { 2325 if (id != null) {
2260 _json["id"] = id; 2326 _json["id"] = id;
2261 } 2327 }
2262 if (kind != null) { 2328 if (kind != null) {
(...skipping 24 matching lines...) Expand all
2287 _json["updated"] = (updated).toIso8601String(); 2353 _json["updated"] = (updated).toIso8601String();
2288 } 2354 }
2289 if (url != null) { 2355 if (url != null) {
2290 _json["url"] = url; 2356 _json["url"] = url;
2291 } 2357 }
2292 return _json; 2358 return _json;
2293 } 2359 }
2294 } 2360 }
2295 2361
2296 class BlogList { 2362 class BlogList {
2297 /** Admin level list of blog per-user information */ 2363 /// Admin level list of blog per-user information
2298 core.List<BlogUserInfo> blogUserInfos; 2364 core.List<BlogUserInfo> blogUserInfos;
2299 /** The list of Blogs this user has Authorship or Admin rights over. */ 2365
2366 /// The list of Blogs this user has Authorship or Admin rights over.
2300 core.List<Blog> items; 2367 core.List<Blog> items;
2301 /** The kind of this entity. Always blogger#blogList */ 2368
2369 /// The kind of this entity. Always blogger#blogList
2302 core.String kind; 2370 core.String kind;
2303 2371
2304 BlogList(); 2372 BlogList();
2305 2373
2306 BlogList.fromJson(core.Map _json) { 2374 BlogList.fromJson(core.Map _json) {
2307 if (_json.containsKey("blogUserInfos")) { 2375 if (_json.containsKey("blogUserInfos")) {
2308 blogUserInfos = _json["blogUserInfos"].map((value) => new BlogUserInfo.fro mJson(value)).toList(); 2376 blogUserInfos = _json["blogUserInfos"]
2377 .map((value) => new BlogUserInfo.fromJson(value))
2378 .toList();
2309 } 2379 }
2310 if (_json.containsKey("items")) { 2380 if (_json.containsKey("items")) {
2311 items = _json["items"].map((value) => new Blog.fromJson(value)).toList(); 2381 items = _json["items"].map((value) => new Blog.fromJson(value)).toList();
2312 } 2382 }
2313 if (_json.containsKey("kind")) { 2383 if (_json.containsKey("kind")) {
2314 kind = _json["kind"]; 2384 kind = _json["kind"];
2315 } 2385 }
2316 } 2386 }
2317 2387
2318 core.Map<core.String, core.Object> toJson() { 2388 core.Map<core.String, core.Object> toJson() {
2319 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2389 final core.Map<core.String, core.Object> _json =
2390 new core.Map<core.String, core.Object>();
2320 if (blogUserInfos != null) { 2391 if (blogUserInfos != null) {
2321 _json["blogUserInfos"] = blogUserInfos.map((value) => (value).toJson()).to List(); 2392 _json["blogUserInfos"] =
2393 blogUserInfos.map((value) => (value).toJson()).toList();
2322 } 2394 }
2323 if (items != null) { 2395 if (items != null) {
2324 _json["items"] = items.map((value) => (value).toJson()).toList(); 2396 _json["items"] = items.map((value) => (value).toJson()).toList();
2325 } 2397 }
2326 if (kind != null) { 2398 if (kind != null) {
2327 _json["kind"] = kind; 2399 _json["kind"] = kind;
2328 } 2400 }
2329 return _json; 2401 return _json;
2330 } 2402 }
2331 } 2403 }
2332 2404
2333 class BlogPerUserInfo { 2405 class BlogPerUserInfo {
2334 /** ID of the Blog resource */ 2406 /// ID of the Blog resource
2335 core.String blogId; 2407 core.String blogId;
2336 /** True if the user has Admin level access to the blog. */ 2408
2409 /// True if the user has Admin level access to the blog.
2337 core.bool hasAdminAccess; 2410 core.bool hasAdminAccess;
2338 /** The kind of this entity. Always blogger#blogPerUserInfo */ 2411
2412 /// The kind of this entity. Always blogger#blogPerUserInfo
2339 core.String kind; 2413 core.String kind;
2340 /** The Photo Album Key for the user when adding photos to the blog */ 2414
2415 /// The Photo Album Key for the user when adding photos to the blog
2341 core.String photosAlbumKey; 2416 core.String photosAlbumKey;
2342 /** 2417
2343 * Access permissions that the user has for the blog (ADMIN, AUTHOR, or 2418 /// Access permissions that the user has for the blog (ADMIN, AUTHOR, or
2344 * READER). 2419 /// READER).
2345 */
2346 core.String role; 2420 core.String role;
2347 /** ID of the User */ 2421
2422 /// ID of the User
2348 core.String userId; 2423 core.String userId;
2349 2424
2350 BlogPerUserInfo(); 2425 BlogPerUserInfo();
2351 2426
2352 BlogPerUserInfo.fromJson(core.Map _json) { 2427 BlogPerUserInfo.fromJson(core.Map _json) {
2353 if (_json.containsKey("blogId")) { 2428 if (_json.containsKey("blogId")) {
2354 blogId = _json["blogId"]; 2429 blogId = _json["blogId"];
2355 } 2430 }
2356 if (_json.containsKey("hasAdminAccess")) { 2431 if (_json.containsKey("hasAdminAccess")) {
2357 hasAdminAccess = _json["hasAdminAccess"]; 2432 hasAdminAccess = _json["hasAdminAccess"];
2358 } 2433 }
2359 if (_json.containsKey("kind")) { 2434 if (_json.containsKey("kind")) {
2360 kind = _json["kind"]; 2435 kind = _json["kind"];
2361 } 2436 }
2362 if (_json.containsKey("photosAlbumKey")) { 2437 if (_json.containsKey("photosAlbumKey")) {
2363 photosAlbumKey = _json["photosAlbumKey"]; 2438 photosAlbumKey = _json["photosAlbumKey"];
2364 } 2439 }
2365 if (_json.containsKey("role")) { 2440 if (_json.containsKey("role")) {
2366 role = _json["role"]; 2441 role = _json["role"];
2367 } 2442 }
2368 if (_json.containsKey("userId")) { 2443 if (_json.containsKey("userId")) {
2369 userId = _json["userId"]; 2444 userId = _json["userId"];
2370 } 2445 }
2371 } 2446 }
2372 2447
2373 core.Map<core.String, core.Object> toJson() { 2448 core.Map<core.String, core.Object> toJson() {
2374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2449 final core.Map<core.String, core.Object> _json =
2450 new core.Map<core.String, core.Object>();
2375 if (blogId != null) { 2451 if (blogId != null) {
2376 _json["blogId"] = blogId; 2452 _json["blogId"] = blogId;
2377 } 2453 }
2378 if (hasAdminAccess != null) { 2454 if (hasAdminAccess != null) {
2379 _json["hasAdminAccess"] = hasAdminAccess; 2455 _json["hasAdminAccess"] = hasAdminAccess;
2380 } 2456 }
2381 if (kind != null) { 2457 if (kind != null) {
2382 _json["kind"] = kind; 2458 _json["kind"] = kind;
2383 } 2459 }
2384 if (photosAlbumKey != null) { 2460 if (photosAlbumKey != null) {
2385 _json["photosAlbumKey"] = photosAlbumKey; 2461 _json["photosAlbumKey"] = photosAlbumKey;
2386 } 2462 }
2387 if (role != null) { 2463 if (role != null) {
2388 _json["role"] = role; 2464 _json["role"] = role;
2389 } 2465 }
2390 if (userId != null) { 2466 if (userId != null) {
2391 _json["userId"] = userId; 2467 _json["userId"] = userId;
2392 } 2468 }
2393 return _json; 2469 return _json;
2394 } 2470 }
2395 } 2471 }
2396 2472
2397 class BlogUserInfo { 2473 class BlogUserInfo {
2398 /** The Blog resource. */ 2474 /// The Blog resource.
2399 Blog blog; 2475 Blog blog;
2400 /** Information about a User for the Blog. */ 2476
2477 /// Information about a User for the Blog.
2401 BlogPerUserInfo blogUserInfo; 2478 BlogPerUserInfo blogUserInfo;
2402 /** The kind of this entity. Always blogger#blogUserInfo */ 2479
2480 /// The kind of this entity. Always blogger#blogUserInfo
2403 core.String kind; 2481 core.String kind;
2404 2482
2405 BlogUserInfo(); 2483 BlogUserInfo();
2406 2484
2407 BlogUserInfo.fromJson(core.Map _json) { 2485 BlogUserInfo.fromJson(core.Map _json) {
2408 if (_json.containsKey("blog")) { 2486 if (_json.containsKey("blog")) {
2409 blog = new Blog.fromJson(_json["blog"]); 2487 blog = new Blog.fromJson(_json["blog"]);
2410 } 2488 }
2411 if (_json.containsKey("blog_user_info")) { 2489 if (_json.containsKey("blog_user_info")) {
2412 blogUserInfo = new BlogPerUserInfo.fromJson(_json["blog_user_info"]); 2490 blogUserInfo = new BlogPerUserInfo.fromJson(_json["blog_user_info"]);
2413 } 2491 }
2414 if (_json.containsKey("kind")) { 2492 if (_json.containsKey("kind")) {
2415 kind = _json["kind"]; 2493 kind = _json["kind"];
2416 } 2494 }
2417 } 2495 }
2418 2496
2419 core.Map<core.String, core.Object> toJson() { 2497 core.Map<core.String, core.Object> toJson() {
2420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2498 final core.Map<core.String, core.Object> _json =
2499 new core.Map<core.String, core.Object>();
2421 if (blog != null) { 2500 if (blog != null) {
2422 _json["blog"] = (blog).toJson(); 2501 _json["blog"] = (blog).toJson();
2423 } 2502 }
2424 if (blogUserInfo != null) { 2503 if (blogUserInfo != null) {
2425 _json["blog_user_info"] = (blogUserInfo).toJson(); 2504 _json["blog_user_info"] = (blogUserInfo).toJson();
2426 } 2505 }
2427 if (kind != null) { 2506 if (kind != null) {
2428 _json["kind"] = kind; 2507 _json["kind"] = kind;
2429 } 2508 }
2430 return _json; 2509 return _json;
2431 } 2510 }
2432 } 2511 }
2433 2512
2434 /** The comment creator's avatar. */ 2513 /// The comment creator's avatar.
2435 class CommentAuthorImage { 2514 class CommentAuthorImage {
2436 /** The comment creator's avatar URL. */ 2515 /// The comment creator's avatar URL.
2437 core.String url; 2516 core.String url;
2438 2517
2439 CommentAuthorImage(); 2518 CommentAuthorImage();
2440 2519
2441 CommentAuthorImage.fromJson(core.Map _json) { 2520 CommentAuthorImage.fromJson(core.Map _json) {
2442 if (_json.containsKey("url")) { 2521 if (_json.containsKey("url")) {
2443 url = _json["url"]; 2522 url = _json["url"];
2444 } 2523 }
2445 } 2524 }
2446 2525
2447 core.Map<core.String, core.Object> toJson() { 2526 core.Map<core.String, core.Object> toJson() {
2448 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2527 final core.Map<core.String, core.Object> _json =
2528 new core.Map<core.String, core.Object>();
2449 if (url != null) { 2529 if (url != null) {
2450 _json["url"] = url; 2530 _json["url"] = url;
2451 } 2531 }
2452 return _json; 2532 return _json;
2453 } 2533 }
2454 } 2534 }
2455 2535
2456 /** The author of this Comment. */ 2536 /// The author of this Comment.
2457 class CommentAuthor { 2537 class CommentAuthor {
2458 /** The display name. */ 2538 /// The display name.
2459 core.String displayName; 2539 core.String displayName;
2460 /** The identifier of the Comment creator. */ 2540
2541 /// The identifier of the Comment creator.
2461 core.String id; 2542 core.String id;
2462 /** The comment creator's avatar. */ 2543
2544 /// The comment creator's avatar.
2463 CommentAuthorImage image; 2545 CommentAuthorImage image;
2464 /** The URL of the Comment creator's Profile page. */ 2546
2547 /// The URL of the Comment creator's Profile page.
2465 core.String url; 2548 core.String url;
2466 2549
2467 CommentAuthor(); 2550 CommentAuthor();
2468 2551
2469 CommentAuthor.fromJson(core.Map _json) { 2552 CommentAuthor.fromJson(core.Map _json) {
2470 if (_json.containsKey("displayName")) { 2553 if (_json.containsKey("displayName")) {
2471 displayName = _json["displayName"]; 2554 displayName = _json["displayName"];
2472 } 2555 }
2473 if (_json.containsKey("id")) { 2556 if (_json.containsKey("id")) {
2474 id = _json["id"]; 2557 id = _json["id"];
2475 } 2558 }
2476 if (_json.containsKey("image")) { 2559 if (_json.containsKey("image")) {
2477 image = new CommentAuthorImage.fromJson(_json["image"]); 2560 image = new CommentAuthorImage.fromJson(_json["image"]);
2478 } 2561 }
2479 if (_json.containsKey("url")) { 2562 if (_json.containsKey("url")) {
2480 url = _json["url"]; 2563 url = _json["url"];
2481 } 2564 }
2482 } 2565 }
2483 2566
2484 core.Map<core.String, core.Object> toJson() { 2567 core.Map<core.String, core.Object> toJson() {
2485 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2568 final core.Map<core.String, core.Object> _json =
2569 new core.Map<core.String, core.Object>();
2486 if (displayName != null) { 2570 if (displayName != null) {
2487 _json["displayName"] = displayName; 2571 _json["displayName"] = displayName;
2488 } 2572 }
2489 if (id != null) { 2573 if (id != null) {
2490 _json["id"] = id; 2574 _json["id"] = id;
2491 } 2575 }
2492 if (image != null) { 2576 if (image != null) {
2493 _json["image"] = (image).toJson(); 2577 _json["image"] = (image).toJson();
2494 } 2578 }
2495 if (url != null) { 2579 if (url != null) {
2496 _json["url"] = url; 2580 _json["url"] = url;
2497 } 2581 }
2498 return _json; 2582 return _json;
2499 } 2583 }
2500 } 2584 }
2501 2585
2502 /** Data about the blog containing this comment. */ 2586 /// Data about the blog containing this comment.
2503 class CommentBlog { 2587 class CommentBlog {
2504 /** The identifier of the blog containing this comment. */ 2588 /// The identifier of the blog containing this comment.
2505 core.String id; 2589 core.String id;
2506 2590
2507 CommentBlog(); 2591 CommentBlog();
2508 2592
2509 CommentBlog.fromJson(core.Map _json) { 2593 CommentBlog.fromJson(core.Map _json) {
2510 if (_json.containsKey("id")) { 2594 if (_json.containsKey("id")) {
2511 id = _json["id"]; 2595 id = _json["id"];
2512 } 2596 }
2513 } 2597 }
2514 2598
2515 core.Map<core.String, core.Object> toJson() { 2599 core.Map<core.String, core.Object> toJson() {
2516 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2600 final core.Map<core.String, core.Object> _json =
2601 new core.Map<core.String, core.Object>();
2517 if (id != null) { 2602 if (id != null) {
2518 _json["id"] = id; 2603 _json["id"] = id;
2519 } 2604 }
2520 return _json; 2605 return _json;
2521 } 2606 }
2522 } 2607 }
2523 2608
2524 /** Data about the comment this is in reply to. */ 2609 /// Data about the comment this is in reply to.
2525 class CommentInReplyTo { 2610 class CommentInReplyTo {
2526 /** The identified of the parent of this comment. */ 2611 /// The identified of the parent of this comment.
2527 core.String id; 2612 core.String id;
2528 2613
2529 CommentInReplyTo(); 2614 CommentInReplyTo();
2530 2615
2531 CommentInReplyTo.fromJson(core.Map _json) { 2616 CommentInReplyTo.fromJson(core.Map _json) {
2532 if (_json.containsKey("id")) { 2617 if (_json.containsKey("id")) {
2533 id = _json["id"]; 2618 id = _json["id"];
2534 } 2619 }
2535 } 2620 }
2536 2621
2537 core.Map<core.String, core.Object> toJson() { 2622 core.Map<core.String, core.Object> toJson() {
2538 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2623 final core.Map<core.String, core.Object> _json =
2624 new core.Map<core.String, core.Object>();
2539 if (id != null) { 2625 if (id != null) {
2540 _json["id"] = id; 2626 _json["id"] = id;
2541 } 2627 }
2542 return _json; 2628 return _json;
2543 } 2629 }
2544 } 2630 }
2545 2631
2546 /** Data about the post containing this comment. */ 2632 /// Data about the post containing this comment.
2547 class CommentPost { 2633 class CommentPost {
2548 /** The identifier of the post containing this comment. */ 2634 /// The identifier of the post containing this comment.
2549 core.String id; 2635 core.String id;
2550 2636
2551 CommentPost(); 2637 CommentPost();
2552 2638
2553 CommentPost.fromJson(core.Map _json) { 2639 CommentPost.fromJson(core.Map _json) {
2554 if (_json.containsKey("id")) { 2640 if (_json.containsKey("id")) {
2555 id = _json["id"]; 2641 id = _json["id"];
2556 } 2642 }
2557 } 2643 }
2558 2644
2559 core.Map<core.String, core.Object> toJson() { 2645 core.Map<core.String, core.Object> toJson() {
2560 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2646 final core.Map<core.String, core.Object> _json =
2647 new core.Map<core.String, core.Object>();
2561 if (id != null) { 2648 if (id != null) {
2562 _json["id"] = id; 2649 _json["id"] = id;
2563 } 2650 }
2564 return _json; 2651 return _json;
2565 } 2652 }
2566 } 2653 }
2567 2654
2568 class Comment { 2655 class Comment {
2569 /** The author of this Comment. */ 2656 /// The author of this Comment.
2570 CommentAuthor author; 2657 CommentAuthor author;
2571 /** Data about the blog containing this comment. */ 2658
2659 /// Data about the blog containing this comment.
2572 CommentBlog blog; 2660 CommentBlog blog;
2573 /** The actual content of the comment. May include HTML markup. */ 2661
2662 /// The actual content of the comment. May include HTML markup.
2574 core.String content; 2663 core.String content;
2575 /** The identifier for this resource. */ 2664
2665 /// The identifier for this resource.
2576 core.String id; 2666 core.String id;
2577 /** Data about the comment this is in reply to. */ 2667
2668 /// Data about the comment this is in reply to.
2578 CommentInReplyTo inReplyTo; 2669 CommentInReplyTo inReplyTo;
2579 /** The kind of this entry. Always blogger#comment */ 2670
2671 /// The kind of this entry. Always blogger#comment
2580 core.String kind; 2672 core.String kind;
2581 /** Data about the post containing this comment. */ 2673
2674 /// Data about the post containing this comment.
2582 CommentPost post; 2675 CommentPost post;
2583 /** RFC 3339 date-time when this comment was published. */ 2676
2677 /// RFC 3339 date-time when this comment was published.
2584 core.DateTime published; 2678 core.DateTime published;
2585 /** The API REST URL to fetch this resource from. */ 2679
2680 /// The API REST URL to fetch this resource from.
2586 core.String selfLink; 2681 core.String selfLink;
2587 /** The status of the comment (only populated for admin users) */ 2682
2683 /// The status of the comment (only populated for admin users)
2588 core.String status; 2684 core.String status;
2589 /** RFC 3339 date-time when this comment was last updated. */ 2685
2686 /// RFC 3339 date-time when this comment was last updated.
2590 core.DateTime updated; 2687 core.DateTime updated;
2591 2688
2592 Comment(); 2689 Comment();
2593 2690
2594 Comment.fromJson(core.Map _json) { 2691 Comment.fromJson(core.Map _json) {
2595 if (_json.containsKey("author")) { 2692 if (_json.containsKey("author")) {
2596 author = new CommentAuthor.fromJson(_json["author"]); 2693 author = new CommentAuthor.fromJson(_json["author"]);
2597 } 2694 }
2598 if (_json.containsKey("blog")) { 2695 if (_json.containsKey("blog")) {
2599 blog = new CommentBlog.fromJson(_json["blog"]); 2696 blog = new CommentBlog.fromJson(_json["blog"]);
(...skipping 21 matching lines...) Expand all
2621 } 2718 }
2622 if (_json.containsKey("status")) { 2719 if (_json.containsKey("status")) {
2623 status = _json["status"]; 2720 status = _json["status"];
2624 } 2721 }
2625 if (_json.containsKey("updated")) { 2722 if (_json.containsKey("updated")) {
2626 updated = core.DateTime.parse(_json["updated"]); 2723 updated = core.DateTime.parse(_json["updated"]);
2627 } 2724 }
2628 } 2725 }
2629 2726
2630 core.Map<core.String, core.Object> toJson() { 2727 core.Map<core.String, core.Object> toJson() {
2631 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2728 final core.Map<core.String, core.Object> _json =
2729 new core.Map<core.String, core.Object>();
2632 if (author != null) { 2730 if (author != null) {
2633 _json["author"] = (author).toJson(); 2731 _json["author"] = (author).toJson();
2634 } 2732 }
2635 if (blog != null) { 2733 if (blog != null) {
2636 _json["blog"] = (blog).toJson(); 2734 _json["blog"] = (blog).toJson();
2637 } 2735 }
2638 if (content != null) { 2736 if (content != null) {
2639 _json["content"] = content; 2737 _json["content"] = content;
2640 } 2738 }
2641 if (id != null) { 2739 if (id != null) {
(...skipping 18 matching lines...) Expand all
2660 _json["status"] = status; 2758 _json["status"] = status;
2661 } 2759 }
2662 if (updated != null) { 2760 if (updated != null) {
2663 _json["updated"] = (updated).toIso8601String(); 2761 _json["updated"] = (updated).toIso8601String();
2664 } 2762 }
2665 return _json; 2763 return _json;
2666 } 2764 }
2667 } 2765 }
2668 2766
2669 class CommentList { 2767 class CommentList {
2670 /** Etag of the response. */ 2768 /// Etag of the response.
2671 core.String etag; 2769 core.String etag;
2672 /** The List of Comments for a Post. */ 2770
2771 /// The List of Comments for a Post.
2673 core.List<Comment> items; 2772 core.List<Comment> items;
2674 /** The kind of this entry. Always blogger#commentList */ 2773
2774 /// The kind of this entry. Always blogger#commentList
2675 core.String kind; 2775 core.String kind;
2676 /** Pagination token to fetch the next page, if one exists. */ 2776
2777 /// Pagination token to fetch the next page, if one exists.
2677 core.String nextPageToken; 2778 core.String nextPageToken;
2678 /** Pagination token to fetch the previous page, if one exists. */ 2779
2780 /// Pagination token to fetch the previous page, if one exists.
2679 core.String prevPageToken; 2781 core.String prevPageToken;
2680 2782
2681 CommentList(); 2783 CommentList();
2682 2784
2683 CommentList.fromJson(core.Map _json) { 2785 CommentList.fromJson(core.Map _json) {
2684 if (_json.containsKey("etag")) { 2786 if (_json.containsKey("etag")) {
2685 etag = _json["etag"]; 2787 etag = _json["etag"];
2686 } 2788 }
2687 if (_json.containsKey("items")) { 2789 if (_json.containsKey("items")) {
2688 items = _json["items"].map((value) => new Comment.fromJson(value)).toList( ); 2790 items =
2791 _json["items"].map((value) => new Comment.fromJson(value)).toList();
2689 } 2792 }
2690 if (_json.containsKey("kind")) { 2793 if (_json.containsKey("kind")) {
2691 kind = _json["kind"]; 2794 kind = _json["kind"];
2692 } 2795 }
2693 if (_json.containsKey("nextPageToken")) { 2796 if (_json.containsKey("nextPageToken")) {
2694 nextPageToken = _json["nextPageToken"]; 2797 nextPageToken = _json["nextPageToken"];
2695 } 2798 }
2696 if (_json.containsKey("prevPageToken")) { 2799 if (_json.containsKey("prevPageToken")) {
2697 prevPageToken = _json["prevPageToken"]; 2800 prevPageToken = _json["prevPageToken"];
2698 } 2801 }
2699 } 2802 }
2700 2803
2701 core.Map<core.String, core.Object> toJson() { 2804 core.Map<core.String, core.Object> toJson() {
2702 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2805 final core.Map<core.String, core.Object> _json =
2806 new core.Map<core.String, core.Object>();
2703 if (etag != null) { 2807 if (etag != null) {
2704 _json["etag"] = etag; 2808 _json["etag"] = etag;
2705 } 2809 }
2706 if (items != null) { 2810 if (items != null) {
2707 _json["items"] = items.map((value) => (value).toJson()).toList(); 2811 _json["items"] = items.map((value) => (value).toJson()).toList();
2708 } 2812 }
2709 if (kind != null) { 2813 if (kind != null) {
2710 _json["kind"] = kind; 2814 _json["kind"] = kind;
2711 } 2815 }
2712 if (nextPageToken != null) { 2816 if (nextPageToken != null) {
2713 _json["nextPageToken"] = nextPageToken; 2817 _json["nextPageToken"] = nextPageToken;
2714 } 2818 }
2715 if (prevPageToken != null) { 2819 if (prevPageToken != null) {
2716 _json["prevPageToken"] = prevPageToken; 2820 _json["prevPageToken"] = prevPageToken;
2717 } 2821 }
2718 return _json; 2822 return _json;
2719 } 2823 }
2720 } 2824 }
2721 2825
2722 /** The page author's avatar. */ 2826 /// The page author's avatar.
2723 class PageAuthorImage { 2827 class PageAuthorImage {
2724 /** The page author's avatar URL. */ 2828 /// The page author's avatar URL.
2725 core.String url; 2829 core.String url;
2726 2830
2727 PageAuthorImage(); 2831 PageAuthorImage();
2728 2832
2729 PageAuthorImage.fromJson(core.Map _json) { 2833 PageAuthorImage.fromJson(core.Map _json) {
2730 if (_json.containsKey("url")) { 2834 if (_json.containsKey("url")) {
2731 url = _json["url"]; 2835 url = _json["url"];
2732 } 2836 }
2733 } 2837 }
2734 2838
2735 core.Map<core.String, core.Object> toJson() { 2839 core.Map<core.String, core.Object> toJson() {
2736 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2840 final core.Map<core.String, core.Object> _json =
2841 new core.Map<core.String, core.Object>();
2737 if (url != null) { 2842 if (url != null) {
2738 _json["url"] = url; 2843 _json["url"] = url;
2739 } 2844 }
2740 return _json; 2845 return _json;
2741 } 2846 }
2742 } 2847 }
2743 2848
2744 /** The author of this Page. */ 2849 /// The author of this Page.
2745 class PageAuthor { 2850 class PageAuthor {
2746 /** The display name. */ 2851 /// The display name.
2747 core.String displayName; 2852 core.String displayName;
2748 /** The identifier of the Page creator. */ 2853
2854 /// The identifier of the Page creator.
2749 core.String id; 2855 core.String id;
2750 /** The page author's avatar. */ 2856
2857 /// The page author's avatar.
2751 PageAuthorImage image; 2858 PageAuthorImage image;
2752 /** The URL of the Page creator's Profile page. */ 2859
2860 /// The URL of the Page creator's Profile page.
2753 core.String url; 2861 core.String url;
2754 2862
2755 PageAuthor(); 2863 PageAuthor();
2756 2864
2757 PageAuthor.fromJson(core.Map _json) { 2865 PageAuthor.fromJson(core.Map _json) {
2758 if (_json.containsKey("displayName")) { 2866 if (_json.containsKey("displayName")) {
2759 displayName = _json["displayName"]; 2867 displayName = _json["displayName"];
2760 } 2868 }
2761 if (_json.containsKey("id")) { 2869 if (_json.containsKey("id")) {
2762 id = _json["id"]; 2870 id = _json["id"];
2763 } 2871 }
2764 if (_json.containsKey("image")) { 2872 if (_json.containsKey("image")) {
2765 image = new PageAuthorImage.fromJson(_json["image"]); 2873 image = new PageAuthorImage.fromJson(_json["image"]);
2766 } 2874 }
2767 if (_json.containsKey("url")) { 2875 if (_json.containsKey("url")) {
2768 url = _json["url"]; 2876 url = _json["url"];
2769 } 2877 }
2770 } 2878 }
2771 2879
2772 core.Map<core.String, core.Object> toJson() { 2880 core.Map<core.String, core.Object> toJson() {
2773 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2881 final core.Map<core.String, core.Object> _json =
2882 new core.Map<core.String, core.Object>();
2774 if (displayName != null) { 2883 if (displayName != null) {
2775 _json["displayName"] = displayName; 2884 _json["displayName"] = displayName;
2776 } 2885 }
2777 if (id != null) { 2886 if (id != null) {
2778 _json["id"] = id; 2887 _json["id"] = id;
2779 } 2888 }
2780 if (image != null) { 2889 if (image != null) {
2781 _json["image"] = (image).toJson(); 2890 _json["image"] = (image).toJson();
2782 } 2891 }
2783 if (url != null) { 2892 if (url != null) {
2784 _json["url"] = url; 2893 _json["url"] = url;
2785 } 2894 }
2786 return _json; 2895 return _json;
2787 } 2896 }
2788 } 2897 }
2789 2898
2790 /** Data about the blog containing this Page. */ 2899 /// Data about the blog containing this Page.
2791 class PageBlog { 2900 class PageBlog {
2792 /** The identifier of the blog containing this page. */ 2901 /// The identifier of the blog containing this page.
2793 core.String id; 2902 core.String id;
2794 2903
2795 PageBlog(); 2904 PageBlog();
2796 2905
2797 PageBlog.fromJson(core.Map _json) { 2906 PageBlog.fromJson(core.Map _json) {
2798 if (_json.containsKey("id")) { 2907 if (_json.containsKey("id")) {
2799 id = _json["id"]; 2908 id = _json["id"];
2800 } 2909 }
2801 } 2910 }
2802 2911
2803 core.Map<core.String, core.Object> toJson() { 2912 core.Map<core.String, core.Object> toJson() {
2804 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2913 final core.Map<core.String, core.Object> _json =
2914 new core.Map<core.String, core.Object>();
2805 if (id != null) { 2915 if (id != null) {
2806 _json["id"] = id; 2916 _json["id"] = id;
2807 } 2917 }
2808 return _json; 2918 return _json;
2809 } 2919 }
2810 } 2920 }
2811 2921
2812 class Page { 2922 class Page {
2813 /** The author of this Page. */ 2923 /// The author of this Page.
2814 PageAuthor author; 2924 PageAuthor author;
2815 /** Data about the blog containing this Page. */ 2925
2926 /// Data about the blog containing this Page.
2816 PageBlog blog; 2927 PageBlog blog;
2817 /** The body content of this Page, in HTML. */ 2928
2929 /// The body content of this Page, in HTML.
2818 core.String content; 2930 core.String content;
2819 /** Etag of the resource. */ 2931
2932 /// Etag of the resource.
2820 core.String etag; 2933 core.String etag;
2821 /** The identifier for this resource. */ 2934
2935 /// The identifier for this resource.
2822 core.String id; 2936 core.String id;
2823 /** The kind of this entity. Always blogger#page */ 2937
2938 /// The kind of this entity. Always blogger#page
2824 core.String kind; 2939 core.String kind;
2825 /** RFC 3339 date-time when this Page was published. */ 2940
2941 /// RFC 3339 date-time when this Page was published.
2826 core.DateTime published; 2942 core.DateTime published;
2827 /** The API REST URL to fetch this resource from. */ 2943
2944 /// The API REST URL to fetch this resource from.
2828 core.String selfLink; 2945 core.String selfLink;
2829 /** The status of the page for admin resources (either LIVE or DRAFT). */ 2946
2947 /// The status of the page for admin resources (either LIVE or DRAFT).
2830 core.String status; 2948 core.String status;
2831 /** 2949
2832 * The title of this entity. This is the name displayed in the Admin user 2950 /// The title of this entity. This is the name displayed in the Admin user
2833 * interface. 2951 /// interface.
2834 */
2835 core.String title; 2952 core.String title;
2836 /** RFC 3339 date-time when this Page was last updated. */ 2953
2954 /// RFC 3339 date-time when this Page was last updated.
2837 core.DateTime updated; 2955 core.DateTime updated;
2838 /** The URL that this Page is displayed at. */ 2956
2957 /// The URL that this Page is displayed at.
2839 core.String url; 2958 core.String url;
2840 2959
2841 Page(); 2960 Page();
2842 2961
2843 Page.fromJson(core.Map _json) { 2962 Page.fromJson(core.Map _json) {
2844 if (_json.containsKey("author")) { 2963 if (_json.containsKey("author")) {
2845 author = new PageAuthor.fromJson(_json["author"]); 2964 author = new PageAuthor.fromJson(_json["author"]);
2846 } 2965 }
2847 if (_json.containsKey("blog")) { 2966 if (_json.containsKey("blog")) {
2848 blog = new PageBlog.fromJson(_json["blog"]); 2967 blog = new PageBlog.fromJson(_json["blog"]);
(...skipping 24 matching lines...) Expand all
2873 } 2992 }
2874 if (_json.containsKey("updated")) { 2993 if (_json.containsKey("updated")) {
2875 updated = core.DateTime.parse(_json["updated"]); 2994 updated = core.DateTime.parse(_json["updated"]);
2876 } 2995 }
2877 if (_json.containsKey("url")) { 2996 if (_json.containsKey("url")) {
2878 url = _json["url"]; 2997 url = _json["url"];
2879 } 2998 }
2880 } 2999 }
2881 3000
2882 core.Map<core.String, core.Object> toJson() { 3001 core.Map<core.String, core.Object> toJson() {
2883 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3002 final core.Map<core.String, core.Object> _json =
3003 new core.Map<core.String, core.Object>();
2884 if (author != null) { 3004 if (author != null) {
2885 _json["author"] = (author).toJson(); 3005 _json["author"] = (author).toJson();
2886 } 3006 }
2887 if (blog != null) { 3007 if (blog != null) {
2888 _json["blog"] = (blog).toJson(); 3008 _json["blog"] = (blog).toJson();
2889 } 3009 }
2890 if (content != null) { 3010 if (content != null) {
2891 _json["content"] = content; 3011 _json["content"] = content;
2892 } 3012 }
2893 if (etag != null) { 3013 if (etag != null) {
(...skipping 21 matching lines...) Expand all
2915 _json["updated"] = (updated).toIso8601String(); 3035 _json["updated"] = (updated).toIso8601String();
2916 } 3036 }
2917 if (url != null) { 3037 if (url != null) {
2918 _json["url"] = url; 3038 _json["url"] = url;
2919 } 3039 }
2920 return _json; 3040 return _json;
2921 } 3041 }
2922 } 3042 }
2923 3043
2924 class PageList { 3044 class PageList {
2925 /** Etag of the response. */ 3045 /// Etag of the response.
2926 core.String etag; 3046 core.String etag;
2927 /** The list of Pages for a Blog. */ 3047
3048 /// The list of Pages for a Blog.
2928 core.List<Page> items; 3049 core.List<Page> items;
2929 /** The kind of this entity. Always blogger#pageList */ 3050
3051 /// The kind of this entity. Always blogger#pageList
2930 core.String kind; 3052 core.String kind;
2931 /** Pagination token to fetch the next page, if one exists. */ 3053
3054 /// Pagination token to fetch the next page, if one exists.
2932 core.String nextPageToken; 3055 core.String nextPageToken;
2933 3056
2934 PageList(); 3057 PageList();
2935 3058
2936 PageList.fromJson(core.Map _json) { 3059 PageList.fromJson(core.Map _json) {
2937 if (_json.containsKey("etag")) { 3060 if (_json.containsKey("etag")) {
2938 etag = _json["etag"]; 3061 etag = _json["etag"];
2939 } 3062 }
2940 if (_json.containsKey("items")) { 3063 if (_json.containsKey("items")) {
2941 items = _json["items"].map((value) => new Page.fromJson(value)).toList(); 3064 items = _json["items"].map((value) => new Page.fromJson(value)).toList();
2942 } 3065 }
2943 if (_json.containsKey("kind")) { 3066 if (_json.containsKey("kind")) {
2944 kind = _json["kind"]; 3067 kind = _json["kind"];
2945 } 3068 }
2946 if (_json.containsKey("nextPageToken")) { 3069 if (_json.containsKey("nextPageToken")) {
2947 nextPageToken = _json["nextPageToken"]; 3070 nextPageToken = _json["nextPageToken"];
2948 } 3071 }
2949 } 3072 }
2950 3073
2951 core.Map<core.String, core.Object> toJson() { 3074 core.Map<core.String, core.Object> toJson() {
2952 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3075 final core.Map<core.String, core.Object> _json =
3076 new core.Map<core.String, core.Object>();
2953 if (etag != null) { 3077 if (etag != null) {
2954 _json["etag"] = etag; 3078 _json["etag"] = etag;
2955 } 3079 }
2956 if (items != null) { 3080 if (items != null) {
2957 _json["items"] = items.map((value) => (value).toJson()).toList(); 3081 _json["items"] = items.map((value) => (value).toJson()).toList();
2958 } 3082 }
2959 if (kind != null) { 3083 if (kind != null) {
2960 _json["kind"] = kind; 3084 _json["kind"] = kind;
2961 } 3085 }
2962 if (nextPageToken != null) { 3086 if (nextPageToken != null) {
2963 _json["nextPageToken"] = nextPageToken; 3087 _json["nextPageToken"] = nextPageToken;
2964 } 3088 }
2965 return _json; 3089 return _json;
2966 } 3090 }
2967 } 3091 }
2968 3092
2969 class PageviewsCounts { 3093 class PageviewsCounts {
2970 /** Count of page views for the given time range */ 3094 /// Count of page views for the given time range
2971 core.String count; 3095 core.String count;
2972 /** Time range the given count applies to */ 3096
3097 /// Time range the given count applies to
2973 core.String timeRange; 3098 core.String timeRange;
2974 3099
2975 PageviewsCounts(); 3100 PageviewsCounts();
2976 3101
2977 PageviewsCounts.fromJson(core.Map _json) { 3102 PageviewsCounts.fromJson(core.Map _json) {
2978 if (_json.containsKey("count")) { 3103 if (_json.containsKey("count")) {
2979 count = _json["count"]; 3104 count = _json["count"];
2980 } 3105 }
2981 if (_json.containsKey("timeRange")) { 3106 if (_json.containsKey("timeRange")) {
2982 timeRange = _json["timeRange"]; 3107 timeRange = _json["timeRange"];
2983 } 3108 }
2984 } 3109 }
2985 3110
2986 core.Map<core.String, core.Object> toJson() { 3111 core.Map<core.String, core.Object> toJson() {
2987 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3112 final core.Map<core.String, core.Object> _json =
3113 new core.Map<core.String, core.Object>();
2988 if (count != null) { 3114 if (count != null) {
2989 _json["count"] = count; 3115 _json["count"] = count;
2990 } 3116 }
2991 if (timeRange != null) { 3117 if (timeRange != null) {
2992 _json["timeRange"] = timeRange; 3118 _json["timeRange"] = timeRange;
2993 } 3119 }
2994 return _json; 3120 return _json;
2995 } 3121 }
2996 } 3122 }
2997 3123
2998 class Pageviews { 3124 class Pageviews {
2999 /** Blog Id */ 3125 /// Blog Id
3000 core.String blogId; 3126 core.String blogId;
3001 /** The container of posts in this blog. */ 3127
3128 /// The container of posts in this blog.
3002 core.List<PageviewsCounts> counts; 3129 core.List<PageviewsCounts> counts;
3003 /** The kind of this entry. Always blogger#page_views */ 3130
3131 /// The kind of this entry. Always blogger#page_views
3004 core.String kind; 3132 core.String kind;
3005 3133
3006 Pageviews(); 3134 Pageviews();
3007 3135
3008 Pageviews.fromJson(core.Map _json) { 3136 Pageviews.fromJson(core.Map _json) {
3009 if (_json.containsKey("blogId")) { 3137 if (_json.containsKey("blogId")) {
3010 blogId = _json["blogId"]; 3138 blogId = _json["blogId"];
3011 } 3139 }
3012 if (_json.containsKey("counts")) { 3140 if (_json.containsKey("counts")) {
3013 counts = _json["counts"].map((value) => new PageviewsCounts.fromJson(value )).toList(); 3141 counts = _json["counts"]
3142 .map((value) => new PageviewsCounts.fromJson(value))
3143 .toList();
3014 } 3144 }
3015 if (_json.containsKey("kind")) { 3145 if (_json.containsKey("kind")) {
3016 kind = _json["kind"]; 3146 kind = _json["kind"];
3017 } 3147 }
3018 } 3148 }
3019 3149
3020 core.Map<core.String, core.Object> toJson() { 3150 core.Map<core.String, core.Object> toJson() {
3021 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3151 final core.Map<core.String, core.Object> _json =
3152 new core.Map<core.String, core.Object>();
3022 if (blogId != null) { 3153 if (blogId != null) {
3023 _json["blogId"] = blogId; 3154 _json["blogId"] = blogId;
3024 } 3155 }
3025 if (counts != null) { 3156 if (counts != null) {
3026 _json["counts"] = counts.map((value) => (value).toJson()).toList(); 3157 _json["counts"] = counts.map((value) => (value).toJson()).toList();
3027 } 3158 }
3028 if (kind != null) { 3159 if (kind != null) {
3029 _json["kind"] = kind; 3160 _json["kind"] = kind;
3030 } 3161 }
3031 return _json; 3162 return _json;
3032 } 3163 }
3033 } 3164 }
3034 3165
3035 /** The Post author's avatar. */ 3166 /// The Post author's avatar.
3036 class PostAuthorImage { 3167 class PostAuthorImage {
3037 /** The Post author's avatar URL. */ 3168 /// The Post author's avatar URL.
3038 core.String url; 3169 core.String url;
3039 3170
3040 PostAuthorImage(); 3171 PostAuthorImage();
3041 3172
3042 PostAuthorImage.fromJson(core.Map _json) { 3173 PostAuthorImage.fromJson(core.Map _json) {
3043 if (_json.containsKey("url")) { 3174 if (_json.containsKey("url")) {
3044 url = _json["url"]; 3175 url = _json["url"];
3045 } 3176 }
3046 } 3177 }
3047 3178
3048 core.Map<core.String, core.Object> toJson() { 3179 core.Map<core.String, core.Object> toJson() {
3049 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3180 final core.Map<core.String, core.Object> _json =
3181 new core.Map<core.String, core.Object>();
3050 if (url != null) { 3182 if (url != null) {
3051 _json["url"] = url; 3183 _json["url"] = url;
3052 } 3184 }
3053 return _json; 3185 return _json;
3054 } 3186 }
3055 } 3187 }
3056 3188
3057 /** The author of this Post. */ 3189 /// The author of this Post.
3058 class PostAuthor { 3190 class PostAuthor {
3059 /** The display name. */ 3191 /// The display name.
3060 core.String displayName; 3192 core.String displayName;
3061 /** The identifier of the Post creator. */ 3193
3194 /// The identifier of the Post creator.
3062 core.String id; 3195 core.String id;
3063 /** The Post author's avatar. */ 3196
3197 /// The Post author's avatar.
3064 PostAuthorImage image; 3198 PostAuthorImage image;
3065 /** The URL of the Post creator's Profile page. */ 3199
3200 /// The URL of the Post creator's Profile page.
3066 core.String url; 3201 core.String url;
3067 3202
3068 PostAuthor(); 3203 PostAuthor();
3069 3204
3070 PostAuthor.fromJson(core.Map _json) { 3205 PostAuthor.fromJson(core.Map _json) {
3071 if (_json.containsKey("displayName")) { 3206 if (_json.containsKey("displayName")) {
3072 displayName = _json["displayName"]; 3207 displayName = _json["displayName"];
3073 } 3208 }
3074 if (_json.containsKey("id")) { 3209 if (_json.containsKey("id")) {
3075 id = _json["id"]; 3210 id = _json["id"];
3076 } 3211 }
3077 if (_json.containsKey("image")) { 3212 if (_json.containsKey("image")) {
3078 image = new PostAuthorImage.fromJson(_json["image"]); 3213 image = new PostAuthorImage.fromJson(_json["image"]);
3079 } 3214 }
3080 if (_json.containsKey("url")) { 3215 if (_json.containsKey("url")) {
3081 url = _json["url"]; 3216 url = _json["url"];
3082 } 3217 }
3083 } 3218 }
3084 3219
3085 core.Map<core.String, core.Object> toJson() { 3220 core.Map<core.String, core.Object> toJson() {
3086 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3221 final core.Map<core.String, core.Object> _json =
3222 new core.Map<core.String, core.Object>();
3087 if (displayName != null) { 3223 if (displayName != null) {
3088 _json["displayName"] = displayName; 3224 _json["displayName"] = displayName;
3089 } 3225 }
3090 if (id != null) { 3226 if (id != null) {
3091 _json["id"] = id; 3227 _json["id"] = id;
3092 } 3228 }
3093 if (image != null) { 3229 if (image != null) {
3094 _json["image"] = (image).toJson(); 3230 _json["image"] = (image).toJson();
3095 } 3231 }
3096 if (url != null) { 3232 if (url != null) {
3097 _json["url"] = url; 3233 _json["url"] = url;
3098 } 3234 }
3099 return _json; 3235 return _json;
3100 } 3236 }
3101 } 3237 }
3102 3238
3103 /** Data about the blog containing this Post. */ 3239 /// Data about the blog containing this Post.
3104 class PostBlog { 3240 class PostBlog {
3105 /** The identifier of the Blog that contains this Post. */ 3241 /// The identifier of the Blog that contains this Post.
3106 core.String id; 3242 core.String id;
3107 3243
3108 PostBlog(); 3244 PostBlog();
3109 3245
3110 PostBlog.fromJson(core.Map _json) { 3246 PostBlog.fromJson(core.Map _json) {
3111 if (_json.containsKey("id")) { 3247 if (_json.containsKey("id")) {
3112 id = _json["id"]; 3248 id = _json["id"];
3113 } 3249 }
3114 } 3250 }
3115 3251
3116 core.Map<core.String, core.Object> toJson() { 3252 core.Map<core.String, core.Object> toJson() {
3117 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3253 final core.Map<core.String, core.Object> _json =
3254 new core.Map<core.String, core.Object>();
3118 if (id != null) { 3255 if (id != null) {
3119 _json["id"] = id; 3256 _json["id"] = id;
3120 } 3257 }
3121 return _json; 3258 return _json;
3122 } 3259 }
3123 } 3260 }
3124 3261
3125 class PostImages { 3262 class PostImages {
3126 core.String url; 3263 core.String url;
3127 3264
3128 PostImages(); 3265 PostImages();
3129 3266
3130 PostImages.fromJson(core.Map _json) { 3267 PostImages.fromJson(core.Map _json) {
3131 if (_json.containsKey("url")) { 3268 if (_json.containsKey("url")) {
3132 url = _json["url"]; 3269 url = _json["url"];
3133 } 3270 }
3134 } 3271 }
3135 3272
3136 core.Map<core.String, core.Object> toJson() { 3273 core.Map<core.String, core.Object> toJson() {
3137 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3274 final core.Map<core.String, core.Object> _json =
3275 new core.Map<core.String, core.Object>();
3138 if (url != null) { 3276 if (url != null) {
3139 _json["url"] = url; 3277 _json["url"] = url;
3140 } 3278 }
3141 return _json; 3279 return _json;
3142 } 3280 }
3143 } 3281 }
3144 3282
3145 /** The location for geotagged posts. */ 3283 /// The location for geotagged posts.
3146 class PostLocation { 3284 class PostLocation {
3147 /** Location's latitude. */ 3285 /// Location's latitude.
3148 core.double lat; 3286 core.double lat;
3149 /** Location's longitude. */ 3287
3288 /// Location's longitude.
3150 core.double lng; 3289 core.double lng;
3151 /** Location name. */ 3290
3291 /// Location name.
3152 core.String name; 3292 core.String name;
3153 /** Location's viewport span. Can be used when rendering a map preview. */ 3293
3294 /// Location's viewport span. Can be used when rendering a map preview.
3154 core.String span; 3295 core.String span;
3155 3296
3156 PostLocation(); 3297 PostLocation();
3157 3298
3158 PostLocation.fromJson(core.Map _json) { 3299 PostLocation.fromJson(core.Map _json) {
3159 if (_json.containsKey("lat")) { 3300 if (_json.containsKey("lat")) {
3160 lat = _json["lat"]; 3301 lat = _json["lat"];
3161 } 3302 }
3162 if (_json.containsKey("lng")) { 3303 if (_json.containsKey("lng")) {
3163 lng = _json["lng"]; 3304 lng = _json["lng"];
3164 } 3305 }
3165 if (_json.containsKey("name")) { 3306 if (_json.containsKey("name")) {
3166 name = _json["name"]; 3307 name = _json["name"];
3167 } 3308 }
3168 if (_json.containsKey("span")) { 3309 if (_json.containsKey("span")) {
3169 span = _json["span"]; 3310 span = _json["span"];
3170 } 3311 }
3171 } 3312 }
3172 3313
3173 core.Map<core.String, core.Object> toJson() { 3314 core.Map<core.String, core.Object> toJson() {
3174 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3315 final core.Map<core.String, core.Object> _json =
3316 new core.Map<core.String, core.Object>();
3175 if (lat != null) { 3317 if (lat != null) {
3176 _json["lat"] = lat; 3318 _json["lat"] = lat;
3177 } 3319 }
3178 if (lng != null) { 3320 if (lng != null) {
3179 _json["lng"] = lng; 3321 _json["lng"] = lng;
3180 } 3322 }
3181 if (name != null) { 3323 if (name != null) {
3182 _json["name"] = name; 3324 _json["name"] = name;
3183 } 3325 }
3184 if (span != null) { 3326 if (span != null) {
3185 _json["span"] = span; 3327 _json["span"] = span;
3186 } 3328 }
3187 return _json; 3329 return _json;
3188 } 3330 }
3189 } 3331 }
3190 3332
3191 /** The container of comments on this Post. */ 3333 /// The container of comments on this Post.
3192 class PostReplies { 3334 class PostReplies {
3193 /** The List of Comments for this Post. */ 3335 /// The List of Comments for this Post.
3194 core.List<Comment> items; 3336 core.List<Comment> items;
3195 /** The URL of the comments on this post. */ 3337
3338 /// The URL of the comments on this post.
3196 core.String selfLink; 3339 core.String selfLink;
3197 /** The count of comments on this post. */ 3340
3341 /// The count of comments on this post.
3198 core.String totalItems; 3342 core.String totalItems;
3199 3343
3200 PostReplies(); 3344 PostReplies();
3201 3345
3202 PostReplies.fromJson(core.Map _json) { 3346 PostReplies.fromJson(core.Map _json) {
3203 if (_json.containsKey("items")) { 3347 if (_json.containsKey("items")) {
3204 items = _json["items"].map((value) => new Comment.fromJson(value)).toList( ); 3348 items =
3349 _json["items"].map((value) => new Comment.fromJson(value)).toList();
3205 } 3350 }
3206 if (_json.containsKey("selfLink")) { 3351 if (_json.containsKey("selfLink")) {
3207 selfLink = _json["selfLink"]; 3352 selfLink = _json["selfLink"];
3208 } 3353 }
3209 if (_json.containsKey("totalItems")) { 3354 if (_json.containsKey("totalItems")) {
3210 totalItems = _json["totalItems"]; 3355 totalItems = _json["totalItems"];
3211 } 3356 }
3212 } 3357 }
3213 3358
3214 core.Map<core.String, core.Object> toJson() { 3359 core.Map<core.String, core.Object> toJson() {
3215 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3360 final core.Map<core.String, core.Object> _json =
3361 new core.Map<core.String, core.Object>();
3216 if (items != null) { 3362 if (items != null) {
3217 _json["items"] = items.map((value) => (value).toJson()).toList(); 3363 _json["items"] = items.map((value) => (value).toJson()).toList();
3218 } 3364 }
3219 if (selfLink != null) { 3365 if (selfLink != null) {
3220 _json["selfLink"] = selfLink; 3366 _json["selfLink"] = selfLink;
3221 } 3367 }
3222 if (totalItems != null) { 3368 if (totalItems != null) {
3223 _json["totalItems"] = totalItems; 3369 _json["totalItems"] = totalItems;
3224 } 3370 }
3225 return _json; 3371 return _json;
3226 } 3372 }
3227 } 3373 }
3228 3374
3229 class Post { 3375 class Post {
3230 /** The author of this Post. */ 3376 /// The author of this Post.
3231 PostAuthor author; 3377 PostAuthor author;
3232 /** Data about the blog containing this Post. */ 3378
3379 /// Data about the blog containing this Post.
3233 PostBlog blog; 3380 PostBlog blog;
3234 /** The content of the Post. May contain HTML markup. */ 3381
3382 /// The content of the Post. May contain HTML markup.
3235 core.String content; 3383 core.String content;
3236 /** The JSON meta-data for the Post. */ 3384
3385 /// The JSON meta-data for the Post.
3237 core.String customMetaData; 3386 core.String customMetaData;
3238 /** Etag of the resource. */ 3387
3388 /// Etag of the resource.
3239 core.String etag; 3389 core.String etag;
3240 /** The identifier of this Post. */ 3390
3391 /// The identifier of this Post.
3241 core.String id; 3392 core.String id;
3242 /** Display image for the Post. */ 3393
3394 /// Display image for the Post.
3243 core.List<PostImages> images; 3395 core.List<PostImages> images;
3244 /** The kind of this entity. Always blogger#post */ 3396
3397 /// The kind of this entity. Always blogger#post
3245 core.String kind; 3398 core.String kind;
3246 /** The list of labels this Post was tagged with. */ 3399
3400 /// The list of labels this Post was tagged with.
3247 core.List<core.String> labels; 3401 core.List<core.String> labels;
3248 /** The location for geotagged posts. */ 3402
3403 /// The location for geotagged posts.
3249 PostLocation location; 3404 PostLocation location;
3250 /** RFC 3339 date-time when this Post was published. */ 3405
3406 /// RFC 3339 date-time when this Post was published.
3251 core.DateTime published; 3407 core.DateTime published;
3252 /** Comment control and display setting for readers of this post. */ 3408
3409 /// Comment control and display setting for readers of this post.
3253 core.String readerComments; 3410 core.String readerComments;
3254 /** The container of comments on this Post. */ 3411
3412 /// The container of comments on this Post.
3255 PostReplies replies; 3413 PostReplies replies;
3256 /** The API REST URL to fetch this resource from. */ 3414
3415 /// The API REST URL to fetch this resource from.
3257 core.String selfLink; 3416 core.String selfLink;
3258 /** Status of the post. Only set for admin-level requests */ 3417
3418 /// Status of the post. Only set for admin-level requests
3259 core.String status; 3419 core.String status;
3260 /** The title of the Post. */ 3420
3421 /// The title of the Post.
3261 core.String title; 3422 core.String title;
3262 /** The title link URL, similar to atom's related link. */ 3423
3424 /// The title link URL, similar to atom's related link.
3263 core.String titleLink; 3425 core.String titleLink;
3264 /** RFC 3339 date-time when this Post was last updated. */ 3426
3427 /// RFC 3339 date-time when this Post was last updated.
3265 core.DateTime updated; 3428 core.DateTime updated;
3266 /** The URL where this Post is displayed. */ 3429
3430 /// The URL where this Post is displayed.
3267 core.String url; 3431 core.String url;
3268 3432
3269 Post(); 3433 Post();
3270 3434
3271 Post.fromJson(core.Map _json) { 3435 Post.fromJson(core.Map _json) {
3272 if (_json.containsKey("author")) { 3436 if (_json.containsKey("author")) {
3273 author = new PostAuthor.fromJson(_json["author"]); 3437 author = new PostAuthor.fromJson(_json["author"]);
3274 } 3438 }
3275 if (_json.containsKey("blog")) { 3439 if (_json.containsKey("blog")) {
3276 blog = new PostBlog.fromJson(_json["blog"]); 3440 blog = new PostBlog.fromJson(_json["blog"]);
3277 } 3441 }
3278 if (_json.containsKey("content")) { 3442 if (_json.containsKey("content")) {
3279 content = _json["content"]; 3443 content = _json["content"];
3280 } 3444 }
3281 if (_json.containsKey("customMetaData")) { 3445 if (_json.containsKey("customMetaData")) {
3282 customMetaData = _json["customMetaData"]; 3446 customMetaData = _json["customMetaData"];
3283 } 3447 }
3284 if (_json.containsKey("etag")) { 3448 if (_json.containsKey("etag")) {
3285 etag = _json["etag"]; 3449 etag = _json["etag"];
3286 } 3450 }
3287 if (_json.containsKey("id")) { 3451 if (_json.containsKey("id")) {
3288 id = _json["id"]; 3452 id = _json["id"];
3289 } 3453 }
3290 if (_json.containsKey("images")) { 3454 if (_json.containsKey("images")) {
3291 images = _json["images"].map((value) => new PostImages.fromJson(value)).to List(); 3455 images = _json["images"]
3456 .map((value) => new PostImages.fromJson(value))
3457 .toList();
3292 } 3458 }
3293 if (_json.containsKey("kind")) { 3459 if (_json.containsKey("kind")) {
3294 kind = _json["kind"]; 3460 kind = _json["kind"];
3295 } 3461 }
3296 if (_json.containsKey("labels")) { 3462 if (_json.containsKey("labels")) {
3297 labels = _json["labels"]; 3463 labels = _json["labels"];
3298 } 3464 }
3299 if (_json.containsKey("location")) { 3465 if (_json.containsKey("location")) {
3300 location = new PostLocation.fromJson(_json["location"]); 3466 location = new PostLocation.fromJson(_json["location"]);
3301 } 3467 }
(...skipping 20 matching lines...) Expand all
3322 } 3488 }
3323 if (_json.containsKey("updated")) { 3489 if (_json.containsKey("updated")) {
3324 updated = core.DateTime.parse(_json["updated"]); 3490 updated = core.DateTime.parse(_json["updated"]);
3325 } 3491 }
3326 if (_json.containsKey("url")) { 3492 if (_json.containsKey("url")) {
3327 url = _json["url"]; 3493 url = _json["url"];
3328 } 3494 }
3329 } 3495 }
3330 3496
3331 core.Map<core.String, core.Object> toJson() { 3497 core.Map<core.String, core.Object> toJson() {
3332 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3498 final core.Map<core.String, core.Object> _json =
3499 new core.Map<core.String, core.Object>();
3333 if (author != null) { 3500 if (author != null) {
3334 _json["author"] = (author).toJson(); 3501 _json["author"] = (author).toJson();
3335 } 3502 }
3336 if (blog != null) { 3503 if (blog != null) {
3337 _json["blog"] = (blog).toJson(); 3504 _json["blog"] = (blog).toJson();
3338 } 3505 }
3339 if (content != null) { 3506 if (content != null) {
3340 _json["content"] = content; 3507 _json["content"] = content;
3341 } 3508 }
3342 if (customMetaData != null) { 3509 if (customMetaData != null) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3385 _json["updated"] = (updated).toIso8601String(); 3552 _json["updated"] = (updated).toIso8601String();
3386 } 3553 }
3387 if (url != null) { 3554 if (url != null) {
3388 _json["url"] = url; 3555 _json["url"] = url;
3389 } 3556 }
3390 return _json; 3557 return _json;
3391 } 3558 }
3392 } 3559 }
3393 3560
3394 class PostList { 3561 class PostList {
3395 /** Etag of the response. */ 3562 /// Etag of the response.
3396 core.String etag; 3563 core.String etag;
3397 /** The list of Posts for this Blog. */ 3564
3565 /// The list of Posts for this Blog.
3398 core.List<Post> items; 3566 core.List<Post> items;
3399 /** The kind of this entity. Always blogger#postList */ 3567
3568 /// The kind of this entity. Always blogger#postList
3400 core.String kind; 3569 core.String kind;
3401 /** Pagination token to fetch the next page, if one exists. */ 3570
3571 /// Pagination token to fetch the next page, if one exists.
3402 core.String nextPageToken; 3572 core.String nextPageToken;
3403 3573
3404 PostList(); 3574 PostList();
3405 3575
3406 PostList.fromJson(core.Map _json) { 3576 PostList.fromJson(core.Map _json) {
3407 if (_json.containsKey("etag")) { 3577 if (_json.containsKey("etag")) {
3408 etag = _json["etag"]; 3578 etag = _json["etag"];
3409 } 3579 }
3410 if (_json.containsKey("items")) { 3580 if (_json.containsKey("items")) {
3411 items = _json["items"].map((value) => new Post.fromJson(value)).toList(); 3581 items = _json["items"].map((value) => new Post.fromJson(value)).toList();
3412 } 3582 }
3413 if (_json.containsKey("kind")) { 3583 if (_json.containsKey("kind")) {
3414 kind = _json["kind"]; 3584 kind = _json["kind"];
3415 } 3585 }
3416 if (_json.containsKey("nextPageToken")) { 3586 if (_json.containsKey("nextPageToken")) {
3417 nextPageToken = _json["nextPageToken"]; 3587 nextPageToken = _json["nextPageToken"];
3418 } 3588 }
3419 } 3589 }
3420 3590
3421 core.Map<core.String, core.Object> toJson() { 3591 core.Map<core.String, core.Object> toJson() {
3422 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3592 final core.Map<core.String, core.Object> _json =
3593 new core.Map<core.String, core.Object>();
3423 if (etag != null) { 3594 if (etag != null) {
3424 _json["etag"] = etag; 3595 _json["etag"] = etag;
3425 } 3596 }
3426 if (items != null) { 3597 if (items != null) {
3427 _json["items"] = items.map((value) => (value).toJson()).toList(); 3598 _json["items"] = items.map((value) => (value).toJson()).toList();
3428 } 3599 }
3429 if (kind != null) { 3600 if (kind != null) {
3430 _json["kind"] = kind; 3601 _json["kind"] = kind;
3431 } 3602 }
3432 if (nextPageToken != null) { 3603 if (nextPageToken != null) {
3433 _json["nextPageToken"] = nextPageToken; 3604 _json["nextPageToken"] = nextPageToken;
3434 } 3605 }
3435 return _json; 3606 return _json;
3436 } 3607 }
3437 } 3608 }
3438 3609
3439 class PostPerUserInfo { 3610 class PostPerUserInfo {
3440 /** ID of the Blog that the post resource belongs to. */ 3611 /// ID of the Blog that the post resource belongs to.
3441 core.String blogId; 3612 core.String blogId;
3442 /** True if the user has Author level access to the post. */ 3613
3614 /// True if the user has Author level access to the post.
3443 core.bool hasEditAccess; 3615 core.bool hasEditAccess;
3444 /** The kind of this entity. Always blogger#postPerUserInfo */ 3616
3617 /// The kind of this entity. Always blogger#postPerUserInfo
3445 core.String kind; 3618 core.String kind;
3446 /** ID of the Post resource. */ 3619
3620 /// ID of the Post resource.
3447 core.String postId; 3621 core.String postId;
3448 /** ID of the User. */ 3622
3623 /// ID of the User.
3449 core.String userId; 3624 core.String userId;
3450 3625
3451 PostPerUserInfo(); 3626 PostPerUserInfo();
3452 3627
3453 PostPerUserInfo.fromJson(core.Map _json) { 3628 PostPerUserInfo.fromJson(core.Map _json) {
3454 if (_json.containsKey("blogId")) { 3629 if (_json.containsKey("blogId")) {
3455 blogId = _json["blogId"]; 3630 blogId = _json["blogId"];
3456 } 3631 }
3457 if (_json.containsKey("hasEditAccess")) { 3632 if (_json.containsKey("hasEditAccess")) {
3458 hasEditAccess = _json["hasEditAccess"]; 3633 hasEditAccess = _json["hasEditAccess"];
3459 } 3634 }
3460 if (_json.containsKey("kind")) { 3635 if (_json.containsKey("kind")) {
3461 kind = _json["kind"]; 3636 kind = _json["kind"];
3462 } 3637 }
3463 if (_json.containsKey("postId")) { 3638 if (_json.containsKey("postId")) {
3464 postId = _json["postId"]; 3639 postId = _json["postId"];
3465 } 3640 }
3466 if (_json.containsKey("userId")) { 3641 if (_json.containsKey("userId")) {
3467 userId = _json["userId"]; 3642 userId = _json["userId"];
3468 } 3643 }
3469 } 3644 }
3470 3645
3471 core.Map<core.String, core.Object> toJson() { 3646 core.Map<core.String, core.Object> toJson() {
3472 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3647 final core.Map<core.String, core.Object> _json =
3648 new core.Map<core.String, core.Object>();
3473 if (blogId != null) { 3649 if (blogId != null) {
3474 _json["blogId"] = blogId; 3650 _json["blogId"] = blogId;
3475 } 3651 }
3476 if (hasEditAccess != null) { 3652 if (hasEditAccess != null) {
3477 _json["hasEditAccess"] = hasEditAccess; 3653 _json["hasEditAccess"] = hasEditAccess;
3478 } 3654 }
3479 if (kind != null) { 3655 if (kind != null) {
3480 _json["kind"] = kind; 3656 _json["kind"] = kind;
3481 } 3657 }
3482 if (postId != null) { 3658 if (postId != null) {
3483 _json["postId"] = postId; 3659 _json["postId"] = postId;
3484 } 3660 }
3485 if (userId != null) { 3661 if (userId != null) {
3486 _json["userId"] = userId; 3662 _json["userId"] = userId;
3487 } 3663 }
3488 return _json; 3664 return _json;
3489 } 3665 }
3490 } 3666 }
3491 3667
3492 class PostUserInfo { 3668 class PostUserInfo {
3493 /** The kind of this entity. Always blogger#postUserInfo */ 3669 /// The kind of this entity. Always blogger#postUserInfo
3494 core.String kind; 3670 core.String kind;
3495 /** The Post resource. */ 3671
3672 /// The Post resource.
3496 Post post; 3673 Post post;
3497 /** Information about a User for the Post. */ 3674
3675 /// Information about a User for the Post.
3498 PostPerUserInfo postUserInfo; 3676 PostPerUserInfo postUserInfo;
3499 3677
3500 PostUserInfo(); 3678 PostUserInfo();
3501 3679
3502 PostUserInfo.fromJson(core.Map _json) { 3680 PostUserInfo.fromJson(core.Map _json) {
3503 if (_json.containsKey("kind")) { 3681 if (_json.containsKey("kind")) {
3504 kind = _json["kind"]; 3682 kind = _json["kind"];
3505 } 3683 }
3506 if (_json.containsKey("post")) { 3684 if (_json.containsKey("post")) {
3507 post = new Post.fromJson(_json["post"]); 3685 post = new Post.fromJson(_json["post"]);
3508 } 3686 }
3509 if (_json.containsKey("post_user_info")) { 3687 if (_json.containsKey("post_user_info")) {
3510 postUserInfo = new PostPerUserInfo.fromJson(_json["post_user_info"]); 3688 postUserInfo = new PostPerUserInfo.fromJson(_json["post_user_info"]);
3511 } 3689 }
3512 } 3690 }
3513 3691
3514 core.Map<core.String, core.Object> toJson() { 3692 core.Map<core.String, core.Object> toJson() {
3515 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3693 final core.Map<core.String, core.Object> _json =
3694 new core.Map<core.String, core.Object>();
3516 if (kind != null) { 3695 if (kind != null) {
3517 _json["kind"] = kind; 3696 _json["kind"] = kind;
3518 } 3697 }
3519 if (post != null) { 3698 if (post != null) {
3520 _json["post"] = (post).toJson(); 3699 _json["post"] = (post).toJson();
3521 } 3700 }
3522 if (postUserInfo != null) { 3701 if (postUserInfo != null) {
3523 _json["post_user_info"] = (postUserInfo).toJson(); 3702 _json["post_user_info"] = (postUserInfo).toJson();
3524 } 3703 }
3525 return _json; 3704 return _json;
3526 } 3705 }
3527 } 3706 }
3528 3707
3529 class PostUserInfosList { 3708 class PostUserInfosList {
3530 /** The list of Posts with User information for the post, for this Blog. */ 3709 /// The list of Posts with User information for the post, for this Blog.
3531 core.List<PostUserInfo> items; 3710 core.List<PostUserInfo> items;
3532 /** The kind of this entity. Always blogger#postList */ 3711
3712 /// The kind of this entity. Always blogger#postList
3533 core.String kind; 3713 core.String kind;
3534 /** Pagination token to fetch the next page, if one exists. */ 3714
3715 /// Pagination token to fetch the next page, if one exists.
3535 core.String nextPageToken; 3716 core.String nextPageToken;
3536 3717
3537 PostUserInfosList(); 3718 PostUserInfosList();
3538 3719
3539 PostUserInfosList.fromJson(core.Map _json) { 3720 PostUserInfosList.fromJson(core.Map _json) {
3540 if (_json.containsKey("items")) { 3721 if (_json.containsKey("items")) {
3541 items = _json["items"].map((value) => new PostUserInfo.fromJson(value)).to List(); 3722 items = _json["items"]
3723 .map((value) => new PostUserInfo.fromJson(value))
3724 .toList();
3542 } 3725 }
3543 if (_json.containsKey("kind")) { 3726 if (_json.containsKey("kind")) {
3544 kind = _json["kind"]; 3727 kind = _json["kind"];
3545 } 3728 }
3546 if (_json.containsKey("nextPageToken")) { 3729 if (_json.containsKey("nextPageToken")) {
3547 nextPageToken = _json["nextPageToken"]; 3730 nextPageToken = _json["nextPageToken"];
3548 } 3731 }
3549 } 3732 }
3550 3733
3551 core.Map<core.String, core.Object> toJson() { 3734 core.Map<core.String, core.Object> toJson() {
3552 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3735 final core.Map<core.String, core.Object> _json =
3736 new core.Map<core.String, core.Object>();
3553 if (items != null) { 3737 if (items != null) {
3554 _json["items"] = items.map((value) => (value).toJson()).toList(); 3738 _json["items"] = items.map((value) => (value).toJson()).toList();
3555 } 3739 }
3556 if (kind != null) { 3740 if (kind != null) {
3557 _json["kind"] = kind; 3741 _json["kind"] = kind;
3558 } 3742 }
3559 if (nextPageToken != null) { 3743 if (nextPageToken != null) {
3560 _json["nextPageToken"] = nextPageToken; 3744 _json["nextPageToken"] = nextPageToken;
3561 } 3745 }
3562 return _json; 3746 return _json;
3563 } 3747 }
3564 } 3748 }
3565 3749
3566 /** The container of blogs for this user. */ 3750 /// The container of blogs for this user.
3567 class UserBlogs { 3751 class UserBlogs {
3568 /** The URL of the Blogs for this user. */ 3752 /// The URL of the Blogs for this user.
3569 core.String selfLink; 3753 core.String selfLink;
3570 3754
3571 UserBlogs(); 3755 UserBlogs();
3572 3756
3573 UserBlogs.fromJson(core.Map _json) { 3757 UserBlogs.fromJson(core.Map _json) {
3574 if (_json.containsKey("selfLink")) { 3758 if (_json.containsKey("selfLink")) {
3575 selfLink = _json["selfLink"]; 3759 selfLink = _json["selfLink"];
3576 } 3760 }
3577 } 3761 }
3578 3762
3579 core.Map<core.String, core.Object> toJson() { 3763 core.Map<core.String, core.Object> toJson() {
3580 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3764 final core.Map<core.String, core.Object> _json =
3765 new core.Map<core.String, core.Object>();
3581 if (selfLink != null) { 3766 if (selfLink != null) {
3582 _json["selfLink"] = selfLink; 3767 _json["selfLink"] = selfLink;
3583 } 3768 }
3584 return _json; 3769 return _json;
3585 } 3770 }
3586 } 3771 }
3587 3772
3588 /** This user's locale */ 3773 /// This user's locale
3589 class UserLocale { 3774 class UserLocale {
3590 /** The user's country setting. */ 3775 /// The user's country setting.
3591 core.String country; 3776 core.String country;
3592 /** The user's language setting. */ 3777
3778 /// The user's language setting.
3593 core.String language; 3779 core.String language;
3594 /** The user's language variant setting. */ 3780
3781 /// The user's language variant setting.
3595 core.String variant; 3782 core.String variant;
3596 3783
3597 UserLocale(); 3784 UserLocale();
3598 3785
3599 UserLocale.fromJson(core.Map _json) { 3786 UserLocale.fromJson(core.Map _json) {
3600 if (_json.containsKey("country")) { 3787 if (_json.containsKey("country")) {
3601 country = _json["country"]; 3788 country = _json["country"];
3602 } 3789 }
3603 if (_json.containsKey("language")) { 3790 if (_json.containsKey("language")) {
3604 language = _json["language"]; 3791 language = _json["language"];
3605 } 3792 }
3606 if (_json.containsKey("variant")) { 3793 if (_json.containsKey("variant")) {
3607 variant = _json["variant"]; 3794 variant = _json["variant"];
3608 } 3795 }
3609 } 3796 }
3610 3797
3611 core.Map<core.String, core.Object> toJson() { 3798 core.Map<core.String, core.Object> toJson() {
3612 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3799 final core.Map<core.String, core.Object> _json =
3800 new core.Map<core.String, core.Object>();
3613 if (country != null) { 3801 if (country != null) {
3614 _json["country"] = country; 3802 _json["country"] = country;
3615 } 3803 }
3616 if (language != null) { 3804 if (language != null) {
3617 _json["language"] = language; 3805 _json["language"] = language;
3618 } 3806 }
3619 if (variant != null) { 3807 if (variant != null) {
3620 _json["variant"] = variant; 3808 _json["variant"] = variant;
3621 } 3809 }
3622 return _json; 3810 return _json;
3623 } 3811 }
3624 } 3812 }
3625 3813
3626 class User { 3814 class User {
3627 /** Profile summary information. */ 3815 /// Profile summary information.
3628 core.String about; 3816 core.String about;
3629 /** The container of blogs for this user. */ 3817
3818 /// The container of blogs for this user.
3630 UserBlogs blogs; 3819 UserBlogs blogs;
3631 /** 3820
3632 * The timestamp of when this profile was created, in seconds since epoch. 3821 /// The timestamp of when this profile was created, in seconds since epoch.
3633 */
3634 core.DateTime created; 3822 core.DateTime created;
3635 /** The display name. */ 3823
3824 /// The display name.
3636 core.String displayName; 3825 core.String displayName;
3637 /** The identifier for this User. */ 3826
3827 /// The identifier for this User.
3638 core.String id; 3828 core.String id;
3639 /** The kind of this entity. Always blogger#user */ 3829
3830 /// The kind of this entity. Always blogger#user
3640 core.String kind; 3831 core.String kind;
3641 /** This user's locale */ 3832
3833 /// This user's locale
3642 UserLocale locale; 3834 UserLocale locale;
3643 /** The API REST URL to fetch this resource from. */ 3835
3836 /// The API REST URL to fetch this resource from.
3644 core.String selfLink; 3837 core.String selfLink;
3645 /** The user's profile page. */ 3838
3839 /// The user's profile page.
3646 core.String url; 3840 core.String url;
3647 3841
3648 User(); 3842 User();
3649 3843
3650 User.fromJson(core.Map _json) { 3844 User.fromJson(core.Map _json) {
3651 if (_json.containsKey("about")) { 3845 if (_json.containsKey("about")) {
3652 about = _json["about"]; 3846 about = _json["about"];
3653 } 3847 }
3654 if (_json.containsKey("blogs")) { 3848 if (_json.containsKey("blogs")) {
3655 blogs = new UserBlogs.fromJson(_json["blogs"]); 3849 blogs = new UserBlogs.fromJson(_json["blogs"]);
(...skipping 15 matching lines...) Expand all
3671 } 3865 }
3672 if (_json.containsKey("selfLink")) { 3866 if (_json.containsKey("selfLink")) {
3673 selfLink = _json["selfLink"]; 3867 selfLink = _json["selfLink"];
3674 } 3868 }
3675 if (_json.containsKey("url")) { 3869 if (_json.containsKey("url")) {
3676 url = _json["url"]; 3870 url = _json["url"];
3677 } 3871 }
3678 } 3872 }
3679 3873
3680 core.Map<core.String, core.Object> toJson() { 3874 core.Map<core.String, core.Object> toJson() {
3681 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 3875 final core.Map<core.String, core.Object> _json =
3876 new core.Map<core.String, core.Object>();
3682 if (about != null) { 3877 if (about != null) {
3683 _json["about"] = about; 3878 _json["about"] = about;
3684 } 3879 }
3685 if (blogs != null) { 3880 if (blogs != null) {
3686 _json["blogs"] = (blogs).toJson(); 3881 _json["blogs"] = (blogs).toJson();
3687 } 3882 }
3688 if (created != null) { 3883 if (created != null) {
3689 _json["created"] = (created).toIso8601String(); 3884 _json["created"] = (created).toIso8601String();
3690 } 3885 }
3691 if (displayName != null) { 3886 if (displayName != null) {
(...skipping 10 matching lines...) Expand all
3702 } 3897 }
3703 if (selfLink != null) { 3898 if (selfLink != null) {
3704 _json["selfLink"] = selfLink; 3899 _json["selfLink"] = selfLink;
3705 } 3900 }
3706 if (url != null) { 3901 if (url != null) {
3707 _json["url"] = url; 3902 _json["url"] = url;
3708 } 3903 }
3709 return _json; 3904 return _json;
3710 } 3905 }
3711 } 3906 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/bigquerydatatransfer/v1.dart ('k') | generated/googleapis/lib/books/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698