OLD | NEW |
| (Empty) |
1 library googleapis.orkut.v2; | |
2 | |
3 import "dart:core" as core; | |
4 import "dart:collection" as collection_1; | |
5 import "dart:async" as async; | |
6 import "dart:convert" as convert; | |
7 | |
8 import "package:crypto/crypto.dart" as crypto; | |
9 import 'package:http/http.dart' as http; | |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | |
13 export '../common/common.dart' show ApiRequestError; | |
14 export '../common/common.dart' show DetailedApiRequestError; | |
15 | |
16 /** | |
17 * Lets you manage activities, comments and badges in Orkut. More stuff coming | |
18 * in time. | |
19 */ | |
20 class OrkutApi { | |
21 /** Manage your Orkut activity */ | |
22 static const OrkutScope = "https://www.googleapis.com/auth/orkut"; | |
23 | |
24 /** View your Orkut data */ | |
25 static const OrkutReadonlyScope = "https://www.googleapis.com/auth/orkut.reado
nly"; | |
26 | |
27 | |
28 final common_internal.ApiRequester _requester; | |
29 | |
30 AclResourceApi get acl => new AclResourceApi(_requester); | |
31 ActivitiesResourceApi get activities => new ActivitiesResourceApi(_requester); | |
32 ActivityVisibilityResourceApi get activityVisibility => new ActivityVisibility
ResourceApi(_requester); | |
33 BadgesResourceApi get badges => new BadgesResourceApi(_requester); | |
34 CommentsResourceApi get comments => new CommentsResourceApi(_requester); | |
35 CommunitiesResourceApi get communities => new CommunitiesResourceApi(_requeste
r); | |
36 CommunityFollowResourceApi get communityFollow => new CommunityFollowResourceA
pi(_requester); | |
37 CommunityMembersResourceApi get communityMembers => new CommunityMembersResour
ceApi(_requester); | |
38 CommunityMessagesResourceApi get communityMessages => new CommunityMessagesRes
ourceApi(_requester); | |
39 CommunityPollCommentsResourceApi get communityPollComments => new CommunityPol
lCommentsResourceApi(_requester); | |
40 CommunityPollVotesResourceApi get communityPollVotes => new CommunityPollVotes
ResourceApi(_requester); | |
41 CommunityPollsResourceApi get communityPolls => new CommunityPollsResourceApi(
_requester); | |
42 CommunityRelatedResourceApi get communityRelated => new CommunityRelatedResour
ceApi(_requester); | |
43 CommunityTopicsResourceApi get communityTopics => new CommunityTopicsResourceA
pi(_requester); | |
44 CountersResourceApi get counters => new CountersResourceApi(_requester); | |
45 ScrapsResourceApi get scraps => new ScrapsResourceApi(_requester); | |
46 | |
47 OrkutApi(http.Client client) : | |
48 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "orkut/v2/"); | |
49 } | |
50 | |
51 | |
52 /** Not documented yet. */ | |
53 class AclResourceApi { | |
54 final common_internal.ApiRequester _requester; | |
55 | |
56 AclResourceApi(common_internal.ApiRequester client) : | |
57 _requester = client; | |
58 | |
59 /** | |
60 * Excludes an element from the ACL of the activity. | |
61 * | |
62 * Request parameters: | |
63 * | |
64 * [activityId] - ID of the activity. | |
65 * | |
66 * [userId] - ID of the user to be removed from the activity. | |
67 * | |
68 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
69 * error. | |
70 * | |
71 * If the used [http.Client] completes with an error when making a REST call, | |
72 * this method will complete with the same error. | |
73 */ | |
74 async.Future delete(core.String activityId, core.String userId) { | |
75 var _url = null; | |
76 var _queryParams = new core.Map(); | |
77 var _uploadMedia = null; | |
78 var _uploadOptions = null; | |
79 var _downloadOptions = common.DownloadOptions.Metadata; | |
80 var _body = null; | |
81 | |
82 if (activityId == null) { | |
83 throw new core.ArgumentError("Parameter activityId is required."); | |
84 } | |
85 if (userId == null) { | |
86 throw new core.ArgumentError("Parameter userId is required."); | |
87 } | |
88 | |
89 _downloadOptions = null; | |
90 | |
91 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/acl/' + common_internal.Escaper.ecapeVariable('$userId'); | |
92 | |
93 var _response = _requester.request(_url, | |
94 "DELETE", | |
95 body: _body, | |
96 queryParams: _queryParams, | |
97 uploadOptions: _uploadOptions, | |
98 uploadMedia: _uploadMedia, | |
99 downloadOptions: _downloadOptions); | |
100 return _response.then((data) => null); | |
101 } | |
102 | |
103 } | |
104 | |
105 | |
106 /** Not documented yet. */ | |
107 class ActivitiesResourceApi { | |
108 final common_internal.ApiRequester _requester; | |
109 | |
110 ActivitiesResourceApi(common_internal.ApiRequester client) : | |
111 _requester = client; | |
112 | |
113 /** | |
114 * Deletes an existing activity, if the access controls allow it. | |
115 * | |
116 * Request parameters: | |
117 * | |
118 * [activityId] - ID of the activity to remove. | |
119 * | |
120 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
121 * error. | |
122 * | |
123 * If the used [http.Client] completes with an error when making a REST call, | |
124 * this method will complete with the same error. | |
125 */ | |
126 async.Future delete(core.String activityId) { | |
127 var _url = null; | |
128 var _queryParams = new core.Map(); | |
129 var _uploadMedia = null; | |
130 var _uploadOptions = null; | |
131 var _downloadOptions = common.DownloadOptions.Metadata; | |
132 var _body = null; | |
133 | |
134 if (activityId == null) { | |
135 throw new core.ArgumentError("Parameter activityId is required."); | |
136 } | |
137 | |
138 _downloadOptions = null; | |
139 | |
140 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId'); | |
141 | |
142 var _response = _requester.request(_url, | |
143 "DELETE", | |
144 body: _body, | |
145 queryParams: _queryParams, | |
146 uploadOptions: _uploadOptions, | |
147 uploadMedia: _uploadMedia, | |
148 downloadOptions: _downloadOptions); | |
149 return _response.then((data) => null); | |
150 } | |
151 | |
152 /** | |
153 * Retrieves a list of activities. | |
154 * | |
155 * Request parameters: | |
156 * | |
157 * [userId] - The ID of the user whose activities will be listed. Can be me to | |
158 * refer to the viewer (i.e. the authenticated user). | |
159 * | |
160 * [collection] - The collection of activities to list. | |
161 * Possible string values are: | |
162 * - "all" : All activities created by the specified user that the | |
163 * authenticated user is authorized to view. | |
164 * - "scraps" : The specified user's scrapbook. | |
165 * - "stream" : The specified user's stream feed, intended for consumption. | |
166 * This includes activities posted by people that the user is following, and | |
167 * activities in which the user has been mentioned. | |
168 * | |
169 * [hl] - Specifies the interface language (host language) of your user | |
170 * interface. | |
171 * | |
172 * [maxResults] - The maximum number of activities to include in the response. | |
173 * Value must be between "1" and "100". | |
174 * | |
175 * [pageToken] - A continuation token that allows pagination. | |
176 * | |
177 * Completes with a [ActivityList]. | |
178 * | |
179 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
180 * error. | |
181 * | |
182 * If the used [http.Client] completes with an error when making a REST call, | |
183 * this method will complete with the same error. | |
184 */ | |
185 async.Future<ActivityList> list(core.String userId, core.String collection, {c
ore.String hl, core.int maxResults, core.String pageToken}) { | |
186 var _url = null; | |
187 var _queryParams = new core.Map(); | |
188 var _uploadMedia = null; | |
189 var _uploadOptions = null; | |
190 var _downloadOptions = common.DownloadOptions.Metadata; | |
191 var _body = null; | |
192 | |
193 if (userId == null) { | |
194 throw new core.ArgumentError("Parameter userId is required."); | |
195 } | |
196 if (collection == null) { | |
197 throw new core.ArgumentError("Parameter collection is required."); | |
198 } | |
199 if (hl != null) { | |
200 _queryParams["hl"] = [hl]; | |
201 } | |
202 if (maxResults != null) { | |
203 _queryParams["maxResults"] = ["${maxResults}"]; | |
204 } | |
205 if (pageToken != null) { | |
206 _queryParams["pageToken"] = [pageToken]; | |
207 } | |
208 | |
209 | |
210 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/acti
vities/' + common_internal.Escaper.ecapeVariable('$collection'); | |
211 | |
212 var _response = _requester.request(_url, | |
213 "GET", | |
214 body: _body, | |
215 queryParams: _queryParams, | |
216 uploadOptions: _uploadOptions, | |
217 uploadMedia: _uploadMedia, | |
218 downloadOptions: _downloadOptions); | |
219 return _response.then((data) => new ActivityList.fromJson(data)); | |
220 } | |
221 | |
222 } | |
223 | |
224 | |
225 /** Not documented yet. */ | |
226 class ActivityVisibilityResourceApi { | |
227 final common_internal.ApiRequester _requester; | |
228 | |
229 ActivityVisibilityResourceApi(common_internal.ApiRequester client) : | |
230 _requester = client; | |
231 | |
232 /** | |
233 * Gets the visibility of an existing activity. | |
234 * | |
235 * Request parameters: | |
236 * | |
237 * [activityId] - ID of the activity to get the visibility. | |
238 * | |
239 * Completes with a [Visibility]. | |
240 * | |
241 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
242 * error. | |
243 * | |
244 * If the used [http.Client] completes with an error when making a REST call, | |
245 * this method will complete with the same error. | |
246 */ | |
247 async.Future<Visibility> get(core.String activityId) { | |
248 var _url = null; | |
249 var _queryParams = new core.Map(); | |
250 var _uploadMedia = null; | |
251 var _uploadOptions = null; | |
252 var _downloadOptions = common.DownloadOptions.Metadata; | |
253 var _body = null; | |
254 | |
255 if (activityId == null) { | |
256 throw new core.ArgumentError("Parameter activityId is required."); | |
257 } | |
258 | |
259 | |
260 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/visibility'; | |
261 | |
262 var _response = _requester.request(_url, | |
263 "GET", | |
264 body: _body, | |
265 queryParams: _queryParams, | |
266 uploadOptions: _uploadOptions, | |
267 uploadMedia: _uploadMedia, | |
268 downloadOptions: _downloadOptions); | |
269 return _response.then((data) => new Visibility.fromJson(data)); | |
270 } | |
271 | |
272 /** | |
273 * Updates the visibility of an existing activity. This method supports patch | |
274 * semantics. | |
275 * | |
276 * [request] - The metadata request object. | |
277 * | |
278 * Request parameters: | |
279 * | |
280 * [activityId] - ID of the activity. | |
281 * | |
282 * Completes with a [Visibility]. | |
283 * | |
284 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
285 * error. | |
286 * | |
287 * If the used [http.Client] completes with an error when making a REST call, | |
288 * this method will complete with the same error. | |
289 */ | |
290 async.Future<Visibility> patch(Visibility request, core.String activityId) { | |
291 var _url = null; | |
292 var _queryParams = new core.Map(); | |
293 var _uploadMedia = null; | |
294 var _uploadOptions = null; | |
295 var _downloadOptions = common.DownloadOptions.Metadata; | |
296 var _body = null; | |
297 | |
298 if (request != null) { | |
299 _body = convert.JSON.encode((request).toJson()); | |
300 } | |
301 if (activityId == null) { | |
302 throw new core.ArgumentError("Parameter activityId is required."); | |
303 } | |
304 | |
305 | |
306 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/visibility'; | |
307 | |
308 var _response = _requester.request(_url, | |
309 "PATCH", | |
310 body: _body, | |
311 queryParams: _queryParams, | |
312 uploadOptions: _uploadOptions, | |
313 uploadMedia: _uploadMedia, | |
314 downloadOptions: _downloadOptions); | |
315 return _response.then((data) => new Visibility.fromJson(data)); | |
316 } | |
317 | |
318 /** | |
319 * Updates the visibility of an existing activity. | |
320 * | |
321 * [request] - The metadata request object. | |
322 * | |
323 * Request parameters: | |
324 * | |
325 * [activityId] - ID of the activity. | |
326 * | |
327 * Completes with a [Visibility]. | |
328 * | |
329 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
330 * error. | |
331 * | |
332 * If the used [http.Client] completes with an error when making a REST call, | |
333 * this method will complete with the same error. | |
334 */ | |
335 async.Future<Visibility> update(Visibility request, core.String activityId) { | |
336 var _url = null; | |
337 var _queryParams = new core.Map(); | |
338 var _uploadMedia = null; | |
339 var _uploadOptions = null; | |
340 var _downloadOptions = common.DownloadOptions.Metadata; | |
341 var _body = null; | |
342 | |
343 if (request != null) { | |
344 _body = convert.JSON.encode((request).toJson()); | |
345 } | |
346 if (activityId == null) { | |
347 throw new core.ArgumentError("Parameter activityId is required."); | |
348 } | |
349 | |
350 | |
351 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/visibility'; | |
352 | |
353 var _response = _requester.request(_url, | |
354 "PUT", | |
355 body: _body, | |
356 queryParams: _queryParams, | |
357 uploadOptions: _uploadOptions, | |
358 uploadMedia: _uploadMedia, | |
359 downloadOptions: _downloadOptions); | |
360 return _response.then((data) => new Visibility.fromJson(data)); | |
361 } | |
362 | |
363 } | |
364 | |
365 | |
366 /** Not documented yet. */ | |
367 class BadgesResourceApi { | |
368 final common_internal.ApiRequester _requester; | |
369 | |
370 BadgesResourceApi(common_internal.ApiRequester client) : | |
371 _requester = client; | |
372 | |
373 /** | |
374 * Retrieves a badge from a user. | |
375 * | |
376 * Request parameters: | |
377 * | |
378 * [userId] - The ID of the user whose badges will be listed. Can be me to | |
379 * refer to caller. | |
380 * | |
381 * [badgeId] - The ID of the badge that will be retrieved. | |
382 * | |
383 * Completes with a [Badge]. | |
384 * | |
385 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
386 * error. | |
387 * | |
388 * If the used [http.Client] completes with an error when making a REST call, | |
389 * this method will complete with the same error. | |
390 */ | |
391 async.Future<Badge> get(core.String userId, core.String badgeId) { | |
392 var _url = null; | |
393 var _queryParams = new core.Map(); | |
394 var _uploadMedia = null; | |
395 var _uploadOptions = null; | |
396 var _downloadOptions = common.DownloadOptions.Metadata; | |
397 var _body = null; | |
398 | |
399 if (userId == null) { | |
400 throw new core.ArgumentError("Parameter userId is required."); | |
401 } | |
402 if (badgeId == null) { | |
403 throw new core.ArgumentError("Parameter badgeId is required."); | |
404 } | |
405 | |
406 | |
407 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/badg
es/' + common_internal.Escaper.ecapeVariable('$badgeId'); | |
408 | |
409 var _response = _requester.request(_url, | |
410 "GET", | |
411 body: _body, | |
412 queryParams: _queryParams, | |
413 uploadOptions: _uploadOptions, | |
414 uploadMedia: _uploadMedia, | |
415 downloadOptions: _downloadOptions); | |
416 return _response.then((data) => new Badge.fromJson(data)); | |
417 } | |
418 | |
419 /** | |
420 * Retrieves the list of visible badges of a user. | |
421 * | |
422 * Request parameters: | |
423 * | |
424 * [userId] - The id of the user whose badges will be listed. Can be me to | |
425 * refer to caller. | |
426 * | |
427 * Completes with a [BadgeList]. | |
428 * | |
429 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
430 * error. | |
431 * | |
432 * If the used [http.Client] completes with an error when making a REST call, | |
433 * this method will complete with the same error. | |
434 */ | |
435 async.Future<BadgeList> list(core.String userId) { | |
436 var _url = null; | |
437 var _queryParams = new core.Map(); | |
438 var _uploadMedia = null; | |
439 var _uploadOptions = null; | |
440 var _downloadOptions = common.DownloadOptions.Metadata; | |
441 var _body = null; | |
442 | |
443 if (userId == null) { | |
444 throw new core.ArgumentError("Parameter userId is required."); | |
445 } | |
446 | |
447 | |
448 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/badg
es'; | |
449 | |
450 var _response = _requester.request(_url, | |
451 "GET", | |
452 body: _body, | |
453 queryParams: _queryParams, | |
454 uploadOptions: _uploadOptions, | |
455 uploadMedia: _uploadMedia, | |
456 downloadOptions: _downloadOptions); | |
457 return _response.then((data) => new BadgeList.fromJson(data)); | |
458 } | |
459 | |
460 } | |
461 | |
462 | |
463 /** Not documented yet. */ | |
464 class CommentsResourceApi { | |
465 final common_internal.ApiRequester _requester; | |
466 | |
467 CommentsResourceApi(common_internal.ApiRequester client) : | |
468 _requester = client; | |
469 | |
470 /** | |
471 * Deletes an existing comment. | |
472 * | |
473 * Request parameters: | |
474 * | |
475 * [commentId] - ID of the comment to remove. | |
476 * | |
477 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
478 * error. | |
479 * | |
480 * If the used [http.Client] completes with an error when making a REST call, | |
481 * this method will complete with the same error. | |
482 */ | |
483 async.Future delete(core.String commentId) { | |
484 var _url = null; | |
485 var _queryParams = new core.Map(); | |
486 var _uploadMedia = null; | |
487 var _uploadOptions = null; | |
488 var _downloadOptions = common.DownloadOptions.Metadata; | |
489 var _body = null; | |
490 | |
491 if (commentId == null) { | |
492 throw new core.ArgumentError("Parameter commentId is required."); | |
493 } | |
494 | |
495 _downloadOptions = null; | |
496 | |
497 _url = 'comments/' + common_internal.Escaper.ecapeVariable('$commentId'); | |
498 | |
499 var _response = _requester.request(_url, | |
500 "DELETE", | |
501 body: _body, | |
502 queryParams: _queryParams, | |
503 uploadOptions: _uploadOptions, | |
504 uploadMedia: _uploadMedia, | |
505 downloadOptions: _downloadOptions); | |
506 return _response.then((data) => null); | |
507 } | |
508 | |
509 /** | |
510 * Retrieves an existing comment. | |
511 * | |
512 * Request parameters: | |
513 * | |
514 * [commentId] - ID of the comment to get. | |
515 * | |
516 * [hl] - Specifies the interface language (host language) of your user | |
517 * interface. | |
518 * | |
519 * Completes with a [Comment]. | |
520 * | |
521 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
522 * error. | |
523 * | |
524 * If the used [http.Client] completes with an error when making a REST call, | |
525 * this method will complete with the same error. | |
526 */ | |
527 async.Future<Comment> get(core.String commentId, {core.String hl}) { | |
528 var _url = null; | |
529 var _queryParams = new core.Map(); | |
530 var _uploadMedia = null; | |
531 var _uploadOptions = null; | |
532 var _downloadOptions = common.DownloadOptions.Metadata; | |
533 var _body = null; | |
534 | |
535 if (commentId == null) { | |
536 throw new core.ArgumentError("Parameter commentId is required."); | |
537 } | |
538 if (hl != null) { | |
539 _queryParams["hl"] = [hl]; | |
540 } | |
541 | |
542 | |
543 _url = 'comments/' + common_internal.Escaper.ecapeVariable('$commentId'); | |
544 | |
545 var _response = _requester.request(_url, | |
546 "GET", | |
547 body: _body, | |
548 queryParams: _queryParams, | |
549 uploadOptions: _uploadOptions, | |
550 uploadMedia: _uploadMedia, | |
551 downloadOptions: _downloadOptions); | |
552 return _response.then((data) => new Comment.fromJson(data)); | |
553 } | |
554 | |
555 /** | |
556 * Inserts a new comment to an activity. | |
557 * | |
558 * [request] - The metadata request object. | |
559 * | |
560 * Request parameters: | |
561 * | |
562 * [activityId] - The ID of the activity to contain the new comment. | |
563 * | |
564 * Completes with a [Comment]. | |
565 * | |
566 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
567 * error. | |
568 * | |
569 * If the used [http.Client] completes with an error when making a REST call, | |
570 * this method will complete with the same error. | |
571 */ | |
572 async.Future<Comment> insert(Comment request, core.String activityId) { | |
573 var _url = null; | |
574 var _queryParams = new core.Map(); | |
575 var _uploadMedia = null; | |
576 var _uploadOptions = null; | |
577 var _downloadOptions = common.DownloadOptions.Metadata; | |
578 var _body = null; | |
579 | |
580 if (request != null) { | |
581 _body = convert.JSON.encode((request).toJson()); | |
582 } | |
583 if (activityId == null) { | |
584 throw new core.ArgumentError("Parameter activityId is required."); | |
585 } | |
586 | |
587 | |
588 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/comments'; | |
589 | |
590 var _response = _requester.request(_url, | |
591 "POST", | |
592 body: _body, | |
593 queryParams: _queryParams, | |
594 uploadOptions: _uploadOptions, | |
595 uploadMedia: _uploadMedia, | |
596 downloadOptions: _downloadOptions); | |
597 return _response.then((data) => new Comment.fromJson(data)); | |
598 } | |
599 | |
600 /** | |
601 * Retrieves a list of comments, possibly filtered. | |
602 * | |
603 * Request parameters: | |
604 * | |
605 * [activityId] - The ID of the activity containing the comments. | |
606 * | |
607 * [hl] - Specifies the interface language (host language) of your user | |
608 * interface. | |
609 * | |
610 * [maxResults] - The maximum number of activities to include in the response. | |
611 * | |
612 * [orderBy] - Sort search results. | |
613 * Possible string values are: | |
614 * - "ascending" : Use ascending sort order. | |
615 * - "descending" : Use descending sort order. | |
616 * | |
617 * [pageToken] - A continuation token that allows pagination. | |
618 * | |
619 * Completes with a [CommentList]. | |
620 * | |
621 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
622 * error. | |
623 * | |
624 * If the used [http.Client] completes with an error when making a REST call, | |
625 * this method will complete with the same error. | |
626 */ | |
627 async.Future<CommentList> list(core.String activityId, {core.String hl, core.i
nt maxResults, core.String orderBy, core.String pageToken}) { | |
628 var _url = null; | |
629 var _queryParams = new core.Map(); | |
630 var _uploadMedia = null; | |
631 var _uploadOptions = null; | |
632 var _downloadOptions = common.DownloadOptions.Metadata; | |
633 var _body = null; | |
634 | |
635 if (activityId == null) { | |
636 throw new core.ArgumentError("Parameter activityId is required."); | |
637 } | |
638 if (hl != null) { | |
639 _queryParams["hl"] = [hl]; | |
640 } | |
641 if (maxResults != null) { | |
642 _queryParams["maxResults"] = ["${maxResults}"]; | |
643 } | |
644 if (orderBy != null) { | |
645 _queryParams["orderBy"] = [orderBy]; | |
646 } | |
647 if (pageToken != null) { | |
648 _queryParams["pageToken"] = [pageToken]; | |
649 } | |
650 | |
651 | |
652 _url = 'activities/' + common_internal.Escaper.ecapeVariable('$activityId')
+ '/comments'; | |
653 | |
654 var _response = _requester.request(_url, | |
655 "GET", | |
656 body: _body, | |
657 queryParams: _queryParams, | |
658 uploadOptions: _uploadOptions, | |
659 uploadMedia: _uploadMedia, | |
660 downloadOptions: _downloadOptions); | |
661 return _response.then((data) => new CommentList.fromJson(data)); | |
662 } | |
663 | |
664 } | |
665 | |
666 | |
667 /** Not documented yet. */ | |
668 class CommunitiesResourceApi { | |
669 final common_internal.ApiRequester _requester; | |
670 | |
671 CommunitiesResourceApi(common_internal.ApiRequester client) : | |
672 _requester = client; | |
673 | |
674 /** | |
675 * Retrieves the basic information (aka. profile) of a community. | |
676 * | |
677 * Request parameters: | |
678 * | |
679 * [communityId] - The ID of the community to get. | |
680 * | |
681 * [hl] - Specifies the interface language (host language) of your user | |
682 * interface. | |
683 * | |
684 * Completes with a [Community]. | |
685 * | |
686 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
687 * error. | |
688 * | |
689 * If the used [http.Client] completes with an error when making a REST call, | |
690 * this method will complete with the same error. | |
691 */ | |
692 async.Future<Community> get(core.int communityId, {core.String hl}) { | |
693 var _url = null; | |
694 var _queryParams = new core.Map(); | |
695 var _uploadMedia = null; | |
696 var _uploadOptions = null; | |
697 var _downloadOptions = common.DownloadOptions.Metadata; | |
698 var _body = null; | |
699 | |
700 if (communityId == null) { | |
701 throw new core.ArgumentError("Parameter communityId is required."); | |
702 } | |
703 if (hl != null) { | |
704 _queryParams["hl"] = [hl]; | |
705 } | |
706 | |
707 | |
708 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
); | |
709 | |
710 var _response = _requester.request(_url, | |
711 "GET", | |
712 body: _body, | |
713 queryParams: _queryParams, | |
714 uploadOptions: _uploadOptions, | |
715 uploadMedia: _uploadMedia, | |
716 downloadOptions: _downloadOptions); | |
717 return _response.then((data) => new Community.fromJson(data)); | |
718 } | |
719 | |
720 /** | |
721 * Retrieves the list of communities the current user is a member of. | |
722 * | |
723 * Request parameters: | |
724 * | |
725 * [userId] - The ID of the user whose communities will be listed. Can be me | |
726 * to refer to caller. | |
727 * | |
728 * [hl] - Specifies the interface language (host language) of your user | |
729 * interface. | |
730 * | |
731 * [maxResults] - The maximum number of communities to include in the | |
732 * response. | |
733 * | |
734 * [orderBy] - How to order the communities by. | |
735 * Possible string values are: | |
736 * - "id" : Returns the communities sorted by a fixed, natural order. | |
737 * - "ranked" : Returns the communities ranked accordingly to how they are | |
738 * displayed on the orkut web application. | |
739 * | |
740 * Completes with a [CommunityList]. | |
741 * | |
742 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
743 * error. | |
744 * | |
745 * If the used [http.Client] completes with an error when making a REST call, | |
746 * this method will complete with the same error. | |
747 */ | |
748 async.Future<CommunityList> list(core.String userId, {core.String hl, core.int
maxResults, core.String orderBy}) { | |
749 var _url = null; | |
750 var _queryParams = new core.Map(); | |
751 var _uploadMedia = null; | |
752 var _uploadOptions = null; | |
753 var _downloadOptions = common.DownloadOptions.Metadata; | |
754 var _body = null; | |
755 | |
756 if (userId == null) { | |
757 throw new core.ArgumentError("Parameter userId is required."); | |
758 } | |
759 if (hl != null) { | |
760 _queryParams["hl"] = [hl]; | |
761 } | |
762 if (maxResults != null) { | |
763 _queryParams["maxResults"] = ["${maxResults}"]; | |
764 } | |
765 if (orderBy != null) { | |
766 _queryParams["orderBy"] = [orderBy]; | |
767 } | |
768 | |
769 | |
770 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/comm
unities'; | |
771 | |
772 var _response = _requester.request(_url, | |
773 "GET", | |
774 body: _body, | |
775 queryParams: _queryParams, | |
776 uploadOptions: _uploadOptions, | |
777 uploadMedia: _uploadMedia, | |
778 downloadOptions: _downloadOptions); | |
779 return _response.then((data) => new CommunityList.fromJson(data)); | |
780 } | |
781 | |
782 } | |
783 | |
784 | |
785 /** Not documented yet. */ | |
786 class CommunityFollowResourceApi { | |
787 final common_internal.ApiRequester _requester; | |
788 | |
789 CommunityFollowResourceApi(common_internal.ApiRequester client) : | |
790 _requester = client; | |
791 | |
792 /** | |
793 * Removes a user from the followers of a community. | |
794 * | |
795 * Request parameters: | |
796 * | |
797 * [communityId] - ID of the community. | |
798 * | |
799 * [userId] - ID of the user. | |
800 * | |
801 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
802 * error. | |
803 * | |
804 * If the used [http.Client] completes with an error when making a REST call, | |
805 * this method will complete with the same error. | |
806 */ | |
807 async.Future delete(core.int communityId, core.String userId) { | |
808 var _url = null; | |
809 var _queryParams = new core.Map(); | |
810 var _uploadMedia = null; | |
811 var _uploadOptions = null; | |
812 var _downloadOptions = common.DownloadOptions.Metadata; | |
813 var _body = null; | |
814 | |
815 if (communityId == null) { | |
816 throw new core.ArgumentError("Parameter communityId is required."); | |
817 } | |
818 if (userId == null) { | |
819 throw new core.ArgumentError("Parameter userId is required."); | |
820 } | |
821 | |
822 _downloadOptions = null; | |
823 | |
824 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/followers/' + common_internal.Escaper.ecapeVariable('$userId'); | |
825 | |
826 var _response = _requester.request(_url, | |
827 "DELETE", | |
828 body: _body, | |
829 queryParams: _queryParams, | |
830 uploadOptions: _uploadOptions, | |
831 uploadMedia: _uploadMedia, | |
832 downloadOptions: _downloadOptions); | |
833 return _response.then((data) => null); | |
834 } | |
835 | |
836 /** | |
837 * Adds a user as a follower of a community. | |
838 * | |
839 * Request parameters: | |
840 * | |
841 * [communityId] - ID of the community. | |
842 * | |
843 * [userId] - ID of the user. | |
844 * | |
845 * Completes with a [CommunityMembers]. | |
846 * | |
847 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
848 * error. | |
849 * | |
850 * If the used [http.Client] completes with an error when making a REST call, | |
851 * this method will complete with the same error. | |
852 */ | |
853 async.Future<CommunityMembers> insert(core.int communityId, core.String userId
) { | |
854 var _url = null; | |
855 var _queryParams = new core.Map(); | |
856 var _uploadMedia = null; | |
857 var _uploadOptions = null; | |
858 var _downloadOptions = common.DownloadOptions.Metadata; | |
859 var _body = null; | |
860 | |
861 if (communityId == null) { | |
862 throw new core.ArgumentError("Parameter communityId is required."); | |
863 } | |
864 if (userId == null) { | |
865 throw new core.ArgumentError("Parameter userId is required."); | |
866 } | |
867 | |
868 | |
869 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/followers/' + common_internal.Escaper.ecapeVariable('$userId'); | |
870 | |
871 var _response = _requester.request(_url, | |
872 "POST", | |
873 body: _body, | |
874 queryParams: _queryParams, | |
875 uploadOptions: _uploadOptions, | |
876 uploadMedia: _uploadMedia, | |
877 downloadOptions: _downloadOptions); | |
878 return _response.then((data) => new CommunityMembers.fromJson(data)); | |
879 } | |
880 | |
881 } | |
882 | |
883 | |
884 /** Not documented yet. */ | |
885 class CommunityMembersResourceApi { | |
886 final common_internal.ApiRequester _requester; | |
887 | |
888 CommunityMembersResourceApi(common_internal.ApiRequester client) : | |
889 _requester = client; | |
890 | |
891 /** | |
892 * Makes the user leave a community. | |
893 * | |
894 * Request parameters: | |
895 * | |
896 * [communityId] - ID of the community. | |
897 * | |
898 * [userId] - ID of the user. | |
899 * | |
900 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
901 * error. | |
902 * | |
903 * If the used [http.Client] completes with an error when making a REST call, | |
904 * this method will complete with the same error. | |
905 */ | |
906 async.Future delete(core.int communityId, core.String userId) { | |
907 var _url = null; | |
908 var _queryParams = new core.Map(); | |
909 var _uploadMedia = null; | |
910 var _uploadOptions = null; | |
911 var _downloadOptions = common.DownloadOptions.Metadata; | |
912 var _body = null; | |
913 | |
914 if (communityId == null) { | |
915 throw new core.ArgumentError("Parameter communityId is required."); | |
916 } | |
917 if (userId == null) { | |
918 throw new core.ArgumentError("Parameter userId is required."); | |
919 } | |
920 | |
921 _downloadOptions = null; | |
922 | |
923 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/members/' + common_internal.Escaper.ecapeVariable('$userId'); | |
924 | |
925 var _response = _requester.request(_url, | |
926 "DELETE", | |
927 body: _body, | |
928 queryParams: _queryParams, | |
929 uploadOptions: _uploadOptions, | |
930 uploadMedia: _uploadMedia, | |
931 downloadOptions: _downloadOptions); | |
932 return _response.then((data) => null); | |
933 } | |
934 | |
935 /** | |
936 * Retrieves the relationship between a user and a community. | |
937 * | |
938 * Request parameters: | |
939 * | |
940 * [communityId] - ID of the community. | |
941 * | |
942 * [userId] - ID of the user. | |
943 * | |
944 * [hl] - Specifies the interface language (host language) of your user | |
945 * interface. | |
946 * | |
947 * Completes with a [CommunityMembers]. | |
948 * | |
949 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
950 * error. | |
951 * | |
952 * If the used [http.Client] completes with an error when making a REST call, | |
953 * this method will complete with the same error. | |
954 */ | |
955 async.Future<CommunityMembers> get(core.int communityId, core.String userId, {
core.String hl}) { | |
956 var _url = null; | |
957 var _queryParams = new core.Map(); | |
958 var _uploadMedia = null; | |
959 var _uploadOptions = null; | |
960 var _downloadOptions = common.DownloadOptions.Metadata; | |
961 var _body = null; | |
962 | |
963 if (communityId == null) { | |
964 throw new core.ArgumentError("Parameter communityId is required."); | |
965 } | |
966 if (userId == null) { | |
967 throw new core.ArgumentError("Parameter userId is required."); | |
968 } | |
969 if (hl != null) { | |
970 _queryParams["hl"] = [hl]; | |
971 } | |
972 | |
973 | |
974 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/members/' + common_internal.Escaper.ecapeVariable('$userId'); | |
975 | |
976 var _response = _requester.request(_url, | |
977 "GET", | |
978 body: _body, | |
979 queryParams: _queryParams, | |
980 uploadOptions: _uploadOptions, | |
981 uploadMedia: _uploadMedia, | |
982 downloadOptions: _downloadOptions); | |
983 return _response.then((data) => new CommunityMembers.fromJson(data)); | |
984 } | |
985 | |
986 /** | |
987 * Makes the user join a community. | |
988 * | |
989 * Request parameters: | |
990 * | |
991 * [communityId] - ID of the community. | |
992 * | |
993 * [userId] - ID of the user. | |
994 * | |
995 * Completes with a [CommunityMembers]. | |
996 * | |
997 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
998 * error. | |
999 * | |
1000 * If the used [http.Client] completes with an error when making a REST call, | |
1001 * this method will complete with the same error. | |
1002 */ | |
1003 async.Future<CommunityMembers> insert(core.int communityId, core.String userId
) { | |
1004 var _url = null; | |
1005 var _queryParams = new core.Map(); | |
1006 var _uploadMedia = null; | |
1007 var _uploadOptions = null; | |
1008 var _downloadOptions = common.DownloadOptions.Metadata; | |
1009 var _body = null; | |
1010 | |
1011 if (communityId == null) { | |
1012 throw new core.ArgumentError("Parameter communityId is required."); | |
1013 } | |
1014 if (userId == null) { | |
1015 throw new core.ArgumentError("Parameter userId is required."); | |
1016 } | |
1017 | |
1018 | |
1019 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/members/' + common_internal.Escaper.ecapeVariable('$userId'); | |
1020 | |
1021 var _response = _requester.request(_url, | |
1022 "POST", | |
1023 body: _body, | |
1024 queryParams: _queryParams, | |
1025 uploadOptions: _uploadOptions, | |
1026 uploadMedia: _uploadMedia, | |
1027 downloadOptions: _downloadOptions); | |
1028 return _response.then((data) => new CommunityMembers.fromJson(data)); | |
1029 } | |
1030 | |
1031 /** | |
1032 * Lists members of a community. Use the pagination tokens to retrieve the | |
1033 * full list; do not rely on the member count available in the community | |
1034 * profile information to know when to stop iterating, as that count may be | |
1035 * approximate. | |
1036 * | |
1037 * Request parameters: | |
1038 * | |
1039 * [communityId] - The ID of the community whose members will be listed. | |
1040 * | |
1041 * [friendsOnly] - Whether to list only community members who are friends of | |
1042 * the user. | |
1043 * | |
1044 * [hl] - Specifies the interface language (host language) of your user | |
1045 * interface. | |
1046 * | |
1047 * [maxResults] - The maximum number of members to include in the response. | |
1048 * | |
1049 * [pageToken] - A continuation token that allows pagination. | |
1050 * | |
1051 * Completes with a [CommunityMembersList]. | |
1052 * | |
1053 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1054 * error. | |
1055 * | |
1056 * If the used [http.Client] completes with an error when making a REST call, | |
1057 * this method will complete with the same error. | |
1058 */ | |
1059 async.Future<CommunityMembersList> list(core.int communityId, {core.bool frien
dsOnly, core.String hl, core.int maxResults, core.String pageToken}) { | |
1060 var _url = null; | |
1061 var _queryParams = new core.Map(); | |
1062 var _uploadMedia = null; | |
1063 var _uploadOptions = null; | |
1064 var _downloadOptions = common.DownloadOptions.Metadata; | |
1065 var _body = null; | |
1066 | |
1067 if (communityId == null) { | |
1068 throw new core.ArgumentError("Parameter communityId is required."); | |
1069 } | |
1070 if (friendsOnly != null) { | |
1071 _queryParams["friendsOnly"] = ["${friendsOnly}"]; | |
1072 } | |
1073 if (hl != null) { | |
1074 _queryParams["hl"] = [hl]; | |
1075 } | |
1076 if (maxResults != null) { | |
1077 _queryParams["maxResults"] = ["${maxResults}"]; | |
1078 } | |
1079 if (pageToken != null) { | |
1080 _queryParams["pageToken"] = [pageToken]; | |
1081 } | |
1082 | |
1083 | |
1084 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/members'; | |
1085 | |
1086 var _response = _requester.request(_url, | |
1087 "GET", | |
1088 body: _body, | |
1089 queryParams: _queryParams, | |
1090 uploadOptions: _uploadOptions, | |
1091 uploadMedia: _uploadMedia, | |
1092 downloadOptions: _downloadOptions); | |
1093 return _response.then((data) => new CommunityMembersList.fromJson(data)); | |
1094 } | |
1095 | |
1096 } | |
1097 | |
1098 | |
1099 /** Not documented yet. */ | |
1100 class CommunityMessagesResourceApi { | |
1101 final common_internal.ApiRequester _requester; | |
1102 | |
1103 CommunityMessagesResourceApi(common_internal.ApiRequester client) : | |
1104 _requester = client; | |
1105 | |
1106 /** | |
1107 * Moves a message of the community to the trash folder. | |
1108 * | |
1109 * Request parameters: | |
1110 * | |
1111 * [communityId] - The ID of the community whose message will be moved to the | |
1112 * trash folder. | |
1113 * | |
1114 * [topicId] - The ID of the topic whose message will be moved to the trash | |
1115 * folder. | |
1116 * | |
1117 * [messageId] - The ID of the message to be moved to the trash folder. | |
1118 * | |
1119 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1120 * error. | |
1121 * | |
1122 * If the used [http.Client] completes with an error when making a REST call, | |
1123 * this method will complete with the same error. | |
1124 */ | |
1125 async.Future delete(core.int communityId, core.String topicId, core.String mes
sageId) { | |
1126 var _url = null; | |
1127 var _queryParams = new core.Map(); | |
1128 var _uploadMedia = null; | |
1129 var _uploadOptions = null; | |
1130 var _downloadOptions = common.DownloadOptions.Metadata; | |
1131 var _body = null; | |
1132 | |
1133 if (communityId == null) { | |
1134 throw new core.ArgumentError("Parameter communityId is required."); | |
1135 } | |
1136 if (topicId == null) { | |
1137 throw new core.ArgumentError("Parameter topicId is required."); | |
1138 } | |
1139 if (messageId == null) { | |
1140 throw new core.ArgumentError("Parameter messageId is required."); | |
1141 } | |
1142 | |
1143 _downloadOptions = null; | |
1144 | |
1145 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics/' + common_internal.Escaper.ecapeVariable('$topicId') + '/messages/
' + common_internal.Escaper.ecapeVariable('$messageId'); | |
1146 | |
1147 var _response = _requester.request(_url, | |
1148 "DELETE", | |
1149 body: _body, | |
1150 queryParams: _queryParams, | |
1151 uploadOptions: _uploadOptions, | |
1152 uploadMedia: _uploadMedia, | |
1153 downloadOptions: _downloadOptions); | |
1154 return _response.then((data) => null); | |
1155 } | |
1156 | |
1157 /** | |
1158 * Adds a message to a given community topic. | |
1159 * | |
1160 * [request] - The metadata request object. | |
1161 * | |
1162 * Request parameters: | |
1163 * | |
1164 * [communityId] - The ID of the community the message should be added to. | |
1165 * | |
1166 * [topicId] - The ID of the topic the message should be added to. | |
1167 * | |
1168 * Completes with a [CommunityMessage]. | |
1169 * | |
1170 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1171 * error. | |
1172 * | |
1173 * If the used [http.Client] completes with an error when making a REST call, | |
1174 * this method will complete with the same error. | |
1175 */ | |
1176 async.Future<CommunityMessage> insert(CommunityMessage request, core.int commu
nityId, core.String topicId) { | |
1177 var _url = null; | |
1178 var _queryParams = new core.Map(); | |
1179 var _uploadMedia = null; | |
1180 var _uploadOptions = null; | |
1181 var _downloadOptions = common.DownloadOptions.Metadata; | |
1182 var _body = null; | |
1183 | |
1184 if (request != null) { | |
1185 _body = convert.JSON.encode((request).toJson()); | |
1186 } | |
1187 if (communityId == null) { | |
1188 throw new core.ArgumentError("Parameter communityId is required."); | |
1189 } | |
1190 if (topicId == null) { | |
1191 throw new core.ArgumentError("Parameter topicId is required."); | |
1192 } | |
1193 | |
1194 | |
1195 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics/' + common_internal.Escaper.ecapeVariable('$topicId') + '/messages'
; | |
1196 | |
1197 var _response = _requester.request(_url, | |
1198 "POST", | |
1199 body: _body, | |
1200 queryParams: _queryParams, | |
1201 uploadOptions: _uploadOptions, | |
1202 uploadMedia: _uploadMedia, | |
1203 downloadOptions: _downloadOptions); | |
1204 return _response.then((data) => new CommunityMessage.fromJson(data)); | |
1205 } | |
1206 | |
1207 /** | |
1208 * Retrieves the messages of a topic of a community. | |
1209 * | |
1210 * Request parameters: | |
1211 * | |
1212 * [communityId] - The ID of the community which messages will be listed. | |
1213 * | |
1214 * [topicId] - The ID of the topic which messages will be listed. | |
1215 * | |
1216 * [hl] - Specifies the interface language (host language) of your user | |
1217 * interface. | |
1218 * | |
1219 * [maxResults] - The maximum number of messages to include in the response. | |
1220 * Value must be between "1" and "100". | |
1221 * | |
1222 * [pageToken] - A continuation token that allows pagination. | |
1223 * | |
1224 * Completes with a [CommunityMessageList]. | |
1225 * | |
1226 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1227 * error. | |
1228 * | |
1229 * If the used [http.Client] completes with an error when making a REST call, | |
1230 * this method will complete with the same error. | |
1231 */ | |
1232 async.Future<CommunityMessageList> list(core.int communityId, core.String topi
cId, {core.String hl, core.int maxResults, core.String pageToken}) { | |
1233 var _url = null; | |
1234 var _queryParams = new core.Map(); | |
1235 var _uploadMedia = null; | |
1236 var _uploadOptions = null; | |
1237 var _downloadOptions = common.DownloadOptions.Metadata; | |
1238 var _body = null; | |
1239 | |
1240 if (communityId == null) { | |
1241 throw new core.ArgumentError("Parameter communityId is required."); | |
1242 } | |
1243 if (topicId == null) { | |
1244 throw new core.ArgumentError("Parameter topicId is required."); | |
1245 } | |
1246 if (hl != null) { | |
1247 _queryParams["hl"] = [hl]; | |
1248 } | |
1249 if (maxResults != null) { | |
1250 _queryParams["maxResults"] = ["${maxResults}"]; | |
1251 } | |
1252 if (pageToken != null) { | |
1253 _queryParams["pageToken"] = [pageToken]; | |
1254 } | |
1255 | |
1256 | |
1257 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics/' + common_internal.Escaper.ecapeVariable('$topicId') + '/messages'
; | |
1258 | |
1259 var _response = _requester.request(_url, | |
1260 "GET", | |
1261 body: _body, | |
1262 queryParams: _queryParams, | |
1263 uploadOptions: _uploadOptions, | |
1264 uploadMedia: _uploadMedia, | |
1265 downloadOptions: _downloadOptions); | |
1266 return _response.then((data) => new CommunityMessageList.fromJson(data)); | |
1267 } | |
1268 | |
1269 } | |
1270 | |
1271 | |
1272 /** Not documented yet. */ | |
1273 class CommunityPollCommentsResourceApi { | |
1274 final common_internal.ApiRequester _requester; | |
1275 | |
1276 CommunityPollCommentsResourceApi(common_internal.ApiRequester client) : | |
1277 _requester = client; | |
1278 | |
1279 /** | |
1280 * Adds a comment on a community poll. | |
1281 * | |
1282 * [request] - The metadata request object. | |
1283 * | |
1284 * Request parameters: | |
1285 * | |
1286 * [communityId] - The ID of the community whose poll is being commented. | |
1287 * | |
1288 * [pollId] - The ID of the poll being commented. | |
1289 * | |
1290 * Completes with a [CommunityPollComment]. | |
1291 * | |
1292 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1293 * error. | |
1294 * | |
1295 * If the used [http.Client] completes with an error when making a REST call, | |
1296 * this method will complete with the same error. | |
1297 */ | |
1298 async.Future<CommunityPollComment> insert(CommunityPollComment request, core.i
nt communityId, core.String pollId) { | |
1299 var _url = null; | |
1300 var _queryParams = new core.Map(); | |
1301 var _uploadMedia = null; | |
1302 var _uploadOptions = null; | |
1303 var _downloadOptions = common.DownloadOptions.Metadata; | |
1304 var _body = null; | |
1305 | |
1306 if (request != null) { | |
1307 _body = convert.JSON.encode((request).toJson()); | |
1308 } | |
1309 if (communityId == null) { | |
1310 throw new core.ArgumentError("Parameter communityId is required."); | |
1311 } | |
1312 if (pollId == null) { | |
1313 throw new core.ArgumentError("Parameter pollId is required."); | |
1314 } | |
1315 | |
1316 | |
1317 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/polls/' + common_internal.Escaper.ecapeVariable('$pollId') + '/comments'; | |
1318 | |
1319 var _response = _requester.request(_url, | |
1320 "POST", | |
1321 body: _body, | |
1322 queryParams: _queryParams, | |
1323 uploadOptions: _uploadOptions, | |
1324 uploadMedia: _uploadMedia, | |
1325 downloadOptions: _downloadOptions); | |
1326 return _response.then((data) => new CommunityPollComment.fromJson(data)); | |
1327 } | |
1328 | |
1329 /** | |
1330 * Retrieves the comments of a community poll. | |
1331 * | |
1332 * Request parameters: | |
1333 * | |
1334 * [communityId] - The ID of the community whose poll is having its comments | |
1335 * listed. | |
1336 * | |
1337 * [pollId] - The ID of the community whose polls will be listed. | |
1338 * | |
1339 * [hl] - Specifies the interface language (host language) of your user | |
1340 * interface. | |
1341 * | |
1342 * [maxResults] - The maximum number of comments to include in the response. | |
1343 * | |
1344 * [pageToken] - A continuation token that allows pagination. | |
1345 * | |
1346 * Completes with a [CommunityPollCommentList]. | |
1347 * | |
1348 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1349 * error. | |
1350 * | |
1351 * If the used [http.Client] completes with an error when making a REST call, | |
1352 * this method will complete with the same error. | |
1353 */ | |
1354 async.Future<CommunityPollCommentList> list(core.int communityId, core.String
pollId, {core.String hl, core.int maxResults, core.String pageToken}) { | |
1355 var _url = null; | |
1356 var _queryParams = new core.Map(); | |
1357 var _uploadMedia = null; | |
1358 var _uploadOptions = null; | |
1359 var _downloadOptions = common.DownloadOptions.Metadata; | |
1360 var _body = null; | |
1361 | |
1362 if (communityId == null) { | |
1363 throw new core.ArgumentError("Parameter communityId is required."); | |
1364 } | |
1365 if (pollId == null) { | |
1366 throw new core.ArgumentError("Parameter pollId is required."); | |
1367 } | |
1368 if (hl != null) { | |
1369 _queryParams["hl"] = [hl]; | |
1370 } | |
1371 if (maxResults != null) { | |
1372 _queryParams["maxResults"] = ["${maxResults}"]; | |
1373 } | |
1374 if (pageToken != null) { | |
1375 _queryParams["pageToken"] = [pageToken]; | |
1376 } | |
1377 | |
1378 | |
1379 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/polls/' + common_internal.Escaper.ecapeVariable('$pollId') + '/comments'; | |
1380 | |
1381 var _response = _requester.request(_url, | |
1382 "GET", | |
1383 body: _body, | |
1384 queryParams: _queryParams, | |
1385 uploadOptions: _uploadOptions, | |
1386 uploadMedia: _uploadMedia, | |
1387 downloadOptions: _downloadOptions); | |
1388 return _response.then((data) => new CommunityPollCommentList.fromJson(data))
; | |
1389 } | |
1390 | |
1391 } | |
1392 | |
1393 | |
1394 /** Not documented yet. */ | |
1395 class CommunityPollVotesResourceApi { | |
1396 final common_internal.ApiRequester _requester; | |
1397 | |
1398 CommunityPollVotesResourceApi(common_internal.ApiRequester client) : | |
1399 _requester = client; | |
1400 | |
1401 /** | |
1402 * Votes on a community poll. | |
1403 * | |
1404 * [request] - The metadata request object. | |
1405 * | |
1406 * Request parameters: | |
1407 * | |
1408 * [communityId] - The ID of the community whose poll is being voted. | |
1409 * | |
1410 * [pollId] - The ID of the poll being voted. | |
1411 * | |
1412 * Completes with a [CommunityPollVote]. | |
1413 * | |
1414 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1415 * error. | |
1416 * | |
1417 * If the used [http.Client] completes with an error when making a REST call, | |
1418 * this method will complete with the same error. | |
1419 */ | |
1420 async.Future<CommunityPollVote> insert(CommunityPollVote request, core.int com
munityId, core.String pollId) { | |
1421 var _url = null; | |
1422 var _queryParams = new core.Map(); | |
1423 var _uploadMedia = null; | |
1424 var _uploadOptions = null; | |
1425 var _downloadOptions = common.DownloadOptions.Metadata; | |
1426 var _body = null; | |
1427 | |
1428 if (request != null) { | |
1429 _body = convert.JSON.encode((request).toJson()); | |
1430 } | |
1431 if (communityId == null) { | |
1432 throw new core.ArgumentError("Parameter communityId is required."); | |
1433 } | |
1434 if (pollId == null) { | |
1435 throw new core.ArgumentError("Parameter pollId is required."); | |
1436 } | |
1437 | |
1438 | |
1439 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/polls/' + common_internal.Escaper.ecapeVariable('$pollId') + '/votes'; | |
1440 | |
1441 var _response = _requester.request(_url, | |
1442 "POST", | |
1443 body: _body, | |
1444 queryParams: _queryParams, | |
1445 uploadOptions: _uploadOptions, | |
1446 uploadMedia: _uploadMedia, | |
1447 downloadOptions: _downloadOptions); | |
1448 return _response.then((data) => new CommunityPollVote.fromJson(data)); | |
1449 } | |
1450 | |
1451 } | |
1452 | |
1453 | |
1454 /** Not documented yet. */ | |
1455 class CommunityPollsResourceApi { | |
1456 final common_internal.ApiRequester _requester; | |
1457 | |
1458 CommunityPollsResourceApi(common_internal.ApiRequester client) : | |
1459 _requester = client; | |
1460 | |
1461 /** | |
1462 * Retrieves one specific poll of a community. | |
1463 * | |
1464 * Request parameters: | |
1465 * | |
1466 * [communityId] - The ID of the community for whose poll will be retrieved. | |
1467 * | |
1468 * [pollId] - The ID of the poll to get. | |
1469 * | |
1470 * [hl] - Specifies the interface language (host language) of your user | |
1471 * interface. | |
1472 * | |
1473 * Completes with a [CommunityPoll]. | |
1474 * | |
1475 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1476 * error. | |
1477 * | |
1478 * If the used [http.Client] completes with an error when making a REST call, | |
1479 * this method will complete with the same error. | |
1480 */ | |
1481 async.Future<CommunityPoll> get(core.int communityId, core.String pollId, {cor
e.String hl}) { | |
1482 var _url = null; | |
1483 var _queryParams = new core.Map(); | |
1484 var _uploadMedia = null; | |
1485 var _uploadOptions = null; | |
1486 var _downloadOptions = common.DownloadOptions.Metadata; | |
1487 var _body = null; | |
1488 | |
1489 if (communityId == null) { | |
1490 throw new core.ArgumentError("Parameter communityId is required."); | |
1491 } | |
1492 if (pollId == null) { | |
1493 throw new core.ArgumentError("Parameter pollId is required."); | |
1494 } | |
1495 if (hl != null) { | |
1496 _queryParams["hl"] = [hl]; | |
1497 } | |
1498 | |
1499 | |
1500 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/polls/' + common_internal.Escaper.ecapeVariable('$pollId'); | |
1501 | |
1502 var _response = _requester.request(_url, | |
1503 "GET", | |
1504 body: _body, | |
1505 queryParams: _queryParams, | |
1506 uploadOptions: _uploadOptions, | |
1507 uploadMedia: _uploadMedia, | |
1508 downloadOptions: _downloadOptions); | |
1509 return _response.then((data) => new CommunityPoll.fromJson(data)); | |
1510 } | |
1511 | |
1512 /** | |
1513 * Retrieves the polls of a community. | |
1514 * | |
1515 * Request parameters: | |
1516 * | |
1517 * [communityId] - The ID of the community which polls will be listed. | |
1518 * | |
1519 * [hl] - Specifies the interface language (host language) of your user | |
1520 * interface. | |
1521 * | |
1522 * [maxResults] - The maximum number of polls to include in the response. | |
1523 * | |
1524 * [pageToken] - A continuation token that allows pagination. | |
1525 * | |
1526 * Completes with a [CommunityPollList]. | |
1527 * | |
1528 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1529 * error. | |
1530 * | |
1531 * If the used [http.Client] completes with an error when making a REST call, | |
1532 * this method will complete with the same error. | |
1533 */ | |
1534 async.Future<CommunityPollList> list(core.int communityId, {core.String hl, co
re.int maxResults, core.String pageToken}) { | |
1535 var _url = null; | |
1536 var _queryParams = new core.Map(); | |
1537 var _uploadMedia = null; | |
1538 var _uploadOptions = null; | |
1539 var _downloadOptions = common.DownloadOptions.Metadata; | |
1540 var _body = null; | |
1541 | |
1542 if (communityId == null) { | |
1543 throw new core.ArgumentError("Parameter communityId is required."); | |
1544 } | |
1545 if (hl != null) { | |
1546 _queryParams["hl"] = [hl]; | |
1547 } | |
1548 if (maxResults != null) { | |
1549 _queryParams["maxResults"] = ["${maxResults}"]; | |
1550 } | |
1551 if (pageToken != null) { | |
1552 _queryParams["pageToken"] = [pageToken]; | |
1553 } | |
1554 | |
1555 | |
1556 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/polls'; | |
1557 | |
1558 var _response = _requester.request(_url, | |
1559 "GET", | |
1560 body: _body, | |
1561 queryParams: _queryParams, | |
1562 uploadOptions: _uploadOptions, | |
1563 uploadMedia: _uploadMedia, | |
1564 downloadOptions: _downloadOptions); | |
1565 return _response.then((data) => new CommunityPollList.fromJson(data)); | |
1566 } | |
1567 | |
1568 } | |
1569 | |
1570 | |
1571 /** Not documented yet. */ | |
1572 class CommunityRelatedResourceApi { | |
1573 final common_internal.ApiRequester _requester; | |
1574 | |
1575 CommunityRelatedResourceApi(common_internal.ApiRequester client) : | |
1576 _requester = client; | |
1577 | |
1578 /** | |
1579 * Retrieves the communities related to another one. | |
1580 * | |
1581 * Request parameters: | |
1582 * | |
1583 * [communityId] - The ID of the community whose related communities will be | |
1584 * listed. | |
1585 * | |
1586 * [hl] - Specifies the interface language (host language) of your user | |
1587 * interface. | |
1588 * | |
1589 * Completes with a [CommunityList]. | |
1590 * | |
1591 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1592 * error. | |
1593 * | |
1594 * If the used [http.Client] completes with an error when making a REST call, | |
1595 * this method will complete with the same error. | |
1596 */ | |
1597 async.Future<CommunityList> list(core.int communityId, {core.String hl}) { | |
1598 var _url = null; | |
1599 var _queryParams = new core.Map(); | |
1600 var _uploadMedia = null; | |
1601 var _uploadOptions = null; | |
1602 var _downloadOptions = common.DownloadOptions.Metadata; | |
1603 var _body = null; | |
1604 | |
1605 if (communityId == null) { | |
1606 throw new core.ArgumentError("Parameter communityId is required."); | |
1607 } | |
1608 if (hl != null) { | |
1609 _queryParams["hl"] = [hl]; | |
1610 } | |
1611 | |
1612 | |
1613 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/related'; | |
1614 | |
1615 var _response = _requester.request(_url, | |
1616 "GET", | |
1617 body: _body, | |
1618 queryParams: _queryParams, | |
1619 uploadOptions: _uploadOptions, | |
1620 uploadMedia: _uploadMedia, | |
1621 downloadOptions: _downloadOptions); | |
1622 return _response.then((data) => new CommunityList.fromJson(data)); | |
1623 } | |
1624 | |
1625 } | |
1626 | |
1627 | |
1628 /** Not documented yet. */ | |
1629 class CommunityTopicsResourceApi { | |
1630 final common_internal.ApiRequester _requester; | |
1631 | |
1632 CommunityTopicsResourceApi(common_internal.ApiRequester client) : | |
1633 _requester = client; | |
1634 | |
1635 /** | |
1636 * Moves a topic of the community to the trash folder. | |
1637 * | |
1638 * Request parameters: | |
1639 * | |
1640 * [communityId] - The ID of the community whose topic will be moved to the | |
1641 * trash folder. | |
1642 * | |
1643 * [topicId] - The ID of the topic to be moved to the trash folder. | |
1644 * | |
1645 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1646 * error. | |
1647 * | |
1648 * If the used [http.Client] completes with an error when making a REST call, | |
1649 * this method will complete with the same error. | |
1650 */ | |
1651 async.Future delete(core.int communityId, core.String topicId) { | |
1652 var _url = null; | |
1653 var _queryParams = new core.Map(); | |
1654 var _uploadMedia = null; | |
1655 var _uploadOptions = null; | |
1656 var _downloadOptions = common.DownloadOptions.Metadata; | |
1657 var _body = null; | |
1658 | |
1659 if (communityId == null) { | |
1660 throw new core.ArgumentError("Parameter communityId is required."); | |
1661 } | |
1662 if (topicId == null) { | |
1663 throw new core.ArgumentError("Parameter topicId is required."); | |
1664 } | |
1665 | |
1666 _downloadOptions = null; | |
1667 | |
1668 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics/' + common_internal.Escaper.ecapeVariable('$topicId'); | |
1669 | |
1670 var _response = _requester.request(_url, | |
1671 "DELETE", | |
1672 body: _body, | |
1673 queryParams: _queryParams, | |
1674 uploadOptions: _uploadOptions, | |
1675 uploadMedia: _uploadMedia, | |
1676 downloadOptions: _downloadOptions); | |
1677 return _response.then((data) => null); | |
1678 } | |
1679 | |
1680 /** | |
1681 * Retrieves a topic of a community. | |
1682 * | |
1683 * Request parameters: | |
1684 * | |
1685 * [communityId] - The ID of the community whose topic will be retrieved. | |
1686 * | |
1687 * [topicId] - The ID of the topic to get. | |
1688 * | |
1689 * [hl] - Specifies the interface language (host language) of your user | |
1690 * interface. | |
1691 * | |
1692 * Completes with a [CommunityTopic]. | |
1693 * | |
1694 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1695 * error. | |
1696 * | |
1697 * If the used [http.Client] completes with an error when making a REST call, | |
1698 * this method will complete with the same error. | |
1699 */ | |
1700 async.Future<CommunityTopic> get(core.int communityId, core.String topicId, {c
ore.String hl}) { | |
1701 var _url = null; | |
1702 var _queryParams = new core.Map(); | |
1703 var _uploadMedia = null; | |
1704 var _uploadOptions = null; | |
1705 var _downloadOptions = common.DownloadOptions.Metadata; | |
1706 var _body = null; | |
1707 | |
1708 if (communityId == null) { | |
1709 throw new core.ArgumentError("Parameter communityId is required."); | |
1710 } | |
1711 if (topicId == null) { | |
1712 throw new core.ArgumentError("Parameter topicId is required."); | |
1713 } | |
1714 if (hl != null) { | |
1715 _queryParams["hl"] = [hl]; | |
1716 } | |
1717 | |
1718 | |
1719 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics/' + common_internal.Escaper.ecapeVariable('$topicId'); | |
1720 | |
1721 var _response = _requester.request(_url, | |
1722 "GET", | |
1723 body: _body, | |
1724 queryParams: _queryParams, | |
1725 uploadOptions: _uploadOptions, | |
1726 uploadMedia: _uploadMedia, | |
1727 downloadOptions: _downloadOptions); | |
1728 return _response.then((data) => new CommunityTopic.fromJson(data)); | |
1729 } | |
1730 | |
1731 /** | |
1732 * Adds a topic to a given community. | |
1733 * | |
1734 * [request] - The metadata request object. | |
1735 * | |
1736 * Request parameters: | |
1737 * | |
1738 * [communityId] - The ID of the community the topic should be added to. | |
1739 * | |
1740 * [isShout] - Whether this topic is a shout. | |
1741 * | |
1742 * Completes with a [CommunityTopic]. | |
1743 * | |
1744 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1745 * error. | |
1746 * | |
1747 * If the used [http.Client] completes with an error when making a REST call, | |
1748 * this method will complete with the same error. | |
1749 */ | |
1750 async.Future<CommunityTopic> insert(CommunityTopic request, core.int community
Id, {core.bool isShout}) { | |
1751 var _url = null; | |
1752 var _queryParams = new core.Map(); | |
1753 var _uploadMedia = null; | |
1754 var _uploadOptions = null; | |
1755 var _downloadOptions = common.DownloadOptions.Metadata; | |
1756 var _body = null; | |
1757 | |
1758 if (request != null) { | |
1759 _body = convert.JSON.encode((request).toJson()); | |
1760 } | |
1761 if (communityId == null) { | |
1762 throw new core.ArgumentError("Parameter communityId is required."); | |
1763 } | |
1764 if (isShout != null) { | |
1765 _queryParams["isShout"] = ["${isShout}"]; | |
1766 } | |
1767 | |
1768 | |
1769 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics'; | |
1770 | |
1771 var _response = _requester.request(_url, | |
1772 "POST", | |
1773 body: _body, | |
1774 queryParams: _queryParams, | |
1775 uploadOptions: _uploadOptions, | |
1776 uploadMedia: _uploadMedia, | |
1777 downloadOptions: _downloadOptions); | |
1778 return _response.then((data) => new CommunityTopic.fromJson(data)); | |
1779 } | |
1780 | |
1781 /** | |
1782 * Retrieves the topics of a community. | |
1783 * | |
1784 * Request parameters: | |
1785 * | |
1786 * [communityId] - The ID of the community which topics will be listed. | |
1787 * | |
1788 * [hl] - Specifies the interface language (host language) of your user | |
1789 * interface. | |
1790 * | |
1791 * [maxResults] - The maximum number of topics to include in the response. | |
1792 * Value must be between "1" and "100". | |
1793 * | |
1794 * [pageToken] - A continuation token that allows pagination. | |
1795 * | |
1796 * Completes with a [CommunityTopicList]. | |
1797 * | |
1798 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1799 * error. | |
1800 * | |
1801 * If the used [http.Client] completes with an error when making a REST call, | |
1802 * this method will complete with the same error. | |
1803 */ | |
1804 async.Future<CommunityTopicList> list(core.int communityId, {core.String hl, c
ore.int maxResults, core.String pageToken}) { | |
1805 var _url = null; | |
1806 var _queryParams = new core.Map(); | |
1807 var _uploadMedia = null; | |
1808 var _uploadOptions = null; | |
1809 var _downloadOptions = common.DownloadOptions.Metadata; | |
1810 var _body = null; | |
1811 | |
1812 if (communityId == null) { | |
1813 throw new core.ArgumentError("Parameter communityId is required."); | |
1814 } | |
1815 if (hl != null) { | |
1816 _queryParams["hl"] = [hl]; | |
1817 } | |
1818 if (maxResults != null) { | |
1819 _queryParams["maxResults"] = ["${maxResults}"]; | |
1820 } | |
1821 if (pageToken != null) { | |
1822 _queryParams["pageToken"] = [pageToken]; | |
1823 } | |
1824 | |
1825 | |
1826 _url = 'communities/' + common_internal.Escaper.ecapeVariable('$communityId'
) + '/topics'; | |
1827 | |
1828 var _response = _requester.request(_url, | |
1829 "GET", | |
1830 body: _body, | |
1831 queryParams: _queryParams, | |
1832 uploadOptions: _uploadOptions, | |
1833 uploadMedia: _uploadMedia, | |
1834 downloadOptions: _downloadOptions); | |
1835 return _response.then((data) => new CommunityTopicList.fromJson(data)); | |
1836 } | |
1837 | |
1838 } | |
1839 | |
1840 | |
1841 /** Not documented yet. */ | |
1842 class CountersResourceApi { | |
1843 final common_internal.ApiRequester _requester; | |
1844 | |
1845 CountersResourceApi(common_internal.ApiRequester client) : | |
1846 _requester = client; | |
1847 | |
1848 /** | |
1849 * Retrieves the counters of a user. | |
1850 * | |
1851 * Request parameters: | |
1852 * | |
1853 * [userId] - The ID of the user whose counters will be listed. Can be me to | |
1854 * refer to caller. | |
1855 * | |
1856 * Completes with a [Counters]. | |
1857 * | |
1858 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1859 * error. | |
1860 * | |
1861 * If the used [http.Client] completes with an error when making a REST call, | |
1862 * this method will complete with the same error. | |
1863 */ | |
1864 async.Future<Counters> list(core.String userId) { | |
1865 var _url = null; | |
1866 var _queryParams = new core.Map(); | |
1867 var _uploadMedia = null; | |
1868 var _uploadOptions = null; | |
1869 var _downloadOptions = common.DownloadOptions.Metadata; | |
1870 var _body = null; | |
1871 | |
1872 if (userId == null) { | |
1873 throw new core.ArgumentError("Parameter userId is required."); | |
1874 } | |
1875 | |
1876 | |
1877 _url = 'people/' + common_internal.Escaper.ecapeVariable('$userId') + '/coun
ters'; | |
1878 | |
1879 var _response = _requester.request(_url, | |
1880 "GET", | |
1881 body: _body, | |
1882 queryParams: _queryParams, | |
1883 uploadOptions: _uploadOptions, | |
1884 uploadMedia: _uploadMedia, | |
1885 downloadOptions: _downloadOptions); | |
1886 return _response.then((data) => new Counters.fromJson(data)); | |
1887 } | |
1888 | |
1889 } | |
1890 | |
1891 | |
1892 /** Not documented yet. */ | |
1893 class ScrapsResourceApi { | |
1894 final common_internal.ApiRequester _requester; | |
1895 | |
1896 ScrapsResourceApi(common_internal.ApiRequester client) : | |
1897 _requester = client; | |
1898 | |
1899 /** | |
1900 * Creates a new scrap. | |
1901 * | |
1902 * [request] - The metadata request object. | |
1903 * | |
1904 * Request parameters: | |
1905 * | |
1906 * Completes with a [Activity]. | |
1907 * | |
1908 * Completes with a [common.ApiRequestError] if the API endpoint returned an | |
1909 * error. | |
1910 * | |
1911 * If the used [http.Client] completes with an error when making a REST call, | |
1912 * this method will complete with the same error. | |
1913 */ | |
1914 async.Future<Activity> insert(Activity request) { | |
1915 var _url = null; | |
1916 var _queryParams = new core.Map(); | |
1917 var _uploadMedia = null; | |
1918 var _uploadOptions = null; | |
1919 var _downloadOptions = common.DownloadOptions.Metadata; | |
1920 var _body = null; | |
1921 | |
1922 if (request != null) { | |
1923 _body = convert.JSON.encode((request).toJson()); | |
1924 } | |
1925 | |
1926 | |
1927 _url = 'activities/scraps'; | |
1928 | |
1929 var _response = _requester.request(_url, | |
1930 "POST", | |
1931 body: _body, | |
1932 queryParams: _queryParams, | |
1933 uploadOptions: _uploadOptions, | |
1934 uploadMedia: _uploadMedia, | |
1935 downloadOptions: _downloadOptions); | |
1936 return _response.then((data) => new Activity.fromJson(data)); | |
1937 } | |
1938 | |
1939 } | |
1940 | |
1941 | |
1942 | |
1943 /** Not documented yet. */ | |
1944 class AclItems { | |
1945 /** | |
1946 * The ID of the entity. For entities of type "person" or "circle", this is | |
1947 * the ID of the resource. For other types, this will be unset. | |
1948 */ | |
1949 core.String id; | |
1950 | |
1951 /** The type of entity to whom access is granted. */ | |
1952 core.String type; | |
1953 | |
1954 | |
1955 AclItems(); | |
1956 | |
1957 AclItems.fromJson(core.Map _json) { | |
1958 if (_json.containsKey("id")) { | |
1959 id = _json["id"]; | |
1960 } | |
1961 if (_json.containsKey("type")) { | |
1962 type = _json["type"]; | |
1963 } | |
1964 } | |
1965 | |
1966 core.Map toJson() { | |
1967 var _json = new core.Map(); | |
1968 if (id != null) { | |
1969 _json["id"] = id; | |
1970 } | |
1971 if (type != null) { | |
1972 _json["type"] = type; | |
1973 } | |
1974 return _json; | |
1975 } | |
1976 } | |
1977 | |
1978 | |
1979 /** Not documented yet. */ | |
1980 class Acl { | |
1981 /** Human readable description of the access granted. */ | |
1982 core.String description; | |
1983 | |
1984 /** The list of ACL entries. */ | |
1985 core.List<AclItems> items; | |
1986 | |
1987 /** Identifies this resource as an access control list. Value: "orkut#acl" */ | |
1988 core.String kind; | |
1989 | |
1990 /** The total count of participants of the parent resource. */ | |
1991 core.int totalParticipants; | |
1992 | |
1993 | |
1994 Acl(); | |
1995 | |
1996 Acl.fromJson(core.Map _json) { | |
1997 if (_json.containsKey("description")) { | |
1998 description = _json["description"]; | |
1999 } | |
2000 if (_json.containsKey("items")) { | |
2001 items = _json["items"].map((value) => new AclItems.fromJson(value)).toList
(); | |
2002 } | |
2003 if (_json.containsKey("kind")) { | |
2004 kind = _json["kind"]; | |
2005 } | |
2006 if (_json.containsKey("totalParticipants")) { | |
2007 totalParticipants = _json["totalParticipants"]; | |
2008 } | |
2009 } | |
2010 | |
2011 core.Map toJson() { | |
2012 var _json = new core.Map(); | |
2013 if (description != null) { | |
2014 _json["description"] = description; | |
2015 } | |
2016 if (items != null) { | |
2017 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2018 } | |
2019 if (kind != null) { | |
2020 _json["kind"] = kind; | |
2021 } | |
2022 if (totalParticipants != null) { | |
2023 _json["totalParticipants"] = totalParticipants; | |
2024 } | |
2025 return _json; | |
2026 } | |
2027 } | |
2028 | |
2029 | |
2030 /** Comments in reply to this activity. */ | |
2031 class ActivityObjectReplies { | |
2032 /** The list of comments. */ | |
2033 core.List<Comment> items; | |
2034 | |
2035 /** Total number of comments. */ | |
2036 core.String totalItems; | |
2037 | |
2038 /** URL for the collection of comments in reply to this activity. */ | |
2039 core.String url; | |
2040 | |
2041 | |
2042 ActivityObjectReplies(); | |
2043 | |
2044 ActivityObjectReplies.fromJson(core.Map _json) { | |
2045 if (_json.containsKey("items")) { | |
2046 items = _json["items"].map((value) => new Comment.fromJson(value)).toList(
); | |
2047 } | |
2048 if (_json.containsKey("totalItems")) { | |
2049 totalItems = _json["totalItems"]; | |
2050 } | |
2051 if (_json.containsKey("url")) { | |
2052 url = _json["url"]; | |
2053 } | |
2054 } | |
2055 | |
2056 core.Map toJson() { | |
2057 var _json = new core.Map(); | |
2058 if (items != null) { | |
2059 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2060 } | |
2061 if (totalItems != null) { | |
2062 _json["totalItems"] = totalItems; | |
2063 } | |
2064 if (url != null) { | |
2065 _json["url"] = url; | |
2066 } | |
2067 return _json; | |
2068 } | |
2069 } | |
2070 | |
2071 | |
2072 /** The activity's object. */ | |
2073 class ActivityObject { | |
2074 /** | |
2075 * The HTML-formatted content, suitable for display. When updating an | |
2076 * activity's content, post the changes to this property, using the value of | |
2077 * originalContent as a starting point. If the update is successful, the | |
2078 * server adds HTML formatting and responds with this formatted content. | |
2079 */ | |
2080 core.String content; | |
2081 | |
2082 /** The list of additional items. */ | |
2083 core.List<OrkutActivityobjectsResource> items; | |
2084 | |
2085 /** | |
2086 * The type of the object affected by the activity. Clients can use this | |
2087 * information to style the rendered activity object differently depending on | |
2088 * the content. | |
2089 */ | |
2090 core.String objectType; | |
2091 | |
2092 /** Comments in reply to this activity. */ | |
2093 ActivityObjectReplies replies; | |
2094 | |
2095 | |
2096 ActivityObject(); | |
2097 | |
2098 ActivityObject.fromJson(core.Map _json) { | |
2099 if (_json.containsKey("content")) { | |
2100 content = _json["content"]; | |
2101 } | |
2102 if (_json.containsKey("items")) { | |
2103 items = _json["items"].map((value) => new OrkutActivityobjectsResource.fro
mJson(value)).toList(); | |
2104 } | |
2105 if (_json.containsKey("objectType")) { | |
2106 objectType = _json["objectType"]; | |
2107 } | |
2108 if (_json.containsKey("replies")) { | |
2109 replies = new ActivityObjectReplies.fromJson(_json["replies"]); | |
2110 } | |
2111 } | |
2112 | |
2113 core.Map toJson() { | |
2114 var _json = new core.Map(); | |
2115 if (content != null) { | |
2116 _json["content"] = content; | |
2117 } | |
2118 if (items != null) { | |
2119 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2120 } | |
2121 if (objectType != null) { | |
2122 _json["objectType"] = objectType; | |
2123 } | |
2124 if (replies != null) { | |
2125 _json["replies"] = (replies).toJson(); | |
2126 } | |
2127 return _json; | |
2128 } | |
2129 } | |
2130 | |
2131 | |
2132 /** Not documented yet. */ | |
2133 class Activity { | |
2134 /** Identifies who has access to see this activity. */ | |
2135 Acl access; | |
2136 | |
2137 /** The person who performed the activity. */ | |
2138 OrkutAuthorResource actor; | |
2139 | |
2140 /** The ID for the activity. */ | |
2141 core.String id; | |
2142 | |
2143 /** The kind of activity. Always orkut#activity. */ | |
2144 core.String kind; | |
2145 | |
2146 /** Links to resources related to this activity. */ | |
2147 core.List<OrkutLinkResource> links; | |
2148 | |
2149 /** The activity's object. */ | |
2150 ActivityObject object; | |
2151 | |
2152 /** The time at which the activity was initially published. */ | |
2153 core.DateTime published; | |
2154 | |
2155 /** Title of the activity. */ | |
2156 core.String title; | |
2157 | |
2158 /** The time at which the activity was last updated. */ | |
2159 core.DateTime updated; | |
2160 | |
2161 /** | |
2162 * This activity's verb, indicating what action was performed. Possible values | |
2163 * are: | |
2164 * - add - User added new content to profile or album, e.g. video, photo. | |
2165 * - post - User publish content to the stream, e.g. status, scrap. | |
2166 * - update - User commented on an activity. | |
2167 * - make-friend - User added a new friend. | |
2168 * - birthday - User has a birthday. | |
2169 */ | |
2170 core.String verb; | |
2171 | |
2172 | |
2173 Activity(); | |
2174 | |
2175 Activity.fromJson(core.Map _json) { | |
2176 if (_json.containsKey("access")) { | |
2177 access = new Acl.fromJson(_json["access"]); | |
2178 } | |
2179 if (_json.containsKey("actor")) { | |
2180 actor = new OrkutAuthorResource.fromJson(_json["actor"]); | |
2181 } | |
2182 if (_json.containsKey("id")) { | |
2183 id = _json["id"]; | |
2184 } | |
2185 if (_json.containsKey("kind")) { | |
2186 kind = _json["kind"]; | |
2187 } | |
2188 if (_json.containsKey("links")) { | |
2189 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
2190 } | |
2191 if (_json.containsKey("object")) { | |
2192 object = new ActivityObject.fromJson(_json["object"]); | |
2193 } | |
2194 if (_json.containsKey("published")) { | |
2195 published = core.DateTime.parse(_json["published"]); | |
2196 } | |
2197 if (_json.containsKey("title")) { | |
2198 title = _json["title"]; | |
2199 } | |
2200 if (_json.containsKey("updated")) { | |
2201 updated = core.DateTime.parse(_json["updated"]); | |
2202 } | |
2203 if (_json.containsKey("verb")) { | |
2204 verb = _json["verb"]; | |
2205 } | |
2206 } | |
2207 | |
2208 core.Map toJson() { | |
2209 var _json = new core.Map(); | |
2210 if (access != null) { | |
2211 _json["access"] = (access).toJson(); | |
2212 } | |
2213 if (actor != null) { | |
2214 _json["actor"] = (actor).toJson(); | |
2215 } | |
2216 if (id != null) { | |
2217 _json["id"] = id; | |
2218 } | |
2219 if (kind != null) { | |
2220 _json["kind"] = kind; | |
2221 } | |
2222 if (links != null) { | |
2223 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
2224 } | |
2225 if (object != null) { | |
2226 _json["object"] = (object).toJson(); | |
2227 } | |
2228 if (published != null) { | |
2229 _json["published"] = (published).toIso8601String(); | |
2230 } | |
2231 if (title != null) { | |
2232 _json["title"] = title; | |
2233 } | |
2234 if (updated != null) { | |
2235 _json["updated"] = (updated).toIso8601String(); | |
2236 } | |
2237 if (verb != null) { | |
2238 _json["verb"] = verb; | |
2239 } | |
2240 return _json; | |
2241 } | |
2242 } | |
2243 | |
2244 | |
2245 /** Not documented yet. */ | |
2246 class ActivityList { | |
2247 /** List of activities retrieved. */ | |
2248 core.List<Activity> items; | |
2249 | |
2250 /** | |
2251 * Identifies this resource as a collection of activities. Value: | |
2252 * "orkut#activityList" | |
2253 */ | |
2254 core.String kind; | |
2255 | |
2256 /** | |
2257 * The value of pageToken query parameter in activities.list request to get | |
2258 * the next page, if there are more to retrieve. | |
2259 */ | |
2260 core.String nextPageToken; | |
2261 | |
2262 | |
2263 ActivityList(); | |
2264 | |
2265 ActivityList.fromJson(core.Map _json) { | |
2266 if (_json.containsKey("items")) { | |
2267 items = _json["items"].map((value) => new Activity.fromJson(value)).toList
(); | |
2268 } | |
2269 if (_json.containsKey("kind")) { | |
2270 kind = _json["kind"]; | |
2271 } | |
2272 if (_json.containsKey("nextPageToken")) { | |
2273 nextPageToken = _json["nextPageToken"]; | |
2274 } | |
2275 } | |
2276 | |
2277 core.Map toJson() { | |
2278 var _json = new core.Map(); | |
2279 if (items != null) { | |
2280 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2281 } | |
2282 if (kind != null) { | |
2283 _json["kind"] = kind; | |
2284 } | |
2285 if (nextPageToken != null) { | |
2286 _json["nextPageToken"] = nextPageToken; | |
2287 } | |
2288 return _json; | |
2289 } | |
2290 } | |
2291 | |
2292 | |
2293 /** Not documented yet. */ | |
2294 class Badge { | |
2295 /** The URL for the 64x64 badge logo. */ | |
2296 core.String badgeLargeLogo; | |
2297 | |
2298 /** The URL for the 24x24 badge logo. */ | |
2299 core.String badgeSmallLogo; | |
2300 | |
2301 /** The name of the badge, suitable for display. */ | |
2302 core.String caption; | |
2303 | |
2304 /** The description for the badge, suitable for display. */ | |
2305 core.String description; | |
2306 | |
2307 /** The unique ID for the badge. */ | |
2308 core.String id; | |
2309 | |
2310 /** Identifies this resource as a badge. Value: "orkut#badge" */ | |
2311 core.String kind; | |
2312 | |
2313 /** The URL for the 32x32 badge sponsor logo. */ | |
2314 core.String sponsorLogo; | |
2315 | |
2316 /** The name of the badge sponsor, suitable for display. */ | |
2317 core.String sponsorName; | |
2318 | |
2319 /** The URL for the badge sponsor. */ | |
2320 core.String sponsorUrl; | |
2321 | |
2322 | |
2323 Badge(); | |
2324 | |
2325 Badge.fromJson(core.Map _json) { | |
2326 if (_json.containsKey("badgeLargeLogo")) { | |
2327 badgeLargeLogo = _json["badgeLargeLogo"]; | |
2328 } | |
2329 if (_json.containsKey("badgeSmallLogo")) { | |
2330 badgeSmallLogo = _json["badgeSmallLogo"]; | |
2331 } | |
2332 if (_json.containsKey("caption")) { | |
2333 caption = _json["caption"]; | |
2334 } | |
2335 if (_json.containsKey("description")) { | |
2336 description = _json["description"]; | |
2337 } | |
2338 if (_json.containsKey("id")) { | |
2339 id = _json["id"]; | |
2340 } | |
2341 if (_json.containsKey("kind")) { | |
2342 kind = _json["kind"]; | |
2343 } | |
2344 if (_json.containsKey("sponsorLogo")) { | |
2345 sponsorLogo = _json["sponsorLogo"]; | |
2346 } | |
2347 if (_json.containsKey("sponsorName")) { | |
2348 sponsorName = _json["sponsorName"]; | |
2349 } | |
2350 if (_json.containsKey("sponsorUrl")) { | |
2351 sponsorUrl = _json["sponsorUrl"]; | |
2352 } | |
2353 } | |
2354 | |
2355 core.Map toJson() { | |
2356 var _json = new core.Map(); | |
2357 if (badgeLargeLogo != null) { | |
2358 _json["badgeLargeLogo"] = badgeLargeLogo; | |
2359 } | |
2360 if (badgeSmallLogo != null) { | |
2361 _json["badgeSmallLogo"] = badgeSmallLogo; | |
2362 } | |
2363 if (caption != null) { | |
2364 _json["caption"] = caption; | |
2365 } | |
2366 if (description != null) { | |
2367 _json["description"] = description; | |
2368 } | |
2369 if (id != null) { | |
2370 _json["id"] = id; | |
2371 } | |
2372 if (kind != null) { | |
2373 _json["kind"] = kind; | |
2374 } | |
2375 if (sponsorLogo != null) { | |
2376 _json["sponsorLogo"] = sponsorLogo; | |
2377 } | |
2378 if (sponsorName != null) { | |
2379 _json["sponsorName"] = sponsorName; | |
2380 } | |
2381 if (sponsorUrl != null) { | |
2382 _json["sponsorUrl"] = sponsorUrl; | |
2383 } | |
2384 return _json; | |
2385 } | |
2386 } | |
2387 | |
2388 | |
2389 /** Not documented yet. */ | |
2390 class BadgeList { | |
2391 /** List of badges retrieved. */ | |
2392 core.List<Badge> items; | |
2393 | |
2394 /** | |
2395 * Identifies this resource as a collection of badges. Value: | |
2396 * "orkut#badgeList" | |
2397 */ | |
2398 core.String kind; | |
2399 | |
2400 | |
2401 BadgeList(); | |
2402 | |
2403 BadgeList.fromJson(core.Map _json) { | |
2404 if (_json.containsKey("items")) { | |
2405 items = _json["items"].map((value) => new Badge.fromJson(value)).toList(); | |
2406 } | |
2407 if (_json.containsKey("kind")) { | |
2408 kind = _json["kind"]; | |
2409 } | |
2410 } | |
2411 | |
2412 core.Map toJson() { | |
2413 var _json = new core.Map(); | |
2414 if (items != null) { | |
2415 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2416 } | |
2417 if (kind != null) { | |
2418 _json["kind"] = kind; | |
2419 } | |
2420 return _json; | |
2421 } | |
2422 } | |
2423 | |
2424 | |
2425 /** Link to the original activity where this comment was posted. */ | |
2426 class CommentInReplyTo { | |
2427 /** Link to the post on activity stream being commented. */ | |
2428 core.String href; | |
2429 | |
2430 /** Unique identifier of the post on activity stream being commented. */ | |
2431 core.String ref; | |
2432 | |
2433 /** | |
2434 * Relationship between the comment and the post on activity stream being | |
2435 * commented. Always inReplyTo. | |
2436 */ | |
2437 core.String rel; | |
2438 | |
2439 /** Type of the post on activity stream being commented. Always text/html. */ | |
2440 core.String type; | |
2441 | |
2442 | |
2443 CommentInReplyTo(); | |
2444 | |
2445 CommentInReplyTo.fromJson(core.Map _json) { | |
2446 if (_json.containsKey("href")) { | |
2447 href = _json["href"]; | |
2448 } | |
2449 if (_json.containsKey("ref")) { | |
2450 ref = _json["ref"]; | |
2451 } | |
2452 if (_json.containsKey("rel")) { | |
2453 rel = _json["rel"]; | |
2454 } | |
2455 if (_json.containsKey("type")) { | |
2456 type = _json["type"]; | |
2457 } | |
2458 } | |
2459 | |
2460 core.Map toJson() { | |
2461 var _json = new core.Map(); | |
2462 if (href != null) { | |
2463 _json["href"] = href; | |
2464 } | |
2465 if (ref != null) { | |
2466 _json["ref"] = ref; | |
2467 } | |
2468 if (rel != null) { | |
2469 _json["rel"] = rel; | |
2470 } | |
2471 if (type != null) { | |
2472 _json["type"] = type; | |
2473 } | |
2474 return _json; | |
2475 } | |
2476 } | |
2477 | |
2478 | |
2479 /** Not documented yet. */ | |
2480 class Comment { | |
2481 /** The person who posted the comment. */ | |
2482 OrkutAuthorResource actor; | |
2483 | |
2484 /** The content of the comment in text/html */ | |
2485 core.String content; | |
2486 | |
2487 /** The unique ID for the comment. */ | |
2488 core.String id; | |
2489 | |
2490 /** Link to the original activity where this comment was posted. */ | |
2491 CommentInReplyTo inReplyTo; | |
2492 | |
2493 /** Identifies this resource as a comment. Value: "orkut#comment" */ | |
2494 core.String kind; | |
2495 | |
2496 /** List of resources for the comment. */ | |
2497 core.List<OrkutLinkResource> links; | |
2498 | |
2499 /** The time the comment was initially published, in RFC 3339 format. */ | |
2500 core.DateTime published; | |
2501 | |
2502 | |
2503 Comment(); | |
2504 | |
2505 Comment.fromJson(core.Map _json) { | |
2506 if (_json.containsKey("actor")) { | |
2507 actor = new OrkutAuthorResource.fromJson(_json["actor"]); | |
2508 } | |
2509 if (_json.containsKey("content")) { | |
2510 content = _json["content"]; | |
2511 } | |
2512 if (_json.containsKey("id")) { | |
2513 id = _json["id"]; | |
2514 } | |
2515 if (_json.containsKey("inReplyTo")) { | |
2516 inReplyTo = new CommentInReplyTo.fromJson(_json["inReplyTo"]); | |
2517 } | |
2518 if (_json.containsKey("kind")) { | |
2519 kind = _json["kind"]; | |
2520 } | |
2521 if (_json.containsKey("links")) { | |
2522 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
2523 } | |
2524 if (_json.containsKey("published")) { | |
2525 published = core.DateTime.parse(_json["published"]); | |
2526 } | |
2527 } | |
2528 | |
2529 core.Map toJson() { | |
2530 var _json = new core.Map(); | |
2531 if (actor != null) { | |
2532 _json["actor"] = (actor).toJson(); | |
2533 } | |
2534 if (content != null) { | |
2535 _json["content"] = content; | |
2536 } | |
2537 if (id != null) { | |
2538 _json["id"] = id; | |
2539 } | |
2540 if (inReplyTo != null) { | |
2541 _json["inReplyTo"] = (inReplyTo).toJson(); | |
2542 } | |
2543 if (kind != null) { | |
2544 _json["kind"] = kind; | |
2545 } | |
2546 if (links != null) { | |
2547 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
2548 } | |
2549 if (published != null) { | |
2550 _json["published"] = (published).toIso8601String(); | |
2551 } | |
2552 return _json; | |
2553 } | |
2554 } | |
2555 | |
2556 | |
2557 /** Not documented yet. */ | |
2558 class CommentList { | |
2559 /** List of comments retrieved. */ | |
2560 core.List<Comment> items; | |
2561 | |
2562 /** | |
2563 * Identifies this resource as a collection of comments. Value: | |
2564 * "orkut#commentList" | |
2565 */ | |
2566 core.String kind; | |
2567 | |
2568 /** | |
2569 * The value of pageToken query parameter in comments.list request to get the | |
2570 * next page, if there are more to retrieve. | |
2571 */ | |
2572 core.String nextPageToken; | |
2573 | |
2574 /** | |
2575 * The value of pageToken query parameter in comments.list request to get the | |
2576 * previous page, if there are more to retrieve. | |
2577 */ | |
2578 core.String previousPageToken; | |
2579 | |
2580 | |
2581 CommentList(); | |
2582 | |
2583 CommentList.fromJson(core.Map _json) { | |
2584 if (_json.containsKey("items")) { | |
2585 items = _json["items"].map((value) => new Comment.fromJson(value)).toList(
); | |
2586 } | |
2587 if (_json.containsKey("kind")) { | |
2588 kind = _json["kind"]; | |
2589 } | |
2590 if (_json.containsKey("nextPageToken")) { | |
2591 nextPageToken = _json["nextPageToken"]; | |
2592 } | |
2593 if (_json.containsKey("previousPageToken")) { | |
2594 previousPageToken = _json["previousPageToken"]; | |
2595 } | |
2596 } | |
2597 | |
2598 core.Map toJson() { | |
2599 var _json = new core.Map(); | |
2600 if (items != null) { | |
2601 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2602 } | |
2603 if (kind != null) { | |
2604 _json["kind"] = kind; | |
2605 } | |
2606 if (nextPageToken != null) { | |
2607 _json["nextPageToken"] = nextPageToken; | |
2608 } | |
2609 if (previousPageToken != null) { | |
2610 _json["previousPageToken"] = previousPageToken; | |
2611 } | |
2612 return _json; | |
2613 } | |
2614 } | |
2615 | |
2616 | |
2617 /** Not documented yet. */ | |
2618 class Community { | |
2619 /** The category of the community. */ | |
2620 core.String category; | |
2621 | |
2622 /** The co-owners of the community. */ | |
2623 core.List<OrkutAuthorResource> coOwners; | |
2624 | |
2625 /** The time the community was created, in RFC 3339 format. */ | |
2626 core.DateTime creationDate; | |
2627 | |
2628 /** The description of the community. */ | |
2629 core.String description; | |
2630 | |
2631 /** The id of the community. */ | |
2632 core.int id; | |
2633 | |
2634 /** Identifies this resource as a community. Value: "orkut#community" */ | |
2635 core.String kind; | |
2636 | |
2637 /** The official language of the community. */ | |
2638 core.String language; | |
2639 | |
2640 /** List of resources for the community. */ | |
2641 core.List<OrkutLinkResource> links; | |
2642 | |
2643 /** The location of the community. */ | |
2644 core.String location; | |
2645 | |
2646 /** | |
2647 * The number of users who are part of the community. This number may be | |
2648 * approximate, so do not rely on it for iteration. | |
2649 */ | |
2650 core.int memberCount; | |
2651 | |
2652 /** The list of moderators of the community. */ | |
2653 core.List<OrkutAuthorResource> moderators; | |
2654 | |
2655 /** The name of the community. */ | |
2656 core.String name; | |
2657 | |
2658 /** The person who owns the community. */ | |
2659 OrkutAuthorResource owner; | |
2660 | |
2661 /** The photo of the community. */ | |
2662 core.String photoUrl; | |
2663 | |
2664 | |
2665 Community(); | |
2666 | |
2667 Community.fromJson(core.Map _json) { | |
2668 if (_json.containsKey("category")) { | |
2669 category = _json["category"]; | |
2670 } | |
2671 if (_json.containsKey("co_owners")) { | |
2672 coOwners = _json["co_owners"].map((value) => new OrkutAuthorResource.fromJ
son(value)).toList(); | |
2673 } | |
2674 if (_json.containsKey("creation_date")) { | |
2675 creationDate = core.DateTime.parse(_json["creation_date"]); | |
2676 } | |
2677 if (_json.containsKey("description")) { | |
2678 description = _json["description"]; | |
2679 } | |
2680 if (_json.containsKey("id")) { | |
2681 id = _json["id"]; | |
2682 } | |
2683 if (_json.containsKey("kind")) { | |
2684 kind = _json["kind"]; | |
2685 } | |
2686 if (_json.containsKey("language")) { | |
2687 language = _json["language"]; | |
2688 } | |
2689 if (_json.containsKey("links")) { | |
2690 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
2691 } | |
2692 if (_json.containsKey("location")) { | |
2693 location = _json["location"]; | |
2694 } | |
2695 if (_json.containsKey("member_count")) { | |
2696 memberCount = _json["member_count"]; | |
2697 } | |
2698 if (_json.containsKey("moderators")) { | |
2699 moderators = _json["moderators"].map((value) => new OrkutAuthorResource.fr
omJson(value)).toList(); | |
2700 } | |
2701 if (_json.containsKey("name")) { | |
2702 name = _json["name"]; | |
2703 } | |
2704 if (_json.containsKey("owner")) { | |
2705 owner = new OrkutAuthorResource.fromJson(_json["owner"]); | |
2706 } | |
2707 if (_json.containsKey("photo_url")) { | |
2708 photoUrl = _json["photo_url"]; | |
2709 } | |
2710 } | |
2711 | |
2712 core.Map toJson() { | |
2713 var _json = new core.Map(); | |
2714 if (category != null) { | |
2715 _json["category"] = category; | |
2716 } | |
2717 if (coOwners != null) { | |
2718 _json["co_owners"] = coOwners.map((value) => (value).toJson()).toList(); | |
2719 } | |
2720 if (creationDate != null) { | |
2721 _json["creation_date"] = (creationDate).toIso8601String(); | |
2722 } | |
2723 if (description != null) { | |
2724 _json["description"] = description; | |
2725 } | |
2726 if (id != null) { | |
2727 _json["id"] = id; | |
2728 } | |
2729 if (kind != null) { | |
2730 _json["kind"] = kind; | |
2731 } | |
2732 if (language != null) { | |
2733 _json["language"] = language; | |
2734 } | |
2735 if (links != null) { | |
2736 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
2737 } | |
2738 if (location != null) { | |
2739 _json["location"] = location; | |
2740 } | |
2741 if (memberCount != null) { | |
2742 _json["member_count"] = memberCount; | |
2743 } | |
2744 if (moderators != null) { | |
2745 _json["moderators"] = moderators.map((value) => (value).toJson()).toList()
; | |
2746 } | |
2747 if (name != null) { | |
2748 _json["name"] = name; | |
2749 } | |
2750 if (owner != null) { | |
2751 _json["owner"] = (owner).toJson(); | |
2752 } | |
2753 if (photoUrl != null) { | |
2754 _json["photo_url"] = photoUrl; | |
2755 } | |
2756 return _json; | |
2757 } | |
2758 } | |
2759 | |
2760 | |
2761 /** Not documented yet. */ | |
2762 class CommunityList { | |
2763 /** List of communities retrieved. */ | |
2764 core.List<Community> items; | |
2765 | |
2766 /** | |
2767 * Identifies this resource as a collection of communities. Value: | |
2768 * "orkut#communityList" | |
2769 */ | |
2770 core.String kind; | |
2771 | |
2772 | |
2773 CommunityList(); | |
2774 | |
2775 CommunityList.fromJson(core.Map _json) { | |
2776 if (_json.containsKey("items")) { | |
2777 items = _json["items"].map((value) => new Community.fromJson(value)).toLis
t(); | |
2778 } | |
2779 if (_json.containsKey("kind")) { | |
2780 kind = _json["kind"]; | |
2781 } | |
2782 } | |
2783 | |
2784 core.Map toJson() { | |
2785 var _json = new core.Map(); | |
2786 if (items != null) { | |
2787 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2788 } | |
2789 if (kind != null) { | |
2790 _json["kind"] = kind; | |
2791 } | |
2792 return _json; | |
2793 } | |
2794 } | |
2795 | |
2796 | |
2797 /** Not documented yet. */ | |
2798 class CommunityMembers { | |
2799 /** Status and permissions of the user related to the community. */ | |
2800 CommunityMembershipStatus communityMembershipStatus; | |
2801 | |
2802 /** Kind of this item. Always orkut#communityMembers. */ | |
2803 core.String kind; | |
2804 | |
2805 /** Description of the community member. */ | |
2806 OrkutActivitypersonResource person; | |
2807 | |
2808 | |
2809 CommunityMembers(); | |
2810 | |
2811 CommunityMembers.fromJson(core.Map _json) { | |
2812 if (_json.containsKey("communityMembershipStatus")) { | |
2813 communityMembershipStatus = new CommunityMembershipStatus.fromJson(_json["
communityMembershipStatus"]); | |
2814 } | |
2815 if (_json.containsKey("kind")) { | |
2816 kind = _json["kind"]; | |
2817 } | |
2818 if (_json.containsKey("person")) { | |
2819 person = new OrkutActivitypersonResource.fromJson(_json["person"]); | |
2820 } | |
2821 } | |
2822 | |
2823 core.Map toJson() { | |
2824 var _json = new core.Map(); | |
2825 if (communityMembershipStatus != null) { | |
2826 _json["communityMembershipStatus"] = (communityMembershipStatus).toJson(); | |
2827 } | |
2828 if (kind != null) { | |
2829 _json["kind"] = kind; | |
2830 } | |
2831 if (person != null) { | |
2832 _json["person"] = (person).toJson(); | |
2833 } | |
2834 return _json; | |
2835 } | |
2836 } | |
2837 | |
2838 | |
2839 /** Not documented yet. */ | |
2840 class CommunityMembersList { | |
2841 /** | |
2842 * The value of pageToken query parameter in community_members.list request to | |
2843 * get the first page. | |
2844 */ | |
2845 core.String firstPageToken; | |
2846 | |
2847 /** List of community members retrieved. */ | |
2848 core.List<CommunityMembers> items; | |
2849 | |
2850 /** Kind of this item. Always orkut#communityMembersList. */ | |
2851 core.String kind; | |
2852 | |
2853 /** | |
2854 * The value of pageToken query parameter in community_members.list request to | |
2855 * get the last page. | |
2856 */ | |
2857 core.String lastPageToken; | |
2858 | |
2859 /** | |
2860 * The value of pageToken query parameter in community_members.list request to | |
2861 * get the next page, if there are more to retrieve. | |
2862 */ | |
2863 core.String nextPageToken; | |
2864 | |
2865 /** | |
2866 * The value of pageToken query parameter in community_members.list request to | |
2867 * get the previous page, if there are more to retrieve. | |
2868 */ | |
2869 core.String prevPageToken; | |
2870 | |
2871 | |
2872 CommunityMembersList(); | |
2873 | |
2874 CommunityMembersList.fromJson(core.Map _json) { | |
2875 if (_json.containsKey("firstPageToken")) { | |
2876 firstPageToken = _json["firstPageToken"]; | |
2877 } | |
2878 if (_json.containsKey("items")) { | |
2879 items = _json["items"].map((value) => new CommunityMembers.fromJson(value)
).toList(); | |
2880 } | |
2881 if (_json.containsKey("kind")) { | |
2882 kind = _json["kind"]; | |
2883 } | |
2884 if (_json.containsKey("lastPageToken")) { | |
2885 lastPageToken = _json["lastPageToken"]; | |
2886 } | |
2887 if (_json.containsKey("nextPageToken")) { | |
2888 nextPageToken = _json["nextPageToken"]; | |
2889 } | |
2890 if (_json.containsKey("prevPageToken")) { | |
2891 prevPageToken = _json["prevPageToken"]; | |
2892 } | |
2893 } | |
2894 | |
2895 core.Map toJson() { | |
2896 var _json = new core.Map(); | |
2897 if (firstPageToken != null) { | |
2898 _json["firstPageToken"] = firstPageToken; | |
2899 } | |
2900 if (items != null) { | |
2901 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
2902 } | |
2903 if (kind != null) { | |
2904 _json["kind"] = kind; | |
2905 } | |
2906 if (lastPageToken != null) { | |
2907 _json["lastPageToken"] = lastPageToken; | |
2908 } | |
2909 if (nextPageToken != null) { | |
2910 _json["nextPageToken"] = nextPageToken; | |
2911 } | |
2912 if (prevPageToken != null) { | |
2913 _json["prevPageToken"] = prevPageToken; | |
2914 } | |
2915 return _json; | |
2916 } | |
2917 } | |
2918 | |
2919 | |
2920 /** Not documented yet. */ | |
2921 class CommunityMembershipStatus { | |
2922 /** Whether the user can create a poll in this community. */ | |
2923 core.bool canCreatePoll; | |
2924 | |
2925 /** Whether the user can create a topic in this community. */ | |
2926 core.bool canCreateTopic; | |
2927 | |
2928 /** Whether the user can perform a shout operation in this community. */ | |
2929 core.bool canShout; | |
2930 | |
2931 /** Whether the session user is a community co-owner. */ | |
2932 core.bool isCoOwner; | |
2933 | |
2934 /** Whether the user is following this community. */ | |
2935 core.bool isFollowing; | |
2936 | |
2937 /** Whether the session user is a community moderator. */ | |
2938 core.bool isModerator; | |
2939 | |
2940 /** Whether the session user is the community owner. */ | |
2941 core.bool isOwner; | |
2942 | |
2943 /** Whether the restore operation is available for the community. */ | |
2944 core.bool isRestoreAvailable; | |
2945 | |
2946 /** Whether the take-back operation is available for the community. */ | |
2947 core.bool isTakebackAvailable; | |
2948 | |
2949 /** Kind of this item. Always orkut#communityMembershipStatus. */ | |
2950 core.String kind; | |
2951 | |
2952 /** The status of the current link between the community and the user. */ | |
2953 core.String status; | |
2954 | |
2955 | |
2956 CommunityMembershipStatus(); | |
2957 | |
2958 CommunityMembershipStatus.fromJson(core.Map _json) { | |
2959 if (_json.containsKey("canCreatePoll")) { | |
2960 canCreatePoll = _json["canCreatePoll"]; | |
2961 } | |
2962 if (_json.containsKey("canCreateTopic")) { | |
2963 canCreateTopic = _json["canCreateTopic"]; | |
2964 } | |
2965 if (_json.containsKey("canShout")) { | |
2966 canShout = _json["canShout"]; | |
2967 } | |
2968 if (_json.containsKey("isCoOwner")) { | |
2969 isCoOwner = _json["isCoOwner"]; | |
2970 } | |
2971 if (_json.containsKey("isFollowing")) { | |
2972 isFollowing = _json["isFollowing"]; | |
2973 } | |
2974 if (_json.containsKey("isModerator")) { | |
2975 isModerator = _json["isModerator"]; | |
2976 } | |
2977 if (_json.containsKey("isOwner")) { | |
2978 isOwner = _json["isOwner"]; | |
2979 } | |
2980 if (_json.containsKey("isRestoreAvailable")) { | |
2981 isRestoreAvailable = _json["isRestoreAvailable"]; | |
2982 } | |
2983 if (_json.containsKey("isTakebackAvailable")) { | |
2984 isTakebackAvailable = _json["isTakebackAvailable"]; | |
2985 } | |
2986 if (_json.containsKey("kind")) { | |
2987 kind = _json["kind"]; | |
2988 } | |
2989 if (_json.containsKey("status")) { | |
2990 status = _json["status"]; | |
2991 } | |
2992 } | |
2993 | |
2994 core.Map toJson() { | |
2995 var _json = new core.Map(); | |
2996 if (canCreatePoll != null) { | |
2997 _json["canCreatePoll"] = canCreatePoll; | |
2998 } | |
2999 if (canCreateTopic != null) { | |
3000 _json["canCreateTopic"] = canCreateTopic; | |
3001 } | |
3002 if (canShout != null) { | |
3003 _json["canShout"] = canShout; | |
3004 } | |
3005 if (isCoOwner != null) { | |
3006 _json["isCoOwner"] = isCoOwner; | |
3007 } | |
3008 if (isFollowing != null) { | |
3009 _json["isFollowing"] = isFollowing; | |
3010 } | |
3011 if (isModerator != null) { | |
3012 _json["isModerator"] = isModerator; | |
3013 } | |
3014 if (isOwner != null) { | |
3015 _json["isOwner"] = isOwner; | |
3016 } | |
3017 if (isRestoreAvailable != null) { | |
3018 _json["isRestoreAvailable"] = isRestoreAvailable; | |
3019 } | |
3020 if (isTakebackAvailable != null) { | |
3021 _json["isTakebackAvailable"] = isTakebackAvailable; | |
3022 } | |
3023 if (kind != null) { | |
3024 _json["kind"] = kind; | |
3025 } | |
3026 if (status != null) { | |
3027 _json["status"] = status; | |
3028 } | |
3029 return _json; | |
3030 } | |
3031 } | |
3032 | |
3033 | |
3034 /** Not documented yet. */ | |
3035 class CommunityMessage { | |
3036 /** | |
3037 * The timestamp of the date when the message was added, in RFC 3339 format. | |
3038 */ | |
3039 core.DateTime addedDate; | |
3040 | |
3041 /** The creator of the message. If ommited, the message is annonimous. */ | |
3042 OrkutAuthorResource author; | |
3043 | |
3044 /** The body of the message. */ | |
3045 core.String body; | |
3046 | |
3047 /** The ID of the message. */ | |
3048 core.String id; | |
3049 | |
3050 /** | |
3051 * Whether this post was marked as spam by the viewer, when he/she is not the | |
3052 * community owner or one of its moderators. | |
3053 */ | |
3054 core.bool isSpam; | |
3055 | |
3056 /** | |
3057 * Identifies this resource as a community message. Value: | |
3058 * "orkut#communityMessage" | |
3059 */ | |
3060 core.String kind; | |
3061 | |
3062 /** List of resources for the community message. */ | |
3063 core.List<OrkutLinkResource> links; | |
3064 | |
3065 /** The subject of the message. */ | |
3066 core.String subject; | |
3067 | |
3068 | |
3069 CommunityMessage(); | |
3070 | |
3071 CommunityMessage.fromJson(core.Map _json) { | |
3072 if (_json.containsKey("addedDate")) { | |
3073 addedDate = core.DateTime.parse(_json["addedDate"]); | |
3074 } | |
3075 if (_json.containsKey("author")) { | |
3076 author = new OrkutAuthorResource.fromJson(_json["author"]); | |
3077 } | |
3078 if (_json.containsKey("body")) { | |
3079 body = _json["body"]; | |
3080 } | |
3081 if (_json.containsKey("id")) { | |
3082 id = _json["id"]; | |
3083 } | |
3084 if (_json.containsKey("isSpam")) { | |
3085 isSpam = _json["isSpam"]; | |
3086 } | |
3087 if (_json.containsKey("kind")) { | |
3088 kind = _json["kind"]; | |
3089 } | |
3090 if (_json.containsKey("links")) { | |
3091 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
3092 } | |
3093 if (_json.containsKey("subject")) { | |
3094 subject = _json["subject"]; | |
3095 } | |
3096 } | |
3097 | |
3098 core.Map toJson() { | |
3099 var _json = new core.Map(); | |
3100 if (addedDate != null) { | |
3101 _json["addedDate"] = (addedDate).toIso8601String(); | |
3102 } | |
3103 if (author != null) { | |
3104 _json["author"] = (author).toJson(); | |
3105 } | |
3106 if (body != null) { | |
3107 _json["body"] = body; | |
3108 } | |
3109 if (id != null) { | |
3110 _json["id"] = id; | |
3111 } | |
3112 if (isSpam != null) { | |
3113 _json["isSpam"] = isSpam; | |
3114 } | |
3115 if (kind != null) { | |
3116 _json["kind"] = kind; | |
3117 } | |
3118 if (links != null) { | |
3119 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
3120 } | |
3121 if (subject != null) { | |
3122 _json["subject"] = subject; | |
3123 } | |
3124 return _json; | |
3125 } | |
3126 } | |
3127 | |
3128 | |
3129 /** Not documented yet. */ | |
3130 class CommunityMessageList { | |
3131 /** | |
3132 * The value of pageToken query parameter in community_messages.list request | |
3133 * to get the first page. | |
3134 */ | |
3135 core.String firstPageToken; | |
3136 | |
3137 /** List of messages retrieved. */ | |
3138 core.List<CommunityMessage> items; | |
3139 | |
3140 /** | |
3141 * Identifies this resource as a collection of community messages. Value: | |
3142 * "orkut#communityMessageList" | |
3143 */ | |
3144 core.String kind; | |
3145 | |
3146 /** | |
3147 * The value of pageToken query parameter in community_messages.list request | |
3148 * to get the last page. | |
3149 */ | |
3150 core.String lastPageToken; | |
3151 | |
3152 /** | |
3153 * The value of pageToken query parameter in community_messages.list request | |
3154 * to get the next page, if there are more to retrieve. | |
3155 */ | |
3156 core.String nextPageToken; | |
3157 | |
3158 /** | |
3159 * The value of pageToken query parameter in community_messages.list request | |
3160 * to get the previous page, if there are more to retrieve. | |
3161 */ | |
3162 core.String prevPageToken; | |
3163 | |
3164 | |
3165 CommunityMessageList(); | |
3166 | |
3167 CommunityMessageList.fromJson(core.Map _json) { | |
3168 if (_json.containsKey("firstPageToken")) { | |
3169 firstPageToken = _json["firstPageToken"]; | |
3170 } | |
3171 if (_json.containsKey("items")) { | |
3172 items = _json["items"].map((value) => new CommunityMessage.fromJson(value)
).toList(); | |
3173 } | |
3174 if (_json.containsKey("kind")) { | |
3175 kind = _json["kind"]; | |
3176 } | |
3177 if (_json.containsKey("lastPageToken")) { | |
3178 lastPageToken = _json["lastPageToken"]; | |
3179 } | |
3180 if (_json.containsKey("nextPageToken")) { | |
3181 nextPageToken = _json["nextPageToken"]; | |
3182 } | |
3183 if (_json.containsKey("prevPageToken")) { | |
3184 prevPageToken = _json["prevPageToken"]; | |
3185 } | |
3186 } | |
3187 | |
3188 core.Map toJson() { | |
3189 var _json = new core.Map(); | |
3190 if (firstPageToken != null) { | |
3191 _json["firstPageToken"] = firstPageToken; | |
3192 } | |
3193 if (items != null) { | |
3194 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
3195 } | |
3196 if (kind != null) { | |
3197 _json["kind"] = kind; | |
3198 } | |
3199 if (lastPageToken != null) { | |
3200 _json["lastPageToken"] = lastPageToken; | |
3201 } | |
3202 if (nextPageToken != null) { | |
3203 _json["nextPageToken"] = nextPageToken; | |
3204 } | |
3205 if (prevPageToken != null) { | |
3206 _json["prevPageToken"] = prevPageToken; | |
3207 } | |
3208 return _json; | |
3209 } | |
3210 } | |
3211 | |
3212 | |
3213 /** The image representing the poll. Field is omitted if no image exists. */ | |
3214 class CommunityPollImage { | |
3215 /** A URL that points to an image of the poll. */ | |
3216 core.String url; | |
3217 | |
3218 | |
3219 CommunityPollImage(); | |
3220 | |
3221 CommunityPollImage.fromJson(core.Map _json) { | |
3222 if (_json.containsKey("url")) { | |
3223 url = _json["url"]; | |
3224 } | |
3225 } | |
3226 | |
3227 core.Map toJson() { | |
3228 var _json = new core.Map(); | |
3229 if (url != null) { | |
3230 _json["url"] = url; | |
3231 } | |
3232 return _json; | |
3233 } | |
3234 } | |
3235 | |
3236 | |
3237 /** Not documented yet. */ | |
3238 class CommunityPoll { | |
3239 /** The person who created the poll. */ | |
3240 OrkutAuthorResource author; | |
3241 | |
3242 /** The ID of the community. */ | |
3243 core.int communityId; | |
3244 | |
3245 /** The date of creation of this poll */ | |
3246 core.DateTime creationTime; | |
3247 | |
3248 /** The poll description. */ | |
3249 core.String description; | |
3250 | |
3251 /** The ending date of this poll or empty if the poll doesn't have one. */ | |
3252 core.DateTime endingTime; | |
3253 | |
3254 /** Whether the user has voted on this poll. */ | |
3255 core.bool hasVoted; | |
3256 | |
3257 /** The poll ID. */ | |
3258 core.String id; | |
3259 | |
3260 /** The image representing the poll. Field is omitted if no image exists. */ | |
3261 CommunityPollImage image; | |
3262 | |
3263 /** | |
3264 * Whether the poll is not expired if there is an expiration date. A poll is | |
3265 * open (that is, not closed for voting) if it either is not expired or | |
3266 * doesn't have an expiration date at all. Note that just because a poll is | |
3267 * open, it doesn't mean that the requester can vote on it. | |
3268 */ | |
3269 core.bool isClosed; | |
3270 | |
3271 /** Whether this poll allows voting for more than one option. */ | |
3272 core.bool isMultipleAnswers; | |
3273 | |
3274 /** | |
3275 * Whether this poll is still opened for voting. A poll is open for voting if | |
3276 * it is not closed, the user has not yet voted on it and the user has the | |
3277 * permission to do so, which happens if he/she is either a community member | |
3278 * or the poll is open for everybody. | |
3279 */ | |
3280 core.bool isOpenForVoting; | |
3281 | |
3282 /** | |
3283 * Whether this poll is restricted for members only. If a poll is open but the | |
3284 * user can't vote on it, it's been restricted to members only. This | |
3285 * information is important to tell this case apart from the one where the | |
3286 * user can't vote simply because the poll is already closed. | |
3287 */ | |
3288 core.bool isRestricted; | |
3289 | |
3290 /** | |
3291 * Whether the user has marked this poll as spam. This only affects the poll | |
3292 * for this user, not globally. | |
3293 */ | |
3294 core.bool isSpam; | |
3295 | |
3296 /** If user has already voted, whether his vote is publicly visible. */ | |
3297 core.bool isUsersVotePublic; | |
3298 | |
3299 /** Whether non-members of the community can vote on the poll. */ | |
3300 core.bool isVotingAllowedForNonMembers; | |
3301 | |
3302 /** | |
3303 * Identifies this resource as a community poll. Value: "orkut#communityPoll" | |
3304 */ | |
3305 core.String kind; | |
3306 | |
3307 /** The date of the last update of this poll. */ | |
3308 core.DateTime lastUpdate; | |
3309 | |
3310 /** List of resources for the community poll. */ | |
3311 core.List<OrkutLinkResource> links; | |
3312 | |
3313 /** List of options of this poll. */ | |
3314 core.List<OrkutCommunitypolloptionResource> options; | |
3315 | |
3316 /** The poll question. */ | |
3317 core.String question; | |
3318 | |
3319 /** The total number of votes this poll has received. */ | |
3320 core.int totalNumberOfVotes; | |
3321 | |
3322 /** List of options the user has voted on, if there are any. */ | |
3323 core.List<core.int> votedOptions; | |
3324 | |
3325 | |
3326 CommunityPoll(); | |
3327 | |
3328 CommunityPoll.fromJson(core.Map _json) { | |
3329 if (_json.containsKey("author")) { | |
3330 author = new OrkutAuthorResource.fromJson(_json["author"]); | |
3331 } | |
3332 if (_json.containsKey("communityId")) { | |
3333 communityId = _json["communityId"]; | |
3334 } | |
3335 if (_json.containsKey("creationTime")) { | |
3336 creationTime = core.DateTime.parse(_json["creationTime"]); | |
3337 } | |
3338 if (_json.containsKey("description")) { | |
3339 description = _json["description"]; | |
3340 } | |
3341 if (_json.containsKey("endingTime")) { | |
3342 endingTime = core.DateTime.parse(_json["endingTime"]); | |
3343 } | |
3344 if (_json.containsKey("hasVoted")) { | |
3345 hasVoted = _json["hasVoted"]; | |
3346 } | |
3347 if (_json.containsKey("id")) { | |
3348 id = _json["id"]; | |
3349 } | |
3350 if (_json.containsKey("image")) { | |
3351 image = new CommunityPollImage.fromJson(_json["image"]); | |
3352 } | |
3353 if (_json.containsKey("isClosed")) { | |
3354 isClosed = _json["isClosed"]; | |
3355 } | |
3356 if (_json.containsKey("isMultipleAnswers")) { | |
3357 isMultipleAnswers = _json["isMultipleAnswers"]; | |
3358 } | |
3359 if (_json.containsKey("isOpenForVoting")) { | |
3360 isOpenForVoting = _json["isOpenForVoting"]; | |
3361 } | |
3362 if (_json.containsKey("isRestricted")) { | |
3363 isRestricted = _json["isRestricted"]; | |
3364 } | |
3365 if (_json.containsKey("isSpam")) { | |
3366 isSpam = _json["isSpam"]; | |
3367 } | |
3368 if (_json.containsKey("isUsersVotePublic")) { | |
3369 isUsersVotePublic = _json["isUsersVotePublic"]; | |
3370 } | |
3371 if (_json.containsKey("isVotingAllowedForNonMembers")) { | |
3372 isVotingAllowedForNonMembers = _json["isVotingAllowedForNonMembers"]; | |
3373 } | |
3374 if (_json.containsKey("kind")) { | |
3375 kind = _json["kind"]; | |
3376 } | |
3377 if (_json.containsKey("lastUpdate")) { | |
3378 lastUpdate = core.DateTime.parse(_json["lastUpdate"]); | |
3379 } | |
3380 if (_json.containsKey("links")) { | |
3381 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
3382 } | |
3383 if (_json.containsKey("options")) { | |
3384 options = _json["options"].map((value) => new OrkutCommunitypolloptionReso
urce.fromJson(value)).toList(); | |
3385 } | |
3386 if (_json.containsKey("question")) { | |
3387 question = _json["question"]; | |
3388 } | |
3389 if (_json.containsKey("totalNumberOfVotes")) { | |
3390 totalNumberOfVotes = _json["totalNumberOfVotes"]; | |
3391 } | |
3392 if (_json.containsKey("votedOptions")) { | |
3393 votedOptions = _json["votedOptions"]; | |
3394 } | |
3395 } | |
3396 | |
3397 core.Map toJson() { | |
3398 var _json = new core.Map(); | |
3399 if (author != null) { | |
3400 _json["author"] = (author).toJson(); | |
3401 } | |
3402 if (communityId != null) { | |
3403 _json["communityId"] = communityId; | |
3404 } | |
3405 if (creationTime != null) { | |
3406 _json["creationTime"] = (creationTime).toIso8601String(); | |
3407 } | |
3408 if (description != null) { | |
3409 _json["description"] = description; | |
3410 } | |
3411 if (endingTime != null) { | |
3412 _json["endingTime"] = (endingTime).toIso8601String(); | |
3413 } | |
3414 if (hasVoted != null) { | |
3415 _json["hasVoted"] = hasVoted; | |
3416 } | |
3417 if (id != null) { | |
3418 _json["id"] = id; | |
3419 } | |
3420 if (image != null) { | |
3421 _json["image"] = (image).toJson(); | |
3422 } | |
3423 if (isClosed != null) { | |
3424 _json["isClosed"] = isClosed; | |
3425 } | |
3426 if (isMultipleAnswers != null) { | |
3427 _json["isMultipleAnswers"] = isMultipleAnswers; | |
3428 } | |
3429 if (isOpenForVoting != null) { | |
3430 _json["isOpenForVoting"] = isOpenForVoting; | |
3431 } | |
3432 if (isRestricted != null) { | |
3433 _json["isRestricted"] = isRestricted; | |
3434 } | |
3435 if (isSpam != null) { | |
3436 _json["isSpam"] = isSpam; | |
3437 } | |
3438 if (isUsersVotePublic != null) { | |
3439 _json["isUsersVotePublic"] = isUsersVotePublic; | |
3440 } | |
3441 if (isVotingAllowedForNonMembers != null) { | |
3442 _json["isVotingAllowedForNonMembers"] = isVotingAllowedForNonMembers; | |
3443 } | |
3444 if (kind != null) { | |
3445 _json["kind"] = kind; | |
3446 } | |
3447 if (lastUpdate != null) { | |
3448 _json["lastUpdate"] = (lastUpdate).toIso8601String(); | |
3449 } | |
3450 if (links != null) { | |
3451 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
3452 } | |
3453 if (options != null) { | |
3454 _json["options"] = options.map((value) => (value).toJson()).toList(); | |
3455 } | |
3456 if (question != null) { | |
3457 _json["question"] = question; | |
3458 } | |
3459 if (totalNumberOfVotes != null) { | |
3460 _json["totalNumberOfVotes"] = totalNumberOfVotes; | |
3461 } | |
3462 if (votedOptions != null) { | |
3463 _json["votedOptions"] = votedOptions; | |
3464 } | |
3465 return _json; | |
3466 } | |
3467 } | |
3468 | |
3469 | |
3470 /** Not documented yet. */ | |
3471 class CommunityPollComment { | |
3472 /** The date when the message was added, in RFC 3339 format. */ | |
3473 core.DateTime addedDate; | |
3474 | |
3475 /** The creator of the comment. */ | |
3476 OrkutAuthorResource author; | |
3477 | |
3478 /** The body of the message. */ | |
3479 core.String body; | |
3480 | |
3481 /** The ID of the comment. */ | |
3482 core.int id; | |
3483 | |
3484 /** | |
3485 * Identifies this resource as a community poll comment. Value: | |
3486 * "orkut#communityPollComment" | |
3487 */ | |
3488 core.String kind; | |
3489 | |
3490 | |
3491 CommunityPollComment(); | |
3492 | |
3493 CommunityPollComment.fromJson(core.Map _json) { | |
3494 if (_json.containsKey("addedDate")) { | |
3495 addedDate = core.DateTime.parse(_json["addedDate"]); | |
3496 } | |
3497 if (_json.containsKey("author")) { | |
3498 author = new OrkutAuthorResource.fromJson(_json["author"]); | |
3499 } | |
3500 if (_json.containsKey("body")) { | |
3501 body = _json["body"]; | |
3502 } | |
3503 if (_json.containsKey("id")) { | |
3504 id = _json["id"]; | |
3505 } | |
3506 if (_json.containsKey("kind")) { | |
3507 kind = _json["kind"]; | |
3508 } | |
3509 } | |
3510 | |
3511 core.Map toJson() { | |
3512 var _json = new core.Map(); | |
3513 if (addedDate != null) { | |
3514 _json["addedDate"] = (addedDate).toIso8601String(); | |
3515 } | |
3516 if (author != null) { | |
3517 _json["author"] = (author).toJson(); | |
3518 } | |
3519 if (body != null) { | |
3520 _json["body"] = body; | |
3521 } | |
3522 if (id != null) { | |
3523 _json["id"] = id; | |
3524 } | |
3525 if (kind != null) { | |
3526 _json["kind"] = kind; | |
3527 } | |
3528 return _json; | |
3529 } | |
3530 } | |
3531 | |
3532 | |
3533 /** Not documented yet. */ | |
3534 class CommunityPollCommentList { | |
3535 /** | |
3536 * The value of pageToken query parameter in community_poll_comments.list | |
3537 * request to get the first page. | |
3538 */ | |
3539 core.String firstPageToken; | |
3540 | |
3541 /** List of community poll comments retrieved. */ | |
3542 core.List<CommunityPollComment> items; | |
3543 | |
3544 /** | |
3545 * Identifies this resource as a collection of community poll comments. Value: | |
3546 * "orkut#CommunityPollCommentList" | |
3547 */ | |
3548 core.String kind; | |
3549 | |
3550 /** | |
3551 * The value of pageToken query parameter in community_poll_comments.list | |
3552 * request to get the last page. | |
3553 */ | |
3554 core.String lastPageToken; | |
3555 | |
3556 /** | |
3557 * The value of pageToken query parameter in community_poll_comments.list | |
3558 * request to get the next page, if there are more to retrieve. | |
3559 */ | |
3560 core.String nextPageToken; | |
3561 | |
3562 /** | |
3563 * The value of pageToken query parameter in community_poll_comments.list | |
3564 * request to get the previous page, if there are more to retrieve. | |
3565 */ | |
3566 core.String prevPageToken; | |
3567 | |
3568 | |
3569 CommunityPollCommentList(); | |
3570 | |
3571 CommunityPollCommentList.fromJson(core.Map _json) { | |
3572 if (_json.containsKey("firstPageToken")) { | |
3573 firstPageToken = _json["firstPageToken"]; | |
3574 } | |
3575 if (_json.containsKey("items")) { | |
3576 items = _json["items"].map((value) => new CommunityPollComment.fromJson(va
lue)).toList(); | |
3577 } | |
3578 if (_json.containsKey("kind")) { | |
3579 kind = _json["kind"]; | |
3580 } | |
3581 if (_json.containsKey("lastPageToken")) { | |
3582 lastPageToken = _json["lastPageToken"]; | |
3583 } | |
3584 if (_json.containsKey("nextPageToken")) { | |
3585 nextPageToken = _json["nextPageToken"]; | |
3586 } | |
3587 if (_json.containsKey("prevPageToken")) { | |
3588 prevPageToken = _json["prevPageToken"]; | |
3589 } | |
3590 } | |
3591 | |
3592 core.Map toJson() { | |
3593 var _json = new core.Map(); | |
3594 if (firstPageToken != null) { | |
3595 _json["firstPageToken"] = firstPageToken; | |
3596 } | |
3597 if (items != null) { | |
3598 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
3599 } | |
3600 if (kind != null) { | |
3601 _json["kind"] = kind; | |
3602 } | |
3603 if (lastPageToken != null) { | |
3604 _json["lastPageToken"] = lastPageToken; | |
3605 } | |
3606 if (nextPageToken != null) { | |
3607 _json["nextPageToken"] = nextPageToken; | |
3608 } | |
3609 if (prevPageToken != null) { | |
3610 _json["prevPageToken"] = prevPageToken; | |
3611 } | |
3612 return _json; | |
3613 } | |
3614 } | |
3615 | |
3616 | |
3617 /** Not documented yet. */ | |
3618 class CommunityPollList { | |
3619 /** | |
3620 * The value of pageToken query parameter in community_polls.list request to | |
3621 * get the first page. | |
3622 */ | |
3623 core.String firstPageToken; | |
3624 | |
3625 /** List of community polls retrieved. */ | |
3626 core.List<CommunityPoll> items; | |
3627 | |
3628 /** | |
3629 * Identifies this resource as a collection of community polls. Value: | |
3630 * "orkut#communityPollList" | |
3631 */ | |
3632 core.String kind; | |
3633 | |
3634 /** | |
3635 * The value of pageToken query parameter in community_polls.list request to | |
3636 * get the last page. | |
3637 */ | |
3638 core.String lastPageToken; | |
3639 | |
3640 /** | |
3641 * The value of pageToken query parameter in community_polls.list request to | |
3642 * get the next page, if there are more to retrieve. | |
3643 */ | |
3644 core.String nextPageToken; | |
3645 | |
3646 /** | |
3647 * The value of pageToken query parameter in community_polls.list request to | |
3648 * get the previous page, if there are more to retrieve. | |
3649 */ | |
3650 core.String prevPageToken; | |
3651 | |
3652 | |
3653 CommunityPollList(); | |
3654 | |
3655 CommunityPollList.fromJson(core.Map _json) { | |
3656 if (_json.containsKey("firstPageToken")) { | |
3657 firstPageToken = _json["firstPageToken"]; | |
3658 } | |
3659 if (_json.containsKey("items")) { | |
3660 items = _json["items"].map((value) => new CommunityPoll.fromJson(value)).t
oList(); | |
3661 } | |
3662 if (_json.containsKey("kind")) { | |
3663 kind = _json["kind"]; | |
3664 } | |
3665 if (_json.containsKey("lastPageToken")) { | |
3666 lastPageToken = _json["lastPageToken"]; | |
3667 } | |
3668 if (_json.containsKey("nextPageToken")) { | |
3669 nextPageToken = _json["nextPageToken"]; | |
3670 } | |
3671 if (_json.containsKey("prevPageToken")) { | |
3672 prevPageToken = _json["prevPageToken"]; | |
3673 } | |
3674 } | |
3675 | |
3676 core.Map toJson() { | |
3677 var _json = new core.Map(); | |
3678 if (firstPageToken != null) { | |
3679 _json["firstPageToken"] = firstPageToken; | |
3680 } | |
3681 if (items != null) { | |
3682 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
3683 } | |
3684 if (kind != null) { | |
3685 _json["kind"] = kind; | |
3686 } | |
3687 if (lastPageToken != null) { | |
3688 _json["lastPageToken"] = lastPageToken; | |
3689 } | |
3690 if (nextPageToken != null) { | |
3691 _json["nextPageToken"] = nextPageToken; | |
3692 } | |
3693 if (prevPageToken != null) { | |
3694 _json["prevPageToken"] = prevPageToken; | |
3695 } | |
3696 return _json; | |
3697 } | |
3698 } | |
3699 | |
3700 | |
3701 /** Not documented yet. */ | |
3702 class CommunityPollVote { | |
3703 /** Whether this vote is visible to other users or not. */ | |
3704 core.bool isVotevisible; | |
3705 | |
3706 /** | |
3707 * Identifies this resource as a community poll vote. Value: | |
3708 * "orkut#communityPollVote" | |
3709 */ | |
3710 core.String kind; | |
3711 | |
3712 /** The ids of the voted options. */ | |
3713 core.List<core.int> optionIds; | |
3714 | |
3715 | |
3716 CommunityPollVote(); | |
3717 | |
3718 CommunityPollVote.fromJson(core.Map _json) { | |
3719 if (_json.containsKey("isVotevisible")) { | |
3720 isVotevisible = _json["isVotevisible"]; | |
3721 } | |
3722 if (_json.containsKey("kind")) { | |
3723 kind = _json["kind"]; | |
3724 } | |
3725 if (_json.containsKey("optionIds")) { | |
3726 optionIds = _json["optionIds"]; | |
3727 } | |
3728 } | |
3729 | |
3730 core.Map toJson() { | |
3731 var _json = new core.Map(); | |
3732 if (isVotevisible != null) { | |
3733 _json["isVotevisible"] = isVotevisible; | |
3734 } | |
3735 if (kind != null) { | |
3736 _json["kind"] = kind; | |
3737 } | |
3738 if (optionIds != null) { | |
3739 _json["optionIds"] = optionIds; | |
3740 } | |
3741 return _json; | |
3742 } | |
3743 } | |
3744 | |
3745 | |
3746 /** Not documented yet. */ | |
3747 class CommunityTopic { | |
3748 /** The creator of the topic. */ | |
3749 OrkutAuthorResource author; | |
3750 | |
3751 /** The body of the topic. */ | |
3752 core.String body; | |
3753 | |
3754 /** The ID of the topic. */ | |
3755 core.String id; | |
3756 | |
3757 /** Whether the topic is closed for new messages. */ | |
3758 core.bool isClosed; | |
3759 | |
3760 /** | |
3761 * Identifies this resource as a community topic. Value: | |
3762 * "orkut#communityTopic" | |
3763 */ | |
3764 core.String kind; | |
3765 | |
3766 /** The timestamp of the last update, in RFC 3339 format. */ | |
3767 core.DateTime lastUpdate; | |
3768 | |
3769 /** Snippet of the last message posted on this topic. */ | |
3770 core.String latestMessageSnippet; | |
3771 | |
3772 /** List of resources for the community. */ | |
3773 core.List<OrkutLinkResource> links; | |
3774 | |
3775 /** Most recent messages. */ | |
3776 core.List<CommunityMessage> messages; | |
3777 | |
3778 /** The total number of replies this topic has received. */ | |
3779 core.int numberOfReplies; | |
3780 | |
3781 /** The title of the topic. */ | |
3782 core.String title; | |
3783 | |
3784 | |
3785 CommunityTopic(); | |
3786 | |
3787 CommunityTopic.fromJson(core.Map _json) { | |
3788 if (_json.containsKey("author")) { | |
3789 author = new OrkutAuthorResource.fromJson(_json["author"]); | |
3790 } | |
3791 if (_json.containsKey("body")) { | |
3792 body = _json["body"]; | |
3793 } | |
3794 if (_json.containsKey("id")) { | |
3795 id = _json["id"]; | |
3796 } | |
3797 if (_json.containsKey("isClosed")) { | |
3798 isClosed = _json["isClosed"]; | |
3799 } | |
3800 if (_json.containsKey("kind")) { | |
3801 kind = _json["kind"]; | |
3802 } | |
3803 if (_json.containsKey("lastUpdate")) { | |
3804 lastUpdate = core.DateTime.parse(_json["lastUpdate"]); | |
3805 } | |
3806 if (_json.containsKey("latestMessageSnippet")) { | |
3807 latestMessageSnippet = _json["latestMessageSnippet"]; | |
3808 } | |
3809 if (_json.containsKey("links")) { | |
3810 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
3811 } | |
3812 if (_json.containsKey("messages")) { | |
3813 messages = _json["messages"].map((value) => new CommunityMessage.fromJson(
value)).toList(); | |
3814 } | |
3815 if (_json.containsKey("numberOfReplies")) { | |
3816 numberOfReplies = _json["numberOfReplies"]; | |
3817 } | |
3818 if (_json.containsKey("title")) { | |
3819 title = _json["title"]; | |
3820 } | |
3821 } | |
3822 | |
3823 core.Map toJson() { | |
3824 var _json = new core.Map(); | |
3825 if (author != null) { | |
3826 _json["author"] = (author).toJson(); | |
3827 } | |
3828 if (body != null) { | |
3829 _json["body"] = body; | |
3830 } | |
3831 if (id != null) { | |
3832 _json["id"] = id; | |
3833 } | |
3834 if (isClosed != null) { | |
3835 _json["isClosed"] = isClosed; | |
3836 } | |
3837 if (kind != null) { | |
3838 _json["kind"] = kind; | |
3839 } | |
3840 if (lastUpdate != null) { | |
3841 _json["lastUpdate"] = (lastUpdate).toIso8601String(); | |
3842 } | |
3843 if (latestMessageSnippet != null) { | |
3844 _json["latestMessageSnippet"] = latestMessageSnippet; | |
3845 } | |
3846 if (links != null) { | |
3847 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
3848 } | |
3849 if (messages != null) { | |
3850 _json["messages"] = messages.map((value) => (value).toJson()).toList(); | |
3851 } | |
3852 if (numberOfReplies != null) { | |
3853 _json["numberOfReplies"] = numberOfReplies; | |
3854 } | |
3855 if (title != null) { | |
3856 _json["title"] = title; | |
3857 } | |
3858 return _json; | |
3859 } | |
3860 } | |
3861 | |
3862 | |
3863 /** Not documented yet. */ | |
3864 class CommunityTopicList { | |
3865 /** | |
3866 * The value of pageToken query parameter in community_topic.list request to | |
3867 * get the first page. | |
3868 */ | |
3869 core.String firstPageToken; | |
3870 | |
3871 /** List of topics retrieved. */ | |
3872 core.List<CommunityTopic> items; | |
3873 | |
3874 /** | |
3875 * Identifies this resource as a collection of community topics. Value: | |
3876 * "orkut#communityTopicList" | |
3877 */ | |
3878 core.String kind; | |
3879 | |
3880 /** | |
3881 * The value of pageToken query parameter in community_topic.list request to | |
3882 * get the last page. | |
3883 */ | |
3884 core.String lastPageToken; | |
3885 | |
3886 /** | |
3887 * The value of pageToken query parameter in community_topic.list request to | |
3888 * get the next page, if there are more to retrieve. | |
3889 */ | |
3890 core.String nextPageToken; | |
3891 | |
3892 /** | |
3893 * The value of pageToken query parameter in community_topic.list request to | |
3894 * get the previous page, if there are more to retrieve. | |
3895 */ | |
3896 core.String prevPageToken; | |
3897 | |
3898 | |
3899 CommunityTopicList(); | |
3900 | |
3901 CommunityTopicList.fromJson(core.Map _json) { | |
3902 if (_json.containsKey("firstPageToken")) { | |
3903 firstPageToken = _json["firstPageToken"]; | |
3904 } | |
3905 if (_json.containsKey("items")) { | |
3906 items = _json["items"].map((value) => new CommunityTopic.fromJson(value)).
toList(); | |
3907 } | |
3908 if (_json.containsKey("kind")) { | |
3909 kind = _json["kind"]; | |
3910 } | |
3911 if (_json.containsKey("lastPageToken")) { | |
3912 lastPageToken = _json["lastPageToken"]; | |
3913 } | |
3914 if (_json.containsKey("nextPageToken")) { | |
3915 nextPageToken = _json["nextPageToken"]; | |
3916 } | |
3917 if (_json.containsKey("prevPageToken")) { | |
3918 prevPageToken = _json["prevPageToken"]; | |
3919 } | |
3920 } | |
3921 | |
3922 core.Map toJson() { | |
3923 var _json = new core.Map(); | |
3924 if (firstPageToken != null) { | |
3925 _json["firstPageToken"] = firstPageToken; | |
3926 } | |
3927 if (items != null) { | |
3928 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
3929 } | |
3930 if (kind != null) { | |
3931 _json["kind"] = kind; | |
3932 } | |
3933 if (lastPageToken != null) { | |
3934 _json["lastPageToken"] = lastPageToken; | |
3935 } | |
3936 if (nextPageToken != null) { | |
3937 _json["nextPageToken"] = nextPageToken; | |
3938 } | |
3939 if (prevPageToken != null) { | |
3940 _json["prevPageToken"] = prevPageToken; | |
3941 } | |
3942 return _json; | |
3943 } | |
3944 } | |
3945 | |
3946 | |
3947 /** Not documented yet. */ | |
3948 class Counters { | |
3949 /** List of counters retrieved. */ | |
3950 core.List<OrkutCounterResource> items; | |
3951 | |
3952 /** | |
3953 * Identifies this resource as a collection of counters. Value: | |
3954 * "orkut#counters" | |
3955 */ | |
3956 core.String kind; | |
3957 | |
3958 | |
3959 Counters(); | |
3960 | |
3961 Counters.fromJson(core.Map _json) { | |
3962 if (_json.containsKey("items")) { | |
3963 items = _json["items"].map((value) => new OrkutCounterResource.fromJson(va
lue)).toList(); | |
3964 } | |
3965 if (_json.containsKey("kind")) { | |
3966 kind = _json["kind"]; | |
3967 } | |
3968 } | |
3969 | |
3970 core.Map toJson() { | |
3971 var _json = new core.Map(); | |
3972 if (items != null) { | |
3973 _json["items"] = items.map((value) => (value).toJson()).toList(); | |
3974 } | |
3975 if (kind != null) { | |
3976 _json["kind"] = kind; | |
3977 } | |
3978 return _json; | |
3979 } | |
3980 } | |
3981 | |
3982 | |
3983 /** Not documented yet. */ | |
3984 class OrkutActivityobjectsResource { | |
3985 /** | |
3986 * The community which is related with this activity, e.g. a joined community. | |
3987 */ | |
3988 Community community; | |
3989 | |
3990 /** | |
3991 * The HTML-formatted content, suitable for display. When updating an | |
3992 * activity's content, post the changes to this property, using the value of | |
3993 * originalContent as a starting point. If the update is successful, the | |
3994 * server adds HTML formatting and responds with this formatted content. | |
3995 */ | |
3996 core.String content; | |
3997 | |
3998 /** The title of the object. */ | |
3999 core.String displayName; | |
4000 | |
4001 /** The ID for the object. */ | |
4002 core.String id; | |
4003 | |
4004 /** Links to other resources related to this object. */ | |
4005 core.List<OrkutLinkResource> links; | |
4006 | |
4007 /** The object type. */ | |
4008 core.String objectType; | |
4009 | |
4010 /** The person who is related with this activity, e.g. an Added User. */ | |
4011 OrkutActivitypersonResource person; | |
4012 | |
4013 | |
4014 OrkutActivityobjectsResource(); | |
4015 | |
4016 OrkutActivityobjectsResource.fromJson(core.Map _json) { | |
4017 if (_json.containsKey("community")) { | |
4018 community = new Community.fromJson(_json["community"]); | |
4019 } | |
4020 if (_json.containsKey("content")) { | |
4021 content = _json["content"]; | |
4022 } | |
4023 if (_json.containsKey("displayName")) { | |
4024 displayName = _json["displayName"]; | |
4025 } | |
4026 if (_json.containsKey("id")) { | |
4027 id = _json["id"]; | |
4028 } | |
4029 if (_json.containsKey("links")) { | |
4030 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
4031 } | |
4032 if (_json.containsKey("objectType")) { | |
4033 objectType = _json["objectType"]; | |
4034 } | |
4035 if (_json.containsKey("person")) { | |
4036 person = new OrkutActivitypersonResource.fromJson(_json["person"]); | |
4037 } | |
4038 } | |
4039 | |
4040 core.Map toJson() { | |
4041 var _json = new core.Map(); | |
4042 if (community != null) { | |
4043 _json["community"] = (community).toJson(); | |
4044 } | |
4045 if (content != null) { | |
4046 _json["content"] = content; | |
4047 } | |
4048 if (displayName != null) { | |
4049 _json["displayName"] = displayName; | |
4050 } | |
4051 if (id != null) { | |
4052 _json["id"] = id; | |
4053 } | |
4054 if (links != null) { | |
4055 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
4056 } | |
4057 if (objectType != null) { | |
4058 _json["objectType"] = objectType; | |
4059 } | |
4060 if (person != null) { | |
4061 _json["person"] = (person).toJson(); | |
4062 } | |
4063 return _json; | |
4064 } | |
4065 } | |
4066 | |
4067 | |
4068 /** | |
4069 * The person's profile photo. This is adapted from Google+ and was originaly | |
4070 * introduced as extra OpenSocial convenience fields. | |
4071 */ | |
4072 class OrkutActivitypersonResourceImage { | |
4073 /** The URL of the person's profile photo. */ | |
4074 core.String url; | |
4075 | |
4076 | |
4077 OrkutActivitypersonResourceImage(); | |
4078 | |
4079 OrkutActivitypersonResourceImage.fromJson(core.Map _json) { | |
4080 if (_json.containsKey("url")) { | |
4081 url = _json["url"]; | |
4082 } | |
4083 } | |
4084 | |
4085 core.Map toJson() { | |
4086 var _json = new core.Map(); | |
4087 if (url != null) { | |
4088 _json["url"] = url; | |
4089 } | |
4090 return _json; | |
4091 } | |
4092 } | |
4093 | |
4094 | |
4095 /** | |
4096 * An object that encapsulates the individual components of a person's name. | |
4097 */ | |
4098 class OrkutActivitypersonResourceName { | |
4099 /** The family name (last name) of this person. */ | |
4100 core.String familyName; | |
4101 | |
4102 /** The given name (first name) of this person. */ | |
4103 core.String givenName; | |
4104 | |
4105 | |
4106 OrkutActivitypersonResourceName(); | |
4107 | |
4108 OrkutActivitypersonResourceName.fromJson(core.Map _json) { | |
4109 if (_json.containsKey("familyName")) { | |
4110 familyName = _json["familyName"]; | |
4111 } | |
4112 if (_json.containsKey("givenName")) { | |
4113 givenName = _json["givenName"]; | |
4114 } | |
4115 } | |
4116 | |
4117 core.Map toJson() { | |
4118 var _json = new core.Map(); | |
4119 if (familyName != null) { | |
4120 _json["familyName"] = familyName; | |
4121 } | |
4122 if (givenName != null) { | |
4123 _json["givenName"] = givenName; | |
4124 } | |
4125 return _json; | |
4126 } | |
4127 } | |
4128 | |
4129 | |
4130 /** Not documented yet. */ | |
4131 class OrkutActivitypersonResource { | |
4132 /** The person's date of birth, represented as YYYY-MM-DD. */ | |
4133 core.String birthday; | |
4134 | |
4135 /** The person's gender. Values include "male", "female", and "other". */ | |
4136 core.String gender; | |
4137 | |
4138 /** The person's opensocial ID. */ | |
4139 core.String id; | |
4140 | |
4141 /** | |
4142 * The person's profile photo. This is adapted from Google+ and was originaly | |
4143 * introduced as extra OpenSocial convenience fields. | |
4144 */ | |
4145 OrkutActivitypersonResourceImage image; | |
4146 | |
4147 /** | |
4148 * An object that encapsulates the individual components of a person's name. | |
4149 */ | |
4150 OrkutActivitypersonResourceName name; | |
4151 | |
4152 /** | |
4153 * The person's profile url. This is adapted from Google+ and was originaly | |
4154 * introduced as extra OpenSocial convenience fields. | |
4155 */ | |
4156 core.String url; | |
4157 | |
4158 | |
4159 OrkutActivitypersonResource(); | |
4160 | |
4161 OrkutActivitypersonResource.fromJson(core.Map _json) { | |
4162 if (_json.containsKey("birthday")) { | |
4163 birthday = _json["birthday"]; | |
4164 } | |
4165 if (_json.containsKey("gender")) { | |
4166 gender = _json["gender"]; | |
4167 } | |
4168 if (_json.containsKey("id")) { | |
4169 id = _json["id"]; | |
4170 } | |
4171 if (_json.containsKey("image")) { | |
4172 image = new OrkutActivitypersonResourceImage.fromJson(_json["image"]); | |
4173 } | |
4174 if (_json.containsKey("name")) { | |
4175 name = new OrkutActivitypersonResourceName.fromJson(_json["name"]); | |
4176 } | |
4177 if (_json.containsKey("url")) { | |
4178 url = _json["url"]; | |
4179 } | |
4180 } | |
4181 | |
4182 core.Map toJson() { | |
4183 var _json = new core.Map(); | |
4184 if (birthday != null) { | |
4185 _json["birthday"] = birthday; | |
4186 } | |
4187 if (gender != null) { | |
4188 _json["gender"] = gender; | |
4189 } | |
4190 if (id != null) { | |
4191 _json["id"] = id; | |
4192 } | |
4193 if (image != null) { | |
4194 _json["image"] = (image).toJson(); | |
4195 } | |
4196 if (name != null) { | |
4197 _json["name"] = (name).toJson(); | |
4198 } | |
4199 if (url != null) { | |
4200 _json["url"] = url; | |
4201 } | |
4202 return _json; | |
4203 } | |
4204 } | |
4205 | |
4206 | |
4207 /** Image data about the author. */ | |
4208 class OrkutAuthorResourceImage { | |
4209 /** A URL that points to a thumbnail photo of the author. */ | |
4210 core.String url; | |
4211 | |
4212 | |
4213 OrkutAuthorResourceImage(); | |
4214 | |
4215 OrkutAuthorResourceImage.fromJson(core.Map _json) { | |
4216 if (_json.containsKey("url")) { | |
4217 url = _json["url"]; | |
4218 } | |
4219 } | |
4220 | |
4221 core.Map toJson() { | |
4222 var _json = new core.Map(); | |
4223 if (url != null) { | |
4224 _json["url"] = url; | |
4225 } | |
4226 return _json; | |
4227 } | |
4228 } | |
4229 | |
4230 | |
4231 /** Not documented yet. */ | |
4232 class OrkutAuthorResource { | |
4233 /** The name of the author, suitable for display. */ | |
4234 core.String displayName; | |
4235 | |
4236 /** | |
4237 * Unique identifier of the person who posted the comment. This is the | |
4238 * person's OpenSocial ID. | |
4239 */ | |
4240 core.String id; | |
4241 | |
4242 /** Image data about the author. */ | |
4243 OrkutAuthorResourceImage image; | |
4244 | |
4245 /** The URL of the author who posted the comment [not yet implemented] */ | |
4246 core.String url; | |
4247 | |
4248 | |
4249 OrkutAuthorResource(); | |
4250 | |
4251 OrkutAuthorResource.fromJson(core.Map _json) { | |
4252 if (_json.containsKey("displayName")) { | |
4253 displayName = _json["displayName"]; | |
4254 } | |
4255 if (_json.containsKey("id")) { | |
4256 id = _json["id"]; | |
4257 } | |
4258 if (_json.containsKey("image")) { | |
4259 image = new OrkutAuthorResourceImage.fromJson(_json["image"]); | |
4260 } | |
4261 if (_json.containsKey("url")) { | |
4262 url = _json["url"]; | |
4263 } | |
4264 } | |
4265 | |
4266 core.Map toJson() { | |
4267 var _json = new core.Map(); | |
4268 if (displayName != null) { | |
4269 _json["displayName"] = displayName; | |
4270 } | |
4271 if (id != null) { | |
4272 _json["id"] = id; | |
4273 } | |
4274 if (image != null) { | |
4275 _json["image"] = (image).toJson(); | |
4276 } | |
4277 if (url != null) { | |
4278 _json["url"] = url; | |
4279 } | |
4280 return _json; | |
4281 } | |
4282 } | |
4283 | |
4284 | |
4285 /** Image data about the poll option. Field is omitted if no image exists. */ | |
4286 class OrkutCommunitypolloptionResourceImage { | |
4287 /** A URL that points to an image of the poll question. */ | |
4288 core.String url; | |
4289 | |
4290 | |
4291 OrkutCommunitypolloptionResourceImage(); | |
4292 | |
4293 OrkutCommunitypolloptionResourceImage.fromJson(core.Map _json) { | |
4294 if (_json.containsKey("url")) { | |
4295 url = _json["url"]; | |
4296 } | |
4297 } | |
4298 | |
4299 core.Map toJson() { | |
4300 var _json = new core.Map(); | |
4301 if (url != null) { | |
4302 _json["url"] = url; | |
4303 } | |
4304 return _json; | |
4305 } | |
4306 } | |
4307 | |
4308 | |
4309 /** Not documented yet. */ | |
4310 class OrkutCommunitypolloptionResource { | |
4311 /** The option description. */ | |
4312 core.String description; | |
4313 | |
4314 /** Image data about the poll option. Field is omitted if no image exists. */ | |
4315 OrkutCommunitypolloptionResourceImage image; | |
4316 | |
4317 /** The total number of votes that this option received. */ | |
4318 core.int numberOfVotes; | |
4319 | |
4320 /** The poll option ID */ | |
4321 core.int optionId; | |
4322 | |
4323 | |
4324 OrkutCommunitypolloptionResource(); | |
4325 | |
4326 OrkutCommunitypolloptionResource.fromJson(core.Map _json) { | |
4327 if (_json.containsKey("description")) { | |
4328 description = _json["description"]; | |
4329 } | |
4330 if (_json.containsKey("image")) { | |
4331 image = new OrkutCommunitypolloptionResourceImage.fromJson(_json["image"])
; | |
4332 } | |
4333 if (_json.containsKey("numberOfVotes")) { | |
4334 numberOfVotes = _json["numberOfVotes"]; | |
4335 } | |
4336 if (_json.containsKey("optionId")) { | |
4337 optionId = _json["optionId"]; | |
4338 } | |
4339 } | |
4340 | |
4341 core.Map toJson() { | |
4342 var _json = new core.Map(); | |
4343 if (description != null) { | |
4344 _json["description"] = description; | |
4345 } | |
4346 if (image != null) { | |
4347 _json["image"] = (image).toJson(); | |
4348 } | |
4349 if (numberOfVotes != null) { | |
4350 _json["numberOfVotes"] = numberOfVotes; | |
4351 } | |
4352 if (optionId != null) { | |
4353 _json["optionId"] = optionId; | |
4354 } | |
4355 return _json; | |
4356 } | |
4357 } | |
4358 | |
4359 | |
4360 /** Not documented yet. */ | |
4361 class OrkutCounterResource { | |
4362 /** Link to the collection being counted. */ | |
4363 OrkutLinkResource link; | |
4364 | |
4365 /** | |
4366 * The name of the counted collection. Currently supported collections are: | |
4367 * - scraps - The scraps of the user. | |
4368 * - photos - The photos of the user. | |
4369 * - videos - The videos of the user. | |
4370 * - pendingTestimonials - The pending testimonials of the user. | |
4371 */ | |
4372 core.String name; | |
4373 | |
4374 /** The number of resources on the counted collection. */ | |
4375 core.int total; | |
4376 | |
4377 | |
4378 OrkutCounterResource(); | |
4379 | |
4380 OrkutCounterResource.fromJson(core.Map _json) { | |
4381 if (_json.containsKey("link")) { | |
4382 link = new OrkutLinkResource.fromJson(_json["link"]); | |
4383 } | |
4384 if (_json.containsKey("name")) { | |
4385 name = _json["name"]; | |
4386 } | |
4387 if (_json.containsKey("total")) { | |
4388 total = _json["total"]; | |
4389 } | |
4390 } | |
4391 | |
4392 core.Map toJson() { | |
4393 var _json = new core.Map(); | |
4394 if (link != null) { | |
4395 _json["link"] = (link).toJson(); | |
4396 } | |
4397 if (name != null) { | |
4398 _json["name"] = name; | |
4399 } | |
4400 if (total != null) { | |
4401 _json["total"] = total; | |
4402 } | |
4403 return _json; | |
4404 } | |
4405 } | |
4406 | |
4407 | |
4408 /** Links to resources related to the parent object. */ | |
4409 class OrkutLinkResource { | |
4410 /** URL of the link. */ | |
4411 core.String href; | |
4412 | |
4413 /** Relation between the resource and the parent object. */ | |
4414 core.String rel; | |
4415 | |
4416 /** Title of the link. */ | |
4417 core.String title; | |
4418 | |
4419 /** Media type of the link. */ | |
4420 core.String type; | |
4421 | |
4422 | |
4423 OrkutLinkResource(); | |
4424 | |
4425 OrkutLinkResource.fromJson(core.Map _json) { | |
4426 if (_json.containsKey("href")) { | |
4427 href = _json["href"]; | |
4428 } | |
4429 if (_json.containsKey("rel")) { | |
4430 rel = _json["rel"]; | |
4431 } | |
4432 if (_json.containsKey("title")) { | |
4433 title = _json["title"]; | |
4434 } | |
4435 if (_json.containsKey("type")) { | |
4436 type = _json["type"]; | |
4437 } | |
4438 } | |
4439 | |
4440 core.Map toJson() { | |
4441 var _json = new core.Map(); | |
4442 if (href != null) { | |
4443 _json["href"] = href; | |
4444 } | |
4445 if (rel != null) { | |
4446 _json["rel"] = rel; | |
4447 } | |
4448 if (title != null) { | |
4449 _json["title"] = title; | |
4450 } | |
4451 if (type != null) { | |
4452 _json["type"] = type; | |
4453 } | |
4454 return _json; | |
4455 } | |
4456 } | |
4457 | |
4458 | |
4459 /** Not documented yet. */ | |
4460 class Visibility { | |
4461 /** | |
4462 * Identifies this resource as a visibility item. Value: "orkut#visibility" | |
4463 */ | |
4464 core.String kind; | |
4465 | |
4466 /** List of resources for the visibility item. */ | |
4467 core.List<OrkutLinkResource> links; | |
4468 | |
4469 /** | |
4470 * The visibility of the resource. Possible values are: | |
4471 * - default: not hidden by the user | |
4472 * - hidden: hidden | |
4473 */ | |
4474 core.String visibility; | |
4475 | |
4476 | |
4477 Visibility(); | |
4478 | |
4479 Visibility.fromJson(core.Map _json) { | |
4480 if (_json.containsKey("kind")) { | |
4481 kind = _json["kind"]; | |
4482 } | |
4483 if (_json.containsKey("links")) { | |
4484 links = _json["links"].map((value) => new OrkutLinkResource.fromJson(value
)).toList(); | |
4485 } | |
4486 if (_json.containsKey("visibility")) { | |
4487 visibility = _json["visibility"]; | |
4488 } | |
4489 } | |
4490 | |
4491 core.Map toJson() { | |
4492 var _json = new core.Map(); | |
4493 if (kind != null) { | |
4494 _json["kind"] = kind; | |
4495 } | |
4496 if (links != null) { | |
4497 _json["links"] = links.map((value) => (value).toJson()).toList(); | |
4498 } | |
4499 if (visibility != null) { | |
4500 _json["visibility"] = visibility; | |
4501 } | |
4502 return _json; | |
4503 } | |
4504 } | |
4505 | |
4506 | |
OLD | NEW |