OLD | NEW |
1 library googleapis.youtube.v3; | 1 library googleapis.youtube.v3; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 /** | 343 /** |
344 * Deletes a channelSection. | 344 * Deletes a channelSection. |
345 * | 345 * |
346 * Request parameters: | 346 * Request parameters: |
347 * | 347 * |
348 * [id] - The id parameter specifies the YouTube channelSection ID for the | 348 * [id] - The id parameter specifies the YouTube channelSection ID for the |
349 * resource that is being deleted. In a channelSection resource, the id | 349 * resource that is being deleted. In a channelSection resource, the id |
350 * property specifies the YouTube channelSection ID. | 350 * property specifies the YouTube channelSection ID. |
351 * | 351 * |
| 352 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 353 * YouTube content partners. |
| 354 * |
| 355 * The onBehalfOfContentOwner parameter indicates that the request's |
| 356 * authorization credentials identify a YouTube CMS user who is acting on |
| 357 * behalf of the content owner specified in the parameter value. This |
| 358 * parameter is intended for YouTube content partners that own and manage many |
| 359 * different YouTube channels. It allows content owners to authenticate once |
| 360 * and get access to all their video and channel data, without having to |
| 361 * provide authentication credentials for each individual channel. The CMS |
| 362 * account that the user authenticates with must be linked to the specified |
| 363 * YouTube content owner. |
| 364 * |
352 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 365 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
353 * error. | 366 * error. |
354 * | 367 * |
355 * If the used [http.Client] completes with an error when making a REST call, | 368 * If the used [http.Client] completes with an error when making a REST call, |
356 * this method will complete with the same error. | 369 * this method will complete with the same error. |
357 */ | 370 */ |
358 async.Future delete(core.String id) { | 371 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { |
359 var _url = null; | 372 var _url = null; |
360 var _queryParams = new core.Map(); | 373 var _queryParams = new core.Map(); |
361 var _uploadMedia = null; | 374 var _uploadMedia = null; |
362 var _uploadOptions = null; | 375 var _uploadOptions = null; |
363 var _downloadOptions = common.DownloadOptions.Metadata; | 376 var _downloadOptions = common.DownloadOptions.Metadata; |
364 var _body = null; | 377 var _body = null; |
365 | 378 |
366 if (id == null) { | 379 if (id == null) { |
367 throw new core.ArgumentError("Parameter id is required."); | 380 throw new core.ArgumentError("Parameter id is required."); |
368 } | 381 } |
369 _queryParams["id"] = [id]; | 382 _queryParams["id"] = [id]; |
| 383 if (onBehalfOfContentOwner != null) { |
| 384 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 385 } |
370 | 386 |
371 _downloadOptions = null; | 387 _downloadOptions = null; |
372 | 388 |
373 _url = 'channelSections'; | 389 _url = 'channelSections'; |
374 | 390 |
375 var _response = _requester.request(_url, | 391 var _response = _requester.request(_url, |
376 "DELETE", | 392 "DELETE", |
377 body: _body, | 393 body: _body, |
378 queryParams: _queryParams, | 394 queryParams: _queryParams, |
379 uploadOptions: _uploadOptions, | 395 uploadOptions: _uploadOptions, |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 * | 581 * |
566 * Request parameters: | 582 * Request parameters: |
567 * | 583 * |
568 * [part] - The part parameter serves two purposes in this operation. It | 584 * [part] - The part parameter serves two purposes in this operation. It |
569 * identifies the properties that the write operation will set as well as the | 585 * identifies the properties that the write operation will set as well as the |
570 * properties that the API response will include. | 586 * properties that the API response will include. |
571 * | 587 * |
572 * The part names that you can include in the parameter value are snippet and | 588 * The part names that you can include in the parameter value are snippet and |
573 * contentDetails. | 589 * contentDetails. |
574 * | 590 * |
| 591 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for |
| 592 * YouTube content partners. |
| 593 * |
| 594 * The onBehalfOfContentOwner parameter indicates that the request's |
| 595 * authorization credentials identify a YouTube CMS user who is acting on |
| 596 * behalf of the content owner specified in the parameter value. This |
| 597 * parameter is intended for YouTube content partners that own and manage many |
| 598 * different YouTube channels. It allows content owners to authenticate once |
| 599 * and get access to all their video and channel data, without having to |
| 600 * provide authentication credentials for each individual channel. The CMS |
| 601 * account that the user authenticates with must be linked to the specified |
| 602 * YouTube content owner. |
| 603 * |
575 * Completes with a [ChannelSection]. | 604 * Completes with a [ChannelSection]. |
576 * | 605 * |
577 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 606 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
578 * error. | 607 * error. |
579 * | 608 * |
580 * If the used [http.Client] completes with an error when making a REST call, | 609 * If the used [http.Client] completes with an error when making a REST call, |
581 * this method will complete with the same error. | 610 * this method will complete with the same error. |
582 */ | 611 */ |
583 async.Future<ChannelSection> update(ChannelSection request, core.String part)
{ | 612 async.Future<ChannelSection> update(ChannelSection request, core.String part,
{core.String onBehalfOfContentOwner}) { |
584 var _url = null; | 613 var _url = null; |
585 var _queryParams = new core.Map(); | 614 var _queryParams = new core.Map(); |
586 var _uploadMedia = null; | 615 var _uploadMedia = null; |
587 var _uploadOptions = null; | 616 var _uploadOptions = null; |
588 var _downloadOptions = common.DownloadOptions.Metadata; | 617 var _downloadOptions = common.DownloadOptions.Metadata; |
589 var _body = null; | 618 var _body = null; |
590 | 619 |
591 if (request != null) { | 620 if (request != null) { |
592 _body = convert.JSON.encode((request).toJson()); | 621 _body = convert.JSON.encode((request).toJson()); |
593 } | 622 } |
594 if (part == null) { | 623 if (part == null) { |
595 throw new core.ArgumentError("Parameter part is required."); | 624 throw new core.ArgumentError("Parameter part is required."); |
596 } | 625 } |
597 _queryParams["part"] = [part]; | 626 _queryParams["part"] = [part]; |
| 627 if (onBehalfOfContentOwner != null) { |
| 628 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 629 } |
598 | 630 |
599 | 631 |
600 _url = 'channelSections'; | 632 _url = 'channelSections'; |
601 | 633 |
602 var _response = _requester.request(_url, | 634 var _response = _requester.request(_url, |
603 "PUT", | 635 "PUT", |
604 body: _body, | 636 body: _body, |
605 queryParams: _queryParams, | 637 queryParams: _queryParams, |
606 uploadOptions: _uploadOptions, | 638 uploadOptions: _uploadOptions, |
607 uploadMedia: _uploadMedia, | 639 uploadMedia: _uploadMedia, |
(...skipping 5877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6485 if (topicIds != null) { | 6517 if (topicIds != null) { |
6486 _json["topicIds"] = topicIds; | 6518 _json["topicIds"] = topicIds; |
6487 } | 6519 } |
6488 return _json; | 6520 return _json; |
6489 } | 6521 } |
6490 } | 6522 } |
6491 | 6523 |
6492 | 6524 |
6493 /** | 6525 /** |
6494 * Ratings schemes. The country-specific ratings are mostly for movies and | 6526 * Ratings schemes. The country-specific ratings are mostly for movies and |
6495 * shows. | 6527 * shows. NEXT_ID: 65 |
6496 */ | 6528 */ |
6497 class ContentRating { | 6529 class ContentRating { |
6498 /** | 6530 /** |
6499 * Rating system in Australia - Australian Classification Board | 6531 * Rating system in Australia - Australian Classification Board |
6500 * Possible string values are: | 6532 * Possible string values are: |
6501 * - "acbC" | 6533 * - "acbC" |
6502 * - "acbE" | 6534 * - "acbE" |
6503 * - "acbG" | 6535 * - "acbG" |
6504 * - "acbM" | 6536 * - "acbM" |
6505 * - "acbMa15plus" | 6537 * - "acbMa15plus" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6728 * - "djctq10" | 6760 * - "djctq10" |
6729 * - "djctq12" | 6761 * - "djctq12" |
6730 * - "djctq14" | 6762 * - "djctq14" |
6731 * - "djctq16" | 6763 * - "djctq16" |
6732 * - "djctq18" | 6764 * - "djctq18" |
6733 * - "djctqL" | 6765 * - "djctqL" |
6734 * - "djctqUnrated" | 6766 * - "djctqUnrated" |
6735 */ | 6767 */ |
6736 core.String djctqRating; | 6768 core.String djctqRating; |
6737 | 6769 |
| 6770 /** Not documented yet. */ |
| 6771 core.List<core.String> djctqRatingReasons; |
| 6772 |
6738 /** | 6773 /** |
6739 * Rating system for Estonia - Estonia Rating System | 6774 * Rating system for Estonia - Estonia Rating System |
6740 * Possible string values are: | 6775 * Possible string values are: |
6741 * - "eefilmK12" | 6776 * - "eefilmK12" |
6742 * - "eefilmK14" | 6777 * - "eefilmK14" |
6743 * - "eefilmK16" | 6778 * - "eefilmK16" |
6744 * - "eefilmK6" | 6779 * - "eefilmK6" |
6745 * - "eefilmL" | 6780 * - "eefilmL" |
6746 * - "eefilmMs12" | 6781 * - "eefilmMs12" |
6747 * - "eefilmMs6" | 6782 * - "eefilmMs6" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7339 } | 7374 } |
7340 if (_json.containsKey("cscfRating")) { | 7375 if (_json.containsKey("cscfRating")) { |
7341 cscfRating = _json["cscfRating"]; | 7376 cscfRating = _json["cscfRating"]; |
7342 } | 7377 } |
7343 if (_json.containsKey("czfilmRating")) { | 7378 if (_json.containsKey("czfilmRating")) { |
7344 czfilmRating = _json["czfilmRating"]; | 7379 czfilmRating = _json["czfilmRating"]; |
7345 } | 7380 } |
7346 if (_json.containsKey("djctqRating")) { | 7381 if (_json.containsKey("djctqRating")) { |
7347 djctqRating = _json["djctqRating"]; | 7382 djctqRating = _json["djctqRating"]; |
7348 } | 7383 } |
| 7384 if (_json.containsKey("djctqRatingReasons")) { |
| 7385 djctqRatingReasons = _json["djctqRatingReasons"]; |
| 7386 } |
7349 if (_json.containsKey("eefilmRating")) { | 7387 if (_json.containsKey("eefilmRating")) { |
7350 eefilmRating = _json["eefilmRating"]; | 7388 eefilmRating = _json["eefilmRating"]; |
7351 } | 7389 } |
7352 if (_json.containsKey("egfilmRating")) { | 7390 if (_json.containsKey("egfilmRating")) { |
7353 egfilmRating = _json["egfilmRating"]; | 7391 egfilmRating = _json["egfilmRating"]; |
7354 } | 7392 } |
7355 if (_json.containsKey("eirinRating")) { | 7393 if (_json.containsKey("eirinRating")) { |
7356 eirinRating = _json["eirinRating"]; | 7394 eirinRating = _json["eirinRating"]; |
7357 } | 7395 } |
7358 if (_json.containsKey("fcbmRating")) { | 7396 if (_json.containsKey("fcbmRating")) { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7532 } | 7570 } |
7533 if (cscfRating != null) { | 7571 if (cscfRating != null) { |
7534 _json["cscfRating"] = cscfRating; | 7572 _json["cscfRating"] = cscfRating; |
7535 } | 7573 } |
7536 if (czfilmRating != null) { | 7574 if (czfilmRating != null) { |
7537 _json["czfilmRating"] = czfilmRating; | 7575 _json["czfilmRating"] = czfilmRating; |
7538 } | 7576 } |
7539 if (djctqRating != null) { | 7577 if (djctqRating != null) { |
7540 _json["djctqRating"] = djctqRating; | 7578 _json["djctqRating"] = djctqRating; |
7541 } | 7579 } |
| 7580 if (djctqRatingReasons != null) { |
| 7581 _json["djctqRatingReasons"] = djctqRatingReasons; |
| 7582 } |
7542 if (eefilmRating != null) { | 7583 if (eefilmRating != null) { |
7543 _json["eefilmRating"] = eefilmRating; | 7584 _json["eefilmRating"] = eefilmRating; |
7544 } | 7585 } |
7545 if (egfilmRating != null) { | 7586 if (egfilmRating != null) { |
7546 _json["egfilmRating"] = egfilmRating; | 7587 _json["egfilmRating"] = egfilmRating; |
7547 } | 7588 } |
7548 if (eirinRating != null) { | 7589 if (eirinRating != null) { |
7549 _json["eirinRating"] = eirinRating; | 7590 _json["eirinRating"] = eirinRating; |
7550 } | 7591 } |
7551 if (fcbmRating != null) { | 7592 if (fcbmRating != null) { |
(...skipping 6287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13839 _json["featuredPlaylistId"] = featuredPlaylistId; | 13880 _json["featuredPlaylistId"] = featuredPlaylistId; |
13840 } | 13881 } |
13841 if (textColor != null) { | 13882 if (textColor != null) { |
13842 _json["textColor"] = textColor; | 13883 _json["textColor"] = textColor; |
13843 } | 13884 } |
13844 return _json; | 13885 return _json; |
13845 } | 13886 } |
13846 } | 13887 } |
13847 | 13888 |
13848 | 13889 |
OLD | NEW |