OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.youtube.v3; | 3 library googleapis.youtube.v3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 LiveBroadcastsResourceApi get liveBroadcasts => new LiveBroadcastsResourceApi(
_requester); | 59 LiveBroadcastsResourceApi get liveBroadcasts => new LiveBroadcastsResourceApi(
_requester); |
60 LiveChatBansResourceApi get liveChatBans => new LiveChatBansResourceApi(_reque
ster); | 60 LiveChatBansResourceApi get liveChatBans => new LiveChatBansResourceApi(_reque
ster); |
61 LiveChatMessagesResourceApi get liveChatMessages => new LiveChatMessagesResour
ceApi(_requester); | 61 LiveChatMessagesResourceApi get liveChatMessages => new LiveChatMessagesResour
ceApi(_requester); |
62 LiveChatModeratorsResourceApi get liveChatModerators => new LiveChatModerators
ResourceApi(_requester); | 62 LiveChatModeratorsResourceApi get liveChatModerators => new LiveChatModerators
ResourceApi(_requester); |
63 LiveStreamsResourceApi get liveStreams => new LiveStreamsResourceApi(_requeste
r); | 63 LiveStreamsResourceApi get liveStreams => new LiveStreamsResourceApi(_requeste
r); |
64 PlaylistItemsResourceApi get playlistItems => new PlaylistItemsResourceApi(_re
quester); | 64 PlaylistItemsResourceApi get playlistItems => new PlaylistItemsResourceApi(_re
quester); |
65 PlaylistsResourceApi get playlists => new PlaylistsResourceApi(_requester); | 65 PlaylistsResourceApi get playlists => new PlaylistsResourceApi(_requester); |
66 SearchResourceApi get search => new SearchResourceApi(_requester); | 66 SearchResourceApi get search => new SearchResourceApi(_requester); |
67 SponsorsResourceApi get sponsors => new SponsorsResourceApi(_requester); | 67 SponsorsResourceApi get sponsors => new SponsorsResourceApi(_requester); |
68 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re
quester); | 68 SubscriptionsResourceApi get subscriptions => new SubscriptionsResourceApi(_re
quester); |
| 69 SuperChatEventsResourceApi get superChatEvents => new SuperChatEventsResourceA
pi(_requester); |
69 ThumbnailsResourceApi get thumbnails => new ThumbnailsResourceApi(_requester); | 70 ThumbnailsResourceApi get thumbnails => new ThumbnailsResourceApi(_requester); |
70 VideoAbuseReportReasonsResourceApi get videoAbuseReportReasons => new VideoAbu
seReportReasonsResourceApi(_requester); | 71 VideoAbuseReportReasonsResourceApi get videoAbuseReportReasons => new VideoAbu
seReportReasonsResourceApi(_requester); |
71 VideoCategoriesResourceApi get videoCategories => new VideoCategoriesResourceA
pi(_requester); | 72 VideoCategoriesResourceApi get videoCategories => new VideoCategoriesResourceA
pi(_requester); |
72 VideosResourceApi get videos => new VideosResourceApi(_requester); | 73 VideosResourceApi get videos => new VideosResourceApi(_requester); |
73 WatermarksResourceApi get watermarks => new WatermarksResourceApi(_requester); | 74 WatermarksResourceApi get watermarks => new WatermarksResourceApi(_requester); |
74 | 75 |
75 YoutubeApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "youtube/v3/"}) : | 76 YoutubeApi(http.Client client, {core.String rootUrl: "https://www.googleapis.c
om/", core.String servicePath: "youtube/v3/"}) : |
76 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 77 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
77 } | 78 } |
78 | 79 |
(...skipping 4993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5072 queryParams: _queryParams, | 5073 queryParams: _queryParams, |
5073 uploadOptions: _uploadOptions, | 5074 uploadOptions: _uploadOptions, |
5074 uploadMedia: _uploadMedia, | 5075 uploadMedia: _uploadMedia, |
5075 downloadOptions: _downloadOptions); | 5076 downloadOptions: _downloadOptions); |
5076 return _response.then((data) => new SubscriptionListResponse.fromJson(data))
; | 5077 return _response.then((data) => new SubscriptionListResponse.fromJson(data))
; |
5077 } | 5078 } |
5078 | 5079 |
5079 } | 5080 } |
5080 | 5081 |
5081 | 5082 |
| 5083 class SuperChatEventsResourceApi { |
| 5084 final commons.ApiRequester _requester; |
| 5085 |
| 5086 SuperChatEventsResourceApi(commons.ApiRequester client) : |
| 5087 _requester = client; |
| 5088 |
| 5089 /** |
| 5090 * Lists Super Chat events for a channel. |
| 5091 * |
| 5092 * Request parameters: |
| 5093 * |
| 5094 * [part] - The part parameter specifies the superChatEvent resource parts |
| 5095 * that the API response will include. Supported values are id and snippet. |
| 5096 * |
| 5097 * [hl] - The hl parameter instructs the API to retrieve localized resource |
| 5098 * metadata for a specific application language that the YouTube website |
| 5099 * supports. The parameter value must be a language code included in the list |
| 5100 * returned by the i18nLanguages.list method. |
| 5101 * |
| 5102 * If localized resource details are available in that language, the |
| 5103 * resource's snippet.localized object will contain the localized values. |
| 5104 * However, if localized details are not available, the snippet.localized |
| 5105 * object will contain resource details in the resource's default language. |
| 5106 * |
| 5107 * [maxResults] - The maxResults parameter specifies the maximum number of |
| 5108 * items that should be returned in the result set. |
| 5109 * Value must be between "0" and "50". |
| 5110 * |
| 5111 * [pageToken] - The pageToken parameter identifies a specific page in the |
| 5112 * result set that should be returned. In an API response, the nextPageToken |
| 5113 * and prevPageToken properties identify other pages that could be retrieved. |
| 5114 * |
| 5115 * Completes with a [SuperChatEventListResponse]. |
| 5116 * |
| 5117 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 5118 * error. |
| 5119 * |
| 5120 * If the used [http.Client] completes with an error when making a REST call, |
| 5121 * this method will complete with the same error. |
| 5122 */ |
| 5123 async.Future<SuperChatEventListResponse> list(core.String part, {core.String h
l, core.int maxResults, core.String pageToken}) { |
| 5124 var _url = null; |
| 5125 var _queryParams = new core.Map(); |
| 5126 var _uploadMedia = null; |
| 5127 var _uploadOptions = null; |
| 5128 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 5129 var _body = null; |
| 5130 |
| 5131 if (part == null) { |
| 5132 throw new core.ArgumentError("Parameter part is required."); |
| 5133 } |
| 5134 _queryParams["part"] = [part]; |
| 5135 if (hl != null) { |
| 5136 _queryParams["hl"] = [hl]; |
| 5137 } |
| 5138 if (maxResults != null) { |
| 5139 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5140 } |
| 5141 if (pageToken != null) { |
| 5142 _queryParams["pageToken"] = [pageToken]; |
| 5143 } |
| 5144 |
| 5145 _url = 'superChatEvents'; |
| 5146 |
| 5147 var _response = _requester.request(_url, |
| 5148 "GET", |
| 5149 body: _body, |
| 5150 queryParams: _queryParams, |
| 5151 uploadOptions: _uploadOptions, |
| 5152 uploadMedia: _uploadMedia, |
| 5153 downloadOptions: _downloadOptions); |
| 5154 return _response.then((data) => new SuperChatEventListResponse.fromJson(data
)); |
| 5155 } |
| 5156 |
| 5157 } |
| 5158 |
| 5159 |
5082 class ThumbnailsResourceApi { | 5160 class ThumbnailsResourceApi { |
5083 final commons.ApiRequester _requester; | 5161 final commons.ApiRequester _requester; |
5084 | 5162 |
5085 ThumbnailsResourceApi(commons.ApiRequester client) : | 5163 ThumbnailsResourceApi(commons.ApiRequester client) : |
5086 _requester = client; | 5164 _requester = client; |
5087 | 5165 |
5088 /** | 5166 /** |
5089 * Uploads a custom video thumbnail to YouTube and sets it for a video. | 5167 * Uploads a custom video thumbnail to YouTube and sets it for a video. |
5090 * | 5168 * |
5091 * Request parameters: | 5169 * Request parameters: |
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8634 } | 8712 } |
8635 if (privacyStatus != null) { | 8713 if (privacyStatus != null) { |
8636 _json["privacyStatus"] = privacyStatus; | 8714 _json["privacyStatus"] = privacyStatus; |
8637 } | 8715 } |
8638 return _json; | 8716 return _json; |
8639 } | 8717 } |
8640 } | 8718 } |
8641 | 8719 |
8642 /** Freebase topic information related to the channel. */ | 8720 /** Freebase topic information related to the channel. */ |
8643 class ChannelTopicDetails { | 8721 class ChannelTopicDetails { |
| 8722 /** A list of Wikipedia URLs that describe the channel's content. */ |
| 8723 core.List<core.String> topicCategories; |
8644 /** | 8724 /** |
8645 * A list of Freebase topic IDs associated with the channel. You can retrieve | 8725 * A list of Freebase topic IDs associated with the channel. You can retrieve |
8646 * information about each topic using the Freebase Topic API. | 8726 * information about each topic using the Freebase Topic API. |
8647 */ | 8727 */ |
8648 core.List<core.String> topicIds; | 8728 core.List<core.String> topicIds; |
8649 | 8729 |
8650 ChannelTopicDetails(); | 8730 ChannelTopicDetails(); |
8651 | 8731 |
8652 ChannelTopicDetails.fromJson(core.Map _json) { | 8732 ChannelTopicDetails.fromJson(core.Map _json) { |
| 8733 if (_json.containsKey("topicCategories")) { |
| 8734 topicCategories = _json["topicCategories"]; |
| 8735 } |
8653 if (_json.containsKey("topicIds")) { | 8736 if (_json.containsKey("topicIds")) { |
8654 topicIds = _json["topicIds"]; | 8737 topicIds = _json["topicIds"]; |
8655 } | 8738 } |
8656 } | 8739 } |
8657 | 8740 |
8658 core.Map toJson() { | 8741 core.Map toJson() { |
8659 var _json = new core.Map(); | 8742 var _json = new core.Map(); |
| 8743 if (topicCategories != null) { |
| 8744 _json["topicCategories"] = topicCategories; |
| 8745 } |
8660 if (topicIds != null) { | 8746 if (topicIds != null) { |
8661 _json["topicIds"] = topicIds; | 8747 _json["topicIds"] = topicIds; |
8662 } | 8748 } |
8663 return _json; | 8749 return _json; |
8664 } | 8750 } |
8665 } | 8751 } |
8666 | 8752 |
8667 /** A comment represents a single YouTube comment. */ | 8753 /** A comment represents a single YouTube comment. */ |
8668 class Comment { | 8754 class Comment { |
8669 /** Etag of this resource. */ | 8755 /** Etag of this resource. */ |
(...skipping 4148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12818 } | 12904 } |
12819 } | 12905 } |
12820 | 12906 |
12821 class LiveChatMessageSnippet { | 12907 class LiveChatMessageSnippet { |
12822 /** | 12908 /** |
12823 * The ID of the user that authored this message, this field is not always | 12909 * The ID of the user that authored this message, this field is not always |
12824 * filled. textMessageEvent - the user that wrote the message fanFundingEvent | 12910 * filled. textMessageEvent - the user that wrote the message fanFundingEvent |
12825 * - the user that funded the broadcast newSponsorEvent - the user that just | 12911 * - the user that funded the broadcast newSponsorEvent - the user that just |
12826 * became a sponsor messageDeletedEvent - the moderator that took the action | 12912 * became a sponsor messageDeletedEvent - the moderator that took the action |
12827 * messageRetractedEvent - the author that retracted their message | 12913 * messageRetractedEvent - the author that retracted their message |
12828 * userBannedEvent - the moderator that took the action | 12914 * userBannedEvent - the moderator that took the action superChatEvent - the |
| 12915 * user that made the purchase |
12829 */ | 12916 */ |
12830 core.String authorChannelId; | 12917 core.String authorChannelId; |
12831 /** | 12918 /** |
12832 * Contains a string that can be displayed to the user. If this field is not | 12919 * Contains a string that can be displayed to the user. If this field is not |
12833 * present the message is silent, at the moment only messages of type | 12920 * present the message is silent, at the moment only messages of type |
12834 * TOMBSTONE and CHAT_ENDED_EVENT are silent. | 12921 * TOMBSTONE and CHAT_ENDED_EVENT are silent. |
12835 */ | 12922 */ |
12836 core.String displayMessage; | 12923 core.String displayMessage; |
12837 /** | 12924 /** |
12838 * Details about the funding event, this is only set if the type is | 12925 * Details about the funding event, this is only set if the type is |
(...skipping 10 matching lines...) Expand all Loading... |
12849 LiveChatPollClosedDetails pollClosedDetails; | 12936 LiveChatPollClosedDetails pollClosedDetails; |
12850 LiveChatPollEditedDetails pollEditedDetails; | 12937 LiveChatPollEditedDetails pollEditedDetails; |
12851 LiveChatPollOpenedDetails pollOpenedDetails; | 12938 LiveChatPollOpenedDetails pollOpenedDetails; |
12852 LiveChatPollVotedDetails pollVotedDetails; | 12939 LiveChatPollVotedDetails pollVotedDetails; |
12853 /** | 12940 /** |
12854 * The date and time when the message was orignally published. The value is | 12941 * The date and time when the message was orignally published. The value is |
12855 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. | 12942 * specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
12856 */ | 12943 */ |
12857 core.DateTime publishedAt; | 12944 core.DateTime publishedAt; |
12858 /** | 12945 /** |
| 12946 * Details about the Super Chat event, this is only set if the type is |
| 12947 * 'superChatEvent'. |
| 12948 */ |
| 12949 LiveChatSuperChatDetails superChatDetails; |
| 12950 /** |
12859 * Details about the text message, this is only set if the type is | 12951 * Details about the text message, this is only set if the type is |
12860 * 'textMessageEvent'. | 12952 * 'textMessageEvent'. |
12861 */ | 12953 */ |
12862 LiveChatTextMessageDetails textMessageDetails; | 12954 LiveChatTextMessageDetails textMessageDetails; |
12863 /** | 12955 /** |
12864 * The type of message, this will always be present, it determines the | 12956 * The type of message, this will always be present, it determines the |
12865 * contents of the message as well as which fields will be present. | 12957 * contents of the message as well as which fields will be present. |
12866 * Possible string values are: | 12958 * Possible string values are: |
12867 * - "chatEndedEvent" | 12959 * - "chatEndedEvent" |
12868 * - "fanFundingEvent" | 12960 * - "fanFundingEvent" |
12869 * - "messageDeletedEvent" | 12961 * - "messageDeletedEvent" |
12870 * - "messageRetractedEvent" | 12962 * - "messageRetractedEvent" |
12871 * - "newSponsorEvent" | 12963 * - "newSponsorEvent" |
12872 * - "pollClosedEvent" | 12964 * - "pollClosedEvent" |
12873 * - "pollEditedEvent" | 12965 * - "pollEditedEvent" |
12874 * - "pollOpenedEvent" | 12966 * - "pollOpenedEvent" |
12875 * - "pollVotedEvent" | 12967 * - "pollVotedEvent" |
12876 * - "sponsorOnlyModeEndedEvent" | 12968 * - "sponsorOnlyModeEndedEvent" |
12877 * - "sponsorOnlyModeStartedEvent" | 12969 * - "sponsorOnlyModeStartedEvent" |
| 12970 * - "superChatEvent" |
12878 * - "textMessageEvent" | 12971 * - "textMessageEvent" |
12879 * - "tombstone" | 12972 * - "tombstone" |
12880 * - "userBannedEvent" | 12973 * - "userBannedEvent" |
12881 */ | 12974 */ |
12882 core.String type; | 12975 core.String type; |
12883 LiveChatUserBannedMessageDetails userBannedDetails; | 12976 LiveChatUserBannedMessageDetails userBannedDetails; |
12884 | 12977 |
12885 LiveChatMessageSnippet(); | 12978 LiveChatMessageSnippet(); |
12886 | 12979 |
12887 LiveChatMessageSnippet.fromJson(core.Map _json) { | 12980 LiveChatMessageSnippet.fromJson(core.Map _json) { |
(...skipping 26 matching lines...) Expand all Loading... |
12914 } | 13007 } |
12915 if (_json.containsKey("pollOpenedDetails")) { | 13008 if (_json.containsKey("pollOpenedDetails")) { |
12916 pollOpenedDetails = new LiveChatPollOpenedDetails.fromJson(_json["pollOpen
edDetails"]); | 13009 pollOpenedDetails = new LiveChatPollOpenedDetails.fromJson(_json["pollOpen
edDetails"]); |
12917 } | 13010 } |
12918 if (_json.containsKey("pollVotedDetails")) { | 13011 if (_json.containsKey("pollVotedDetails")) { |
12919 pollVotedDetails = new LiveChatPollVotedDetails.fromJson(_json["pollVotedD
etails"]); | 13012 pollVotedDetails = new LiveChatPollVotedDetails.fromJson(_json["pollVotedD
etails"]); |
12920 } | 13013 } |
12921 if (_json.containsKey("publishedAt")) { | 13014 if (_json.containsKey("publishedAt")) { |
12922 publishedAt = core.DateTime.parse(_json["publishedAt"]); | 13015 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
12923 } | 13016 } |
| 13017 if (_json.containsKey("superChatDetails")) { |
| 13018 superChatDetails = new LiveChatSuperChatDetails.fromJson(_json["superChatD
etails"]); |
| 13019 } |
12924 if (_json.containsKey("textMessageDetails")) { | 13020 if (_json.containsKey("textMessageDetails")) { |
12925 textMessageDetails = new LiveChatTextMessageDetails.fromJson(_json["textMe
ssageDetails"]); | 13021 textMessageDetails = new LiveChatTextMessageDetails.fromJson(_json["textMe
ssageDetails"]); |
12926 } | 13022 } |
12927 if (_json.containsKey("type")) { | 13023 if (_json.containsKey("type")) { |
12928 type = _json["type"]; | 13024 type = _json["type"]; |
12929 } | 13025 } |
12930 if (_json.containsKey("userBannedDetails")) { | 13026 if (_json.containsKey("userBannedDetails")) { |
12931 userBannedDetails = new LiveChatUserBannedMessageDetails.fromJson(_json["u
serBannedDetails"]); | 13027 userBannedDetails = new LiveChatUserBannedMessageDetails.fromJson(_json["u
serBannedDetails"]); |
12932 } | 13028 } |
12933 } | 13029 } |
(...skipping 29 matching lines...) Expand all Loading... |
12963 } | 13059 } |
12964 if (pollOpenedDetails != null) { | 13060 if (pollOpenedDetails != null) { |
12965 _json["pollOpenedDetails"] = (pollOpenedDetails).toJson(); | 13061 _json["pollOpenedDetails"] = (pollOpenedDetails).toJson(); |
12966 } | 13062 } |
12967 if (pollVotedDetails != null) { | 13063 if (pollVotedDetails != null) { |
12968 _json["pollVotedDetails"] = (pollVotedDetails).toJson(); | 13064 _json["pollVotedDetails"] = (pollVotedDetails).toJson(); |
12969 } | 13065 } |
12970 if (publishedAt != null) { | 13066 if (publishedAt != null) { |
12971 _json["publishedAt"] = (publishedAt).toIso8601String(); | 13067 _json["publishedAt"] = (publishedAt).toIso8601String(); |
12972 } | 13068 } |
| 13069 if (superChatDetails != null) { |
| 13070 _json["superChatDetails"] = (superChatDetails).toJson(); |
| 13071 } |
12973 if (textMessageDetails != null) { | 13072 if (textMessageDetails != null) { |
12974 _json["textMessageDetails"] = (textMessageDetails).toJson(); | 13073 _json["textMessageDetails"] = (textMessageDetails).toJson(); |
12975 } | 13074 } |
12976 if (type != null) { | 13075 if (type != null) { |
12977 _json["type"] = type; | 13076 _json["type"] = type; |
12978 } | 13077 } |
12979 if (userBannedDetails != null) { | 13078 if (userBannedDetails != null) { |
12980 _json["userBannedDetails"] = (userBannedDetails).toJson(); | 13079 _json["userBannedDetails"] = (userBannedDetails).toJson(); |
12981 } | 13080 } |
12982 return _json; | 13081 return _json; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13296 if (itemId != null) { | 13395 if (itemId != null) { |
13297 _json["itemId"] = itemId; | 13396 _json["itemId"] = itemId; |
13298 } | 13397 } |
13299 if (pollId != null) { | 13398 if (pollId != null) { |
13300 _json["pollId"] = pollId; | 13399 _json["pollId"] = pollId; |
13301 } | 13400 } |
13302 return _json; | 13401 return _json; |
13303 } | 13402 } |
13304 } | 13403 } |
13305 | 13404 |
| 13405 class LiveChatSuperChatDetails { |
| 13406 /** |
| 13407 * A rendered string that displays the fund amount and currency to the user. |
| 13408 */ |
| 13409 core.String amountDisplayString; |
| 13410 /** The amount purchased by the user, in micros (1,750,000 micros = 1.75). */ |
| 13411 core.String amountMicros; |
| 13412 /** The currency in which the purchase was made. */ |
| 13413 core.String currency; |
| 13414 /** |
| 13415 * The tier in which the amount belongs to. Lower amounts belong to lower |
| 13416 * tiers. Starts at 1. |
| 13417 */ |
| 13418 core.int tier; |
| 13419 /** The comment added by the user to this Super Chat event. */ |
| 13420 core.String userComment; |
| 13421 |
| 13422 LiveChatSuperChatDetails(); |
| 13423 |
| 13424 LiveChatSuperChatDetails.fromJson(core.Map _json) { |
| 13425 if (_json.containsKey("amountDisplayString")) { |
| 13426 amountDisplayString = _json["amountDisplayString"]; |
| 13427 } |
| 13428 if (_json.containsKey("amountMicros")) { |
| 13429 amountMicros = _json["amountMicros"]; |
| 13430 } |
| 13431 if (_json.containsKey("currency")) { |
| 13432 currency = _json["currency"]; |
| 13433 } |
| 13434 if (_json.containsKey("tier")) { |
| 13435 tier = _json["tier"]; |
| 13436 } |
| 13437 if (_json.containsKey("userComment")) { |
| 13438 userComment = _json["userComment"]; |
| 13439 } |
| 13440 } |
| 13441 |
| 13442 core.Map toJson() { |
| 13443 var _json = new core.Map(); |
| 13444 if (amountDisplayString != null) { |
| 13445 _json["amountDisplayString"] = amountDisplayString; |
| 13446 } |
| 13447 if (amountMicros != null) { |
| 13448 _json["amountMicros"] = amountMicros; |
| 13449 } |
| 13450 if (currency != null) { |
| 13451 _json["currency"] = currency; |
| 13452 } |
| 13453 if (tier != null) { |
| 13454 _json["tier"] = tier; |
| 13455 } |
| 13456 if (userComment != null) { |
| 13457 _json["userComment"] = userComment; |
| 13458 } |
| 13459 return _json; |
| 13460 } |
| 13461 } |
| 13462 |
13306 class LiveChatTextMessageDetails { | 13463 class LiveChatTextMessageDetails { |
13307 /** The user's message. */ | 13464 /** The user's message. */ |
13308 core.String messageText; | 13465 core.String messageText; |
13309 | 13466 |
13310 LiveChatTextMessageDetails(); | 13467 LiveChatTextMessageDetails(); |
13311 | 13468 |
13312 LiveChatTextMessageDetails.fromJson(core.Map _json) { | 13469 LiveChatTextMessageDetails.fromJson(core.Map _json) { |
13313 if (_json.containsKey("messageText")) { | 13470 if (_json.containsKey("messageText")) { |
13314 messageText = _json["messageText"]; | 13471 messageText = _json["messageText"]; |
13315 } | 13472 } |
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15747 if (thumbnails != null) { | 15904 if (thumbnails != null) { |
15748 _json["thumbnails"] = (thumbnails).toJson(); | 15905 _json["thumbnails"] = (thumbnails).toJson(); |
15749 } | 15906 } |
15750 if (title != null) { | 15907 if (title != null) { |
15751 _json["title"] = title; | 15908 _json["title"] = title; |
15752 } | 15909 } |
15753 return _json; | 15910 return _json; |
15754 } | 15911 } |
15755 } | 15912 } |
15756 | 15913 |
| 15914 /** |
| 15915 * A superChatEvent resource represents a Super Chat purchase on a YouTube |
| 15916 * channel. |
| 15917 */ |
| 15918 class SuperChatEvent { |
| 15919 /** Etag of this resource. */ |
| 15920 core.String etag; |
| 15921 /** The ID that YouTube assigns to uniquely identify the Super Chat event. */ |
| 15922 core.String id; |
| 15923 /** |
| 15924 * Identifies what kind of resource this is. Value: the fixed string |
| 15925 * "youtube#superChatEvent". |
| 15926 */ |
| 15927 core.String kind; |
| 15928 /** The snippet object contains basic details about the Super Chat event. */ |
| 15929 SuperChatEventSnippet snippet; |
| 15930 |
| 15931 SuperChatEvent(); |
| 15932 |
| 15933 SuperChatEvent.fromJson(core.Map _json) { |
| 15934 if (_json.containsKey("etag")) { |
| 15935 etag = _json["etag"]; |
| 15936 } |
| 15937 if (_json.containsKey("id")) { |
| 15938 id = _json["id"]; |
| 15939 } |
| 15940 if (_json.containsKey("kind")) { |
| 15941 kind = _json["kind"]; |
| 15942 } |
| 15943 if (_json.containsKey("snippet")) { |
| 15944 snippet = new SuperChatEventSnippet.fromJson(_json["snippet"]); |
| 15945 } |
| 15946 } |
| 15947 |
| 15948 core.Map toJson() { |
| 15949 var _json = new core.Map(); |
| 15950 if (etag != null) { |
| 15951 _json["etag"] = etag; |
| 15952 } |
| 15953 if (id != null) { |
| 15954 _json["id"] = id; |
| 15955 } |
| 15956 if (kind != null) { |
| 15957 _json["kind"] = kind; |
| 15958 } |
| 15959 if (snippet != null) { |
| 15960 _json["snippet"] = (snippet).toJson(); |
| 15961 } |
| 15962 return _json; |
| 15963 } |
| 15964 } |
| 15965 |
| 15966 class SuperChatEventListResponse { |
| 15967 /** Etag of this resource. */ |
| 15968 core.String etag; |
| 15969 /** Serialized EventId of the request which produced this response. */ |
| 15970 core.String eventId; |
| 15971 /** A list of Super Chat purchases that match the request criteria. */ |
| 15972 core.List<SuperChatEvent> items; |
| 15973 /** |
| 15974 * Identifies what kind of resource this is. Value: the fixed string |
| 15975 * "youtube#superChatEventListResponse". |
| 15976 */ |
| 15977 core.String kind; |
| 15978 /** |
| 15979 * The token that can be used as the value of the pageToken parameter to |
| 15980 * retrieve the next page in the result set. |
| 15981 */ |
| 15982 core.String nextPageToken; |
| 15983 PageInfo pageInfo; |
| 15984 TokenPagination tokenPagination; |
| 15985 /** The visitorId identifies the visitor. */ |
| 15986 core.String visitorId; |
| 15987 |
| 15988 SuperChatEventListResponse(); |
| 15989 |
| 15990 SuperChatEventListResponse.fromJson(core.Map _json) { |
| 15991 if (_json.containsKey("etag")) { |
| 15992 etag = _json["etag"]; |
| 15993 } |
| 15994 if (_json.containsKey("eventId")) { |
| 15995 eventId = _json["eventId"]; |
| 15996 } |
| 15997 if (_json.containsKey("items")) { |
| 15998 items = _json["items"].map((value) => new SuperChatEvent.fromJson(value)).
toList(); |
| 15999 } |
| 16000 if (_json.containsKey("kind")) { |
| 16001 kind = _json["kind"]; |
| 16002 } |
| 16003 if (_json.containsKey("nextPageToken")) { |
| 16004 nextPageToken = _json["nextPageToken"]; |
| 16005 } |
| 16006 if (_json.containsKey("pageInfo")) { |
| 16007 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 16008 } |
| 16009 if (_json.containsKey("tokenPagination")) { |
| 16010 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 16011 } |
| 16012 if (_json.containsKey("visitorId")) { |
| 16013 visitorId = _json["visitorId"]; |
| 16014 } |
| 16015 } |
| 16016 |
| 16017 core.Map toJson() { |
| 16018 var _json = new core.Map(); |
| 16019 if (etag != null) { |
| 16020 _json["etag"] = etag; |
| 16021 } |
| 16022 if (eventId != null) { |
| 16023 _json["eventId"] = eventId; |
| 16024 } |
| 16025 if (items != null) { |
| 16026 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 16027 } |
| 16028 if (kind != null) { |
| 16029 _json["kind"] = kind; |
| 16030 } |
| 16031 if (nextPageToken != null) { |
| 16032 _json["nextPageToken"] = nextPageToken; |
| 16033 } |
| 16034 if (pageInfo != null) { |
| 16035 _json["pageInfo"] = (pageInfo).toJson(); |
| 16036 } |
| 16037 if (tokenPagination != null) { |
| 16038 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 16039 } |
| 16040 if (visitorId != null) { |
| 16041 _json["visitorId"] = visitorId; |
| 16042 } |
| 16043 return _json; |
| 16044 } |
| 16045 } |
| 16046 |
| 16047 class SuperChatEventSnippet { |
| 16048 /** |
| 16049 * The purchase amount, in micros of the purchase currency. e.g., 1 is |
| 16050 * represented as 1000000. |
| 16051 */ |
| 16052 core.String amountMicros; |
| 16053 /** Channel id where the event occurred. */ |
| 16054 core.String channelId; |
| 16055 /** The text contents of the comment left by the user. */ |
| 16056 core.String commentText; |
| 16057 /** |
| 16058 * The date and time when the event occurred. The value is specified in ISO |
| 16059 * 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. |
| 16060 */ |
| 16061 core.DateTime createdAt; |
| 16062 /** The currency in which the purchase was made. ISO 4217. */ |
| 16063 core.String currency; |
| 16064 /** |
| 16065 * A rendered string that displays the purchase amount and currency (e.g., |
| 16066 * "$1.00"). The string is rendered for the given language. |
| 16067 */ |
| 16068 core.String displayString; |
| 16069 /** |
| 16070 * The tier for the paid message, which is based on the amount of money spent |
| 16071 * to purchase the message. |
| 16072 */ |
| 16073 core.int messageType; |
| 16074 /** Details about the supporter. */ |
| 16075 ChannelProfileDetails supporterDetails; |
| 16076 |
| 16077 SuperChatEventSnippet(); |
| 16078 |
| 16079 SuperChatEventSnippet.fromJson(core.Map _json) { |
| 16080 if (_json.containsKey("amountMicros")) { |
| 16081 amountMicros = _json["amountMicros"]; |
| 16082 } |
| 16083 if (_json.containsKey("channelId")) { |
| 16084 channelId = _json["channelId"]; |
| 16085 } |
| 16086 if (_json.containsKey("commentText")) { |
| 16087 commentText = _json["commentText"]; |
| 16088 } |
| 16089 if (_json.containsKey("createdAt")) { |
| 16090 createdAt = core.DateTime.parse(_json["createdAt"]); |
| 16091 } |
| 16092 if (_json.containsKey("currency")) { |
| 16093 currency = _json["currency"]; |
| 16094 } |
| 16095 if (_json.containsKey("displayString")) { |
| 16096 displayString = _json["displayString"]; |
| 16097 } |
| 16098 if (_json.containsKey("messageType")) { |
| 16099 messageType = _json["messageType"]; |
| 16100 } |
| 16101 if (_json.containsKey("supporterDetails")) { |
| 16102 supporterDetails = new ChannelProfileDetails.fromJson(_json["supporterDeta
ils"]); |
| 16103 } |
| 16104 } |
| 16105 |
| 16106 core.Map toJson() { |
| 16107 var _json = new core.Map(); |
| 16108 if (amountMicros != null) { |
| 16109 _json["amountMicros"] = amountMicros; |
| 16110 } |
| 16111 if (channelId != null) { |
| 16112 _json["channelId"] = channelId; |
| 16113 } |
| 16114 if (commentText != null) { |
| 16115 _json["commentText"] = commentText; |
| 16116 } |
| 16117 if (createdAt != null) { |
| 16118 _json["createdAt"] = (createdAt).toIso8601String(); |
| 16119 } |
| 16120 if (currency != null) { |
| 16121 _json["currency"] = currency; |
| 16122 } |
| 16123 if (displayString != null) { |
| 16124 _json["displayString"] = displayString; |
| 16125 } |
| 16126 if (messageType != null) { |
| 16127 _json["messageType"] = messageType; |
| 16128 } |
| 16129 if (supporterDetails != null) { |
| 16130 _json["supporterDetails"] = (supporterDetails).toJson(); |
| 16131 } |
| 16132 return _json; |
| 16133 } |
| 16134 } |
| 16135 |
15757 /** A thumbnail is an image representing a YouTube resource. */ | 16136 /** A thumbnail is an image representing a YouTube resource. */ |
15758 class Thumbnail { | 16137 class Thumbnail { |
15759 /** (Optional) Height of the thumbnail image. */ | 16138 /** (Optional) Height of the thumbnail image. */ |
15760 core.int height; | 16139 core.int height; |
15761 /** The thumbnail image's URL. */ | 16140 /** The thumbnail image's URL. */ |
15762 core.String url; | 16141 core.String url; |
15763 /** (Optional) Width of the thumbnail image. */ | 16142 /** (Optional) Width of the thumbnail image. */ |
15764 core.int width; | 16143 core.int width; |
15765 | 16144 |
15766 Thumbnail(); | 16145 Thumbnail(); |
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18106 | 18485 |
18107 /** Freebase topic information related to the video. */ | 18486 /** Freebase topic information related to the video. */ |
18108 class VideoTopicDetails { | 18487 class VideoTopicDetails { |
18109 /** | 18488 /** |
18110 * Similar to topic_id, except that these topics are merely relevant to the | 18489 * Similar to topic_id, except that these topics are merely relevant to the |
18111 * video. These are topics that may be mentioned in, or appear in the video. | 18490 * video. These are topics that may be mentioned in, or appear in the video. |
18112 * You can retrieve information about each topic using Freebase Topic API. | 18491 * You can retrieve information about each topic using Freebase Topic API. |
18113 */ | 18492 */ |
18114 core.List<core.String> relevantTopicIds; | 18493 core.List<core.String> relevantTopicIds; |
18115 /** | 18494 /** |
| 18495 * A list of Wikipedia URLs that provide a high-level description of the |
| 18496 * video's content. |
| 18497 */ |
| 18498 core.List<core.String> topicCategories; |
| 18499 /** |
18116 * A list of Freebase topic IDs that are centrally associated with the video. | 18500 * A list of Freebase topic IDs that are centrally associated with the video. |
18117 * These are topics that are centrally featured in the video, and it can be | 18501 * These are topics that are centrally featured in the video, and it can be |
18118 * said that the video is mainly about each of these. You can retrieve | 18502 * said that the video is mainly about each of these. You can retrieve |
18119 * information about each topic using the Freebase Topic API. | 18503 * information about each topic using the Freebase Topic API. |
18120 */ | 18504 */ |
18121 core.List<core.String> topicIds; | 18505 core.List<core.String> topicIds; |
18122 | 18506 |
18123 VideoTopicDetails(); | 18507 VideoTopicDetails(); |
18124 | 18508 |
18125 VideoTopicDetails.fromJson(core.Map _json) { | 18509 VideoTopicDetails.fromJson(core.Map _json) { |
18126 if (_json.containsKey("relevantTopicIds")) { | 18510 if (_json.containsKey("relevantTopicIds")) { |
18127 relevantTopicIds = _json["relevantTopicIds"]; | 18511 relevantTopicIds = _json["relevantTopicIds"]; |
18128 } | 18512 } |
| 18513 if (_json.containsKey("topicCategories")) { |
| 18514 topicCategories = _json["topicCategories"]; |
| 18515 } |
18129 if (_json.containsKey("topicIds")) { | 18516 if (_json.containsKey("topicIds")) { |
18130 topicIds = _json["topicIds"]; | 18517 topicIds = _json["topicIds"]; |
18131 } | 18518 } |
18132 } | 18519 } |
18133 | 18520 |
18134 core.Map toJson() { | 18521 core.Map toJson() { |
18135 var _json = new core.Map(); | 18522 var _json = new core.Map(); |
18136 if (relevantTopicIds != null) { | 18523 if (relevantTopicIds != null) { |
18137 _json["relevantTopicIds"] = relevantTopicIds; | 18524 _json["relevantTopicIds"] = relevantTopicIds; |
18138 } | 18525 } |
| 18526 if (topicCategories != null) { |
| 18527 _json["topicCategories"] = topicCategories; |
| 18528 } |
18139 if (topicIds != null) { | 18529 if (topicIds != null) { |
18140 _json["topicIds"] = topicIds; | 18530 _json["topicIds"] = topicIds; |
18141 } | 18531 } |
18142 return _json; | 18532 return _json; |
18143 } | 18533 } |
18144 } | 18534 } |
18145 | 18535 |
18146 /** Branding properties for the watch. All deprecated. */ | 18536 /** Branding properties for the watch. All deprecated. */ |
18147 class WatchSettings { | 18537 class WatchSettings { |
18148 /** The text color for the video watch page's branded area. */ | 18538 /** The text color for the video watch page's branded area. */ |
(...skipping 27 matching lines...) Expand all Loading... |
18176 } | 18566 } |
18177 if (featuredPlaylistId != null) { | 18567 if (featuredPlaylistId != null) { |
18178 _json["featuredPlaylistId"] = featuredPlaylistId; | 18568 _json["featuredPlaylistId"] = featuredPlaylistId; |
18179 } | 18569 } |
18180 if (textColor != null) { | 18570 if (textColor != null) { |
18181 _json["textColor"] = textColor; | 18571 _json["textColor"] = textColor; |
18182 } | 18572 } |
18183 return _json; | 18573 return _json; |
18184 } | 18574 } |
18185 } | 18575 } |
OLD | NEW |