OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.blogger.v3; | 3 library googleapis.blogger.v3; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client blogger/v3'; |
15 | 18 |
16 /** API for access to the data within Blogger. */ | 19 /** API for access to the data within Blogger. */ |
17 class BloggerApi { | 20 class BloggerApi { |
18 /** Manage your Blogger account */ | 21 /** Manage your Blogger account */ |
19 static const BloggerScope = "https://www.googleapis.com/auth/blogger"; | 22 static const BloggerScope = "https://www.googleapis.com/auth/blogger"; |
20 | 23 |
21 /** View your Blogger account */ | 24 /** View your Blogger account */ |
22 static const BloggerReadonlyScope = "https://www.googleapis.com/auth/blogger.r
eadonly"; | 25 static const BloggerReadonlyScope = "https://www.googleapis.com/auth/blogger.r
eadonly"; |
23 | 26 |
24 | 27 |
25 final common_internal.ApiRequester _requester; | 28 final commons.ApiRequester _requester; |
26 | 29 |
27 BlogUserInfosResourceApi get blogUserInfos => new BlogUserInfosResourceApi(_re
quester); | 30 BlogUserInfosResourceApi get blogUserInfos => new BlogUserInfosResourceApi(_re
quester); |
28 BlogsResourceApi get blogs => new BlogsResourceApi(_requester); | 31 BlogsResourceApi get blogs => new BlogsResourceApi(_requester); |
29 CommentsResourceApi get comments => new CommentsResourceApi(_requester); | 32 CommentsResourceApi get comments => new CommentsResourceApi(_requester); |
30 PageViewsResourceApi get pageViews => new PageViewsResourceApi(_requester); | 33 PageViewsResourceApi get pageViews => new PageViewsResourceApi(_requester); |
31 PagesResourceApi get pages => new PagesResourceApi(_requester); | 34 PagesResourceApi get pages => new PagesResourceApi(_requester); |
32 PostUserInfosResourceApi get postUserInfos => new PostUserInfosResourceApi(_re
quester); | 35 PostUserInfosResourceApi get postUserInfos => new PostUserInfosResourceApi(_re
quester); |
33 PostsResourceApi get posts => new PostsResourceApi(_requester); | 36 PostsResourceApi get posts => new PostsResourceApi(_requester); |
34 UsersResourceApi get users => new UsersResourceApi(_requester); | 37 UsersResourceApi get users => new UsersResourceApi(_requester); |
35 | 38 |
36 BloggerApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "blogger/v3/"}) : | 39 BloggerApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "blogger/v3/"}) : |
37 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 40 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
38 } | 41 } |
39 | 42 |
40 | 43 |
41 /** Not documented yet. */ | |
42 class BlogUserInfosResourceApi { | 44 class BlogUserInfosResourceApi { |
43 final common_internal.ApiRequester _requester; | 45 final commons.ApiRequester _requester; |
44 | 46 |
45 BlogUserInfosResourceApi(common_internal.ApiRequester client) : | 47 BlogUserInfosResourceApi(commons.ApiRequester client) : |
46 _requester = client; | 48 _requester = client; |
47 | 49 |
48 /** | 50 /** |
49 * Gets one blog and user info pair by blogId and userId. | 51 * Gets one blog and user info pair by blogId and userId. |
50 * | 52 * |
51 * Request parameters: | 53 * Request parameters: |
52 * | 54 * |
53 * [userId] - ID of the user whose blogs are to be fetched. Either the word | 55 * [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. | 56 * 'self' (sans quote marks) or the user's profile identifier. |
55 * | 57 * |
56 * [blogId] - The ID of the blog to get. | 58 * [blogId] - The ID of the blog to get. |
57 * | 59 * |
58 * [maxPosts] - Maximum number of posts to pull back with the blog. | 60 * [maxPosts] - Maximum number of posts to pull back with the blog. |
59 * | 61 * |
60 * Completes with a [BlogUserInfo]. | 62 * Completes with a [BlogUserInfo]. |
61 * | 63 * |
62 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 64 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
63 * error. | 65 * error. |
64 * | 66 * |
65 * If the used [http.Client] completes with an error when making a REST call, | 67 * If the used [http.Client] completes with an error when making a REST call, |
66 * this method will complete with the same error. | 68 * this method will complete with the same error. |
67 */ | 69 */ |
68 async.Future<BlogUserInfo> get(core.String userId, core.String blogId, {core.i
nt maxPosts}) { | 70 async.Future<BlogUserInfo> get(core.String userId, core.String blogId, {core.i
nt maxPosts}) { |
69 var _url = null; | 71 var _url = null; |
70 var _queryParams = new core.Map(); | 72 var _queryParams = new core.Map(); |
71 var _uploadMedia = null; | 73 var _uploadMedia = null; |
72 var _uploadOptions = null; | 74 var _uploadOptions = null; |
73 var _downloadOptions = common.DownloadOptions.Metadata; | 75 var _downloadOptions = commons.DownloadOptions.Metadata; |
74 var _body = null; | 76 var _body = null; |
75 | 77 |
76 if (userId == null) { | 78 if (userId == null) { |
77 throw new core.ArgumentError("Parameter userId is required."); | 79 throw new core.ArgumentError("Parameter userId is required."); |
78 } | 80 } |
79 if (blogId == null) { | 81 if (blogId == null) { |
80 throw new core.ArgumentError("Parameter blogId is required."); | 82 throw new core.ArgumentError("Parameter blogId is required."); |
81 } | 83 } |
82 if (maxPosts != null) { | 84 if (maxPosts != null) { |
83 _queryParams["maxPosts"] = ["${maxPosts}"]; | 85 _queryParams["maxPosts"] = ["${maxPosts}"]; |
84 } | 86 } |
85 | 87 |
86 | 88 |
87 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/blogs
/' + common_internal.Escaper.ecapeVariable('$blogId'); | 89 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com
mons.Escaper.ecapeVariable('$blogId'); |
88 | 90 |
89 var _response = _requester.request(_url, | 91 var _response = _requester.request(_url, |
90 "GET", | 92 "GET", |
91 body: _body, | 93 body: _body, |
92 queryParams: _queryParams, | 94 queryParams: _queryParams, |
93 uploadOptions: _uploadOptions, | 95 uploadOptions: _uploadOptions, |
94 uploadMedia: _uploadMedia, | 96 uploadMedia: _uploadMedia, |
95 downloadOptions: _downloadOptions); | 97 downloadOptions: _downloadOptions); |
96 return _response.then((data) => new BlogUserInfo.fromJson(data)); | 98 return _response.then((data) => new BlogUserInfo.fromJson(data)); |
97 } | 99 } |
98 | 100 |
99 } | 101 } |
100 | 102 |
101 | 103 |
102 /** Not documented yet. */ | |
103 class BlogsResourceApi { | 104 class BlogsResourceApi { |
104 final common_internal.ApiRequester _requester; | 105 final commons.ApiRequester _requester; |
105 | 106 |
106 BlogsResourceApi(common_internal.ApiRequester client) : | 107 BlogsResourceApi(commons.ApiRequester client) : |
107 _requester = client; | 108 _requester = client; |
108 | 109 |
109 /** | 110 /** |
110 * Gets one blog by ID. | 111 * Gets one blog by ID. |
111 * | 112 * |
112 * Request parameters: | 113 * Request parameters: |
113 * | 114 * |
114 * [blogId] - The ID of the blog to get. | 115 * [blogId] - The ID of the blog to get. |
115 * | 116 * |
116 * [maxPosts] - Maximum number of posts to pull back with the blog. | 117 * [maxPosts] - Maximum number of posts to pull back with the blog. |
117 * | 118 * |
118 * [view] - Access level with which to view the blog. Note that some fields | 119 * [view] - Access level with which to view the blog. Note that some fields |
119 * require elevated access. | 120 * require elevated access. |
120 * Possible string values are: | 121 * Possible string values are: |
121 * - "ADMIN" : Admin level detail. | 122 * - "ADMIN" : Admin level detail. |
122 * - "AUTHOR" : Author level detail. | 123 * - "AUTHOR" : Author level detail. |
123 * - "READER" : Reader level detail. | 124 * - "READER" : Reader level detail. |
124 * | 125 * |
125 * Completes with a [Blog]. | 126 * Completes with a [Blog]. |
126 * | 127 * |
127 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
128 * error. | 129 * error. |
129 * | 130 * |
130 * If the used [http.Client] completes with an error when making a REST call, | 131 * If the used [http.Client] completes with an error when making a REST call, |
131 * this method will complete with the same error. | 132 * this method will complete with the same error. |
132 */ | 133 */ |
133 async.Future<Blog> get(core.String blogId, {core.int maxPosts, core.String vie
w}) { | 134 async.Future<Blog> get(core.String blogId, {core.int maxPosts, core.String vie
w}) { |
134 var _url = null; | 135 var _url = null; |
135 var _queryParams = new core.Map(); | 136 var _queryParams = new core.Map(); |
136 var _uploadMedia = null; | 137 var _uploadMedia = null; |
137 var _uploadOptions = null; | 138 var _uploadOptions = null; |
138 var _downloadOptions = common.DownloadOptions.Metadata; | 139 var _downloadOptions = commons.DownloadOptions.Metadata; |
139 var _body = null; | 140 var _body = null; |
140 | 141 |
141 if (blogId == null) { | 142 if (blogId == null) { |
142 throw new core.ArgumentError("Parameter blogId is required."); | 143 throw new core.ArgumentError("Parameter blogId is required."); |
143 } | 144 } |
144 if (maxPosts != null) { | 145 if (maxPosts != null) { |
145 _queryParams["maxPosts"] = ["${maxPosts}"]; | 146 _queryParams["maxPosts"] = ["${maxPosts}"]; |
146 } | 147 } |
147 if (view != null) { | 148 if (view != null) { |
148 _queryParams["view"] = [view]; | 149 _queryParams["view"] = [view]; |
149 } | 150 } |
150 | 151 |
151 | 152 |
152 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId'); | 153 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId'); |
153 | 154 |
154 var _response = _requester.request(_url, | 155 var _response = _requester.request(_url, |
155 "GET", | 156 "GET", |
156 body: _body, | 157 body: _body, |
157 queryParams: _queryParams, | 158 queryParams: _queryParams, |
158 uploadOptions: _uploadOptions, | 159 uploadOptions: _uploadOptions, |
159 uploadMedia: _uploadMedia, | 160 uploadMedia: _uploadMedia, |
160 downloadOptions: _downloadOptions); | 161 downloadOptions: _downloadOptions); |
161 return _response.then((data) => new Blog.fromJson(data)); | 162 return _response.then((data) => new Blog.fromJson(data)); |
162 } | 163 } |
163 | 164 |
164 /** | 165 /** |
165 * Retrieve a Blog by URL. | 166 * Retrieve a Blog by URL. |
166 * | 167 * |
167 * Request parameters: | 168 * Request parameters: |
168 * | 169 * |
169 * [url] - The URL of the blog to retrieve. | 170 * [url] - The URL of the blog to retrieve. |
170 * | 171 * |
171 * [view] - Access level with which to view the blog. Note that some fields | 172 * [view] - Access level with which to view the blog. Note that some fields |
172 * require elevated access. | 173 * require elevated access. |
173 * Possible string values are: | 174 * Possible string values are: |
174 * - "ADMIN" : Admin level detail. | 175 * - "ADMIN" : Admin level detail. |
175 * - "AUTHOR" : Author level detail. | 176 * - "AUTHOR" : Author level detail. |
176 * - "READER" : Reader level detail. | 177 * - "READER" : Reader level detail. |
177 * | 178 * |
178 * Completes with a [Blog]. | 179 * Completes with a [Blog]. |
179 * | 180 * |
180 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 181 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
181 * error. | 182 * error. |
182 * | 183 * |
183 * If the used [http.Client] completes with an error when making a REST call, | 184 * If the used [http.Client] completes with an error when making a REST call, |
184 * this method will complete with the same error. | 185 * this method will complete with the same error. |
185 */ | 186 */ |
186 async.Future<Blog> getByUrl(core.String url, {core.String view}) { | 187 async.Future<Blog> getByUrl(core.String url, {core.String view}) { |
187 var _url = null; | 188 var _url = null; |
188 var _queryParams = new core.Map(); | 189 var _queryParams = new core.Map(); |
189 var _uploadMedia = null; | 190 var _uploadMedia = null; |
190 var _uploadOptions = null; | 191 var _uploadOptions = null; |
191 var _downloadOptions = common.DownloadOptions.Metadata; | 192 var _downloadOptions = commons.DownloadOptions.Metadata; |
192 var _body = null; | 193 var _body = null; |
193 | 194 |
194 if (url == null) { | 195 if (url == null) { |
195 throw new core.ArgumentError("Parameter url is required."); | 196 throw new core.ArgumentError("Parameter url is required."); |
196 } | 197 } |
197 _queryParams["url"] = [url]; | 198 _queryParams["url"] = [url]; |
198 if (view != null) { | 199 if (view != null) { |
199 _queryParams["view"] = [view]; | 200 _queryParams["view"] = [view]; |
200 } | 201 } |
201 | 202 |
(...skipping 30 matching lines...) Expand all Loading... |
232 * | 233 * |
233 * [view] - Access level with which to view the blogs. Note that some fields | 234 * [view] - Access level with which to view the blogs. Note that some fields |
234 * require elevated access. | 235 * require elevated access. |
235 * Possible string values are: | 236 * Possible string values are: |
236 * - "ADMIN" : Admin level detail. | 237 * - "ADMIN" : Admin level detail. |
237 * - "AUTHOR" : Author level detail. | 238 * - "AUTHOR" : Author level detail. |
238 * - "READER" : Reader level detail. | 239 * - "READER" : Reader level detail. |
239 * | 240 * |
240 * Completes with a [BlogList]. | 241 * Completes with a [BlogList]. |
241 * | 242 * |
242 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 243 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
243 * error. | 244 * error. |
244 * | 245 * |
245 * If the used [http.Client] completes with an error when making a REST call, | 246 * If the used [http.Client] completes with an error when making a REST call, |
246 * this method will complete with the same error. | 247 * this method will complete with the same error. |
247 */ | 248 */ |
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 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 _url = null; |
250 var _queryParams = new core.Map(); | 251 var _queryParams = new core.Map(); |
251 var _uploadMedia = null; | 252 var _uploadMedia = null; |
252 var _uploadOptions = null; | 253 var _uploadOptions = null; |
253 var _downloadOptions = common.DownloadOptions.Metadata; | 254 var _downloadOptions = commons.DownloadOptions.Metadata; |
254 var _body = null; | 255 var _body = null; |
255 | 256 |
256 if (userId == null) { | 257 if (userId == null) { |
257 throw new core.ArgumentError("Parameter userId is required."); | 258 throw new core.ArgumentError("Parameter userId is required."); |
258 } | 259 } |
259 if (fetchUserInfo != null) { | 260 if (fetchUserInfo != null) { |
260 _queryParams["fetchUserInfo"] = ["${fetchUserInfo}"]; | 261 _queryParams["fetchUserInfo"] = ["${fetchUserInfo}"]; |
261 } | 262 } |
262 if (role != null) { | 263 if (role != null) { |
263 _queryParams["role"] = role; | 264 _queryParams["role"] = role; |
264 } | 265 } |
265 if (status != null) { | 266 if (status != null) { |
266 _queryParams["status"] = status; | 267 _queryParams["status"] = status; |
267 } | 268 } |
268 if (view != null) { | 269 if (view != null) { |
269 _queryParams["view"] = [view]; | 270 _queryParams["view"] = [view]; |
270 } | 271 } |
271 | 272 |
272 | 273 |
273 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/blogs
'; | 274 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs'; |
274 | 275 |
275 var _response = _requester.request(_url, | 276 var _response = _requester.request(_url, |
276 "GET", | 277 "GET", |
277 body: _body, | 278 body: _body, |
278 queryParams: _queryParams, | 279 queryParams: _queryParams, |
279 uploadOptions: _uploadOptions, | 280 uploadOptions: _uploadOptions, |
280 uploadMedia: _uploadMedia, | 281 uploadMedia: _uploadMedia, |
281 downloadOptions: _downloadOptions); | 282 downloadOptions: _downloadOptions); |
282 return _response.then((data) => new BlogList.fromJson(data)); | 283 return _response.then((data) => new BlogList.fromJson(data)); |
283 } | 284 } |
284 | 285 |
285 } | 286 } |
286 | 287 |
287 | 288 |
288 /** Not documented yet. */ | |
289 class CommentsResourceApi { | 289 class CommentsResourceApi { |
290 final common_internal.ApiRequester _requester; | 290 final commons.ApiRequester _requester; |
291 | 291 |
292 CommentsResourceApi(common_internal.ApiRequester client) : | 292 CommentsResourceApi(commons.ApiRequester client) : |
293 _requester = client; | 293 _requester = client; |
294 | 294 |
295 /** | 295 /** |
296 * Marks a comment as not spam. | 296 * Marks a comment as not spam. |
297 * | 297 * |
298 * Request parameters: | 298 * Request parameters: |
299 * | 299 * |
300 * [blogId] - The ID of the Blog. | 300 * [blogId] - The ID of the Blog. |
301 * | 301 * |
302 * [postId] - The ID of the Post. | 302 * [postId] - The ID of the Post. |
303 * | 303 * |
304 * [commentId] - The ID of the comment to mark as not spam. | 304 * [commentId] - The ID of the comment to mark as not spam. |
305 * | 305 * |
306 * Completes with a [Comment]. | 306 * Completes with a [Comment]. |
307 * | 307 * |
308 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 308 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
309 * error. | 309 * error. |
310 * | 310 * |
311 * If the used [http.Client] completes with an error when making a REST call, | 311 * If the used [http.Client] completes with an error when making a REST call, |
312 * this method will complete with the same error. | 312 * this method will complete with the same error. |
313 */ | 313 */ |
314 async.Future<Comment> approve(core.String blogId, core.String postId, core.Str
ing commentId) { | 314 async.Future<Comment> approve(core.String blogId, core.String postId, core.Str
ing commentId) { |
315 var _url = null; | 315 var _url = null; |
316 var _queryParams = new core.Map(); | 316 var _queryParams = new core.Map(); |
317 var _uploadMedia = null; | 317 var _uploadMedia = null; |
318 var _uploadOptions = null; | 318 var _uploadOptions = null; |
319 var _downloadOptions = common.DownloadOptions.Metadata; | 319 var _downloadOptions = commons.DownloadOptions.Metadata; |
320 var _body = null; | 320 var _body = null; |
321 | 321 |
322 if (blogId == null) { | 322 if (blogId == null) { |
323 throw new core.ArgumentError("Parameter blogId is required."); | 323 throw new core.ArgumentError("Parameter blogId is required."); |
324 } | 324 } |
325 if (postId == null) { | 325 if (postId == null) { |
326 throw new core.ArgumentError("Parameter postId is required."); | 326 throw new core.ArgumentError("Parameter postId is required."); |
327 } | 327 } |
328 if (commentId == null) { | 328 if (commentId == null) { |
329 throw new core.ArgumentError("Parameter commentId is required."); | 329 throw new core.ArgumentError("Parameter commentId is required."); |
330 } | 330 } |
331 | 331 |
332 | 332 |
333 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments/' + common_in
ternal.Escaper.ecapeVariable('$commentId') + '/approve'; | 333 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari
able('$commentId') + '/approve'; |
334 | 334 |
335 var _response = _requester.request(_url, | 335 var _response = _requester.request(_url, |
336 "POST", | 336 "POST", |
337 body: _body, | 337 body: _body, |
338 queryParams: _queryParams, | 338 queryParams: _queryParams, |
339 uploadOptions: _uploadOptions, | 339 uploadOptions: _uploadOptions, |
340 uploadMedia: _uploadMedia, | 340 uploadMedia: _uploadMedia, |
341 downloadOptions: _downloadOptions); | 341 downloadOptions: _downloadOptions); |
342 return _response.then((data) => new Comment.fromJson(data)); | 342 return _response.then((data) => new Comment.fromJson(data)); |
343 } | 343 } |
344 | 344 |
345 /** | 345 /** |
346 * Delete a comment by ID. | 346 * Delete a comment by ID. |
347 * | 347 * |
348 * Request parameters: | 348 * Request parameters: |
349 * | 349 * |
350 * [blogId] - The ID of the Blog. | 350 * [blogId] - The ID of the Blog. |
351 * | 351 * |
352 * [postId] - The ID of the Post. | 352 * [postId] - The ID of the Post. |
353 * | 353 * |
354 * [commentId] - The ID of the comment to delete. | 354 * [commentId] - The ID of the comment to delete. |
355 * | 355 * |
356 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 356 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
357 * error. | 357 * error. |
358 * | 358 * |
359 * If the used [http.Client] completes with an error when making a REST call, | 359 * If the used [http.Client] completes with an error when making a REST call, |
360 * this method will complete with the same error. | 360 * this method will complete with the same error. |
361 */ | 361 */ |
362 async.Future delete(core.String blogId, core.String postId, core.String commen
tId) { | 362 async.Future delete(core.String blogId, core.String postId, core.String commen
tId) { |
363 var _url = null; | 363 var _url = null; |
364 var _queryParams = new core.Map(); | 364 var _queryParams = new core.Map(); |
365 var _uploadMedia = null; | 365 var _uploadMedia = null; |
366 var _uploadOptions = null; | 366 var _uploadOptions = null; |
367 var _downloadOptions = common.DownloadOptions.Metadata; | 367 var _downloadOptions = commons.DownloadOptions.Metadata; |
368 var _body = null; | 368 var _body = null; |
369 | 369 |
370 if (blogId == null) { | 370 if (blogId == null) { |
371 throw new core.ArgumentError("Parameter blogId is required."); | 371 throw new core.ArgumentError("Parameter blogId is required."); |
372 } | 372 } |
373 if (postId == null) { | 373 if (postId == null) { |
374 throw new core.ArgumentError("Parameter postId is required."); | 374 throw new core.ArgumentError("Parameter postId is required."); |
375 } | 375 } |
376 if (commentId == null) { | 376 if (commentId == null) { |
377 throw new core.ArgumentError("Parameter commentId is required."); | 377 throw new core.ArgumentError("Parameter commentId is required."); |
378 } | 378 } |
379 | 379 |
380 _downloadOptions = null; | 380 _downloadOptions = null; |
381 | 381 |
382 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments/' + common_in
ternal.Escaper.ecapeVariable('$commentId'); | 382 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari
able('$commentId'); |
383 | 383 |
384 var _response = _requester.request(_url, | 384 var _response = _requester.request(_url, |
385 "DELETE", | 385 "DELETE", |
386 body: _body, | 386 body: _body, |
387 queryParams: _queryParams, | 387 queryParams: _queryParams, |
388 uploadOptions: _uploadOptions, | 388 uploadOptions: _uploadOptions, |
389 uploadMedia: _uploadMedia, | 389 uploadMedia: _uploadMedia, |
390 downloadOptions: _downloadOptions); | 390 downloadOptions: _downloadOptions); |
391 return _response.then((data) => null); | 391 return _response.then((data) => null); |
392 } | 392 } |
(...skipping 13 matching lines...) Expand all Loading... |
406 * that some comments will require elevated permissions, for example comments | 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 | 407 * where the parent posts which is in a draft state, or comments that are |
408 * pending moderation. | 408 * pending moderation. |
409 * Possible string values are: | 409 * Possible string values are: |
410 * - "ADMIN" : Admin level detail | 410 * - "ADMIN" : Admin level detail |
411 * - "AUTHOR" : Author level detail | 411 * - "AUTHOR" : Author level detail |
412 * - "READER" : Admin level detail | 412 * - "READER" : Admin level detail |
413 * | 413 * |
414 * Completes with a [Comment]. | 414 * Completes with a [Comment]. |
415 * | 415 * |
416 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
417 * error. | 417 * error. |
418 * | 418 * |
419 * If the used [http.Client] completes with an error when making a REST call, | 419 * If the used [http.Client] completes with an error when making a REST call, |
420 * this method will complete with the same error. | 420 * this method will complete with the same error. |
421 */ | 421 */ |
422 async.Future<Comment> get(core.String blogId, core.String postId, core.String
commentId, {core.String view}) { | 422 async.Future<Comment> get(core.String blogId, core.String postId, core.String
commentId, {core.String view}) { |
423 var _url = null; | 423 var _url = null; |
424 var _queryParams = new core.Map(); | 424 var _queryParams = new core.Map(); |
425 var _uploadMedia = null; | 425 var _uploadMedia = null; |
426 var _uploadOptions = null; | 426 var _uploadOptions = null; |
427 var _downloadOptions = common.DownloadOptions.Metadata; | 427 var _downloadOptions = commons.DownloadOptions.Metadata; |
428 var _body = null; | 428 var _body = null; |
429 | 429 |
430 if (blogId == null) { | 430 if (blogId == null) { |
431 throw new core.ArgumentError("Parameter blogId is required."); | 431 throw new core.ArgumentError("Parameter blogId is required."); |
432 } | 432 } |
433 if (postId == null) { | 433 if (postId == null) { |
434 throw new core.ArgumentError("Parameter postId is required."); | 434 throw new core.ArgumentError("Parameter postId is required."); |
435 } | 435 } |
436 if (commentId == null) { | 436 if (commentId == null) { |
437 throw new core.ArgumentError("Parameter commentId is required."); | 437 throw new core.ArgumentError("Parameter commentId is required."); |
438 } | 438 } |
439 if (view != null) { | 439 if (view != null) { |
440 _queryParams["view"] = [view]; | 440 _queryParams["view"] = [view]; |
441 } | 441 } |
442 | 442 |
443 | 443 |
444 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments/' + common_in
ternal.Escaper.ecapeVariable('$commentId'); | 444 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari
able('$commentId'); |
445 | 445 |
446 var _response = _requester.request(_url, | 446 var _response = _requester.request(_url, |
447 "GET", | 447 "GET", |
448 body: _body, | 448 body: _body, |
449 queryParams: _queryParams, | 449 queryParams: _queryParams, |
450 uploadOptions: _uploadOptions, | 450 uploadOptions: _uploadOptions, |
451 uploadMedia: _uploadMedia, | 451 uploadMedia: _uploadMedia, |
452 downloadOptions: _downloadOptions); | 452 downloadOptions: _downloadOptions); |
453 return _response.then((data) => new Comment.fromJson(data)); | 453 return _response.then((data) => new Comment.fromJson(data)); |
454 } | 454 } |
(...skipping 23 matching lines...) Expand all Loading... |
478 * | 478 * |
479 * [view] - Access level with which to view the returned result. Note that | 479 * [view] - Access level with which to view the returned result. Note that |
480 * some fields require elevated access. | 480 * some fields require elevated access. |
481 * Possible string values are: | 481 * Possible string values are: |
482 * - "ADMIN" : Admin level detail | 482 * - "ADMIN" : Admin level detail |
483 * - "AUTHOR" : Author level detail | 483 * - "AUTHOR" : Author level detail |
484 * - "READER" : Reader level detail | 484 * - "READER" : Reader level detail |
485 * | 485 * |
486 * Completes with a [CommentList]. | 486 * Completes with a [CommentList]. |
487 * | 487 * |
488 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 488 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
489 * error. | 489 * error. |
490 * | 490 * |
491 * If the used [http.Client] completes with an error when making a REST call, | 491 * If the used [http.Client] completes with an error when making a REST call, |
492 * this method will complete with the same error. | 492 * this method will complete with the same error. |
493 */ | 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}) { | 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; | 495 var _url = null; |
496 var _queryParams = new core.Map(); | 496 var _queryParams = new core.Map(); |
497 var _uploadMedia = null; | 497 var _uploadMedia = null; |
498 var _uploadOptions = null; | 498 var _uploadOptions = null; |
499 var _downloadOptions = common.DownloadOptions.Metadata; | 499 var _downloadOptions = commons.DownloadOptions.Metadata; |
500 var _body = null; | 500 var _body = null; |
501 | 501 |
502 if (blogId == null) { | 502 if (blogId == null) { |
503 throw new core.ArgumentError("Parameter blogId is required."); | 503 throw new core.ArgumentError("Parameter blogId is required."); |
504 } | 504 } |
505 if (postId == null) { | 505 if (postId == null) { |
506 throw new core.ArgumentError("Parameter postId is required."); | 506 throw new core.ArgumentError("Parameter postId is required."); |
507 } | 507 } |
508 if (endDate != null) { | 508 if (endDate != null) { |
509 _queryParams["endDate"] = [(endDate).toIso8601String()]; | 509 _queryParams["endDate"] = [(endDate).toIso8601String()]; |
(...skipping 11 matching lines...) Expand all Loading... |
521 _queryParams["startDate"] = [(startDate).toIso8601String()]; | 521 _queryParams["startDate"] = [(startDate).toIso8601String()]; |
522 } | 522 } |
523 if (status != null) { | 523 if (status != null) { |
524 _queryParams["status"] = status; | 524 _queryParams["status"] = status; |
525 } | 525 } |
526 if (view != null) { | 526 if (view != null) { |
527 _queryParams["view"] = [view]; | 527 _queryParams["view"] = [view]; |
528 } | 528 } |
529 | 529 |
530 | 530 |
531 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments'; | 531 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments'; |
532 | 532 |
533 var _response = _requester.request(_url, | 533 var _response = _requester.request(_url, |
534 "GET", | 534 "GET", |
535 body: _body, | 535 body: _body, |
536 queryParams: _queryParams, | 536 queryParams: _queryParams, |
537 uploadOptions: _uploadOptions, | 537 uploadOptions: _uploadOptions, |
538 uploadMedia: _uploadMedia, | 538 uploadMedia: _uploadMedia, |
539 downloadOptions: _downloadOptions); | 539 downloadOptions: _downloadOptions); |
540 return _response.then((data) => new CommentList.fromJson(data)); | 540 return _response.then((data) => new CommentList.fromJson(data)); |
541 } | 541 } |
(...skipping 14 matching lines...) Expand all Loading... |
556 * | 556 * |
557 * [pageToken] - Continuation token if request is paged. | 557 * [pageToken] - Continuation token if request is paged. |
558 * | 558 * |
559 * [startDate] - Earliest date of comment to fetch, a date-time with RFC 3339 | 559 * [startDate] - Earliest date of comment to fetch, a date-time with RFC 3339 |
560 * formatting. | 560 * formatting. |
561 * | 561 * |
562 * [status] - null | 562 * [status] - null |
563 * | 563 * |
564 * Completes with a [CommentList]. | 564 * Completes with a [CommentList]. |
565 * | 565 * |
566 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 566 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
567 * error. | 567 * error. |
568 * | 568 * |
569 * If the used [http.Client] completes with an error when making a REST call, | 569 * If the used [http.Client] completes with an error when making a REST call, |
570 * this method will complete with the same error. | 570 * this method will complete with the same error. |
571 */ | 571 */ |
572 async.Future<CommentList> listByBlog(core.String blogId, {core.DateTime endDat
e, core.bool fetchBodies, core.int maxResults, core.String pageToken, core.DateT
ime startDate, core.List<core.String> status}) { | 572 async.Future<CommentList> listByBlog(core.String blogId, {core.DateTime endDat
e, core.bool fetchBodies, core.int maxResults, core.String pageToken, core.DateT
ime startDate, core.List<core.String> status}) { |
573 var _url = null; | 573 var _url = null; |
574 var _queryParams = new core.Map(); | 574 var _queryParams = new core.Map(); |
575 var _uploadMedia = null; | 575 var _uploadMedia = null; |
576 var _uploadOptions = null; | 576 var _uploadOptions = null; |
577 var _downloadOptions = common.DownloadOptions.Metadata; | 577 var _downloadOptions = commons.DownloadOptions.Metadata; |
578 var _body = null; | 578 var _body = null; |
579 | 579 |
580 if (blogId == null) { | 580 if (blogId == null) { |
581 throw new core.ArgumentError("Parameter blogId is required."); | 581 throw new core.ArgumentError("Parameter blogId is required."); |
582 } | 582 } |
583 if (endDate != null) { | 583 if (endDate != null) { |
584 _queryParams["endDate"] = [(endDate).toIso8601String()]; | 584 _queryParams["endDate"] = [(endDate).toIso8601String()]; |
585 } | 585 } |
586 if (fetchBodies != null) { | 586 if (fetchBodies != null) { |
587 _queryParams["fetchBodies"] = ["${fetchBodies}"]; | 587 _queryParams["fetchBodies"] = ["${fetchBodies}"]; |
588 } | 588 } |
589 if (maxResults != null) { | 589 if (maxResults != null) { |
590 _queryParams["maxResults"] = ["${maxResults}"]; | 590 _queryParams["maxResults"] = ["${maxResults}"]; |
591 } | 591 } |
592 if (pageToken != null) { | 592 if (pageToken != null) { |
593 _queryParams["pageToken"] = [pageToken]; | 593 _queryParams["pageToken"] = [pageToken]; |
594 } | 594 } |
595 if (startDate != null) { | 595 if (startDate != null) { |
596 _queryParams["startDate"] = [(startDate).toIso8601String()]; | 596 _queryParams["startDate"] = [(startDate).toIso8601String()]; |
597 } | 597 } |
598 if (status != null) { | 598 if (status != null) { |
599 _queryParams["status"] = status; | 599 _queryParams["status"] = status; |
600 } | 600 } |
601 | 601 |
602 | 602 |
603 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/comme
nts'; | 603 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/comments'; |
604 | 604 |
605 var _response = _requester.request(_url, | 605 var _response = _requester.request(_url, |
606 "GET", | 606 "GET", |
607 body: _body, | 607 body: _body, |
608 queryParams: _queryParams, | 608 queryParams: _queryParams, |
609 uploadOptions: _uploadOptions, | 609 uploadOptions: _uploadOptions, |
610 uploadMedia: _uploadMedia, | 610 uploadMedia: _uploadMedia, |
611 downloadOptions: _downloadOptions); | 611 downloadOptions: _downloadOptions); |
612 return _response.then((data) => new CommentList.fromJson(data)); | 612 return _response.then((data) => new CommentList.fromJson(data)); |
613 } | 613 } |
614 | 614 |
615 /** | 615 /** |
616 * Marks a comment as spam. | 616 * Marks a comment as spam. |
617 * | 617 * |
618 * Request parameters: | 618 * Request parameters: |
619 * | 619 * |
620 * [blogId] - The ID of the Blog. | 620 * [blogId] - The ID of the Blog. |
621 * | 621 * |
622 * [postId] - The ID of the Post. | 622 * [postId] - The ID of the Post. |
623 * | 623 * |
624 * [commentId] - The ID of the comment to mark as spam. | 624 * [commentId] - The ID of the comment to mark as spam. |
625 * | 625 * |
626 * Completes with a [Comment]. | 626 * Completes with a [Comment]. |
627 * | 627 * |
628 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 628 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
629 * error. | 629 * error. |
630 * | 630 * |
631 * If the used [http.Client] completes with an error when making a REST call, | 631 * If the used [http.Client] completes with an error when making a REST call, |
632 * this method will complete with the same error. | 632 * this method will complete with the same error. |
633 */ | 633 */ |
634 async.Future<Comment> markAsSpam(core.String blogId, core.String postId, core.
String commentId) { | 634 async.Future<Comment> markAsSpam(core.String blogId, core.String postId, core.
String commentId) { |
635 var _url = null; | 635 var _url = null; |
636 var _queryParams = new core.Map(); | 636 var _queryParams = new core.Map(); |
637 var _uploadMedia = null; | 637 var _uploadMedia = null; |
638 var _uploadOptions = null; | 638 var _uploadOptions = null; |
639 var _downloadOptions = common.DownloadOptions.Metadata; | 639 var _downloadOptions = commons.DownloadOptions.Metadata; |
640 var _body = null; | 640 var _body = null; |
641 | 641 |
642 if (blogId == null) { | 642 if (blogId == null) { |
643 throw new core.ArgumentError("Parameter blogId is required."); | 643 throw new core.ArgumentError("Parameter blogId is required."); |
644 } | 644 } |
645 if (postId == null) { | 645 if (postId == null) { |
646 throw new core.ArgumentError("Parameter postId is required."); | 646 throw new core.ArgumentError("Parameter postId is required."); |
647 } | 647 } |
648 if (commentId == null) { | 648 if (commentId == null) { |
649 throw new core.ArgumentError("Parameter commentId is required."); | 649 throw new core.ArgumentError("Parameter commentId is required."); |
650 } | 650 } |
651 | 651 |
652 | 652 |
653 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments/' + common_in
ternal.Escaper.ecapeVariable('$commentId') + '/spam'; | 653 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari
able('$commentId') + '/spam'; |
654 | 654 |
655 var _response = _requester.request(_url, | 655 var _response = _requester.request(_url, |
656 "POST", | 656 "POST", |
657 body: _body, | 657 body: _body, |
658 queryParams: _queryParams, | 658 queryParams: _queryParams, |
659 uploadOptions: _uploadOptions, | 659 uploadOptions: _uploadOptions, |
660 uploadMedia: _uploadMedia, | 660 uploadMedia: _uploadMedia, |
661 downloadOptions: _downloadOptions); | 661 downloadOptions: _downloadOptions); |
662 return _response.then((data) => new Comment.fromJson(data)); | 662 return _response.then((data) => new Comment.fromJson(data)); |
663 } | 663 } |
664 | 664 |
665 /** | 665 /** |
666 * Removes the content of a comment. | 666 * Removes the content of a comment. |
667 * | 667 * |
668 * Request parameters: | 668 * Request parameters: |
669 * | 669 * |
670 * [blogId] - The ID of the Blog. | 670 * [blogId] - The ID of the Blog. |
671 * | 671 * |
672 * [postId] - The ID of the Post. | 672 * [postId] - The ID of the Post. |
673 * | 673 * |
674 * [commentId] - The ID of the comment to delete content from. | 674 * [commentId] - The ID of the comment to delete content from. |
675 * | 675 * |
676 * Completes with a [Comment]. | 676 * Completes with a [Comment]. |
677 * | 677 * |
678 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 678 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
679 * error. | 679 * error. |
680 * | 680 * |
681 * If the used [http.Client] completes with an error when making a REST call, | 681 * If the used [http.Client] completes with an error when making a REST call, |
682 * this method will complete with the same error. | 682 * this method will complete with the same error. |
683 */ | 683 */ |
684 async.Future<Comment> removeContent(core.String blogId, core.String postId, co
re.String commentId) { | 684 async.Future<Comment> removeContent(core.String blogId, core.String postId, co
re.String commentId) { |
685 var _url = null; | 685 var _url = null; |
686 var _queryParams = new core.Map(); | 686 var _queryParams = new core.Map(); |
687 var _uploadMedia = null; | 687 var _uploadMedia = null; |
688 var _uploadOptions = null; | 688 var _uploadOptions = null; |
689 var _downloadOptions = common.DownloadOptions.Metadata; | 689 var _downloadOptions = commons.DownloadOptions.Metadata; |
690 var _body = null; | 690 var _body = null; |
691 | 691 |
692 if (blogId == null) { | 692 if (blogId == null) { |
693 throw new core.ArgumentError("Parameter blogId is required."); | 693 throw new core.ArgumentError("Parameter blogId is required."); |
694 } | 694 } |
695 if (postId == null) { | 695 if (postId == null) { |
696 throw new core.ArgumentError("Parameter postId is required."); | 696 throw new core.ArgumentError("Parameter postId is required."); |
697 } | 697 } |
698 if (commentId == null) { | 698 if (commentId == null) { |
699 throw new core.ArgumentError("Parameter commentId is required."); | 699 throw new core.ArgumentError("Parameter commentId is required."); |
700 } | 700 } |
701 | 701 |
702 | 702 |
703 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/comments/' + common_in
ternal.Escaper.ecapeVariable('$commentId') + '/removecontent'; | 703 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/comments/' + commons.Escaper.ecapeVari
able('$commentId') + '/removecontent'; |
704 | 704 |
705 var _response = _requester.request(_url, | 705 var _response = _requester.request(_url, |
706 "POST", | 706 "POST", |
707 body: _body, | 707 body: _body, |
708 queryParams: _queryParams, | 708 queryParams: _queryParams, |
709 uploadOptions: _uploadOptions, | 709 uploadOptions: _uploadOptions, |
710 uploadMedia: _uploadMedia, | 710 uploadMedia: _uploadMedia, |
711 downloadOptions: _downloadOptions); | 711 downloadOptions: _downloadOptions); |
712 return _response.then((data) => new Comment.fromJson(data)); | 712 return _response.then((data) => new Comment.fromJson(data)); |
713 } | 713 } |
714 | 714 |
715 } | 715 } |
716 | 716 |
717 | 717 |
718 /** Not documented yet. */ | |
719 class PageViewsResourceApi { | 718 class PageViewsResourceApi { |
720 final common_internal.ApiRequester _requester; | 719 final commons.ApiRequester _requester; |
721 | 720 |
722 PageViewsResourceApi(common_internal.ApiRequester client) : | 721 PageViewsResourceApi(commons.ApiRequester client) : |
723 _requester = client; | 722 _requester = client; |
724 | 723 |
725 /** | 724 /** |
726 * Retrieve pageview stats for a Blog. | 725 * Retrieve pageview stats for a Blog. |
727 * | 726 * |
728 * Request parameters: | 727 * Request parameters: |
729 * | 728 * |
730 * [blogId] - The ID of the blog to get. | 729 * [blogId] - The ID of the blog to get. |
731 * | 730 * |
732 * [range] - null | 731 * [range] - null |
733 * | 732 * |
734 * Completes with a [Pageviews]. | 733 * Completes with a [Pageviews]. |
735 * | 734 * |
736 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 735 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
737 * error. | 736 * error. |
738 * | 737 * |
739 * If the used [http.Client] completes with an error when making a REST call, | 738 * If the used [http.Client] completes with an error when making a REST call, |
740 * this method will complete with the same error. | 739 * this method will complete with the same error. |
741 */ | 740 */ |
742 async.Future<Pageviews> get(core.String blogId, {core.List<core.String> range}
) { | 741 async.Future<Pageviews> get(core.String blogId, {core.List<core.String> range}
) { |
743 var _url = null; | 742 var _url = null; |
744 var _queryParams = new core.Map(); | 743 var _queryParams = new core.Map(); |
745 var _uploadMedia = null; | 744 var _uploadMedia = null; |
746 var _uploadOptions = null; | 745 var _uploadOptions = null; |
747 var _downloadOptions = common.DownloadOptions.Metadata; | 746 var _downloadOptions = commons.DownloadOptions.Metadata; |
748 var _body = null; | 747 var _body = null; |
749 | 748 |
750 if (blogId == null) { | 749 if (blogId == null) { |
751 throw new core.ArgumentError("Parameter blogId is required."); | 750 throw new core.ArgumentError("Parameter blogId is required."); |
752 } | 751 } |
753 if (range != null) { | 752 if (range != null) { |
754 _queryParams["range"] = range; | 753 _queryParams["range"] = range; |
755 } | 754 } |
756 | 755 |
757 | 756 |
758 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pagev
iews'; | 757 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pageviews'; |
759 | 758 |
760 var _response = _requester.request(_url, | 759 var _response = _requester.request(_url, |
761 "GET", | 760 "GET", |
762 body: _body, | 761 body: _body, |
763 queryParams: _queryParams, | 762 queryParams: _queryParams, |
764 uploadOptions: _uploadOptions, | 763 uploadOptions: _uploadOptions, |
765 uploadMedia: _uploadMedia, | 764 uploadMedia: _uploadMedia, |
766 downloadOptions: _downloadOptions); | 765 downloadOptions: _downloadOptions); |
767 return _response.then((data) => new Pageviews.fromJson(data)); | 766 return _response.then((data) => new Pageviews.fromJson(data)); |
768 } | 767 } |
769 | 768 |
770 } | 769 } |
771 | 770 |
772 | 771 |
773 /** Not documented yet. */ | |
774 class PagesResourceApi { | 772 class PagesResourceApi { |
775 final common_internal.ApiRequester _requester; | 773 final commons.ApiRequester _requester; |
776 | 774 |
777 PagesResourceApi(common_internal.ApiRequester client) : | 775 PagesResourceApi(commons.ApiRequester client) : |
778 _requester = client; | 776 _requester = client; |
779 | 777 |
780 /** | 778 /** |
781 * Delete a page by ID. | 779 * Delete a page by ID. |
782 * | 780 * |
783 * Request parameters: | 781 * Request parameters: |
784 * | 782 * |
785 * [blogId] - The ID of the Blog. | 783 * [blogId] - The ID of the Blog. |
786 * | 784 * |
787 * [pageId] - The ID of the Page. | 785 * [pageId] - The ID of the Page. |
788 * | 786 * |
789 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 787 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
790 * error. | 788 * error. |
791 * | 789 * |
792 * If the used [http.Client] completes with an error when making a REST call, | 790 * If the used [http.Client] completes with an error when making a REST call, |
793 * this method will complete with the same error. | 791 * this method will complete with the same error. |
794 */ | 792 */ |
795 async.Future delete(core.String blogId, core.String pageId) { | 793 async.Future delete(core.String blogId, core.String pageId) { |
796 var _url = null; | 794 var _url = null; |
797 var _queryParams = new core.Map(); | 795 var _queryParams = new core.Map(); |
798 var _uploadMedia = null; | 796 var _uploadMedia = null; |
799 var _uploadOptions = null; | 797 var _uploadOptions = null; |
800 var _downloadOptions = common.DownloadOptions.Metadata; | 798 var _downloadOptions = commons.DownloadOptions.Metadata; |
801 var _body = null; | 799 var _body = null; |
802 | 800 |
803 if (blogId == null) { | 801 if (blogId == null) { |
804 throw new core.ArgumentError("Parameter blogId is required."); | 802 throw new core.ArgumentError("Parameter blogId is required."); |
805 } | 803 } |
806 if (pageId == null) { | 804 if (pageId == null) { |
807 throw new core.ArgumentError("Parameter pageId is required."); | 805 throw new core.ArgumentError("Parameter pageId is required."); |
808 } | 806 } |
809 | 807 |
810 _downloadOptions = null; | 808 _downloadOptions = null; |
811 | 809 |
812 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId'); | 810 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId'); |
813 | 811 |
814 var _response = _requester.request(_url, | 812 var _response = _requester.request(_url, |
815 "DELETE", | 813 "DELETE", |
816 body: _body, | 814 body: _body, |
817 queryParams: _queryParams, | 815 queryParams: _queryParams, |
818 uploadOptions: _uploadOptions, | 816 uploadOptions: _uploadOptions, |
819 uploadMedia: _uploadMedia, | 817 uploadMedia: _uploadMedia, |
820 downloadOptions: _downloadOptions); | 818 downloadOptions: _downloadOptions); |
821 return _response.then((data) => null); | 819 return _response.then((data) => null); |
822 } | 820 } |
823 | 821 |
824 /** | 822 /** |
825 * Gets one blog page by ID. | 823 * Gets one blog page by ID. |
826 * | 824 * |
827 * Request parameters: | 825 * Request parameters: |
828 * | 826 * |
829 * [blogId] - ID of the blog containing the page. | 827 * [blogId] - ID of the blog containing the page. |
830 * | 828 * |
831 * [pageId] - The ID of the page to get. | 829 * [pageId] - The ID of the page to get. |
832 * | 830 * |
833 * [view] - null | 831 * [view] - null |
834 * Possible string values are: | 832 * Possible string values are: |
835 * - "ADMIN" : Admin level detail | 833 * - "ADMIN" : Admin level detail |
836 * - "AUTHOR" : Author level detail | 834 * - "AUTHOR" : Author level detail |
837 * - "READER" : Reader level detail | 835 * - "READER" : Reader level detail |
838 * | 836 * |
839 * Completes with a [Page]. | 837 * Completes with a [Page]. |
840 * | 838 * |
841 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 839 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
842 * error. | 840 * error. |
843 * | 841 * |
844 * If the used [http.Client] completes with an error when making a REST call, | 842 * If the used [http.Client] completes with an error when making a REST call, |
845 * this method will complete with the same error. | 843 * this method will complete with the same error. |
846 */ | 844 */ |
847 async.Future<Page> get(core.String blogId, core.String pageId, {core.String vi
ew}) { | 845 async.Future<Page> get(core.String blogId, core.String pageId, {core.String vi
ew}) { |
848 var _url = null; | 846 var _url = null; |
849 var _queryParams = new core.Map(); | 847 var _queryParams = new core.Map(); |
850 var _uploadMedia = null; | 848 var _uploadMedia = null; |
851 var _uploadOptions = null; | 849 var _uploadOptions = null; |
852 var _downloadOptions = common.DownloadOptions.Metadata; | 850 var _downloadOptions = commons.DownloadOptions.Metadata; |
853 var _body = null; | 851 var _body = null; |
854 | 852 |
855 if (blogId == null) { | 853 if (blogId == null) { |
856 throw new core.ArgumentError("Parameter blogId is required."); | 854 throw new core.ArgumentError("Parameter blogId is required."); |
857 } | 855 } |
858 if (pageId == null) { | 856 if (pageId == null) { |
859 throw new core.ArgumentError("Parameter pageId is required."); | 857 throw new core.ArgumentError("Parameter pageId is required."); |
860 } | 858 } |
861 if (view != null) { | 859 if (view != null) { |
862 _queryParams["view"] = [view]; | 860 _queryParams["view"] = [view]; |
863 } | 861 } |
864 | 862 |
865 | 863 |
866 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId'); | 864 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId'); |
867 | 865 |
868 var _response = _requester.request(_url, | 866 var _response = _requester.request(_url, |
869 "GET", | 867 "GET", |
870 body: _body, | 868 body: _body, |
871 queryParams: _queryParams, | 869 queryParams: _queryParams, |
872 uploadOptions: _uploadOptions, | 870 uploadOptions: _uploadOptions, |
873 uploadMedia: _uploadMedia, | 871 uploadMedia: _uploadMedia, |
874 downloadOptions: _downloadOptions); | 872 downloadOptions: _downloadOptions); |
875 return _response.then((data) => new Page.fromJson(data)); | 873 return _response.then((data) => new Page.fromJson(data)); |
876 } | 874 } |
877 | 875 |
878 /** | 876 /** |
879 * Add a page. | 877 * Add a page. |
880 * | 878 * |
881 * [request] - The metadata request object. | 879 * [request] - The metadata request object. |
882 * | 880 * |
883 * Request parameters: | 881 * Request parameters: |
884 * | 882 * |
885 * [blogId] - ID of the blog to add the page to. | 883 * [blogId] - ID of the blog to add the page to. |
886 * | 884 * |
887 * [isDraft] - Whether to create the page as a draft (default: false). | 885 * [isDraft] - Whether to create the page as a draft (default: false). |
888 * | 886 * |
889 * Completes with a [Page]. | 887 * Completes with a [Page]. |
890 * | 888 * |
891 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 889 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
892 * error. | 890 * error. |
893 * | 891 * |
894 * If the used [http.Client] completes with an error when making a REST call, | 892 * If the used [http.Client] completes with an error when making a REST call, |
895 * this method will complete with the same error. | 893 * this method will complete with the same error. |
896 */ | 894 */ |
897 async.Future<Page> insert(Page request, core.String blogId, {core.bool isDraft
}) { | 895 async.Future<Page> insert(Page request, core.String blogId, {core.bool isDraft
}) { |
898 var _url = null; | 896 var _url = null; |
899 var _queryParams = new core.Map(); | 897 var _queryParams = new core.Map(); |
900 var _uploadMedia = null; | 898 var _uploadMedia = null; |
901 var _uploadOptions = null; | 899 var _uploadOptions = null; |
902 var _downloadOptions = common.DownloadOptions.Metadata; | 900 var _downloadOptions = commons.DownloadOptions.Metadata; |
903 var _body = null; | 901 var _body = null; |
904 | 902 |
905 if (request != null) { | 903 if (request != null) { |
906 _body = convert.JSON.encode((request).toJson()); | 904 _body = convert.JSON.encode((request).toJson()); |
907 } | 905 } |
908 if (blogId == null) { | 906 if (blogId == null) { |
909 throw new core.ArgumentError("Parameter blogId is required."); | 907 throw new core.ArgumentError("Parameter blogId is required."); |
910 } | 908 } |
911 if (isDraft != null) { | 909 if (isDraft != null) { |
912 _queryParams["isDraft"] = ["${isDraft}"]; | 910 _queryParams["isDraft"] = ["${isDraft}"]; |
913 } | 911 } |
914 | 912 |
915 | 913 |
916 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
'; | 914 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages'; |
917 | 915 |
918 var _response = _requester.request(_url, | 916 var _response = _requester.request(_url, |
919 "POST", | 917 "POST", |
920 body: _body, | 918 body: _body, |
921 queryParams: _queryParams, | 919 queryParams: _queryParams, |
922 uploadOptions: _uploadOptions, | 920 uploadOptions: _uploadOptions, |
923 uploadMedia: _uploadMedia, | 921 uploadMedia: _uploadMedia, |
924 downloadOptions: _downloadOptions); | 922 downloadOptions: _downloadOptions); |
925 return _response.then((data) => new Page.fromJson(data)); | 923 return _response.then((data) => new Page.fromJson(data)); |
926 } | 924 } |
(...skipping 15 matching lines...) Expand all Loading... |
942 * | 940 * |
943 * [view] - Access level with which to view the returned result. Note that | 941 * [view] - Access level with which to view the returned result. Note that |
944 * some fields require elevated access. | 942 * some fields require elevated access. |
945 * Possible string values are: | 943 * Possible string values are: |
946 * - "ADMIN" : Admin level detail | 944 * - "ADMIN" : Admin level detail |
947 * - "AUTHOR" : Author level detail | 945 * - "AUTHOR" : Author level detail |
948 * - "READER" : Reader level detail | 946 * - "READER" : Reader level detail |
949 * | 947 * |
950 * Completes with a [PageList]. | 948 * Completes with a [PageList]. |
951 * | 949 * |
952 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 950 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
953 * error. | 951 * error. |
954 * | 952 * |
955 * If the used [http.Client] completes with an error when making a REST call, | 953 * If the used [http.Client] completes with an error when making a REST call, |
956 * this method will complete with the same error. | 954 * this method will complete with the same error. |
957 */ | 955 */ |
958 async.Future<PageList> list(core.String blogId, {core.bool fetchBodies, core.i
nt maxResults, core.String pageToken, core.List<core.String> status, core.String
view}) { | 956 async.Future<PageList> list(core.String blogId, {core.bool fetchBodies, core.i
nt maxResults, core.String pageToken, core.List<core.String> status, core.String
view}) { |
959 var _url = null; | 957 var _url = null; |
960 var _queryParams = new core.Map(); | 958 var _queryParams = new core.Map(); |
961 var _uploadMedia = null; | 959 var _uploadMedia = null; |
962 var _uploadOptions = null; | 960 var _uploadOptions = null; |
963 var _downloadOptions = common.DownloadOptions.Metadata; | 961 var _downloadOptions = commons.DownloadOptions.Metadata; |
964 var _body = null; | 962 var _body = null; |
965 | 963 |
966 if (blogId == null) { | 964 if (blogId == null) { |
967 throw new core.ArgumentError("Parameter blogId is required."); | 965 throw new core.ArgumentError("Parameter blogId is required."); |
968 } | 966 } |
969 if (fetchBodies != null) { | 967 if (fetchBodies != null) { |
970 _queryParams["fetchBodies"] = ["${fetchBodies}"]; | 968 _queryParams["fetchBodies"] = ["${fetchBodies}"]; |
971 } | 969 } |
972 if (maxResults != null) { | 970 if (maxResults != null) { |
973 _queryParams["maxResults"] = ["${maxResults}"]; | 971 _queryParams["maxResults"] = ["${maxResults}"]; |
974 } | 972 } |
975 if (pageToken != null) { | 973 if (pageToken != null) { |
976 _queryParams["pageToken"] = [pageToken]; | 974 _queryParams["pageToken"] = [pageToken]; |
977 } | 975 } |
978 if (status != null) { | 976 if (status != null) { |
979 _queryParams["status"] = status; | 977 _queryParams["status"] = status; |
980 } | 978 } |
981 if (view != null) { | 979 if (view != null) { |
982 _queryParams["view"] = [view]; | 980 _queryParams["view"] = [view]; |
983 } | 981 } |
984 | 982 |
985 | 983 |
986 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
'; | 984 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages'; |
987 | 985 |
988 var _response = _requester.request(_url, | 986 var _response = _requester.request(_url, |
989 "GET", | 987 "GET", |
990 body: _body, | 988 body: _body, |
991 queryParams: _queryParams, | 989 queryParams: _queryParams, |
992 uploadOptions: _uploadOptions, | 990 uploadOptions: _uploadOptions, |
993 uploadMedia: _uploadMedia, | 991 uploadMedia: _uploadMedia, |
994 downloadOptions: _downloadOptions); | 992 downloadOptions: _downloadOptions); |
995 return _response.then((data) => new PageList.fromJson(data)); | 993 return _response.then((data) => new PageList.fromJson(data)); |
996 } | 994 } |
(...skipping 10 matching lines...) Expand all Loading... |
1007 * [pageId] - The ID of the Page. | 1005 * [pageId] - The ID of the Page. |
1008 * | 1006 * |
1009 * [publish_1] - Whether a publish action should be performed when the page is | 1007 * [publish_1] - Whether a publish action should be performed when the page is |
1010 * updated (default: false). | 1008 * updated (default: false). |
1011 * | 1009 * |
1012 * [revert_1] - Whether a revert action should be performed when the page is | 1010 * [revert_1] - Whether a revert action should be performed when the page is |
1013 * updated (default: false). | 1011 * updated (default: false). |
1014 * | 1012 * |
1015 * Completes with a [Page]. | 1013 * Completes with a [Page]. |
1016 * | 1014 * |
1017 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1015 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1018 * error. | 1016 * error. |
1019 * | 1017 * |
1020 * If the used [http.Client] completes with an error when making a REST call, | 1018 * If the used [http.Client] completes with an error when making a REST call, |
1021 * this method will complete with the same error. | 1019 * this method will complete with the same error. |
1022 */ | 1020 */ |
1023 async.Future<Page> patch(Page request, core.String blogId, core.String pageId,
{core.bool publish_1, core.bool revert_1}) { | 1021 async.Future<Page> patch(Page request, core.String blogId, core.String pageId,
{core.bool publish_1, core.bool revert_1}) { |
1024 var _url = null; | 1022 var _url = null; |
1025 var _queryParams = new core.Map(); | 1023 var _queryParams = new core.Map(); |
1026 var _uploadMedia = null; | 1024 var _uploadMedia = null; |
1027 var _uploadOptions = null; | 1025 var _uploadOptions = null; |
1028 var _downloadOptions = common.DownloadOptions.Metadata; | 1026 var _downloadOptions = commons.DownloadOptions.Metadata; |
1029 var _body = null; | 1027 var _body = null; |
1030 | 1028 |
1031 if (request != null) { | 1029 if (request != null) { |
1032 _body = convert.JSON.encode((request).toJson()); | 1030 _body = convert.JSON.encode((request).toJson()); |
1033 } | 1031 } |
1034 if (blogId == null) { | 1032 if (blogId == null) { |
1035 throw new core.ArgumentError("Parameter blogId is required."); | 1033 throw new core.ArgumentError("Parameter blogId is required."); |
1036 } | 1034 } |
1037 if (pageId == null) { | 1035 if (pageId == null) { |
1038 throw new core.ArgumentError("Parameter pageId is required."); | 1036 throw new core.ArgumentError("Parameter pageId is required."); |
1039 } | 1037 } |
1040 if (publish_1 != null) { | 1038 if (publish_1 != null) { |
1041 _queryParams["publish"] = ["${publish_1}"]; | 1039 _queryParams["publish"] = ["${publish_1}"]; |
1042 } | 1040 } |
1043 if (revert_1 != null) { | 1041 if (revert_1 != null) { |
1044 _queryParams["revert"] = ["${revert_1}"]; | 1042 _queryParams["revert"] = ["${revert_1}"]; |
1045 } | 1043 } |
1046 | 1044 |
1047 | 1045 |
1048 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId'); | 1046 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId'); |
1049 | 1047 |
1050 var _response = _requester.request(_url, | 1048 var _response = _requester.request(_url, |
1051 "PATCH", | 1049 "PATCH", |
1052 body: _body, | 1050 body: _body, |
1053 queryParams: _queryParams, | 1051 queryParams: _queryParams, |
1054 uploadOptions: _uploadOptions, | 1052 uploadOptions: _uploadOptions, |
1055 uploadMedia: _uploadMedia, | 1053 uploadMedia: _uploadMedia, |
1056 downloadOptions: _downloadOptions); | 1054 downloadOptions: _downloadOptions); |
1057 return _response.then((data) => new Page.fromJson(data)); | 1055 return _response.then((data) => new Page.fromJson(data)); |
1058 } | 1056 } |
1059 | 1057 |
1060 /** | 1058 /** |
1061 * Publishes a draft page. | 1059 * Publishes a draft page. |
1062 * | 1060 * |
1063 * Request parameters: | 1061 * Request parameters: |
1064 * | 1062 * |
1065 * [blogId] - The ID of the blog. | 1063 * [blogId] - The ID of the blog. |
1066 * | 1064 * |
1067 * [pageId] - The ID of the page. | 1065 * [pageId] - The ID of the page. |
1068 * | 1066 * |
1069 * Completes with a [Page]. | 1067 * Completes with a [Page]. |
1070 * | 1068 * |
1071 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1069 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1072 * error. | 1070 * error. |
1073 * | 1071 * |
1074 * If the used [http.Client] completes with an error when making a REST call, | 1072 * If the used [http.Client] completes with an error when making a REST call, |
1075 * this method will complete with the same error. | 1073 * this method will complete with the same error. |
1076 */ | 1074 */ |
1077 async.Future<Page> publish(core.String blogId, core.String pageId) { | 1075 async.Future<Page> publish(core.String blogId, core.String pageId) { |
1078 var _url = null; | 1076 var _url = null; |
1079 var _queryParams = new core.Map(); | 1077 var _queryParams = new core.Map(); |
1080 var _uploadMedia = null; | 1078 var _uploadMedia = null; |
1081 var _uploadOptions = null; | 1079 var _uploadOptions = null; |
1082 var _downloadOptions = common.DownloadOptions.Metadata; | 1080 var _downloadOptions = commons.DownloadOptions.Metadata; |
1083 var _body = null; | 1081 var _body = null; |
1084 | 1082 |
1085 if (blogId == null) { | 1083 if (blogId == null) { |
1086 throw new core.ArgumentError("Parameter blogId is required."); | 1084 throw new core.ArgumentError("Parameter blogId is required."); |
1087 } | 1085 } |
1088 if (pageId == null) { | 1086 if (pageId == null) { |
1089 throw new core.ArgumentError("Parameter pageId is required."); | 1087 throw new core.ArgumentError("Parameter pageId is required."); |
1090 } | 1088 } |
1091 | 1089 |
1092 | 1090 |
1093 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId') + '/publish'; | 1091 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId') + '/publish'; |
1094 | 1092 |
1095 var _response = _requester.request(_url, | 1093 var _response = _requester.request(_url, |
1096 "POST", | 1094 "POST", |
1097 body: _body, | 1095 body: _body, |
1098 queryParams: _queryParams, | 1096 queryParams: _queryParams, |
1099 uploadOptions: _uploadOptions, | 1097 uploadOptions: _uploadOptions, |
1100 uploadMedia: _uploadMedia, | 1098 uploadMedia: _uploadMedia, |
1101 downloadOptions: _downloadOptions); | 1099 downloadOptions: _downloadOptions); |
1102 return _response.then((data) => new Page.fromJson(data)); | 1100 return _response.then((data) => new Page.fromJson(data)); |
1103 } | 1101 } |
1104 | 1102 |
1105 /** | 1103 /** |
1106 * Revert a published or scheduled page to draft state. | 1104 * Revert a published or scheduled page to draft state. |
1107 * | 1105 * |
1108 * Request parameters: | 1106 * Request parameters: |
1109 * | 1107 * |
1110 * [blogId] - The ID of the blog. | 1108 * [blogId] - The ID of the blog. |
1111 * | 1109 * |
1112 * [pageId] - The ID of the page. | 1110 * [pageId] - The ID of the page. |
1113 * | 1111 * |
1114 * Completes with a [Page]. | 1112 * Completes with a [Page]. |
1115 * | 1113 * |
1116 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1117 * error. | 1115 * error. |
1118 * | 1116 * |
1119 * If the used [http.Client] completes with an error when making a REST call, | 1117 * If the used [http.Client] completes with an error when making a REST call, |
1120 * this method will complete with the same error. | 1118 * this method will complete with the same error. |
1121 */ | 1119 */ |
1122 async.Future<Page> revert(core.String blogId, core.String pageId) { | 1120 async.Future<Page> revert(core.String blogId, core.String pageId) { |
1123 var _url = null; | 1121 var _url = null; |
1124 var _queryParams = new core.Map(); | 1122 var _queryParams = new core.Map(); |
1125 var _uploadMedia = null; | 1123 var _uploadMedia = null; |
1126 var _uploadOptions = null; | 1124 var _uploadOptions = null; |
1127 var _downloadOptions = common.DownloadOptions.Metadata; | 1125 var _downloadOptions = commons.DownloadOptions.Metadata; |
1128 var _body = null; | 1126 var _body = null; |
1129 | 1127 |
1130 if (blogId == null) { | 1128 if (blogId == null) { |
1131 throw new core.ArgumentError("Parameter blogId is required."); | 1129 throw new core.ArgumentError("Parameter blogId is required."); |
1132 } | 1130 } |
1133 if (pageId == null) { | 1131 if (pageId == null) { |
1134 throw new core.ArgumentError("Parameter pageId is required."); | 1132 throw new core.ArgumentError("Parameter pageId is required."); |
1135 } | 1133 } |
1136 | 1134 |
1137 | 1135 |
1138 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId') + '/revert'; | 1136 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId') + '/revert'; |
1139 | 1137 |
1140 var _response = _requester.request(_url, | 1138 var _response = _requester.request(_url, |
1141 "POST", | 1139 "POST", |
1142 body: _body, | 1140 body: _body, |
1143 queryParams: _queryParams, | 1141 queryParams: _queryParams, |
1144 uploadOptions: _uploadOptions, | 1142 uploadOptions: _uploadOptions, |
1145 uploadMedia: _uploadMedia, | 1143 uploadMedia: _uploadMedia, |
1146 downloadOptions: _downloadOptions); | 1144 downloadOptions: _downloadOptions); |
1147 return _response.then((data) => new Page.fromJson(data)); | 1145 return _response.then((data) => new Page.fromJson(data)); |
1148 } | 1146 } |
(...skipping 10 matching lines...) Expand all Loading... |
1159 * [pageId] - The ID of the Page. | 1157 * [pageId] - The ID of the Page. |
1160 * | 1158 * |
1161 * [publish_1] - Whether a publish action should be performed when the page is | 1159 * [publish_1] - Whether a publish action should be performed when the page is |
1162 * updated (default: false). | 1160 * updated (default: false). |
1163 * | 1161 * |
1164 * [revert_1] - Whether a revert action should be performed when the page is | 1162 * [revert_1] - Whether a revert action should be performed when the page is |
1165 * updated (default: false). | 1163 * updated (default: false). |
1166 * | 1164 * |
1167 * Completes with a [Page]. | 1165 * Completes with a [Page]. |
1168 * | 1166 * |
1169 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1167 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1170 * error. | 1168 * error. |
1171 * | 1169 * |
1172 * If the used [http.Client] completes with an error when making a REST call, | 1170 * If the used [http.Client] completes with an error when making a REST call, |
1173 * this method will complete with the same error. | 1171 * this method will complete with the same error. |
1174 */ | 1172 */ |
1175 async.Future<Page> update(Page request, core.String blogId, core.String pageId
, {core.bool publish_1, core.bool revert_1}) { | 1173 async.Future<Page> update(Page request, core.String blogId, core.String pageId
, {core.bool publish_1, core.bool revert_1}) { |
1176 var _url = null; | 1174 var _url = null; |
1177 var _queryParams = new core.Map(); | 1175 var _queryParams = new core.Map(); |
1178 var _uploadMedia = null; | 1176 var _uploadMedia = null; |
1179 var _uploadOptions = null; | 1177 var _uploadOptions = null; |
1180 var _downloadOptions = common.DownloadOptions.Metadata; | 1178 var _downloadOptions = commons.DownloadOptions.Metadata; |
1181 var _body = null; | 1179 var _body = null; |
1182 | 1180 |
1183 if (request != null) { | 1181 if (request != null) { |
1184 _body = convert.JSON.encode((request).toJson()); | 1182 _body = convert.JSON.encode((request).toJson()); |
1185 } | 1183 } |
1186 if (blogId == null) { | 1184 if (blogId == null) { |
1187 throw new core.ArgumentError("Parameter blogId is required."); | 1185 throw new core.ArgumentError("Parameter blogId is required."); |
1188 } | 1186 } |
1189 if (pageId == null) { | 1187 if (pageId == null) { |
1190 throw new core.ArgumentError("Parameter pageId is required."); | 1188 throw new core.ArgumentError("Parameter pageId is required."); |
1191 } | 1189 } |
1192 if (publish_1 != null) { | 1190 if (publish_1 != null) { |
1193 _queryParams["publish"] = ["${publish_1}"]; | 1191 _queryParams["publish"] = ["${publish_1}"]; |
1194 } | 1192 } |
1195 if (revert_1 != null) { | 1193 if (revert_1 != null) { |
1196 _queryParams["revert"] = ["${revert_1}"]; | 1194 _queryParams["revert"] = ["${revert_1}"]; |
1197 } | 1195 } |
1198 | 1196 |
1199 | 1197 |
1200 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/pages
/' + common_internal.Escaper.ecapeVariable('$pageId'); | 1198 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/pages/' + com
mons.Escaper.ecapeVariable('$pageId'); |
1201 | 1199 |
1202 var _response = _requester.request(_url, | 1200 var _response = _requester.request(_url, |
1203 "PUT", | 1201 "PUT", |
1204 body: _body, | 1202 body: _body, |
1205 queryParams: _queryParams, | 1203 queryParams: _queryParams, |
1206 uploadOptions: _uploadOptions, | 1204 uploadOptions: _uploadOptions, |
1207 uploadMedia: _uploadMedia, | 1205 uploadMedia: _uploadMedia, |
1208 downloadOptions: _downloadOptions); | 1206 downloadOptions: _downloadOptions); |
1209 return _response.then((data) => new Page.fromJson(data)); | 1207 return _response.then((data) => new Page.fromJson(data)); |
1210 } | 1208 } |
1211 | 1209 |
1212 } | 1210 } |
1213 | 1211 |
1214 | 1212 |
1215 /** Not documented yet. */ | |
1216 class PostUserInfosResourceApi { | 1213 class PostUserInfosResourceApi { |
1217 final common_internal.ApiRequester _requester; | 1214 final commons.ApiRequester _requester; |
1218 | 1215 |
1219 PostUserInfosResourceApi(common_internal.ApiRequester client) : | 1216 PostUserInfosResourceApi(commons.ApiRequester client) : |
1220 _requester = client; | 1217 _requester = client; |
1221 | 1218 |
1222 /** | 1219 /** |
1223 * Gets one post and user info pair, by post ID and user ID. The post user | 1220 * Gets one post and user info pair, by post ID and user ID. The post user |
1224 * info contains per-user information about the post, such as access rights, | 1221 * info contains per-user information about the post, such as access rights, |
1225 * specific to the user. | 1222 * specific to the user. |
1226 * | 1223 * |
1227 * Request parameters: | 1224 * Request parameters: |
1228 * | 1225 * |
1229 * [userId] - ID of the user for the per-user information to be fetched. | 1226 * [userId] - ID of the user for the per-user information to be fetched. |
1230 * Either the word 'self' (sans quote marks) or the user's profile identifier. | 1227 * Either the word 'self' (sans quote marks) or the user's profile identifier. |
1231 * | 1228 * |
1232 * [blogId] - The ID of the blog. | 1229 * [blogId] - The ID of the blog. |
1233 * | 1230 * |
1234 * [postId] - The ID of the post to get. | 1231 * [postId] - The ID of the post to get. |
1235 * | 1232 * |
1236 * [maxComments] - Maximum number of comments to pull back on a post. | 1233 * [maxComments] - Maximum number of comments to pull back on a post. |
1237 * | 1234 * |
1238 * Completes with a [PostUserInfo]. | 1235 * Completes with a [PostUserInfo]. |
1239 * | 1236 * |
1240 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1237 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1241 * error. | 1238 * error. |
1242 * | 1239 * |
1243 * If the used [http.Client] completes with an error when making a REST call, | 1240 * If the used [http.Client] completes with an error when making a REST call, |
1244 * this method will complete with the same error. | 1241 * this method will complete with the same error. |
1245 */ | 1242 */ |
1246 async.Future<PostUserInfo> get(core.String userId, core.String blogId, core.St
ring postId, {core.int maxComments}) { | 1243 async.Future<PostUserInfo> get(core.String userId, core.String blogId, core.St
ring postId, {core.int maxComments}) { |
1247 var _url = null; | 1244 var _url = null; |
1248 var _queryParams = new core.Map(); | 1245 var _queryParams = new core.Map(); |
1249 var _uploadMedia = null; | 1246 var _uploadMedia = null; |
1250 var _uploadOptions = null; | 1247 var _uploadOptions = null; |
1251 var _downloadOptions = common.DownloadOptions.Metadata; | 1248 var _downloadOptions = commons.DownloadOptions.Metadata; |
1252 var _body = null; | 1249 var _body = null; |
1253 | 1250 |
1254 if (userId == null) { | 1251 if (userId == null) { |
1255 throw new core.ArgumentError("Parameter userId is required."); | 1252 throw new core.ArgumentError("Parameter userId is required."); |
1256 } | 1253 } |
1257 if (blogId == null) { | 1254 if (blogId == null) { |
1258 throw new core.ArgumentError("Parameter blogId is required."); | 1255 throw new core.ArgumentError("Parameter blogId is required."); |
1259 } | 1256 } |
1260 if (postId == null) { | 1257 if (postId == null) { |
1261 throw new core.ArgumentError("Parameter postId is required."); | 1258 throw new core.ArgumentError("Parameter postId is required."); |
1262 } | 1259 } |
1263 if (maxComments != null) { | 1260 if (maxComments != null) { |
1264 _queryParams["maxComments"] = ["${maxComments}"]; | 1261 _queryParams["maxComments"] = ["${maxComments}"]; |
1265 } | 1262 } |
1266 | 1263 |
1267 | 1264 |
1268 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/blogs
/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts/' + common_inter
nal.Escaper.ecapeVariable('$postId'); | 1265 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com
mons.Escaper.ecapeVariable('$blogId') + '/posts/' + commons.Escaper.ecapeVariabl
e('$postId'); |
1269 | 1266 |
1270 var _response = _requester.request(_url, | 1267 var _response = _requester.request(_url, |
1271 "GET", | 1268 "GET", |
1272 body: _body, | 1269 body: _body, |
1273 queryParams: _queryParams, | 1270 queryParams: _queryParams, |
1274 uploadOptions: _uploadOptions, | 1271 uploadOptions: _uploadOptions, |
1275 uploadMedia: _uploadMedia, | 1272 uploadMedia: _uploadMedia, |
1276 downloadOptions: _downloadOptions); | 1273 downloadOptions: _downloadOptions); |
1277 return _response.then((data) => new PostUserInfo.fromJson(data)); | 1274 return _response.then((data) => new PostUserInfo.fromJson(data)); |
1278 } | 1275 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 * | 1310 * |
1314 * [view] - Access level with which to view the returned result. Note that | 1311 * [view] - Access level with which to view the returned result. Note that |
1315 * some fields require elevated access. | 1312 * some fields require elevated access. |
1316 * Possible string values are: | 1313 * Possible string values are: |
1317 * - "ADMIN" : Admin level detail | 1314 * - "ADMIN" : Admin level detail |
1318 * - "AUTHOR" : Author level detail | 1315 * - "AUTHOR" : Author level detail |
1319 * - "READER" : Reader level detail | 1316 * - "READER" : Reader level detail |
1320 * | 1317 * |
1321 * Completes with a [PostUserInfosList]. | 1318 * Completes with a [PostUserInfosList]. |
1322 * | 1319 * |
1323 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1320 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1324 * error. | 1321 * error. |
1325 * | 1322 * |
1326 * If the used [http.Client] completes with an error when making a REST call, | 1323 * If the used [http.Client] completes with an error when making a REST call, |
1327 * this method will complete with the same error. | 1324 * this method will complete with the same error. |
1328 */ | 1325 */ |
1329 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}) { | 1326 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}) { |
1330 var _url = null; | 1327 var _url = null; |
1331 var _queryParams = new core.Map(); | 1328 var _queryParams = new core.Map(); |
1332 var _uploadMedia = null; | 1329 var _uploadMedia = null; |
1333 var _uploadOptions = null; | 1330 var _uploadOptions = null; |
1334 var _downloadOptions = common.DownloadOptions.Metadata; | 1331 var _downloadOptions = commons.DownloadOptions.Metadata; |
1335 var _body = null; | 1332 var _body = null; |
1336 | 1333 |
1337 if (userId == null) { | 1334 if (userId == null) { |
1338 throw new core.ArgumentError("Parameter userId is required."); | 1335 throw new core.ArgumentError("Parameter userId is required."); |
1339 } | 1336 } |
1340 if (blogId == null) { | 1337 if (blogId == null) { |
1341 throw new core.ArgumentError("Parameter blogId is required."); | 1338 throw new core.ArgumentError("Parameter blogId is required."); |
1342 } | 1339 } |
1343 if (endDate != null) { | 1340 if (endDate != null) { |
1344 _queryParams["endDate"] = [(endDate).toIso8601String()]; | 1341 _queryParams["endDate"] = [(endDate).toIso8601String()]; |
(...skipping 17 matching lines...) Expand all Loading... |
1362 _queryParams["startDate"] = [(startDate).toIso8601String()]; | 1359 _queryParams["startDate"] = [(startDate).toIso8601String()]; |
1363 } | 1360 } |
1364 if (status != null) { | 1361 if (status != null) { |
1365 _queryParams["status"] = status; | 1362 _queryParams["status"] = status; |
1366 } | 1363 } |
1367 if (view != null) { | 1364 if (view != null) { |
1368 _queryParams["view"] = [view]; | 1365 _queryParams["view"] = [view]; |
1369 } | 1366 } |
1370 | 1367 |
1371 | 1368 |
1372 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/blogs
/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts'; | 1369 _url = 'users/' + commons.Escaper.ecapeVariable('$userId') + '/blogs/' + com
mons.Escaper.ecapeVariable('$blogId') + '/posts'; |
1373 | 1370 |
1374 var _response = _requester.request(_url, | 1371 var _response = _requester.request(_url, |
1375 "GET", | 1372 "GET", |
1376 body: _body, | 1373 body: _body, |
1377 queryParams: _queryParams, | 1374 queryParams: _queryParams, |
1378 uploadOptions: _uploadOptions, | 1375 uploadOptions: _uploadOptions, |
1379 uploadMedia: _uploadMedia, | 1376 uploadMedia: _uploadMedia, |
1380 downloadOptions: _downloadOptions); | 1377 downloadOptions: _downloadOptions); |
1381 return _response.then((data) => new PostUserInfosList.fromJson(data)); | 1378 return _response.then((data) => new PostUserInfosList.fromJson(data)); |
1382 } | 1379 } |
1383 | 1380 |
1384 } | 1381 } |
1385 | 1382 |
1386 | 1383 |
1387 /** Not documented yet. */ | |
1388 class PostsResourceApi { | 1384 class PostsResourceApi { |
1389 final common_internal.ApiRequester _requester; | 1385 final commons.ApiRequester _requester; |
1390 | 1386 |
1391 PostsResourceApi(common_internal.ApiRequester client) : | 1387 PostsResourceApi(commons.ApiRequester client) : |
1392 _requester = client; | 1388 _requester = client; |
1393 | 1389 |
1394 /** | 1390 /** |
1395 * Delete a post by ID. | 1391 * Delete a post by ID. |
1396 * | 1392 * |
1397 * Request parameters: | 1393 * Request parameters: |
1398 * | 1394 * |
1399 * [blogId] - The ID of the Blog. | 1395 * [blogId] - The ID of the Blog. |
1400 * | 1396 * |
1401 * [postId] - The ID of the Post. | 1397 * [postId] - The ID of the Post. |
1402 * | 1398 * |
1403 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1404 * error. | 1400 * error. |
1405 * | 1401 * |
1406 * If the used [http.Client] completes with an error when making a REST call, | 1402 * If the used [http.Client] completes with an error when making a REST call, |
1407 * this method will complete with the same error. | 1403 * this method will complete with the same error. |
1408 */ | 1404 */ |
1409 async.Future delete(core.String blogId, core.String postId) { | 1405 async.Future delete(core.String blogId, core.String postId) { |
1410 var _url = null; | 1406 var _url = null; |
1411 var _queryParams = new core.Map(); | 1407 var _queryParams = new core.Map(); |
1412 var _uploadMedia = null; | 1408 var _uploadMedia = null; |
1413 var _uploadOptions = null; | 1409 var _uploadOptions = null; |
1414 var _downloadOptions = common.DownloadOptions.Metadata; | 1410 var _downloadOptions = commons.DownloadOptions.Metadata; |
1415 var _body = null; | 1411 var _body = null; |
1416 | 1412 |
1417 if (blogId == null) { | 1413 if (blogId == null) { |
1418 throw new core.ArgumentError("Parameter blogId is required."); | 1414 throw new core.ArgumentError("Parameter blogId is required."); |
1419 } | 1415 } |
1420 if (postId == null) { | 1416 if (postId == null) { |
1421 throw new core.ArgumentError("Parameter postId is required."); | 1417 throw new core.ArgumentError("Parameter postId is required."); |
1422 } | 1418 } |
1423 | 1419 |
1424 _downloadOptions = null; | 1420 _downloadOptions = null; |
1425 | 1421 |
1426 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId'); | 1422 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId'); |
1427 | 1423 |
1428 var _response = _requester.request(_url, | 1424 var _response = _requester.request(_url, |
1429 "DELETE", | 1425 "DELETE", |
1430 body: _body, | 1426 body: _body, |
1431 queryParams: _queryParams, | 1427 queryParams: _queryParams, |
1432 uploadOptions: _uploadOptions, | 1428 uploadOptions: _uploadOptions, |
1433 uploadMedia: _uploadMedia, | 1429 uploadMedia: _uploadMedia, |
1434 downloadOptions: _downloadOptions); | 1430 downloadOptions: _downloadOptions); |
1435 return _response.then((data) => null); | 1431 return _response.then((data) => null); |
1436 } | 1432 } |
(...skipping 18 matching lines...) Expand all Loading... |
1455 * | 1451 * |
1456 * [view] - Access level with which to view the returned result. Note that | 1452 * [view] - Access level with which to view the returned result. Note that |
1457 * some fields require elevated access. | 1453 * some fields require elevated access. |
1458 * Possible string values are: | 1454 * Possible string values are: |
1459 * - "ADMIN" : Admin level detail | 1455 * - "ADMIN" : Admin level detail |
1460 * - "AUTHOR" : Author level detail | 1456 * - "AUTHOR" : Author level detail |
1461 * - "READER" : Reader level detail | 1457 * - "READER" : Reader level detail |
1462 * | 1458 * |
1463 * Completes with a [Post]. | 1459 * Completes with a [Post]. |
1464 * | 1460 * |
1465 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1461 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1466 * error. | 1462 * error. |
1467 * | 1463 * |
1468 * If the used [http.Client] completes with an error when making a REST call, | 1464 * If the used [http.Client] completes with an error when making a REST call, |
1469 * this method will complete with the same error. | 1465 * this method will complete with the same error. |
1470 */ | 1466 */ |
1471 async.Future<Post> get(core.String blogId, core.String postId, {core.bool fetc
hBody, core.bool fetchImages, core.int maxComments, core.String view}) { | 1467 async.Future<Post> get(core.String blogId, core.String postId, {core.bool fetc
hBody, core.bool fetchImages, core.int maxComments, core.String view}) { |
1472 var _url = null; | 1468 var _url = null; |
1473 var _queryParams = new core.Map(); | 1469 var _queryParams = new core.Map(); |
1474 var _uploadMedia = null; | 1470 var _uploadMedia = null; |
1475 var _uploadOptions = null; | 1471 var _uploadOptions = null; |
1476 var _downloadOptions = common.DownloadOptions.Metadata; | 1472 var _downloadOptions = commons.DownloadOptions.Metadata; |
1477 var _body = null; | 1473 var _body = null; |
1478 | 1474 |
1479 if (blogId == null) { | 1475 if (blogId == null) { |
1480 throw new core.ArgumentError("Parameter blogId is required."); | 1476 throw new core.ArgumentError("Parameter blogId is required."); |
1481 } | 1477 } |
1482 if (postId == null) { | 1478 if (postId == null) { |
1483 throw new core.ArgumentError("Parameter postId is required."); | 1479 throw new core.ArgumentError("Parameter postId is required."); |
1484 } | 1480 } |
1485 if (fetchBody != null) { | 1481 if (fetchBody != null) { |
1486 _queryParams["fetchBody"] = ["${fetchBody}"]; | 1482 _queryParams["fetchBody"] = ["${fetchBody}"]; |
1487 } | 1483 } |
1488 if (fetchImages != null) { | 1484 if (fetchImages != null) { |
1489 _queryParams["fetchImages"] = ["${fetchImages}"]; | 1485 _queryParams["fetchImages"] = ["${fetchImages}"]; |
1490 } | 1486 } |
1491 if (maxComments != null) { | 1487 if (maxComments != null) { |
1492 _queryParams["maxComments"] = ["${maxComments}"]; | 1488 _queryParams["maxComments"] = ["${maxComments}"]; |
1493 } | 1489 } |
1494 if (view != null) { | 1490 if (view != null) { |
1495 _queryParams["view"] = [view]; | 1491 _queryParams["view"] = [view]; |
1496 } | 1492 } |
1497 | 1493 |
1498 | 1494 |
1499 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId'); | 1495 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId'); |
1500 | 1496 |
1501 var _response = _requester.request(_url, | 1497 var _response = _requester.request(_url, |
1502 "GET", | 1498 "GET", |
1503 body: _body, | 1499 body: _body, |
1504 queryParams: _queryParams, | 1500 queryParams: _queryParams, |
1505 uploadOptions: _uploadOptions, | 1501 uploadOptions: _uploadOptions, |
1506 uploadMedia: _uploadMedia, | 1502 uploadMedia: _uploadMedia, |
1507 downloadOptions: _downloadOptions); | 1503 downloadOptions: _downloadOptions); |
1508 return _response.then((data) => new Post.fromJson(data)); | 1504 return _response.then((data) => new Post.fromJson(data)); |
1509 } | 1505 } |
(...skipping 11 matching lines...) Expand all Loading... |
1521 * | 1517 * |
1522 * [view] - Access level with which to view the returned result. Note that | 1518 * [view] - Access level with which to view the returned result. Note that |
1523 * some fields require elevated access. | 1519 * some fields require elevated access. |
1524 * Possible string values are: | 1520 * Possible string values are: |
1525 * - "ADMIN" : Admin level detail | 1521 * - "ADMIN" : Admin level detail |
1526 * - "AUTHOR" : Author level detail | 1522 * - "AUTHOR" : Author level detail |
1527 * - "READER" : Reader level detail | 1523 * - "READER" : Reader level detail |
1528 * | 1524 * |
1529 * Completes with a [Post]. | 1525 * Completes with a [Post]. |
1530 * | 1526 * |
1531 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1532 * error. | 1528 * error. |
1533 * | 1529 * |
1534 * If the used [http.Client] completes with an error when making a REST call, | 1530 * If the used [http.Client] completes with an error when making a REST call, |
1535 * this method will complete with the same error. | 1531 * this method will complete with the same error. |
1536 */ | 1532 */ |
1537 async.Future<Post> getByPath(core.String blogId, core.String path, {core.int m
axComments, core.String view}) { | 1533 async.Future<Post> getByPath(core.String blogId, core.String path, {core.int m
axComments, core.String view}) { |
1538 var _url = null; | 1534 var _url = null; |
1539 var _queryParams = new core.Map(); | 1535 var _queryParams = new core.Map(); |
1540 var _uploadMedia = null; | 1536 var _uploadMedia = null; |
1541 var _uploadOptions = null; | 1537 var _uploadOptions = null; |
1542 var _downloadOptions = common.DownloadOptions.Metadata; | 1538 var _downloadOptions = commons.DownloadOptions.Metadata; |
1543 var _body = null; | 1539 var _body = null; |
1544 | 1540 |
1545 if (blogId == null) { | 1541 if (blogId == null) { |
1546 throw new core.ArgumentError("Parameter blogId is required."); | 1542 throw new core.ArgumentError("Parameter blogId is required."); |
1547 } | 1543 } |
1548 if (path == null) { | 1544 if (path == null) { |
1549 throw new core.ArgumentError("Parameter path is required."); | 1545 throw new core.ArgumentError("Parameter path is required."); |
1550 } | 1546 } |
1551 _queryParams["path"] = [path]; | 1547 _queryParams["path"] = [path]; |
1552 if (maxComments != null) { | 1548 if (maxComments != null) { |
1553 _queryParams["maxComments"] = ["${maxComments}"]; | 1549 _queryParams["maxComments"] = ["${maxComments}"]; |
1554 } | 1550 } |
1555 if (view != null) { | 1551 if (view != null) { |
1556 _queryParams["view"] = [view]; | 1552 _queryParams["view"] = [view]; |
1557 } | 1553 } |
1558 | 1554 |
1559 | 1555 |
1560 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/bypath'; | 1556 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/bypath'
; |
1561 | 1557 |
1562 var _response = _requester.request(_url, | 1558 var _response = _requester.request(_url, |
1563 "GET", | 1559 "GET", |
1564 body: _body, | 1560 body: _body, |
1565 queryParams: _queryParams, | 1561 queryParams: _queryParams, |
1566 uploadOptions: _uploadOptions, | 1562 uploadOptions: _uploadOptions, |
1567 uploadMedia: _uploadMedia, | 1563 uploadMedia: _uploadMedia, |
1568 downloadOptions: _downloadOptions); | 1564 downloadOptions: _downloadOptions); |
1569 return _response.then((data) => new Post.fromJson(data)); | 1565 return _response.then((data) => new Post.fromJson(data)); |
1570 } | 1566 } |
(...skipping 10 matching lines...) Expand all Loading... |
1581 * [fetchBody] - Whether the body content of the post is included with the | 1577 * [fetchBody] - Whether the body content of the post is included with the |
1582 * result (default: true). | 1578 * result (default: true). |
1583 * | 1579 * |
1584 * [fetchImages] - Whether image URL metadata for each post is included in the | 1580 * [fetchImages] - Whether image URL metadata for each post is included in the |
1585 * returned result (default: false). | 1581 * returned result (default: false). |
1586 * | 1582 * |
1587 * [isDraft] - Whether to create the post as a draft (default: false). | 1583 * [isDraft] - Whether to create the post as a draft (default: false). |
1588 * | 1584 * |
1589 * Completes with a [Post]. | 1585 * Completes with a [Post]. |
1590 * | 1586 * |
1591 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1587 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1592 * error. | 1588 * error. |
1593 * | 1589 * |
1594 * If the used [http.Client] completes with an error when making a REST call, | 1590 * If the used [http.Client] completes with an error when making a REST call, |
1595 * this method will complete with the same error. | 1591 * this method will complete with the same error. |
1596 */ | 1592 */ |
1597 async.Future<Post> insert(Post request, core.String blogId, {core.bool fetchBo
dy, core.bool fetchImages, core.bool isDraft}) { | 1593 async.Future<Post> insert(Post request, core.String blogId, {core.bool fetchBo
dy, core.bool fetchImages, core.bool isDraft}) { |
1598 var _url = null; | 1594 var _url = null; |
1599 var _queryParams = new core.Map(); | 1595 var _queryParams = new core.Map(); |
1600 var _uploadMedia = null; | 1596 var _uploadMedia = null; |
1601 var _uploadOptions = null; | 1597 var _uploadOptions = null; |
1602 var _downloadOptions = common.DownloadOptions.Metadata; | 1598 var _downloadOptions = commons.DownloadOptions.Metadata; |
1603 var _body = null; | 1599 var _body = null; |
1604 | 1600 |
1605 if (request != null) { | 1601 if (request != null) { |
1606 _body = convert.JSON.encode((request).toJson()); | 1602 _body = convert.JSON.encode((request).toJson()); |
1607 } | 1603 } |
1608 if (blogId == null) { | 1604 if (blogId == null) { |
1609 throw new core.ArgumentError("Parameter blogId is required."); | 1605 throw new core.ArgumentError("Parameter blogId is required."); |
1610 } | 1606 } |
1611 if (fetchBody != null) { | 1607 if (fetchBody != null) { |
1612 _queryParams["fetchBody"] = ["${fetchBody}"]; | 1608 _queryParams["fetchBody"] = ["${fetchBody}"]; |
1613 } | 1609 } |
1614 if (fetchImages != null) { | 1610 if (fetchImages != null) { |
1615 _queryParams["fetchImages"] = ["${fetchImages}"]; | 1611 _queryParams["fetchImages"] = ["${fetchImages}"]; |
1616 } | 1612 } |
1617 if (isDraft != null) { | 1613 if (isDraft != null) { |
1618 _queryParams["isDraft"] = ["${isDraft}"]; | 1614 _queryParams["isDraft"] = ["${isDraft}"]; |
1619 } | 1615 } |
1620 | 1616 |
1621 | 1617 |
1622 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
'; | 1618 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts'; |
1623 | 1619 |
1624 var _response = _requester.request(_url, | 1620 var _response = _requester.request(_url, |
1625 "POST", | 1621 "POST", |
1626 body: _body, | 1622 body: _body, |
1627 queryParams: _queryParams, | 1623 queryParams: _queryParams, |
1628 uploadOptions: _uploadOptions, | 1624 uploadOptions: _uploadOptions, |
1629 uploadMedia: _uploadMedia, | 1625 uploadMedia: _uploadMedia, |
1630 downloadOptions: _downloadOptions); | 1626 downloadOptions: _downloadOptions); |
1631 return _response.then((data) => new Post.fromJson(data)); | 1627 return _response.then((data) => new Post.fromJson(data)); |
1632 } | 1628 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 * | 1661 * |
1666 * [view] - Access level with which to view the returned result. Note that | 1662 * [view] - Access level with which to view the returned result. Note that |
1667 * some fields require escalated access. | 1663 * some fields require escalated access. |
1668 * Possible string values are: | 1664 * Possible string values are: |
1669 * - "ADMIN" : Admin level detail | 1665 * - "ADMIN" : Admin level detail |
1670 * - "AUTHOR" : Author level detail | 1666 * - "AUTHOR" : Author level detail |
1671 * - "READER" : Reader level detail | 1667 * - "READER" : Reader level detail |
1672 * | 1668 * |
1673 * Completes with a [PostList]. | 1669 * Completes with a [PostList]. |
1674 * | 1670 * |
1675 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1671 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1676 * error. | 1672 * error. |
1677 * | 1673 * |
1678 * If the used [http.Client] completes with an error when making a REST call, | 1674 * If the used [http.Client] completes with an error when making a REST call, |
1679 * this method will complete with the same error. | 1675 * this method will complete with the same error. |
1680 */ | 1676 */ |
1681 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}) { | 1677 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}) { |
1682 var _url = null; | 1678 var _url = null; |
1683 var _queryParams = new core.Map(); | 1679 var _queryParams = new core.Map(); |
1684 var _uploadMedia = null; | 1680 var _uploadMedia = null; |
1685 var _uploadOptions = null; | 1681 var _uploadOptions = null; |
1686 var _downloadOptions = common.DownloadOptions.Metadata; | 1682 var _downloadOptions = commons.DownloadOptions.Metadata; |
1687 var _body = null; | 1683 var _body = null; |
1688 | 1684 |
1689 if (blogId == null) { | 1685 if (blogId == null) { |
1690 throw new core.ArgumentError("Parameter blogId is required."); | 1686 throw new core.ArgumentError("Parameter blogId is required."); |
1691 } | 1687 } |
1692 if (endDate != null) { | 1688 if (endDate != null) { |
1693 _queryParams["endDate"] = [(endDate).toIso8601String()]; | 1689 _queryParams["endDate"] = [(endDate).toIso8601String()]; |
1694 } | 1690 } |
1695 if (fetchBodies != null) { | 1691 if (fetchBodies != null) { |
1696 _queryParams["fetchBodies"] = ["${fetchBodies}"]; | 1692 _queryParams["fetchBodies"] = ["${fetchBodies}"]; |
(...skipping 17 matching lines...) Expand all Loading... |
1714 _queryParams["startDate"] = [(startDate).toIso8601String()]; | 1710 _queryParams["startDate"] = [(startDate).toIso8601String()]; |
1715 } | 1711 } |
1716 if (status != null) { | 1712 if (status != null) { |
1717 _queryParams["status"] = status; | 1713 _queryParams["status"] = status; |
1718 } | 1714 } |
1719 if (view != null) { | 1715 if (view != null) { |
1720 _queryParams["view"] = [view]; | 1716 _queryParams["view"] = [view]; |
1721 } | 1717 } |
1722 | 1718 |
1723 | 1719 |
1724 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
'; | 1720 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts'; |
1725 | 1721 |
1726 var _response = _requester.request(_url, | 1722 var _response = _requester.request(_url, |
1727 "GET", | 1723 "GET", |
1728 body: _body, | 1724 body: _body, |
1729 queryParams: _queryParams, | 1725 queryParams: _queryParams, |
1730 uploadOptions: _uploadOptions, | 1726 uploadOptions: _uploadOptions, |
1731 uploadMedia: _uploadMedia, | 1727 uploadMedia: _uploadMedia, |
1732 downloadOptions: _downloadOptions); | 1728 downloadOptions: _downloadOptions); |
1733 return _response.then((data) => new PostList.fromJson(data)); | 1729 return _response.then((data) => new PostList.fromJson(data)); |
1734 } | 1730 } |
(...skipping 19 matching lines...) Expand all Loading... |
1754 * post. | 1750 * post. |
1755 * | 1751 * |
1756 * [publish_1] - Whether a publish action should be performed when the post is | 1752 * [publish_1] - Whether a publish action should be performed when the post is |
1757 * updated (default: false). | 1753 * updated (default: false). |
1758 * | 1754 * |
1759 * [revert_1] - Whether a revert action should be performed when the post is | 1755 * [revert_1] - Whether a revert action should be performed when the post is |
1760 * updated (default: false). | 1756 * updated (default: false). |
1761 * | 1757 * |
1762 * Completes with a [Post]. | 1758 * Completes with a [Post]. |
1763 * | 1759 * |
1764 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1765 * error. | 1761 * error. |
1766 * | 1762 * |
1767 * If the used [http.Client] completes with an error when making a REST call, | 1763 * If the used [http.Client] completes with an error when making a REST call, |
1768 * this method will complete with the same error. | 1764 * this method will complete with the same error. |
1769 */ | 1765 */ |
1770 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}) { | 1766 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}) { |
1771 var _url = null; | 1767 var _url = null; |
1772 var _queryParams = new core.Map(); | 1768 var _queryParams = new core.Map(); |
1773 var _uploadMedia = null; | 1769 var _uploadMedia = null; |
1774 var _uploadOptions = null; | 1770 var _uploadOptions = null; |
1775 var _downloadOptions = common.DownloadOptions.Metadata; | 1771 var _downloadOptions = commons.DownloadOptions.Metadata; |
1776 var _body = null; | 1772 var _body = null; |
1777 | 1773 |
1778 if (request != null) { | 1774 if (request != null) { |
1779 _body = convert.JSON.encode((request).toJson()); | 1775 _body = convert.JSON.encode((request).toJson()); |
1780 } | 1776 } |
1781 if (blogId == null) { | 1777 if (blogId == null) { |
1782 throw new core.ArgumentError("Parameter blogId is required."); | 1778 throw new core.ArgumentError("Parameter blogId is required."); |
1783 } | 1779 } |
1784 if (postId == null) { | 1780 if (postId == null) { |
1785 throw new core.ArgumentError("Parameter postId is required."); | 1781 throw new core.ArgumentError("Parameter postId is required."); |
1786 } | 1782 } |
1787 if (fetchBody != null) { | 1783 if (fetchBody != null) { |
1788 _queryParams["fetchBody"] = ["${fetchBody}"]; | 1784 _queryParams["fetchBody"] = ["${fetchBody}"]; |
1789 } | 1785 } |
1790 if (fetchImages != null) { | 1786 if (fetchImages != null) { |
1791 _queryParams["fetchImages"] = ["${fetchImages}"]; | 1787 _queryParams["fetchImages"] = ["${fetchImages}"]; |
1792 } | 1788 } |
1793 if (maxComments != null) { | 1789 if (maxComments != null) { |
1794 _queryParams["maxComments"] = ["${maxComments}"]; | 1790 _queryParams["maxComments"] = ["${maxComments}"]; |
1795 } | 1791 } |
1796 if (publish_1 != null) { | 1792 if (publish_1 != null) { |
1797 _queryParams["publish"] = ["${publish_1}"]; | 1793 _queryParams["publish"] = ["${publish_1}"]; |
1798 } | 1794 } |
1799 if (revert_1 != null) { | 1795 if (revert_1 != null) { |
1800 _queryParams["revert"] = ["${revert_1}"]; | 1796 _queryParams["revert"] = ["${revert_1}"]; |
1801 } | 1797 } |
1802 | 1798 |
1803 | 1799 |
1804 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId'); | 1800 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId'); |
1805 | 1801 |
1806 var _response = _requester.request(_url, | 1802 var _response = _requester.request(_url, |
1807 "PATCH", | 1803 "PATCH", |
1808 body: _body, | 1804 body: _body, |
1809 queryParams: _queryParams, | 1805 queryParams: _queryParams, |
1810 uploadOptions: _uploadOptions, | 1806 uploadOptions: _uploadOptions, |
1811 uploadMedia: _uploadMedia, | 1807 uploadMedia: _uploadMedia, |
1812 downloadOptions: _downloadOptions); | 1808 downloadOptions: _downloadOptions); |
1813 return _response.then((data) => new Post.fromJson(data)); | 1809 return _response.then((data) => new Post.fromJson(data)); |
1814 } | 1810 } |
1815 | 1811 |
1816 /** | 1812 /** |
1817 * Publishes a draft post, optionally at the specific time of the given | 1813 * Publishes a draft post, optionally at the specific time of the given |
1818 * publishDate parameter. | 1814 * publishDate parameter. |
1819 * | 1815 * |
1820 * Request parameters: | 1816 * Request parameters: |
1821 * | 1817 * |
1822 * [blogId] - The ID of the Blog. | 1818 * [blogId] - The ID of the Blog. |
1823 * | 1819 * |
1824 * [postId] - The ID of the Post. | 1820 * [postId] - The ID of the Post. |
1825 * | 1821 * |
1826 * [publishDate] - Optional date and time to schedule the publishing of the | 1822 * [publishDate] - Optional date and time to schedule the publishing of the |
1827 * Blog. If no publishDate parameter is given, the post is either published at | 1823 * Blog. If no publishDate parameter is given, the post is either published at |
1828 * the a previously saved schedule date (if present), or the current time. If | 1824 * the a previously saved schedule date (if present), or the current time. If |
1829 * a future date is given, the post will be scheduled to be published. | 1825 * a future date is given, the post will be scheduled to be published. |
1830 * | 1826 * |
1831 * Completes with a [Post]. | 1827 * Completes with a [Post]. |
1832 * | 1828 * |
1833 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1829 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1834 * error. | 1830 * error. |
1835 * | 1831 * |
1836 * If the used [http.Client] completes with an error when making a REST call, | 1832 * If the used [http.Client] completes with an error when making a REST call, |
1837 * this method will complete with the same error. | 1833 * this method will complete with the same error. |
1838 */ | 1834 */ |
1839 async.Future<Post> publish(core.String blogId, core.String postId, {core.DateT
ime publishDate}) { | 1835 async.Future<Post> publish(core.String blogId, core.String postId, {core.DateT
ime publishDate}) { |
1840 var _url = null; | 1836 var _url = null; |
1841 var _queryParams = new core.Map(); | 1837 var _queryParams = new core.Map(); |
1842 var _uploadMedia = null; | 1838 var _uploadMedia = null; |
1843 var _uploadOptions = null; | 1839 var _uploadOptions = null; |
1844 var _downloadOptions = common.DownloadOptions.Metadata; | 1840 var _downloadOptions = commons.DownloadOptions.Metadata; |
1845 var _body = null; | 1841 var _body = null; |
1846 | 1842 |
1847 if (blogId == null) { | 1843 if (blogId == null) { |
1848 throw new core.ArgumentError("Parameter blogId is required."); | 1844 throw new core.ArgumentError("Parameter blogId is required."); |
1849 } | 1845 } |
1850 if (postId == null) { | 1846 if (postId == null) { |
1851 throw new core.ArgumentError("Parameter postId is required."); | 1847 throw new core.ArgumentError("Parameter postId is required."); |
1852 } | 1848 } |
1853 if (publishDate != null) { | 1849 if (publishDate != null) { |
1854 _queryParams["publishDate"] = [(publishDate).toIso8601String()]; | 1850 _queryParams["publishDate"] = [(publishDate).toIso8601String()]; |
1855 } | 1851 } |
1856 | 1852 |
1857 | 1853 |
1858 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/publish'; | 1854 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/publish'; |
1859 | 1855 |
1860 var _response = _requester.request(_url, | 1856 var _response = _requester.request(_url, |
1861 "POST", | 1857 "POST", |
1862 body: _body, | 1858 body: _body, |
1863 queryParams: _queryParams, | 1859 queryParams: _queryParams, |
1864 uploadOptions: _uploadOptions, | 1860 uploadOptions: _uploadOptions, |
1865 uploadMedia: _uploadMedia, | 1861 uploadMedia: _uploadMedia, |
1866 downloadOptions: _downloadOptions); | 1862 downloadOptions: _downloadOptions); |
1867 return _response.then((data) => new Post.fromJson(data)); | 1863 return _response.then((data) => new Post.fromJson(data)); |
1868 } | 1864 } |
1869 | 1865 |
1870 /** | 1866 /** |
1871 * Revert a published or scheduled post to draft state. | 1867 * Revert a published or scheduled post to draft state. |
1872 * | 1868 * |
1873 * Request parameters: | 1869 * Request parameters: |
1874 * | 1870 * |
1875 * [blogId] - The ID of the Blog. | 1871 * [blogId] - The ID of the Blog. |
1876 * | 1872 * |
1877 * [postId] - The ID of the Post. | 1873 * [postId] - The ID of the Post. |
1878 * | 1874 * |
1879 * Completes with a [Post]. | 1875 * Completes with a [Post]. |
1880 * | 1876 * |
1881 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1877 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1882 * error. | 1878 * error. |
1883 * | 1879 * |
1884 * If the used [http.Client] completes with an error when making a REST call, | 1880 * If the used [http.Client] completes with an error when making a REST call, |
1885 * this method will complete with the same error. | 1881 * this method will complete with the same error. |
1886 */ | 1882 */ |
1887 async.Future<Post> revert(core.String blogId, core.String postId) { | 1883 async.Future<Post> revert(core.String blogId, core.String postId) { |
1888 var _url = null; | 1884 var _url = null; |
1889 var _queryParams = new core.Map(); | 1885 var _queryParams = new core.Map(); |
1890 var _uploadMedia = null; | 1886 var _uploadMedia = null; |
1891 var _uploadOptions = null; | 1887 var _uploadOptions = null; |
1892 var _downloadOptions = common.DownloadOptions.Metadata; | 1888 var _downloadOptions = commons.DownloadOptions.Metadata; |
1893 var _body = null; | 1889 var _body = null; |
1894 | 1890 |
1895 if (blogId == null) { | 1891 if (blogId == null) { |
1896 throw new core.ArgumentError("Parameter blogId is required."); | 1892 throw new core.ArgumentError("Parameter blogId is required."); |
1897 } | 1893 } |
1898 if (postId == null) { | 1894 if (postId == null) { |
1899 throw new core.ArgumentError("Parameter postId is required."); | 1895 throw new core.ArgumentError("Parameter postId is required."); |
1900 } | 1896 } |
1901 | 1897 |
1902 | 1898 |
1903 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId') + '/revert'; | 1899 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId') + '/revert'; |
1904 | 1900 |
1905 var _response = _requester.request(_url, | 1901 var _response = _requester.request(_url, |
1906 "POST", | 1902 "POST", |
1907 body: _body, | 1903 body: _body, |
1908 queryParams: _queryParams, | 1904 queryParams: _queryParams, |
1909 uploadOptions: _uploadOptions, | 1905 uploadOptions: _uploadOptions, |
1910 uploadMedia: _uploadMedia, | 1906 uploadMedia: _uploadMedia, |
1911 downloadOptions: _downloadOptions); | 1907 downloadOptions: _downloadOptions); |
1912 return _response.then((data) => new Post.fromJson(data)); | 1908 return _response.then((data) => new Post.fromJson(data)); |
1913 } | 1909 } |
(...skipping 11 matching lines...) Expand all Loading... |
1925 * true). This should be set to false when the post bodies are not required, | 1921 * true). This should be set to false when the post bodies are not required, |
1926 * to help minimize traffic. | 1922 * to help minimize traffic. |
1927 * | 1923 * |
1928 * [orderBy] - Sort search results | 1924 * [orderBy] - Sort search results |
1929 * Possible string values are: | 1925 * Possible string values are: |
1930 * - "published" : Order by the date the post was published | 1926 * - "published" : Order by the date the post was published |
1931 * - "updated" : Order by the date the post was last updated | 1927 * - "updated" : Order by the date the post was last updated |
1932 * | 1928 * |
1933 * Completes with a [PostList]. | 1929 * Completes with a [PostList]. |
1934 * | 1930 * |
1935 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 1931 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1936 * error. | 1932 * error. |
1937 * | 1933 * |
1938 * If the used [http.Client] completes with an error when making a REST call, | 1934 * If the used [http.Client] completes with an error when making a REST call, |
1939 * this method will complete with the same error. | 1935 * this method will complete with the same error. |
1940 */ | 1936 */ |
1941 async.Future<PostList> search(core.String blogId, core.String q, {core.bool fe
tchBodies, core.String orderBy}) { | 1937 async.Future<PostList> search(core.String blogId, core.String q, {core.bool fe
tchBodies, core.String orderBy}) { |
1942 var _url = null; | 1938 var _url = null; |
1943 var _queryParams = new core.Map(); | 1939 var _queryParams = new core.Map(); |
1944 var _uploadMedia = null; | 1940 var _uploadMedia = null; |
1945 var _uploadOptions = null; | 1941 var _uploadOptions = null; |
1946 var _downloadOptions = common.DownloadOptions.Metadata; | 1942 var _downloadOptions = commons.DownloadOptions.Metadata; |
1947 var _body = null; | 1943 var _body = null; |
1948 | 1944 |
1949 if (blogId == null) { | 1945 if (blogId == null) { |
1950 throw new core.ArgumentError("Parameter blogId is required."); | 1946 throw new core.ArgumentError("Parameter blogId is required."); |
1951 } | 1947 } |
1952 if (q == null) { | 1948 if (q == null) { |
1953 throw new core.ArgumentError("Parameter q is required."); | 1949 throw new core.ArgumentError("Parameter q is required."); |
1954 } | 1950 } |
1955 _queryParams["q"] = [q]; | 1951 _queryParams["q"] = [q]; |
1956 if (fetchBodies != null) { | 1952 if (fetchBodies != null) { |
1957 _queryParams["fetchBodies"] = ["${fetchBodies}"]; | 1953 _queryParams["fetchBodies"] = ["${fetchBodies}"]; |
1958 } | 1954 } |
1959 if (orderBy != null) { | 1955 if (orderBy != null) { |
1960 _queryParams["orderBy"] = [orderBy]; | 1956 _queryParams["orderBy"] = [orderBy]; |
1961 } | 1957 } |
1962 | 1958 |
1963 | 1959 |
1964 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/search'; | 1960 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/search'
; |
1965 | 1961 |
1966 var _response = _requester.request(_url, | 1962 var _response = _requester.request(_url, |
1967 "GET", | 1963 "GET", |
1968 body: _body, | 1964 body: _body, |
1969 queryParams: _queryParams, | 1965 queryParams: _queryParams, |
1970 uploadOptions: _uploadOptions, | 1966 uploadOptions: _uploadOptions, |
1971 uploadMedia: _uploadMedia, | 1967 uploadMedia: _uploadMedia, |
1972 downloadOptions: _downloadOptions); | 1968 downloadOptions: _downloadOptions); |
1973 return _response.then((data) => new PostList.fromJson(data)); | 1969 return _response.then((data) => new PostList.fromJson(data)); |
1974 } | 1970 } |
(...skipping 19 matching lines...) Expand all Loading... |
1994 * post. | 1990 * post. |
1995 * | 1991 * |
1996 * [publish_1] - Whether a publish action should be performed when the post is | 1992 * [publish_1] - Whether a publish action should be performed when the post is |
1997 * updated (default: false). | 1993 * updated (default: false). |
1998 * | 1994 * |
1999 * [revert_1] - Whether a revert action should be performed when the post is | 1995 * [revert_1] - Whether a revert action should be performed when the post is |
2000 * updated (default: false). | 1996 * updated (default: false). |
2001 * | 1997 * |
2002 * Completes with a [Post]. | 1998 * Completes with a [Post]. |
2003 * | 1999 * |
2004 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2000 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2005 * error. | 2001 * error. |
2006 * | 2002 * |
2007 * If the used [http.Client] completes with an error when making a REST call, | 2003 * If the used [http.Client] completes with an error when making a REST call, |
2008 * this method will complete with the same error. | 2004 * this method will complete with the same error. |
2009 */ | 2005 */ |
2010 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}) { | 2006 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}) { |
2011 var _url = null; | 2007 var _url = null; |
2012 var _queryParams = new core.Map(); | 2008 var _queryParams = new core.Map(); |
2013 var _uploadMedia = null; | 2009 var _uploadMedia = null; |
2014 var _uploadOptions = null; | 2010 var _uploadOptions = null; |
2015 var _downloadOptions = common.DownloadOptions.Metadata; | 2011 var _downloadOptions = commons.DownloadOptions.Metadata; |
2016 var _body = null; | 2012 var _body = null; |
2017 | 2013 |
2018 if (request != null) { | 2014 if (request != null) { |
2019 _body = convert.JSON.encode((request).toJson()); | 2015 _body = convert.JSON.encode((request).toJson()); |
2020 } | 2016 } |
2021 if (blogId == null) { | 2017 if (blogId == null) { |
2022 throw new core.ArgumentError("Parameter blogId is required."); | 2018 throw new core.ArgumentError("Parameter blogId is required."); |
2023 } | 2019 } |
2024 if (postId == null) { | 2020 if (postId == null) { |
2025 throw new core.ArgumentError("Parameter postId is required."); | 2021 throw new core.ArgumentError("Parameter postId is required."); |
2026 } | 2022 } |
2027 if (fetchBody != null) { | 2023 if (fetchBody != null) { |
2028 _queryParams["fetchBody"] = ["${fetchBody}"]; | 2024 _queryParams["fetchBody"] = ["${fetchBody}"]; |
2029 } | 2025 } |
2030 if (fetchImages != null) { | 2026 if (fetchImages != null) { |
2031 _queryParams["fetchImages"] = ["${fetchImages}"]; | 2027 _queryParams["fetchImages"] = ["${fetchImages}"]; |
2032 } | 2028 } |
2033 if (maxComments != null) { | 2029 if (maxComments != null) { |
2034 _queryParams["maxComments"] = ["${maxComments}"]; | 2030 _queryParams["maxComments"] = ["${maxComments}"]; |
2035 } | 2031 } |
2036 if (publish_1 != null) { | 2032 if (publish_1 != null) { |
2037 _queryParams["publish"] = ["${publish_1}"]; | 2033 _queryParams["publish"] = ["${publish_1}"]; |
2038 } | 2034 } |
2039 if (revert_1 != null) { | 2035 if (revert_1 != null) { |
2040 _queryParams["revert"] = ["${revert_1}"]; | 2036 _queryParams["revert"] = ["${revert_1}"]; |
2041 } | 2037 } |
2042 | 2038 |
2043 | 2039 |
2044 _url = 'blogs/' + common_internal.Escaper.ecapeVariable('$blogId') + '/posts
/' + common_internal.Escaper.ecapeVariable('$postId'); | 2040 _url = 'blogs/' + commons.Escaper.ecapeVariable('$blogId') + '/posts/' + com
mons.Escaper.ecapeVariable('$postId'); |
2045 | 2041 |
2046 var _response = _requester.request(_url, | 2042 var _response = _requester.request(_url, |
2047 "PUT", | 2043 "PUT", |
2048 body: _body, | 2044 body: _body, |
2049 queryParams: _queryParams, | 2045 queryParams: _queryParams, |
2050 uploadOptions: _uploadOptions, | 2046 uploadOptions: _uploadOptions, |
2051 uploadMedia: _uploadMedia, | 2047 uploadMedia: _uploadMedia, |
2052 downloadOptions: _downloadOptions); | 2048 downloadOptions: _downloadOptions); |
2053 return _response.then((data) => new Post.fromJson(data)); | 2049 return _response.then((data) => new Post.fromJson(data)); |
2054 } | 2050 } |
2055 | 2051 |
2056 } | 2052 } |
2057 | 2053 |
2058 | 2054 |
2059 /** Not documented yet. */ | |
2060 class UsersResourceApi { | 2055 class UsersResourceApi { |
2061 final common_internal.ApiRequester _requester; | 2056 final commons.ApiRequester _requester; |
2062 | 2057 |
2063 UsersResourceApi(common_internal.ApiRequester client) : | 2058 UsersResourceApi(commons.ApiRequester client) : |
2064 _requester = client; | 2059 _requester = client; |
2065 | 2060 |
2066 /** | 2061 /** |
2067 * Gets one user by ID. | 2062 * Gets one user by ID. |
2068 * | 2063 * |
2069 * Request parameters: | 2064 * Request parameters: |
2070 * | 2065 * |
2071 * [userId] - The ID of the user to get. | 2066 * [userId] - The ID of the user to get. |
2072 * | 2067 * |
2073 * Completes with a [User]. | 2068 * Completes with a [User]. |
2074 * | 2069 * |
2075 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 2070 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2076 * error. | 2071 * error. |
2077 * | 2072 * |
2078 * If the used [http.Client] completes with an error when making a REST call, | 2073 * If the used [http.Client] completes with an error when making a REST call, |
2079 * this method will complete with the same error. | 2074 * this method will complete with the same error. |
2080 */ | 2075 */ |
2081 async.Future<User> get(core.String userId) { | 2076 async.Future<User> get(core.String userId) { |
2082 var _url = null; | 2077 var _url = null; |
2083 var _queryParams = new core.Map(); | 2078 var _queryParams = new core.Map(); |
2084 var _uploadMedia = null; | 2079 var _uploadMedia = null; |
2085 var _uploadOptions = null; | 2080 var _uploadOptions = null; |
2086 var _downloadOptions = common.DownloadOptions.Metadata; | 2081 var _downloadOptions = commons.DownloadOptions.Metadata; |
2087 var _body = null; | 2082 var _body = null; |
2088 | 2083 |
2089 if (userId == null) { | 2084 if (userId == null) { |
2090 throw new core.ArgumentError("Parameter userId is required."); | 2085 throw new core.ArgumentError("Parameter userId is required."); |
2091 } | 2086 } |
2092 | 2087 |
2093 | 2088 |
2094 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId'); | 2089 _url = 'users/' + commons.Escaper.ecapeVariable('$userId'); |
2095 | 2090 |
2096 var _response = _requester.request(_url, | 2091 var _response = _requester.request(_url, |
2097 "GET", | 2092 "GET", |
2098 body: _body, | 2093 body: _body, |
2099 queryParams: _queryParams, | 2094 queryParams: _queryParams, |
2100 uploadOptions: _uploadOptions, | 2095 uploadOptions: _uploadOptions, |
2101 uploadMedia: _uploadMedia, | 2096 uploadMedia: _uploadMedia, |
2102 downloadOptions: _downloadOptions); | 2097 downloadOptions: _downloadOptions); |
2103 return _response.then((data) => new User.fromJson(data)); | 2098 return _response.then((data) => new User.fromJson(data)); |
2104 } | 2099 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2217 _json["selfLink"] = selfLink; | 2212 _json["selfLink"] = selfLink; |
2218 } | 2213 } |
2219 if (totalItems != null) { | 2214 if (totalItems != null) { |
2220 _json["totalItems"] = totalItems; | 2215 _json["totalItems"] = totalItems; |
2221 } | 2216 } |
2222 return _json; | 2217 return _json; |
2223 } | 2218 } |
2224 } | 2219 } |
2225 | 2220 |
2226 | 2221 |
2227 /** Not documented yet. */ | |
2228 class Blog { | 2222 class Blog { |
2229 /** The JSON custom meta-data for the Blog */ | 2223 /** The JSON custom meta-data for the Blog */ |
2230 core.String customMetaData; | 2224 core.String customMetaData; |
2231 | 2225 |
2232 /** The description of this blog. This is displayed underneath the title. */ | 2226 /** The description of this blog. This is displayed underneath the title. */ |
2233 core.String description; | 2227 core.String description; |
2234 | 2228 |
2235 /** The identifier for this resource. */ | 2229 /** The identifier for this resource. */ |
2236 core.String id; | 2230 core.String id; |
2237 | 2231 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 _json["updated"] = (updated).toIso8601String(); | 2343 _json["updated"] = (updated).toIso8601String(); |
2350 } | 2344 } |
2351 if (url != null) { | 2345 if (url != null) { |
2352 _json["url"] = url; | 2346 _json["url"] = url; |
2353 } | 2347 } |
2354 return _json; | 2348 return _json; |
2355 } | 2349 } |
2356 } | 2350 } |
2357 | 2351 |
2358 | 2352 |
2359 /** Not documented yet. */ | |
2360 class BlogList { | 2353 class BlogList { |
2361 /** Admin level list of blog per-user information */ | 2354 /** Admin level list of blog per-user information */ |
2362 core.List<BlogUserInfo> blogUserInfos; | 2355 core.List<BlogUserInfo> blogUserInfos; |
2363 | 2356 |
2364 /** The list of Blogs this user has Authorship or Admin rights over. */ | 2357 /** The list of Blogs this user has Authorship or Admin rights over. */ |
2365 core.List<Blog> items; | 2358 core.List<Blog> items; |
2366 | 2359 |
2367 /** The kind of this entity. Always blogger#blogList */ | 2360 /** The kind of this entity. Always blogger#blogList */ |
2368 core.String kind; | 2361 core.String kind; |
2369 | 2362 |
(...skipping 21 matching lines...) Expand all Loading... |
2391 _json["items"] = items.map((value) => (value).toJson()).toList(); | 2384 _json["items"] = items.map((value) => (value).toJson()).toList(); |
2392 } | 2385 } |
2393 if (kind != null) { | 2386 if (kind != null) { |
2394 _json["kind"] = kind; | 2387 _json["kind"] = kind; |
2395 } | 2388 } |
2396 return _json; | 2389 return _json; |
2397 } | 2390 } |
2398 } | 2391 } |
2399 | 2392 |
2400 | 2393 |
2401 /** Not documented yet. */ | |
2402 class BlogPerUserInfo { | 2394 class BlogPerUserInfo { |
2403 /** ID of the Blog resource */ | 2395 /** ID of the Blog resource */ |
2404 core.String blogId; | 2396 core.String blogId; |
2405 | 2397 |
2406 /** True if the user has Admin level access to the blog. */ | 2398 /** True if the user has Admin level access to the blog. */ |
2407 core.bool hasAdminAccess; | 2399 core.bool hasAdminAccess; |
2408 | 2400 |
2409 /** The kind of this entity. Always blogger#blogPerUserInfo */ | 2401 /** The kind of this entity. Always blogger#blogPerUserInfo */ |
2410 core.String kind; | 2402 core.String kind; |
2411 | 2403 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2463 _json["role"] = role; | 2455 _json["role"] = role; |
2464 } | 2456 } |
2465 if (userId != null) { | 2457 if (userId != null) { |
2466 _json["userId"] = userId; | 2458 _json["userId"] = userId; |
2467 } | 2459 } |
2468 return _json; | 2460 return _json; |
2469 } | 2461 } |
2470 } | 2462 } |
2471 | 2463 |
2472 | 2464 |
2473 /** Not documented yet. */ | |
2474 class BlogUserInfo { | 2465 class BlogUserInfo { |
2475 /** The Blog resource. */ | 2466 /** The Blog resource. */ |
2476 Blog blog; | 2467 Blog blog; |
2477 | 2468 |
2478 /** Information about a User for the Blog. */ | 2469 /** Information about a User for the Blog. */ |
2479 BlogPerUserInfo blogUserInfo; | 2470 BlogPerUserInfo blogUserInfo; |
2480 | 2471 |
2481 /** The kind of this entity. Always blogger#blogUserInfo */ | 2472 /** The kind of this entity. Always blogger#blogUserInfo */ |
2482 core.String kind; | 2473 core.String kind; |
2483 | 2474 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2652 core.Map toJson() { | 2643 core.Map toJson() { |
2653 var _json = new core.Map(); | 2644 var _json = new core.Map(); |
2654 if (id != null) { | 2645 if (id != null) { |
2655 _json["id"] = id; | 2646 _json["id"] = id; |
2656 } | 2647 } |
2657 return _json; | 2648 return _json; |
2658 } | 2649 } |
2659 } | 2650 } |
2660 | 2651 |
2661 | 2652 |
2662 /** Not documented yet. */ | |
2663 class Comment { | 2653 class Comment { |
2664 /** The author of this Comment. */ | 2654 /** The author of this Comment. */ |
2665 CommentAuthor author; | 2655 CommentAuthor author; |
2666 | 2656 |
2667 /** Data about the blog containing this comment. */ | 2657 /** Data about the blog containing this comment. */ |
2668 CommentBlog blog; | 2658 CommentBlog blog; |
2669 | 2659 |
2670 /** The actual content of the comment. May include HTML markup. */ | 2660 /** The actual content of the comment. May include HTML markup. */ |
2671 core.String content; | 2661 core.String content; |
2672 | 2662 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2766 _json["status"] = status; | 2756 _json["status"] = status; |
2767 } | 2757 } |
2768 if (updated != null) { | 2758 if (updated != null) { |
2769 _json["updated"] = (updated).toIso8601String(); | 2759 _json["updated"] = (updated).toIso8601String(); |
2770 } | 2760 } |
2771 return _json; | 2761 return _json; |
2772 } | 2762 } |
2773 } | 2763 } |
2774 | 2764 |
2775 | 2765 |
2776 /** Not documented yet. */ | |
2777 class CommentList { | 2766 class CommentList { |
2778 /** The List of Comments for a Post. */ | 2767 /** The List of Comments for a Post. */ |
2779 core.List<Comment> items; | 2768 core.List<Comment> items; |
2780 | 2769 |
2781 /** The kind of this entry. Always blogger#commentList */ | 2770 /** The kind of this entry. Always blogger#commentList */ |
2782 core.String kind; | 2771 core.String kind; |
2783 | 2772 |
2784 /** Pagination token to fetch the next page, if one exists. */ | 2773 /** Pagination token to fetch the next page, if one exists. */ |
2785 core.String nextPageToken; | 2774 core.String nextPageToken; |
2786 | 2775 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2916 core.Map toJson() { | 2905 core.Map toJson() { |
2917 var _json = new core.Map(); | 2906 var _json = new core.Map(); |
2918 if (id != null) { | 2907 if (id != null) { |
2919 _json["id"] = id; | 2908 _json["id"] = id; |
2920 } | 2909 } |
2921 return _json; | 2910 return _json; |
2922 } | 2911 } |
2923 } | 2912 } |
2924 | 2913 |
2925 | 2914 |
2926 /** Not documented yet. */ | |
2927 class Page { | 2915 class Page { |
2928 /** The author of this Page. */ | 2916 /** The author of this Page. */ |
2929 PageAuthor author; | 2917 PageAuthor author; |
2930 | 2918 |
2931 /** Data about the blog containing this Page. */ | 2919 /** Data about the blog containing this Page. */ |
2932 PageBlog blog; | 2920 PageBlog blog; |
2933 | 2921 |
2934 /** The body content of this Page, in HTML. */ | 2922 /** The body content of this Page, in HTML. */ |
2935 core.String content; | 2923 core.String content; |
2936 | 2924 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 _json["updated"] = (updated).toIso8601String(); | 3030 _json["updated"] = (updated).toIso8601String(); |
3043 } | 3031 } |
3044 if (url != null) { | 3032 if (url != null) { |
3045 _json["url"] = url; | 3033 _json["url"] = url; |
3046 } | 3034 } |
3047 return _json; | 3035 return _json; |
3048 } | 3036 } |
3049 } | 3037 } |
3050 | 3038 |
3051 | 3039 |
3052 /** Not documented yet. */ | |
3053 class PageList { | 3040 class PageList { |
3054 /** The list of Pages for a Blog. */ | 3041 /** The list of Pages for a Blog. */ |
3055 core.List<Page> items; | 3042 core.List<Page> items; |
3056 | 3043 |
3057 /** The kind of this entity. Always blogger#pageList */ | 3044 /** The kind of this entity. Always blogger#pageList */ |
3058 core.String kind; | 3045 core.String kind; |
3059 | 3046 |
3060 /** Pagination token to fetch the next page, if one exists. */ | 3047 /** Pagination token to fetch the next page, if one exists. */ |
3061 core.String nextPageToken; | 3048 core.String nextPageToken; |
3062 | 3049 |
(...skipping 21 matching lines...) Expand all Loading... |
3084 _json["kind"] = kind; | 3071 _json["kind"] = kind; |
3085 } | 3072 } |
3086 if (nextPageToken != null) { | 3073 if (nextPageToken != null) { |
3087 _json["nextPageToken"] = nextPageToken; | 3074 _json["nextPageToken"] = nextPageToken; |
3088 } | 3075 } |
3089 return _json; | 3076 return _json; |
3090 } | 3077 } |
3091 } | 3078 } |
3092 | 3079 |
3093 | 3080 |
3094 /** Not documented yet. */ | |
3095 class PageviewsCounts { | 3081 class PageviewsCounts { |
3096 /** Count of page views for the given time range */ | 3082 /** Count of page views for the given time range */ |
3097 core.String count; | 3083 core.String count; |
3098 | 3084 |
3099 /** Time range the given count applies to */ | 3085 /** Time range the given count applies to */ |
3100 core.String timeRange; | 3086 core.String timeRange; |
3101 | 3087 |
3102 | 3088 |
3103 PageviewsCounts(); | 3089 PageviewsCounts(); |
3104 | 3090 |
(...skipping 12 matching lines...) Expand all Loading... |
3117 _json["count"] = count; | 3103 _json["count"] = count; |
3118 } | 3104 } |
3119 if (timeRange != null) { | 3105 if (timeRange != null) { |
3120 _json["timeRange"] = timeRange; | 3106 _json["timeRange"] = timeRange; |
3121 } | 3107 } |
3122 return _json; | 3108 return _json; |
3123 } | 3109 } |
3124 } | 3110 } |
3125 | 3111 |
3126 | 3112 |
3127 /** Not documented yet. */ | |
3128 class Pageviews { | 3113 class Pageviews { |
3129 /** Blog Id */ | 3114 /** Blog Id */ |
3130 core.String blogId; | 3115 core.String blogId; |
3131 | 3116 |
3132 /** The container of posts in this blog. */ | 3117 /** The container of posts in this blog. */ |
3133 core.List<PageviewsCounts> counts; | 3118 core.List<PageviewsCounts> counts; |
3134 | 3119 |
3135 /** The kind of this entry. Always blogger#page_views */ | 3120 /** The kind of this entry. Always blogger#page_views */ |
3136 core.String kind; | 3121 core.String kind; |
3137 | 3122 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3258 core.Map toJson() { | 3243 core.Map toJson() { |
3259 var _json = new core.Map(); | 3244 var _json = new core.Map(); |
3260 if (id != null) { | 3245 if (id != null) { |
3261 _json["id"] = id; | 3246 _json["id"] = id; |
3262 } | 3247 } |
3263 return _json; | 3248 return _json; |
3264 } | 3249 } |
3265 } | 3250 } |
3266 | 3251 |
3267 | 3252 |
3268 /** Not documented yet. */ | |
3269 class PostImages { | 3253 class PostImages { |
3270 /** Not documented yet. */ | |
3271 core.String url; | 3254 core.String url; |
3272 | 3255 |
3273 | 3256 |
3274 PostImages(); | 3257 PostImages(); |
3275 | 3258 |
3276 PostImages.fromJson(core.Map _json) { | 3259 PostImages.fromJson(core.Map _json) { |
3277 if (_json.containsKey("url")) { | 3260 if (_json.containsKey("url")) { |
3278 url = _json["url"]; | 3261 url = _json["url"]; |
3279 } | 3262 } |
3280 } | 3263 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 _json["selfLink"] = selfLink; | 3358 _json["selfLink"] = selfLink; |
3376 } | 3359 } |
3377 if (totalItems != null) { | 3360 if (totalItems != null) { |
3378 _json["totalItems"] = totalItems; | 3361 _json["totalItems"] = totalItems; |
3379 } | 3362 } |
3380 return _json; | 3363 return _json; |
3381 } | 3364 } |
3382 } | 3365 } |
3383 | 3366 |
3384 | 3367 |
3385 /** Not documented yet. */ | |
3386 class Post { | 3368 class Post { |
3387 /** The author of this Post. */ | 3369 /** The author of this Post. */ |
3388 PostAuthor author; | 3370 PostAuthor author; |
3389 | 3371 |
3390 /** Data about the blog containing this Post. */ | 3372 /** Data about the blog containing this Post. */ |
3391 PostBlog blog; | 3373 PostBlog blog; |
3392 | 3374 |
3393 /** The content of the Post. May contain HTML markup. */ | 3375 /** The content of the Post. May contain HTML markup. */ |
3394 core.String content; | 3376 core.String content; |
3395 | 3377 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 _json["updated"] = (updated).toIso8601String(); | 3543 _json["updated"] = (updated).toIso8601String(); |
3562 } | 3544 } |
3563 if (url != null) { | 3545 if (url != null) { |
3564 _json["url"] = url; | 3546 _json["url"] = url; |
3565 } | 3547 } |
3566 return _json; | 3548 return _json; |
3567 } | 3549 } |
3568 } | 3550 } |
3569 | 3551 |
3570 | 3552 |
3571 /** Not documented yet. */ | |
3572 class PostList { | 3553 class PostList { |
3573 /** The list of Posts for this Blog. */ | 3554 /** The list of Posts for this Blog. */ |
3574 core.List<Post> items; | 3555 core.List<Post> items; |
3575 | 3556 |
3576 /** The kind of this entity. Always blogger#postList */ | 3557 /** The kind of this entity. Always blogger#postList */ |
3577 core.String kind; | 3558 core.String kind; |
3578 | 3559 |
3579 /** Pagination token to fetch the next page, if one exists. */ | 3560 /** Pagination token to fetch the next page, if one exists. */ |
3580 core.String nextPageToken; | 3561 core.String nextPageToken; |
3581 | 3562 |
(...skipping 21 matching lines...) Expand all Loading... |
3603 _json["kind"] = kind; | 3584 _json["kind"] = kind; |
3604 } | 3585 } |
3605 if (nextPageToken != null) { | 3586 if (nextPageToken != null) { |
3606 _json["nextPageToken"] = nextPageToken; | 3587 _json["nextPageToken"] = nextPageToken; |
3607 } | 3588 } |
3608 return _json; | 3589 return _json; |
3609 } | 3590 } |
3610 } | 3591 } |
3611 | 3592 |
3612 | 3593 |
3613 /** Not documented yet. */ | |
3614 class PostPerUserInfo { | 3594 class PostPerUserInfo { |
3615 /** ID of the Blog that the post resource belongs to. */ | 3595 /** ID of the Blog that the post resource belongs to. */ |
3616 core.String blogId; | 3596 core.String blogId; |
3617 | 3597 |
3618 /** True if the user has Author level access to the post. */ | 3598 /** True if the user has Author level access to the post. */ |
3619 core.bool hasEditAccess; | 3599 core.bool hasEditAccess; |
3620 | 3600 |
3621 /** The kind of this entity. Always blogger#postPerUserInfo */ | 3601 /** The kind of this entity. Always blogger#postPerUserInfo */ |
3622 core.String kind; | 3602 core.String kind; |
3623 | 3603 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3663 _json["postId"] = postId; | 3643 _json["postId"] = postId; |
3664 } | 3644 } |
3665 if (userId != null) { | 3645 if (userId != null) { |
3666 _json["userId"] = userId; | 3646 _json["userId"] = userId; |
3667 } | 3647 } |
3668 return _json; | 3648 return _json; |
3669 } | 3649 } |
3670 } | 3650 } |
3671 | 3651 |
3672 | 3652 |
3673 /** Not documented yet. */ | |
3674 class PostUserInfo { | 3653 class PostUserInfo { |
3675 /** The kind of this entity. Always blogger#postUserInfo */ | 3654 /** The kind of this entity. Always blogger#postUserInfo */ |
3676 core.String kind; | 3655 core.String kind; |
3677 | 3656 |
3678 /** The Post resource. */ | 3657 /** The Post resource. */ |
3679 Post post; | 3658 Post post; |
3680 | 3659 |
3681 /** Information about a User for the Post. */ | 3660 /** Information about a User for the Post. */ |
3682 PostPerUserInfo postUserInfo; | 3661 PostPerUserInfo postUserInfo; |
3683 | 3662 |
(...skipping 21 matching lines...) Expand all Loading... |
3705 _json["post"] = (post).toJson(); | 3684 _json["post"] = (post).toJson(); |
3706 } | 3685 } |
3707 if (postUserInfo != null) { | 3686 if (postUserInfo != null) { |
3708 _json["post_user_info"] = (postUserInfo).toJson(); | 3687 _json["post_user_info"] = (postUserInfo).toJson(); |
3709 } | 3688 } |
3710 return _json; | 3689 return _json; |
3711 } | 3690 } |
3712 } | 3691 } |
3713 | 3692 |
3714 | 3693 |
3715 /** Not documented yet. */ | |
3716 class PostUserInfosList { | 3694 class PostUserInfosList { |
3717 /** The list of Posts with User information for the post, for this Blog. */ | 3695 /** The list of Posts with User information for the post, for this Blog. */ |
3718 core.List<PostUserInfo> items; | 3696 core.List<PostUserInfo> items; |
3719 | 3697 |
3720 /** The kind of this entity. Always blogger#postList */ | 3698 /** The kind of this entity. Always blogger#postList */ |
3721 core.String kind; | 3699 core.String kind; |
3722 | 3700 |
3723 /** Pagination token to fetch the next page, if one exists. */ | 3701 /** Pagination token to fetch the next page, if one exists. */ |
3724 core.String nextPageToken; | 3702 core.String nextPageToken; |
3725 | 3703 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3813 _json["language"] = language; | 3791 _json["language"] = language; |
3814 } | 3792 } |
3815 if (variant != null) { | 3793 if (variant != null) { |
3816 _json["variant"] = variant; | 3794 _json["variant"] = variant; |
3817 } | 3795 } |
3818 return _json; | 3796 return _json; |
3819 } | 3797 } |
3820 } | 3798 } |
3821 | 3799 |
3822 | 3800 |
3823 /** Not documented yet. */ | |
3824 class User { | 3801 class User { |
3825 /** Profile summary information. */ | 3802 /** Profile summary information. */ |
3826 core.String about; | 3803 core.String about; |
3827 | 3804 |
3828 /** The container of blogs for this user. */ | 3805 /** The container of blogs for this user. */ |
3829 UserBlogs blogs; | 3806 UserBlogs blogs; |
3830 | 3807 |
3831 /** | 3808 /** |
3832 * The timestamp of when this profile was created, in seconds since epoch. | 3809 * The timestamp of when this profile was created, in seconds since epoch. |
3833 */ | 3810 */ |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3909 } | 3886 } |
3910 if (selfLink != null) { | 3887 if (selfLink != null) { |
3911 _json["selfLink"] = selfLink; | 3888 _json["selfLink"] = selfLink; |
3912 } | 3889 } |
3913 if (url != null) { | 3890 if (url != null) { |
3914 _json["url"] = url; | 3891 _json["url"] = url; |
3915 } | 3892 } |
3916 return _json; | 3893 return _json; |
3917 } | 3894 } |
3918 } | 3895 } |
3919 | |
3920 | |
OLD | NEW |