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

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

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

Powered by Google App Engine
This is Rietveld 408576698