| 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.youtubeAnalytics.v1; | 3 library googleapis.youtubeAnalytics.v1; |
| 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; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
| 13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client youtubeAnalytics/v1'; | 15 const core.String USER_AGENT = 'dart-api-client youtubeAnalytics/v1'; |
| 16 | 16 |
| 17 /** Retrieves your YouTube Analytics data. */ | 17 /// Retrieves your YouTube Analytics data. |
| 18 class YoutubeAnalyticsApi { | 18 class YoutubeAnalyticsApi { |
| 19 /** Manage your YouTube account */ | 19 /// Manage your YouTube account |
| 20 static const YoutubeScope = "https://www.googleapis.com/auth/youtube"; | 20 static const YoutubeScope = "https://www.googleapis.com/auth/youtube"; |
| 21 | 21 |
| 22 /** View your YouTube account */ | 22 /// View your YouTube account |
| 23 static const YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.r
eadonly"; | 23 static const YoutubeReadonlyScope = |
| 24 "https://www.googleapis.com/auth/youtube.readonly"; |
| 24 | 25 |
| 25 /** View and manage your assets and associated content on YouTube */ | 26 /// View and manage your assets and associated content on YouTube |
| 26 static const YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepar
tner"; | 27 static const YoutubepartnerScope = |
| 28 "https://www.googleapis.com/auth/youtubepartner"; |
| 27 | 29 |
| 28 /** | 30 /// View monetary and non-monetary YouTube Analytics reports for your YouTube |
| 29 * View monetary and non-monetary YouTube Analytics reports for your YouTube | 31 /// content |
| 30 * content | 32 static const YtAnalyticsMonetaryReadonlyScope = |
| 31 */ | 33 "https://www.googleapis.com/auth/yt-analytics-monetary.readonly"; |
| 32 static const YtAnalyticsMonetaryReadonlyScope = "https://www.googleapis.com/au
th/yt-analytics-monetary.readonly"; | |
| 33 | 34 |
| 34 /** View YouTube Analytics reports for your YouTube content */ | 35 /// View YouTube Analytics reports for your YouTube content |
| 35 static const YtAnalyticsReadonlyScope = "https://www.googleapis.com/auth/yt-an
alytics.readonly"; | 36 static const YtAnalyticsReadonlyScope = |
| 36 | 37 "https://www.googleapis.com/auth/yt-analytics.readonly"; |
| 37 | 38 |
| 38 final commons.ApiRequester _requester; | 39 final commons.ApiRequester _requester; |
| 39 | 40 |
| 40 GroupItemsResourceApi get groupItems => new GroupItemsResourceApi(_requester); | 41 GroupItemsResourceApi get groupItems => new GroupItemsResourceApi(_requester); |
| 41 GroupsResourceApi get groups => new GroupsResourceApi(_requester); | 42 GroupsResourceApi get groups => new GroupsResourceApi(_requester); |
| 42 ReportsResourceApi get reports => new ReportsResourceApi(_requester); | 43 ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
| 43 | 44 |
| 44 YoutubeAnalyticsApi(http.Client client, {core.String rootUrl: "https://www.goo
gleapis.com/", core.String servicePath: "youtube/analytics/v1/"}) : | 45 YoutubeAnalyticsApi(http.Client client, |
| 45 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 46 {core.String rootUrl: "https://www.googleapis.com/", |
| 47 core.String servicePath: "youtube/analytics/v1/"}) |
| 48 : _requester = |
| 49 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 46 } | 50 } |
| 47 | 51 |
| 48 | |
| 49 class GroupItemsResourceApi { | 52 class GroupItemsResourceApi { |
| 50 final commons.ApiRequester _requester; | 53 final commons.ApiRequester _requester; |
| 51 | 54 |
| 52 GroupItemsResourceApi(commons.ApiRequester client) : | 55 GroupItemsResourceApi(commons.ApiRequester client) : _requester = client; |
| 53 _requester = client; | |
| 54 | 56 |
| 55 /** | 57 /// Removes an item from a group. |
| 56 * Removes an item from a group. | 58 /// |
| 57 * | 59 /// Request parameters: |
| 58 * Request parameters: | 60 /// |
| 59 * | 61 /// [id] - The id parameter specifies the YouTube group item ID for the group |
| 60 * [id] - The id parameter specifies the YouTube group item ID for the group | 62 /// that is being deleted. |
| 61 * that is being deleted. | 63 /// |
| 62 * | 64 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 63 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 65 /// for YouTube content partners. |
| 64 * YouTube content partners. | 66 /// |
| 65 * | 67 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 66 * The onBehalfOfContentOwner parameter indicates that the request's | 68 /// authorization credentials identify a YouTube CMS user who is acting on |
| 67 * authorization credentials identify a YouTube CMS user who is acting on | 69 /// behalf of the content owner specified in the parameter value. This |
| 68 * behalf of the content owner specified in the parameter value. This | 70 /// parameter is intended for YouTube content partners that own and manage |
| 69 * parameter is intended for YouTube content partners that own and manage many | 71 /// many different YouTube channels. It allows content owners to authenticate |
| 70 * different YouTube channels. It allows content owners to authenticate once | 72 /// once and get access to all their video and channel data, without having |
| 71 * and get access to all their video and channel data, without having to | 73 /// to provide authentication credentials for each individual channel. The |
| 72 * provide authentication credentials for each individual channel. The CMS | 74 /// CMS account that the user authenticates with must be linked to the |
| 73 * account that the user authenticates with must be linked to the specified | 75 /// specified YouTube content owner. |
| 74 * YouTube content owner. | 76 /// |
| 75 * | 77 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 76 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 78 /// an error. |
| 77 * error. | 79 /// |
| 78 * | 80 /// If the used [http.Client] completes with an error when making a REST |
| 79 * If the used [http.Client] completes with an error when making a REST call, | 81 /// call, this method will complete with the same error. |
| 80 * this method will complete with the same error. | |
| 81 */ | |
| 82 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { | 82 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { |
| 83 var _url = null; | 83 var _url = null; |
| 84 var _queryParams = new core.Map(); | 84 var _queryParams = new core.Map(); |
| 85 var _uploadMedia = null; | 85 var _uploadMedia = null; |
| 86 var _uploadOptions = null; | 86 var _uploadOptions = null; |
| 87 var _downloadOptions = commons.DownloadOptions.Metadata; | 87 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 88 var _body = null; | 88 var _body = null; |
| 89 | 89 |
| 90 if (id == null) { | 90 if (id == null) { |
| 91 throw new core.ArgumentError("Parameter id is required."); | 91 throw new core.ArgumentError("Parameter id is required."); |
| 92 } | 92 } |
| 93 _queryParams["id"] = [id]; | 93 _queryParams["id"] = [id]; |
| 94 if (onBehalfOfContentOwner != null) { | 94 if (onBehalfOfContentOwner != null) { |
| 95 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 95 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 96 } | 96 } |
| 97 | 97 |
| 98 _downloadOptions = null; | 98 _downloadOptions = null; |
| 99 | 99 |
| 100 _url = 'groupItems'; | 100 _url = 'groupItems'; |
| 101 | 101 |
| 102 var _response = _requester.request(_url, | 102 var _response = _requester.request(_url, "DELETE", |
| 103 "DELETE", | 103 body: _body, |
| 104 body: _body, | 104 queryParams: _queryParams, |
| 105 queryParams: _queryParams, | 105 uploadOptions: _uploadOptions, |
| 106 uploadOptions: _uploadOptions, | 106 uploadMedia: _uploadMedia, |
| 107 uploadMedia: _uploadMedia, | 107 downloadOptions: _downloadOptions); |
| 108 downloadOptions: _downloadOptions); | |
| 109 return _response.then((data) => null); | 108 return _response.then((data) => null); |
| 110 } | 109 } |
| 111 | 110 |
| 112 /** | 111 /// Creates a group item. |
| 113 * Creates a group item. | 112 /// |
| 114 * | 113 /// [request] - The metadata request object. |
| 115 * [request] - The metadata request object. | 114 /// |
| 116 * | 115 /// Request parameters: |
| 117 * Request parameters: | 116 /// |
| 118 * | 117 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 119 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 118 /// for YouTube content partners. |
| 120 * YouTube content partners. | 119 /// |
| 121 * | 120 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 122 * The onBehalfOfContentOwner parameter indicates that the request's | 121 /// authorization credentials identify a YouTube CMS user who is acting on |
| 123 * authorization credentials identify a YouTube CMS user who is acting on | 122 /// behalf of the content owner specified in the parameter value. This |
| 124 * behalf of the content owner specified in the parameter value. This | 123 /// parameter is intended for YouTube content partners that own and manage |
| 125 * parameter is intended for YouTube content partners that own and manage many | 124 /// many different YouTube channels. It allows content owners to authenticate |
| 126 * different YouTube channels. It allows content owners to authenticate once | 125 /// once and get access to all their video and channel data, without having |
| 127 * and get access to all their video and channel data, without having to | 126 /// to provide authentication credentials for each individual channel. The |
| 128 * provide authentication credentials for each individual channel. The CMS | 127 /// CMS account that the user authenticates with must be linked to the |
| 129 * account that the user authenticates with must be linked to the specified | 128 /// specified YouTube content owner. |
| 130 * YouTube content owner. | 129 /// |
| 131 * | 130 /// Completes with a [GroupItem]. |
| 132 * Completes with a [GroupItem]. | 131 /// |
| 133 * | 132 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 134 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 133 /// an error. |
| 135 * error. | 134 /// |
| 136 * | 135 /// If the used [http.Client] completes with an error when making a REST |
| 137 * If the used [http.Client] completes with an error when making a REST call, | 136 /// call, this method will complete with the same error. |
| 138 * this method will complete with the same error. | 137 async.Future<GroupItem> insert(GroupItem request, |
| 139 */ | 138 {core.String onBehalfOfContentOwner}) { |
| 140 async.Future<GroupItem> insert(GroupItem request, {core.String onBehalfOfConte
ntOwner}) { | |
| 141 var _url = null; | 139 var _url = null; |
| 142 var _queryParams = new core.Map(); | 140 var _queryParams = new core.Map(); |
| 143 var _uploadMedia = null; | 141 var _uploadMedia = null; |
| 144 var _uploadOptions = null; | 142 var _uploadOptions = null; |
| 145 var _downloadOptions = commons.DownloadOptions.Metadata; | 143 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 146 var _body = null; | 144 var _body = null; |
| 147 | 145 |
| 148 if (request != null) { | 146 if (request != null) { |
| 149 _body = convert.JSON.encode((request).toJson()); | 147 _body = convert.JSON.encode((request).toJson()); |
| 150 } | 148 } |
| 151 if (onBehalfOfContentOwner != null) { | 149 if (onBehalfOfContentOwner != null) { |
| 152 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 150 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 153 } | 151 } |
| 154 | 152 |
| 155 _url = 'groupItems'; | 153 _url = 'groupItems'; |
| 156 | 154 |
| 157 var _response = _requester.request(_url, | 155 var _response = _requester.request(_url, "POST", |
| 158 "POST", | 156 body: _body, |
| 159 body: _body, | 157 queryParams: _queryParams, |
| 160 queryParams: _queryParams, | 158 uploadOptions: _uploadOptions, |
| 161 uploadOptions: _uploadOptions, | 159 uploadMedia: _uploadMedia, |
| 162 uploadMedia: _uploadMedia, | 160 downloadOptions: _downloadOptions); |
| 163 downloadOptions: _downloadOptions); | |
| 164 return _response.then((data) => new GroupItem.fromJson(data)); | 161 return _response.then((data) => new GroupItem.fromJson(data)); |
| 165 } | 162 } |
| 166 | 163 |
| 167 /** | 164 /// Returns a collection of group items that match the API request |
| 168 * Returns a collection of group items that match the API request parameters. | 165 /// parameters. |
| 169 * | 166 /// |
| 170 * Request parameters: | 167 /// Request parameters: |
| 171 * | 168 /// |
| 172 * [groupId] - The id parameter specifies the unique ID of the group for which | 169 /// [groupId] - The id parameter specifies the unique ID of the group for |
| 173 * you want to retrieve group items. | 170 /// which you want to retrieve group items. |
| 174 * | 171 /// |
| 175 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 172 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 176 * YouTube content partners. | 173 /// for YouTube content partners. |
| 177 * | 174 /// |
| 178 * The onBehalfOfContentOwner parameter indicates that the request's | 175 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 179 * authorization credentials identify a YouTube CMS user who is acting on | 176 /// authorization credentials identify a YouTube CMS user who is acting on |
| 180 * behalf of the content owner specified in the parameter value. This | 177 /// behalf of the content owner specified in the parameter value. This |
| 181 * parameter is intended for YouTube content partners that own and manage many | 178 /// parameter is intended for YouTube content partners that own and manage |
| 182 * different YouTube channels. It allows content owners to authenticate once | 179 /// many different YouTube channels. It allows content owners to authenticate |
| 183 * and get access to all their video and channel data, without having to | 180 /// once and get access to all their video and channel data, without having |
| 184 * provide authentication credentials for each individual channel. The CMS | 181 /// to provide authentication credentials for each individual channel. The |
| 185 * account that the user authenticates with must be linked to the specified | 182 /// CMS account that the user authenticates with must be linked to the |
| 186 * YouTube content owner. | 183 /// specified YouTube content owner. |
| 187 * | 184 /// |
| 188 * Completes with a [GroupItemListResponse]. | 185 /// Completes with a [GroupItemListResponse]. |
| 189 * | 186 /// |
| 190 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 187 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 191 * error. | 188 /// an error. |
| 192 * | 189 /// |
| 193 * If the used [http.Client] completes with an error when making a REST call, | 190 /// If the used [http.Client] completes with an error when making a REST |
| 194 * this method will complete with the same error. | 191 /// call, this method will complete with the same error. |
| 195 */ | 192 async.Future<GroupItemListResponse> list(core.String groupId, |
| 196 async.Future<GroupItemListResponse> list(core.String groupId, {core.String onB
ehalfOfContentOwner}) { | 193 {core.String onBehalfOfContentOwner}) { |
| 197 var _url = null; | 194 var _url = null; |
| 198 var _queryParams = new core.Map(); | 195 var _queryParams = new core.Map(); |
| 199 var _uploadMedia = null; | 196 var _uploadMedia = null; |
| 200 var _uploadOptions = null; | 197 var _uploadOptions = null; |
| 201 var _downloadOptions = commons.DownloadOptions.Metadata; | 198 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 202 var _body = null; | 199 var _body = null; |
| 203 | 200 |
| 204 if (groupId == null) { | 201 if (groupId == null) { |
| 205 throw new core.ArgumentError("Parameter groupId is required."); | 202 throw new core.ArgumentError("Parameter groupId is required."); |
| 206 } | 203 } |
| 207 _queryParams["groupId"] = [groupId]; | 204 _queryParams["groupId"] = [groupId]; |
| 208 if (onBehalfOfContentOwner != null) { | 205 if (onBehalfOfContentOwner != null) { |
| 209 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 206 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 210 } | 207 } |
| 211 | 208 |
| 212 _url = 'groupItems'; | 209 _url = 'groupItems'; |
| 213 | 210 |
| 214 var _response = _requester.request(_url, | 211 var _response = _requester.request(_url, "GET", |
| 215 "GET", | 212 body: _body, |
| 216 body: _body, | 213 queryParams: _queryParams, |
| 217 queryParams: _queryParams, | 214 uploadOptions: _uploadOptions, |
| 218 uploadOptions: _uploadOptions, | 215 uploadMedia: _uploadMedia, |
| 219 uploadMedia: _uploadMedia, | 216 downloadOptions: _downloadOptions); |
| 220 downloadOptions: _downloadOptions); | |
| 221 return _response.then((data) => new GroupItemListResponse.fromJson(data)); | 217 return _response.then((data) => new GroupItemListResponse.fromJson(data)); |
| 222 } | 218 } |
| 223 | |
| 224 } | 219 } |
| 225 | 220 |
| 226 | |
| 227 class GroupsResourceApi { | 221 class GroupsResourceApi { |
| 228 final commons.ApiRequester _requester; | 222 final commons.ApiRequester _requester; |
| 229 | 223 |
| 230 GroupsResourceApi(commons.ApiRequester client) : | 224 GroupsResourceApi(commons.ApiRequester client) : _requester = client; |
| 231 _requester = client; | |
| 232 | 225 |
| 233 /** | 226 /// Deletes a group. |
| 234 * Deletes a group. | 227 /// |
| 235 * | 228 /// Request parameters: |
| 236 * Request parameters: | 229 /// |
| 237 * | 230 /// [id] - The id parameter specifies the YouTube group ID for the group that |
| 238 * [id] - The id parameter specifies the YouTube group ID for the group that | 231 /// is being deleted. |
| 239 * is being deleted. | 232 /// |
| 240 * | 233 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 241 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 234 /// for YouTube content partners. |
| 242 * YouTube content partners. | 235 /// |
| 243 * | 236 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 244 * The onBehalfOfContentOwner parameter indicates that the request's | 237 /// authorization credentials identify a YouTube CMS user who is acting on |
| 245 * authorization credentials identify a YouTube CMS user who is acting on | 238 /// behalf of the content owner specified in the parameter value. This |
| 246 * behalf of the content owner specified in the parameter value. This | 239 /// parameter is intended for YouTube content partners that own and manage |
| 247 * parameter is intended for YouTube content partners that own and manage many | 240 /// many different YouTube channels. It allows content owners to authenticate |
| 248 * different YouTube channels. It allows content owners to authenticate once | 241 /// once and get access to all their video and channel data, without having |
| 249 * and get access to all their video and channel data, without having to | 242 /// to provide authentication credentials for each individual channel. The |
| 250 * provide authentication credentials for each individual channel. The CMS | 243 /// CMS account that the user authenticates with must be linked to the |
| 251 * account that the user authenticates with must be linked to the specified | 244 /// specified YouTube content owner. |
| 252 * YouTube content owner. | 245 /// |
| 253 * | 246 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 254 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 247 /// an error. |
| 255 * error. | 248 /// |
| 256 * | 249 /// If the used [http.Client] completes with an error when making a REST |
| 257 * If the used [http.Client] completes with an error when making a REST call, | 250 /// call, this method will complete with the same error. |
| 258 * this method will complete with the same error. | |
| 259 */ | |
| 260 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { | 251 async.Future delete(core.String id, {core.String onBehalfOfContentOwner}) { |
| 261 var _url = null; | 252 var _url = null; |
| 262 var _queryParams = new core.Map(); | 253 var _queryParams = new core.Map(); |
| 263 var _uploadMedia = null; | 254 var _uploadMedia = null; |
| 264 var _uploadOptions = null; | 255 var _uploadOptions = null; |
| 265 var _downloadOptions = commons.DownloadOptions.Metadata; | 256 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 266 var _body = null; | 257 var _body = null; |
| 267 | 258 |
| 268 if (id == null) { | 259 if (id == null) { |
| 269 throw new core.ArgumentError("Parameter id is required."); | 260 throw new core.ArgumentError("Parameter id is required."); |
| 270 } | 261 } |
| 271 _queryParams["id"] = [id]; | 262 _queryParams["id"] = [id]; |
| 272 if (onBehalfOfContentOwner != null) { | 263 if (onBehalfOfContentOwner != null) { |
| 273 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 264 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 274 } | 265 } |
| 275 | 266 |
| 276 _downloadOptions = null; | 267 _downloadOptions = null; |
| 277 | 268 |
| 278 _url = 'groups'; | 269 _url = 'groups'; |
| 279 | 270 |
| 280 var _response = _requester.request(_url, | 271 var _response = _requester.request(_url, "DELETE", |
| 281 "DELETE", | 272 body: _body, |
| 282 body: _body, | 273 queryParams: _queryParams, |
| 283 queryParams: _queryParams, | 274 uploadOptions: _uploadOptions, |
| 284 uploadOptions: _uploadOptions, | 275 uploadMedia: _uploadMedia, |
| 285 uploadMedia: _uploadMedia, | 276 downloadOptions: _downloadOptions); |
| 286 downloadOptions: _downloadOptions); | |
| 287 return _response.then((data) => null); | 277 return _response.then((data) => null); |
| 288 } | 278 } |
| 289 | 279 |
| 290 /** | 280 /// Creates a group. |
| 291 * Creates a group. | 281 /// |
| 292 * | 282 /// [request] - The metadata request object. |
| 293 * [request] - The metadata request object. | 283 /// |
| 294 * | 284 /// Request parameters: |
| 295 * Request parameters: | 285 /// |
| 296 * | 286 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 297 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 287 /// for YouTube content partners. |
| 298 * YouTube content partners. | 288 /// |
| 299 * | 289 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 300 * The onBehalfOfContentOwner parameter indicates that the request's | 290 /// authorization credentials identify a YouTube CMS user who is acting on |
| 301 * authorization credentials identify a YouTube CMS user who is acting on | 291 /// behalf of the content owner specified in the parameter value. This |
| 302 * behalf of the content owner specified in the parameter value. This | 292 /// parameter is intended for YouTube content partners that own and manage |
| 303 * parameter is intended for YouTube content partners that own and manage many | 293 /// many different YouTube channels. It allows content owners to authenticate |
| 304 * different YouTube channels. It allows content owners to authenticate once | 294 /// once and get access to all their video and channel data, without having |
| 305 * and get access to all their video and channel data, without having to | 295 /// to provide authentication credentials for each individual channel. The |
| 306 * provide authentication credentials for each individual channel. The CMS | 296 /// CMS account that the user authenticates with must be linked to the |
| 307 * account that the user authenticates with must be linked to the specified | 297 /// specified YouTube content owner. |
| 308 * YouTube content owner. | 298 /// |
| 309 * | 299 /// Completes with a [Group]. |
| 310 * Completes with a [Group]. | 300 /// |
| 311 * | 301 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 312 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 302 /// an error. |
| 313 * error. | 303 /// |
| 314 * | 304 /// If the used [http.Client] completes with an error when making a REST |
| 315 * If the used [http.Client] completes with an error when making a REST call, | 305 /// call, this method will complete with the same error. |
| 316 * this method will complete with the same error. | 306 async.Future<Group> insert(Group request, |
| 317 */ | 307 {core.String onBehalfOfContentOwner}) { |
| 318 async.Future<Group> insert(Group request, {core.String onBehalfOfContentOwner}
) { | |
| 319 var _url = null; | 308 var _url = null; |
| 320 var _queryParams = new core.Map(); | 309 var _queryParams = new core.Map(); |
| 321 var _uploadMedia = null; | 310 var _uploadMedia = null; |
| 322 var _uploadOptions = null; | 311 var _uploadOptions = null; |
| 323 var _downloadOptions = commons.DownloadOptions.Metadata; | 312 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 324 var _body = null; | 313 var _body = null; |
| 325 | 314 |
| 326 if (request != null) { | 315 if (request != null) { |
| 327 _body = convert.JSON.encode((request).toJson()); | 316 _body = convert.JSON.encode((request).toJson()); |
| 328 } | 317 } |
| 329 if (onBehalfOfContentOwner != null) { | 318 if (onBehalfOfContentOwner != null) { |
| 330 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 319 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 331 } | 320 } |
| 332 | 321 |
| 333 _url = 'groups'; | 322 _url = 'groups'; |
| 334 | 323 |
| 335 var _response = _requester.request(_url, | 324 var _response = _requester.request(_url, "POST", |
| 336 "POST", | 325 body: _body, |
| 337 body: _body, | 326 queryParams: _queryParams, |
| 338 queryParams: _queryParams, | 327 uploadOptions: _uploadOptions, |
| 339 uploadOptions: _uploadOptions, | 328 uploadMedia: _uploadMedia, |
| 340 uploadMedia: _uploadMedia, | 329 downloadOptions: _downloadOptions); |
| 341 downloadOptions: _downloadOptions); | |
| 342 return _response.then((data) => new Group.fromJson(data)); | 330 return _response.then((data) => new Group.fromJson(data)); |
| 343 } | 331 } |
| 344 | 332 |
| 345 /** | 333 /// Returns a collection of groups that match the API request parameters. For |
| 346 * Returns a collection of groups that match the API request parameters. For | 334 /// example, you can retrieve all groups that the authenticated user owns, or |
| 347 * example, you can retrieve all groups that the authenticated user owns, or | 335 /// you can retrieve one or more groups by their unique IDs. |
| 348 * you can retrieve one or more groups by their unique IDs. | 336 /// |
| 349 * | 337 /// Request parameters: |
| 350 * Request parameters: | 338 /// |
| 351 * | 339 /// [id] - The id parameter specifies a comma-separated list of the YouTube |
| 352 * [id] - The id parameter specifies a comma-separated list of the YouTube | 340 /// group ID(s) for the resource(s) that are being retrieved. In a group |
| 353 * group ID(s) for the resource(s) that are being retrieved. In a group | 341 /// resource, the id property specifies the group's YouTube group ID. |
| 354 * resource, the id property specifies the group's YouTube group ID. | 342 /// |
| 355 * | 343 /// [mine] - Set this parameter's value to true to instruct the API to only |
| 356 * [mine] - Set this parameter's value to true to instruct the API to only | 344 /// return groups owned by the authenticated user. |
| 357 * return groups owned by the authenticated user. | 345 /// |
| 358 * | 346 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 359 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 347 /// for YouTube content partners. |
| 360 * YouTube content partners. | 348 /// |
| 361 * | 349 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 362 * The onBehalfOfContentOwner parameter indicates that the request's | 350 /// authorization credentials identify a YouTube CMS user who is acting on |
| 363 * authorization credentials identify a YouTube CMS user who is acting on | 351 /// behalf of the content owner specified in the parameter value. This |
| 364 * behalf of the content owner specified in the parameter value. This | 352 /// parameter is intended for YouTube content partners that own and manage |
| 365 * parameter is intended for YouTube content partners that own and manage many | 353 /// many different YouTube channels. It allows content owners to authenticate |
| 366 * different YouTube channels. It allows content owners to authenticate once | 354 /// once and get access to all their video and channel data, without having |
| 367 * and get access to all their video and channel data, without having to | 355 /// to provide authentication credentials for each individual channel. The |
| 368 * provide authentication credentials for each individual channel. The CMS | 356 /// CMS account that the user authenticates with must be linked to the |
| 369 * account that the user authenticates with must be linked to the specified | 357 /// specified YouTube content owner. |
| 370 * YouTube content owner. | 358 /// |
| 371 * | 359 /// [pageToken] - The pageToken parameter identifies a specific page in the |
| 372 * [pageToken] - The pageToken parameter identifies a specific page in the | 360 /// result set that should be returned. In an API response, the nextPageToken |
| 373 * result set that should be returned. In an API response, the nextPageToken | 361 /// property identifies the next page that can be retrieved. |
| 374 * property identifies the next page that can be retrieved. | 362 /// |
| 375 * | 363 /// Completes with a [GroupListResponse]. |
| 376 * Completes with a [GroupListResponse]. | 364 /// |
| 377 * | 365 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 366 /// an error. |
| 379 * error. | 367 /// |
| 380 * | 368 /// If the used [http.Client] completes with an error when making a REST |
| 381 * If the used [http.Client] completes with an error when making a REST call, | 369 /// call, this method will complete with the same error. |
| 382 * this method will complete with the same error. | 370 async.Future<GroupListResponse> list( |
| 383 */ | 371 {core.String id, |
| 384 async.Future<GroupListResponse> list({core.String id, core.bool mine, core.Str
ing onBehalfOfContentOwner, core.String pageToken}) { | 372 core.bool mine, |
| 373 core.String onBehalfOfContentOwner, |
| 374 core.String pageToken}) { |
| 385 var _url = null; | 375 var _url = null; |
| 386 var _queryParams = new core.Map(); | 376 var _queryParams = new core.Map(); |
| 387 var _uploadMedia = null; | 377 var _uploadMedia = null; |
| 388 var _uploadOptions = null; | 378 var _uploadOptions = null; |
| 389 var _downloadOptions = commons.DownloadOptions.Metadata; | 379 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 390 var _body = null; | 380 var _body = null; |
| 391 | 381 |
| 392 if (id != null) { | 382 if (id != null) { |
| 393 _queryParams["id"] = [id]; | 383 _queryParams["id"] = [id]; |
| 394 } | 384 } |
| 395 if (mine != null) { | 385 if (mine != null) { |
| 396 _queryParams["mine"] = ["${mine}"]; | 386 _queryParams["mine"] = ["${mine}"]; |
| 397 } | 387 } |
| 398 if (onBehalfOfContentOwner != null) { | 388 if (onBehalfOfContentOwner != null) { |
| 399 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 389 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 400 } | 390 } |
| 401 if (pageToken != null) { | 391 if (pageToken != null) { |
| 402 _queryParams["pageToken"] = [pageToken]; | 392 _queryParams["pageToken"] = [pageToken]; |
| 403 } | 393 } |
| 404 | 394 |
| 405 _url = 'groups'; | 395 _url = 'groups'; |
| 406 | 396 |
| 407 var _response = _requester.request(_url, | 397 var _response = _requester.request(_url, "GET", |
| 408 "GET", | 398 body: _body, |
| 409 body: _body, | 399 queryParams: _queryParams, |
| 410 queryParams: _queryParams, | 400 uploadOptions: _uploadOptions, |
| 411 uploadOptions: _uploadOptions, | 401 uploadMedia: _uploadMedia, |
| 412 uploadMedia: _uploadMedia, | 402 downloadOptions: _downloadOptions); |
| 413 downloadOptions: _downloadOptions); | |
| 414 return _response.then((data) => new GroupListResponse.fromJson(data)); | 403 return _response.then((data) => new GroupListResponse.fromJson(data)); |
| 415 } | 404 } |
| 416 | 405 |
| 417 /** | 406 /// Modifies a group. For example, you could change a group's title. |
| 418 * Modifies a group. For example, you could change a group's title. | 407 /// |
| 419 * | 408 /// [request] - The metadata request object. |
| 420 * [request] - The metadata request object. | 409 /// |
| 421 * | 410 /// Request parameters: |
| 422 * Request parameters: | 411 /// |
| 423 * | 412 /// [onBehalfOfContentOwner] - Note: This parameter is intended exclusively |
| 424 * [onBehalfOfContentOwner] - Note: This parameter is intended exclusively for | 413 /// for YouTube content partners. |
| 425 * YouTube content partners. | 414 /// |
| 426 * | 415 /// The onBehalfOfContentOwner parameter indicates that the request's |
| 427 * The onBehalfOfContentOwner parameter indicates that the request's | 416 /// authorization credentials identify a YouTube CMS user who is acting on |
| 428 * authorization credentials identify a YouTube CMS user who is acting on | 417 /// behalf of the content owner specified in the parameter value. This |
| 429 * behalf of the content owner specified in the parameter value. This | 418 /// parameter is intended for YouTube content partners that own and manage |
| 430 * parameter is intended for YouTube content partners that own and manage many | 419 /// many different YouTube channels. It allows content owners to authenticate |
| 431 * different YouTube channels. It allows content owners to authenticate once | 420 /// once and get access to all their video and channel data, without having |
| 432 * and get access to all their video and channel data, without having to | 421 /// to provide authentication credentials for each individual channel. The |
| 433 * provide authentication credentials for each individual channel. The CMS | 422 /// CMS account that the user authenticates with must be linked to the |
| 434 * account that the user authenticates with must be linked to the specified | 423 /// specified YouTube content owner. |
| 435 * YouTube content owner. | 424 /// |
| 436 * | 425 /// Completes with a [Group]. |
| 437 * Completes with a [Group]. | 426 /// |
| 438 * | 427 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 439 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 428 /// an error. |
| 440 * error. | 429 /// |
| 441 * | 430 /// If the used [http.Client] completes with an error when making a REST |
| 442 * If the used [http.Client] completes with an error when making a REST call, | 431 /// call, this method will complete with the same error. |
| 443 * this method will complete with the same error. | 432 async.Future<Group> update(Group request, |
| 444 */ | 433 {core.String onBehalfOfContentOwner}) { |
| 445 async.Future<Group> update(Group request, {core.String onBehalfOfContentOwner}
) { | |
| 446 var _url = null; | 434 var _url = null; |
| 447 var _queryParams = new core.Map(); | 435 var _queryParams = new core.Map(); |
| 448 var _uploadMedia = null; | 436 var _uploadMedia = null; |
| 449 var _uploadOptions = null; | 437 var _uploadOptions = null; |
| 450 var _downloadOptions = commons.DownloadOptions.Metadata; | 438 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 451 var _body = null; | 439 var _body = null; |
| 452 | 440 |
| 453 if (request != null) { | 441 if (request != null) { |
| 454 _body = convert.JSON.encode((request).toJson()); | 442 _body = convert.JSON.encode((request).toJson()); |
| 455 } | 443 } |
| 456 if (onBehalfOfContentOwner != null) { | 444 if (onBehalfOfContentOwner != null) { |
| 457 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; | 445 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner]; |
| 458 } | 446 } |
| 459 | 447 |
| 460 _url = 'groups'; | 448 _url = 'groups'; |
| 461 | 449 |
| 462 var _response = _requester.request(_url, | 450 var _response = _requester.request(_url, "PUT", |
| 463 "PUT", | 451 body: _body, |
| 464 body: _body, | 452 queryParams: _queryParams, |
| 465 queryParams: _queryParams, | 453 uploadOptions: _uploadOptions, |
| 466 uploadOptions: _uploadOptions, | 454 uploadMedia: _uploadMedia, |
| 467 uploadMedia: _uploadMedia, | 455 downloadOptions: _downloadOptions); |
| 468 downloadOptions: _downloadOptions); | |
| 469 return _response.then((data) => new Group.fromJson(data)); | 456 return _response.then((data) => new Group.fromJson(data)); |
| 470 } | 457 } |
| 471 | |
| 472 } | 458 } |
| 473 | 459 |
| 474 | |
| 475 class ReportsResourceApi { | 460 class ReportsResourceApi { |
| 476 final commons.ApiRequester _requester; | 461 final commons.ApiRequester _requester; |
| 477 | 462 |
| 478 ReportsResourceApi(commons.ApiRequester client) : | 463 ReportsResourceApi(commons.ApiRequester client) : _requester = client; |
| 479 _requester = client; | |
| 480 | 464 |
| 481 /** | 465 /// Retrieve your YouTube Analytics reports. |
| 482 * Retrieve your YouTube Analytics reports. | 466 /// |
| 483 * | 467 /// Request parameters: |
| 484 * Request parameters: | 468 /// |
| 485 * | 469 /// [ids] - Identifies the YouTube channel or content owner for which you are |
| 486 * [ids] - Identifies the YouTube channel or content owner for which you are | 470 /// retrieving YouTube Analytics data. |
| 487 * retrieving YouTube Analytics data. | 471 /// - To request data for a YouTube user, set the ids parameter value to |
| 488 * - To request data for a YouTube user, set the ids parameter value to | 472 /// channel==CHANNEL_ID, where CHANNEL_ID specifies the unique YouTube |
| 489 * channel==CHANNEL_ID, where CHANNEL_ID specifies the unique YouTube channel | 473 /// channel ID. |
| 490 * ID. | 474 /// - To request data for a YouTube CMS content owner, set the ids parameter |
| 491 * - To request data for a YouTube CMS content owner, set the ids parameter | 475 /// value to contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of |
| 492 * value to contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of the | 476 /// the content owner. |
| 493 * content owner. | 477 /// Value must have pattern "[a-zA-Z]+==[a-zA-Z0-9_+-]+". |
| 494 * Value must have pattern "[a-zA-Z]+==[a-zA-Z0-9_+-]+". | 478 /// |
| 495 * | 479 /// [start_date] - The start date for fetching YouTube Analytics data. The |
| 496 * [start_date] - The start date for fetching YouTube Analytics data. The | 480 /// value should be in YYYY-MM-DD format. |
| 497 * value should be in YYYY-MM-DD format. | 481 /// Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 498 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". | 482 /// |
| 499 * | 483 /// [end_date] - The end date for fetching YouTube Analytics data. The value |
| 500 * [end_date] - The end date for fetching YouTube Analytics data. The value | 484 /// should be in YYYY-MM-DD format. |
| 501 * should be in YYYY-MM-DD format. | 485 /// Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". |
| 502 * Value must have pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". | 486 /// |
| 503 * | 487 /// [metrics] - A comma-separated list of YouTube Analytics metrics, such as |
| 504 * [metrics] - A comma-separated list of YouTube Analytics metrics, such as | 488 /// views or likes,dislikes. See the Available Reports document for a list of |
| 505 * views or likes,dislikes. See the Available Reports document for a list of | 489 /// the reports that you can retrieve and the metrics available in each |
| 506 * the reports that you can retrieve and the metrics available in each report, | 490 /// report, and see the Metrics document for definitions of those metrics. |
| 507 * and see the Metrics document for definitions of those metrics. | 491 /// Value must have pattern "[0-9a-zA-Z,]+". |
| 508 * Value must have pattern "[0-9a-zA-Z,]+". | 492 /// |
| 509 * | 493 /// [currency] - The currency to which financial metrics should be converted. |
| 510 * [currency] - The currency to which financial metrics should be converted. | 494 /// The default is US Dollar (USD). If the result contains no financial |
| 511 * The default is US Dollar (USD). If the result contains no financial | 495 /// metrics, this flag will be ignored. Responds with an error if the |
| 512 * metrics, this flag will be ignored. Responds with an error if the specified | 496 /// specified currency is not recognized. |
| 513 * currency is not recognized. | 497 /// Value must have pattern "[A-Z]{3}". |
| 514 * Value must have pattern "[A-Z]{3}". | 498 /// |
| 515 * | 499 /// [dimensions] - A comma-separated list of YouTube Analytics dimensions, |
| 516 * [dimensions] - A comma-separated list of YouTube Analytics dimensions, such | 500 /// such as views or ageGroup,gender. See the Available Reports document for |
| 517 * as views or ageGroup,gender. See the Available Reports document for a list | 501 /// a list of the reports that you can retrieve and the dimensions used for |
| 518 * of the reports that you can retrieve and the dimensions used for those | 502 /// those reports. Also see the Dimensions document for definitions of those |
| 519 * reports. Also see the Dimensions document for definitions of those | 503 /// dimensions. |
| 520 * dimensions. | 504 /// Value must have pattern "[0-9a-zA-Z,]+". |
| 521 * Value must have pattern "[0-9a-zA-Z,]+". | 505 /// |
| 522 * | 506 /// [filters] - A list of filters that should be applied when retrieving |
| 523 * [filters] - A list of filters that should be applied when retrieving | 507 /// YouTube Analytics data. The Available Reports document identifies the |
| 524 * YouTube Analytics data. The Available Reports document identifies the | 508 /// dimensions that can be used to filter each report, and the Dimensions |
| 525 * dimensions that can be used to filter each report, and the Dimensions | 509 /// document defines those dimensions. If a request uses multiple filters, |
| 526 * document defines those dimensions. If a request uses multiple filters, join | 510 /// join them together with a semicolon (;), and the returned result table |
| 527 * them together with a semicolon (;), and the returned result table will | 511 /// will satisfy both filters. For example, a filters parameter value of |
| 528 * satisfy both filters. For example, a filters parameter value of | 512 /// video==dMH0bHeiRNg;country==IT restricts the result set to include data |
| 529 * video==dMH0bHeiRNg;country==IT restricts the result set to include data for | 513 /// for the given video in Italy. |
| 530 * the given video in Italy. | 514 /// |
| 531 * | 515 /// [include_historical_channel_data] - If set to true historical data (i.e. |
| 532 * [include_historical_channel_data] - If set to true historical data (i.e. | 516 /// channel data from before the linking of the channel to the content owner) |
| 533 * channel data from before the linking of the channel to the content owner) | 517 /// will be retrieved. |
| 534 * will be retrieved. | 518 /// |
| 535 * | 519 /// [max_results] - The maximum number of rows to include in the response. |
| 536 * [max_results] - The maximum number of rows to include in the response. | 520 /// |
| 537 * | 521 /// [sort] - A comma-separated list of dimensions or metrics that determine |
| 538 * [sort] - A comma-separated list of dimensions or metrics that determine the | 522 /// the sort order for YouTube Analytics data. By default the sort order is |
| 539 * sort order for YouTube Analytics data. By default the sort order is | 523 /// ascending. The '-' prefix causes descending sort order. |
| 540 * ascending. The '-' prefix causes descending sort order. | 524 /// Value must have pattern "[-0-9a-zA-Z,]+". |
| 541 * Value must have pattern "[-0-9a-zA-Z,]+". | 525 /// |
| 542 * | 526 /// [start_index] - An index of the first entity to retrieve. Use this |
| 543 * [start_index] - An index of the first entity to retrieve. Use this | 527 /// parameter as a pagination mechanism along with the max-results parameter |
| 544 * parameter as a pagination mechanism along with the max-results parameter | 528 /// (one-based, inclusive). |
| 545 * (one-based, inclusive). | 529 /// |
| 546 * | 530 /// Completes with a [ResultTable]. |
| 547 * Completes with a [ResultTable]. | 531 /// |
| 548 * | 532 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 549 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 533 /// an error. |
| 550 * error. | 534 /// |
| 551 * | 535 /// If the used [http.Client] completes with an error when making a REST |
| 552 * If the used [http.Client] completes with an error when making a REST call, | 536 /// call, this method will complete with the same error. |
| 553 * this method will complete with the same error. | 537 async.Future<ResultTable> query(core.String ids, core.String start_date, |
| 554 */ | 538 core.String end_date, core.String metrics, |
| 555 async.Future<ResultTable> query(core.String ids, core.String start_date, core.
String end_date, core.String metrics, {core.String currency, core.String dimensi
ons, core.String filters, core.bool include_historical_channel_data, core.int ma
x_results, core.String sort, core.int start_index}) { | 539 {core.String currency, |
| 540 core.String dimensions, |
| 541 core.String filters, |
| 542 core.bool include_historical_channel_data, |
| 543 core.int max_results, |
| 544 core.String sort, |
| 545 core.int start_index}) { |
| 556 var _url = null; | 546 var _url = null; |
| 557 var _queryParams = new core.Map(); | 547 var _queryParams = new core.Map(); |
| 558 var _uploadMedia = null; | 548 var _uploadMedia = null; |
| 559 var _uploadOptions = null; | 549 var _uploadOptions = null; |
| 560 var _downloadOptions = commons.DownloadOptions.Metadata; | 550 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 561 var _body = null; | 551 var _body = null; |
| 562 | 552 |
| 563 if (ids == null) { | 553 if (ids == null) { |
| 564 throw new core.ArgumentError("Parameter ids is required."); | 554 throw new core.ArgumentError("Parameter ids is required."); |
| 565 } | 555 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 579 if (currency != null) { | 569 if (currency != null) { |
| 580 _queryParams["currency"] = [currency]; | 570 _queryParams["currency"] = [currency]; |
| 581 } | 571 } |
| 582 if (dimensions != null) { | 572 if (dimensions != null) { |
| 583 _queryParams["dimensions"] = [dimensions]; | 573 _queryParams["dimensions"] = [dimensions]; |
| 584 } | 574 } |
| 585 if (filters != null) { | 575 if (filters != null) { |
| 586 _queryParams["filters"] = [filters]; | 576 _queryParams["filters"] = [filters]; |
| 587 } | 577 } |
| 588 if (include_historical_channel_data != null) { | 578 if (include_historical_channel_data != null) { |
| 589 _queryParams["include-historical-channel-data"] = ["${include_historical_c
hannel_data}"]; | 579 _queryParams["include-historical-channel-data"] = [ |
| 580 "${include_historical_channel_data}" |
| 581 ]; |
| 590 } | 582 } |
| 591 if (max_results != null) { | 583 if (max_results != null) { |
| 592 _queryParams["max-results"] = ["${max_results}"]; | 584 _queryParams["max-results"] = ["${max_results}"]; |
| 593 } | 585 } |
| 594 if (sort != null) { | 586 if (sort != null) { |
| 595 _queryParams["sort"] = [sort]; | 587 _queryParams["sort"] = [sort]; |
| 596 } | 588 } |
| 597 if (start_index != null) { | 589 if (start_index != null) { |
| 598 _queryParams["start-index"] = ["${start_index}"]; | 590 _queryParams["start-index"] = ["${start_index}"]; |
| 599 } | 591 } |
| 600 | 592 |
| 601 _url = 'reports'; | 593 _url = 'reports'; |
| 602 | 594 |
| 603 var _response = _requester.request(_url, | 595 var _response = _requester.request(_url, "GET", |
| 604 "GET", | 596 body: _body, |
| 605 body: _body, | 597 queryParams: _queryParams, |
| 606 queryParams: _queryParams, | 598 uploadOptions: _uploadOptions, |
| 607 uploadOptions: _uploadOptions, | 599 uploadMedia: _uploadMedia, |
| 608 uploadMedia: _uploadMedia, | 600 downloadOptions: _downloadOptions); |
| 609 downloadOptions: _downloadOptions); | |
| 610 return _response.then((data) => new ResultTable.fromJson(data)); | 601 return _response.then((data) => new ResultTable.fromJson(data)); |
| 611 } | 602 } |
| 612 | |
| 613 } | 603 } |
| 614 | 604 |
| 615 | |
| 616 | |
| 617 class GroupContentDetails { | 605 class GroupContentDetails { |
| 618 core.String itemCount; | 606 core.String itemCount; |
| 619 core.String itemType; | 607 core.String itemType; |
| 620 | 608 |
| 621 GroupContentDetails(); | 609 GroupContentDetails(); |
| 622 | 610 |
| 623 GroupContentDetails.fromJson(core.Map _json) { | 611 GroupContentDetails.fromJson(core.Map _json) { |
| 624 if (_json.containsKey("itemCount")) { | 612 if (_json.containsKey("itemCount")) { |
| 625 itemCount = _json["itemCount"]; | 613 itemCount = _json["itemCount"]; |
| 626 } | 614 } |
| 627 if (_json.containsKey("itemType")) { | 615 if (_json.containsKey("itemType")) { |
| 628 itemType = _json["itemType"]; | 616 itemType = _json["itemType"]; |
| 629 } | 617 } |
| 630 } | 618 } |
| 631 | 619 |
| 632 core.Map<core.String, core.Object> toJson() { | 620 core.Map<core.String, core.Object> toJson() { |
| 633 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 621 final core.Map<core.String, core.Object> _json = |
| 622 new core.Map<core.String, core.Object>(); |
| 634 if (itemCount != null) { | 623 if (itemCount != null) { |
| 635 _json["itemCount"] = itemCount; | 624 _json["itemCount"] = itemCount; |
| 636 } | 625 } |
| 637 if (itemType != null) { | 626 if (itemType != null) { |
| 638 _json["itemType"] = itemType; | 627 _json["itemType"] = itemType; |
| 639 } | 628 } |
| 640 return _json; | 629 return _json; |
| 641 } | 630 } |
| 642 } | 631 } |
| 643 | 632 |
| 644 class GroupSnippet { | 633 class GroupSnippet { |
| 645 core.DateTime publishedAt; | 634 core.DateTime publishedAt; |
| 646 core.String title; | 635 core.String title; |
| 647 | 636 |
| 648 GroupSnippet(); | 637 GroupSnippet(); |
| 649 | 638 |
| 650 GroupSnippet.fromJson(core.Map _json) { | 639 GroupSnippet.fromJson(core.Map _json) { |
| 651 if (_json.containsKey("publishedAt")) { | 640 if (_json.containsKey("publishedAt")) { |
| 652 publishedAt = core.DateTime.parse(_json["publishedAt"]); | 641 publishedAt = core.DateTime.parse(_json["publishedAt"]); |
| 653 } | 642 } |
| 654 if (_json.containsKey("title")) { | 643 if (_json.containsKey("title")) { |
| 655 title = _json["title"]; | 644 title = _json["title"]; |
| 656 } | 645 } |
| 657 } | 646 } |
| 658 | 647 |
| 659 core.Map<core.String, core.Object> toJson() { | 648 core.Map<core.String, core.Object> toJson() { |
| 660 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 649 final core.Map<core.String, core.Object> _json = |
| 650 new core.Map<core.String, core.Object>(); |
| 661 if (publishedAt != null) { | 651 if (publishedAt != null) { |
| 662 _json["publishedAt"] = (publishedAt).toIso8601String(); | 652 _json["publishedAt"] = (publishedAt).toIso8601String(); |
| 663 } | 653 } |
| 664 if (title != null) { | 654 if (title != null) { |
| 665 _json["title"] = title; | 655 _json["title"] = title; |
| 666 } | 656 } |
| 667 return _json; | 657 return _json; |
| 668 } | 658 } |
| 669 } | 659 } |
| 670 | 660 |
| 671 class Group { | 661 class Group { |
| 672 GroupContentDetails contentDetails; | 662 GroupContentDetails contentDetails; |
| 673 core.String etag; | 663 core.String etag; |
| 674 core.String id; | 664 core.String id; |
| 675 core.String kind; | 665 core.String kind; |
| 676 GroupSnippet snippet; | 666 GroupSnippet snippet; |
| 677 | 667 |
| 678 Group(); | 668 Group(); |
| 679 | 669 |
| 680 Group.fromJson(core.Map _json) { | 670 Group.fromJson(core.Map _json) { |
| 681 if (_json.containsKey("contentDetails")) { | 671 if (_json.containsKey("contentDetails")) { |
| 682 contentDetails = new GroupContentDetails.fromJson(_json["contentDetails"])
; | 672 contentDetails = |
| 673 new GroupContentDetails.fromJson(_json["contentDetails"]); |
| 683 } | 674 } |
| 684 if (_json.containsKey("etag")) { | 675 if (_json.containsKey("etag")) { |
| 685 etag = _json["etag"]; | 676 etag = _json["etag"]; |
| 686 } | 677 } |
| 687 if (_json.containsKey("id")) { | 678 if (_json.containsKey("id")) { |
| 688 id = _json["id"]; | 679 id = _json["id"]; |
| 689 } | 680 } |
| 690 if (_json.containsKey("kind")) { | 681 if (_json.containsKey("kind")) { |
| 691 kind = _json["kind"]; | 682 kind = _json["kind"]; |
| 692 } | 683 } |
| 693 if (_json.containsKey("snippet")) { | 684 if (_json.containsKey("snippet")) { |
| 694 snippet = new GroupSnippet.fromJson(_json["snippet"]); | 685 snippet = new GroupSnippet.fromJson(_json["snippet"]); |
| 695 } | 686 } |
| 696 } | 687 } |
| 697 | 688 |
| 698 core.Map<core.String, core.Object> toJson() { | 689 core.Map<core.String, core.Object> toJson() { |
| 699 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 690 final core.Map<core.String, core.Object> _json = |
| 691 new core.Map<core.String, core.Object>(); |
| 700 if (contentDetails != null) { | 692 if (contentDetails != null) { |
| 701 _json["contentDetails"] = (contentDetails).toJson(); | 693 _json["contentDetails"] = (contentDetails).toJson(); |
| 702 } | 694 } |
| 703 if (etag != null) { | 695 if (etag != null) { |
| 704 _json["etag"] = etag; | 696 _json["etag"] = etag; |
| 705 } | 697 } |
| 706 if (id != null) { | 698 if (id != null) { |
| 707 _json["id"] = id; | 699 _json["id"] = id; |
| 708 } | 700 } |
| 709 if (kind != null) { | 701 if (kind != null) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 725 GroupItemResource.fromJson(core.Map _json) { | 717 GroupItemResource.fromJson(core.Map _json) { |
| 726 if (_json.containsKey("id")) { | 718 if (_json.containsKey("id")) { |
| 727 id = _json["id"]; | 719 id = _json["id"]; |
| 728 } | 720 } |
| 729 if (_json.containsKey("kind")) { | 721 if (_json.containsKey("kind")) { |
| 730 kind = _json["kind"]; | 722 kind = _json["kind"]; |
| 731 } | 723 } |
| 732 } | 724 } |
| 733 | 725 |
| 734 core.Map<core.String, core.Object> toJson() { | 726 core.Map<core.String, core.Object> toJson() { |
| 735 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 727 final core.Map<core.String, core.Object> _json = |
| 728 new core.Map<core.String, core.Object>(); |
| 736 if (id != null) { | 729 if (id != null) { |
| 737 _json["id"] = id; | 730 _json["id"] = id; |
| 738 } | 731 } |
| 739 if (kind != null) { | 732 if (kind != null) { |
| 740 _json["kind"] = kind; | 733 _json["kind"] = kind; |
| 741 } | 734 } |
| 742 return _json; | 735 return _json; |
| 743 } | 736 } |
| 744 } | 737 } |
| 745 | 738 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 764 } | 757 } |
| 765 if (_json.containsKey("kind")) { | 758 if (_json.containsKey("kind")) { |
| 766 kind = _json["kind"]; | 759 kind = _json["kind"]; |
| 767 } | 760 } |
| 768 if (_json.containsKey("resource")) { | 761 if (_json.containsKey("resource")) { |
| 769 resource = new GroupItemResource.fromJson(_json["resource"]); | 762 resource = new GroupItemResource.fromJson(_json["resource"]); |
| 770 } | 763 } |
| 771 } | 764 } |
| 772 | 765 |
| 773 core.Map<core.String, core.Object> toJson() { | 766 core.Map<core.String, core.Object> toJson() { |
| 774 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 767 final core.Map<core.String, core.Object> _json = |
| 768 new core.Map<core.String, core.Object>(); |
| 775 if (etag != null) { | 769 if (etag != null) { |
| 776 _json["etag"] = etag; | 770 _json["etag"] = etag; |
| 777 } | 771 } |
| 778 if (groupId != null) { | 772 if (groupId != null) { |
| 779 _json["groupId"] = groupId; | 773 _json["groupId"] = groupId; |
| 780 } | 774 } |
| 781 if (id != null) { | 775 if (id != null) { |
| 782 _json["id"] = id; | 776 _json["id"] = id; |
| 783 } | 777 } |
| 784 if (kind != null) { | 778 if (kind != null) { |
| 785 _json["kind"] = kind; | 779 _json["kind"] = kind; |
| 786 } | 780 } |
| 787 if (resource != null) { | 781 if (resource != null) { |
| 788 _json["resource"] = (resource).toJson(); | 782 _json["resource"] = (resource).toJson(); |
| 789 } | 783 } |
| 790 return _json; | 784 return _json; |
| 791 } | 785 } |
| 792 } | 786 } |
| 793 | 787 |
| 794 /** | 788 /// A paginated list of grouList resources returned in response to a |
| 795 * A paginated list of grouList resources returned in response to a | 789 /// youtubeAnalytics.groupApi.list request. |
| 796 * youtubeAnalytics.groupApi.list request. | |
| 797 */ | |
| 798 class GroupItemListResponse { | 790 class GroupItemListResponse { |
| 799 core.String etag; | 791 core.String etag; |
| 800 core.List<GroupItem> items; | 792 core.List<GroupItem> items; |
| 801 core.String kind; | 793 core.String kind; |
| 802 | 794 |
| 803 GroupItemListResponse(); | 795 GroupItemListResponse(); |
| 804 | 796 |
| 805 GroupItemListResponse.fromJson(core.Map _json) { | 797 GroupItemListResponse.fromJson(core.Map _json) { |
| 806 if (_json.containsKey("etag")) { | 798 if (_json.containsKey("etag")) { |
| 807 etag = _json["etag"]; | 799 etag = _json["etag"]; |
| 808 } | 800 } |
| 809 if (_json.containsKey("items")) { | 801 if (_json.containsKey("items")) { |
| 810 items = _json["items"].map((value) => new GroupItem.fromJson(value)).toLis
t(); | 802 items = |
| 803 _json["items"].map((value) => new GroupItem.fromJson(value)).toList(); |
| 811 } | 804 } |
| 812 if (_json.containsKey("kind")) { | 805 if (_json.containsKey("kind")) { |
| 813 kind = _json["kind"]; | 806 kind = _json["kind"]; |
| 814 } | 807 } |
| 815 } | 808 } |
| 816 | 809 |
| 817 core.Map<core.String, core.Object> toJson() { | 810 core.Map<core.String, core.Object> toJson() { |
| 818 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 811 final core.Map<core.String, core.Object> _json = |
| 812 new core.Map<core.String, core.Object>(); |
| 819 if (etag != null) { | 813 if (etag != null) { |
| 820 _json["etag"] = etag; | 814 _json["etag"] = etag; |
| 821 } | 815 } |
| 822 if (items != null) { | 816 if (items != null) { |
| 823 _json["items"] = items.map((value) => (value).toJson()).toList(); | 817 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 824 } | 818 } |
| 825 if (kind != null) { | 819 if (kind != null) { |
| 826 _json["kind"] = kind; | 820 _json["kind"] = kind; |
| 827 } | 821 } |
| 828 return _json; | 822 return _json; |
| 829 } | 823 } |
| 830 } | 824 } |
| 831 | 825 |
| 832 /** | 826 /// A paginated list of grouList resources returned in response to a |
| 833 * A paginated list of grouList resources returned in response to a | 827 /// youtubeAnalytics.groupApi.list request. |
| 834 * youtubeAnalytics.groupApi.list request. | |
| 835 */ | |
| 836 class GroupListResponse { | 828 class GroupListResponse { |
| 837 core.String etag; | 829 core.String etag; |
| 838 core.List<Group> items; | 830 core.List<Group> items; |
| 839 core.String kind; | 831 core.String kind; |
| 840 core.String nextPageToken; | 832 core.String nextPageToken; |
| 841 | 833 |
| 842 GroupListResponse(); | 834 GroupListResponse(); |
| 843 | 835 |
| 844 GroupListResponse.fromJson(core.Map _json) { | 836 GroupListResponse.fromJson(core.Map _json) { |
| 845 if (_json.containsKey("etag")) { | 837 if (_json.containsKey("etag")) { |
| 846 etag = _json["etag"]; | 838 etag = _json["etag"]; |
| 847 } | 839 } |
| 848 if (_json.containsKey("items")) { | 840 if (_json.containsKey("items")) { |
| 849 items = _json["items"].map((value) => new Group.fromJson(value)).toList(); | 841 items = _json["items"].map((value) => new Group.fromJson(value)).toList(); |
| 850 } | 842 } |
| 851 if (_json.containsKey("kind")) { | 843 if (_json.containsKey("kind")) { |
| 852 kind = _json["kind"]; | 844 kind = _json["kind"]; |
| 853 } | 845 } |
| 854 if (_json.containsKey("nextPageToken")) { | 846 if (_json.containsKey("nextPageToken")) { |
| 855 nextPageToken = _json["nextPageToken"]; | 847 nextPageToken = _json["nextPageToken"]; |
| 856 } | 848 } |
| 857 } | 849 } |
| 858 | 850 |
| 859 core.Map<core.String, core.Object> toJson() { | 851 core.Map<core.String, core.Object> toJson() { |
| 860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 852 final core.Map<core.String, core.Object> _json = |
| 853 new core.Map<core.String, core.Object>(); |
| 861 if (etag != null) { | 854 if (etag != null) { |
| 862 _json["etag"] = etag; | 855 _json["etag"] = etag; |
| 863 } | 856 } |
| 864 if (items != null) { | 857 if (items != null) { |
| 865 _json["items"] = items.map((value) => (value).toJson()).toList(); | 858 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 866 } | 859 } |
| 867 if (kind != null) { | 860 if (kind != null) { |
| 868 _json["kind"] = kind; | 861 _json["kind"] = kind; |
| 869 } | 862 } |
| 870 if (nextPageToken != null) { | 863 if (nextPageToken != null) { |
| 871 _json["nextPageToken"] = nextPageToken; | 864 _json["nextPageToken"] = nextPageToken; |
| 872 } | 865 } |
| 873 return _json; | 866 return _json; |
| 874 } | 867 } |
| 875 } | 868 } |
| 876 | 869 |
| 877 class ResultTableColumnHeaders { | 870 class ResultTableColumnHeaders { |
| 878 /** The type of the column (DIMENSION or METRIC). */ | 871 /// The type of the column (DIMENSION or METRIC). |
| 879 core.String columnType; | 872 core.String columnType; |
| 880 /** The type of the data in the column (STRING, INTEGER, FLOAT, etc.). */ | 873 |
| 874 /// The type of the data in the column (STRING, INTEGER, FLOAT, etc.). |
| 881 core.String dataType; | 875 core.String dataType; |
| 882 /** The name of the dimension or metric. */ | 876 |
| 877 /// The name of the dimension or metric. |
| 883 core.String name; | 878 core.String name; |
| 884 | 879 |
| 885 ResultTableColumnHeaders(); | 880 ResultTableColumnHeaders(); |
| 886 | 881 |
| 887 ResultTableColumnHeaders.fromJson(core.Map _json) { | 882 ResultTableColumnHeaders.fromJson(core.Map _json) { |
| 888 if (_json.containsKey("columnType")) { | 883 if (_json.containsKey("columnType")) { |
| 889 columnType = _json["columnType"]; | 884 columnType = _json["columnType"]; |
| 890 } | 885 } |
| 891 if (_json.containsKey("dataType")) { | 886 if (_json.containsKey("dataType")) { |
| 892 dataType = _json["dataType"]; | 887 dataType = _json["dataType"]; |
| 893 } | 888 } |
| 894 if (_json.containsKey("name")) { | 889 if (_json.containsKey("name")) { |
| 895 name = _json["name"]; | 890 name = _json["name"]; |
| 896 } | 891 } |
| 897 } | 892 } |
| 898 | 893 |
| 899 core.Map<core.String, core.Object> toJson() { | 894 core.Map<core.String, core.Object> toJson() { |
| 900 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 895 final core.Map<core.String, core.Object> _json = |
| 896 new core.Map<core.String, core.Object>(); |
| 901 if (columnType != null) { | 897 if (columnType != null) { |
| 902 _json["columnType"] = columnType; | 898 _json["columnType"] = columnType; |
| 903 } | 899 } |
| 904 if (dataType != null) { | 900 if (dataType != null) { |
| 905 _json["dataType"] = dataType; | 901 _json["dataType"] = dataType; |
| 906 } | 902 } |
| 907 if (name != null) { | 903 if (name != null) { |
| 908 _json["name"] = name; | 904 _json["name"] = name; |
| 909 } | 905 } |
| 910 return _json; | 906 return _json; |
| 911 } | 907 } |
| 912 } | 908 } |
| 913 | 909 |
| 914 /** | 910 /// Contains a single result table. The table is returned as an array of rows |
| 915 * Contains a single result table. The table is returned as an array of rows | 911 /// that contain the values for the cells of the table. Depending on the metric |
| 916 * that contain the values for the cells of the table. Depending on the metric | 912 /// or dimension, the cell can contain a string (video ID, country code) or a |
| 917 * or dimension, the cell can contain a string (video ID, country code) or a | 913 /// number (number of views or number of likes). |
| 918 * number (number of views or number of likes). | |
| 919 */ | |
| 920 class ResultTable { | 914 class ResultTable { |
| 921 /** | 915 /// This value specifies information about the data returned in the rows |
| 922 * This value specifies information about the data returned in the rows | 916 /// fields. Each item in the columnHeaders list identifies a field returned |
| 923 * fields. Each item in the columnHeaders list identifies a field returned in | 917 /// in the rows value, which contains a list of comma-delimited data. The |
| 924 * the rows value, which contains a list of comma-delimited data. The | 918 /// columnHeaders list will begin with the dimensions specified in the API |
| 925 * columnHeaders list will begin with the dimensions specified in the API | 919 /// request, which will be followed by the metrics specified in the API |
| 926 * request, which will be followed by the metrics specified in the API | 920 /// request. The order of both dimensions and metrics will match the ordering |
| 927 * request. The order of both dimensions and metrics will match the ordering | 921 /// in the API request. For example, if the API request contains the |
| 928 * in the API request. For example, if the API request contains the parameters | 922 /// parameters dimensions=ageGroup,gender&metrics=viewerPercentage, the API |
| 929 * dimensions=ageGroup,gender&metrics=viewerPercentage, the API response will | 923 /// response will return columns in this order: |
| 930 * return columns in this order: ageGroup,gender,viewerPercentage. | 924 /// ageGroup,gender,viewerPercentage. |
| 931 */ | |
| 932 core.List<ResultTableColumnHeaders> columnHeaders; | 925 core.List<ResultTableColumnHeaders> columnHeaders; |
| 933 /** | 926 |
| 934 * This value specifies the type of data included in the API response. For the | 927 /// This value specifies the type of data included in the API response. For |
| 935 * query method, the kind property value will be youtubeAnalytics#resultTable. | 928 /// the query method, the kind property value will be |
| 936 */ | 929 /// youtubeAnalytics#resultTable. |
| 937 core.String kind; | 930 core.String kind; |
| 938 /** | 931 |
| 939 * The list contains all rows of the result table. Each item in the list is an | 932 /// The list contains all rows of the result table. Each item in the list is |
| 940 * array that contains comma-delimited data corresponding to a single row of | 933 /// an array that contains comma-delimited data corresponding to a single row |
| 941 * data. The order of the comma-delimited data fields will match the order of | 934 /// of data. The order of the comma-delimited data fields will match the |
| 942 * the columns listed in the columnHeaders field. If no data is available for | 935 /// order of the columns listed in the columnHeaders field. If no data is |
| 943 * the given query, the rows element will be omitted from the response. The | 936 /// available for the given query, the rows element will be omitted from the |
| 944 * response for a query with the day dimension will not contain rows for the | 937 /// response. The response for a query with the day dimension will not |
| 945 * most recent days. | 938 /// contain rows for the most recent days. |
| 946 * | 939 /// |
| 947 * The values for Object must be JSON objects. It can consist of `num`, | 940 /// The values for Object must be JSON objects. It can consist of `num`, |
| 948 * `String`, `bool` and `null` as well as `Map` and `List` values. | 941 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 949 */ | |
| 950 core.List<core.List<core.Object>> rows; | 942 core.List<core.List<core.Object>> rows; |
| 951 | 943 |
| 952 ResultTable(); | 944 ResultTable(); |
| 953 | 945 |
| 954 ResultTable.fromJson(core.Map _json) { | 946 ResultTable.fromJson(core.Map _json) { |
| 955 if (_json.containsKey("columnHeaders")) { | 947 if (_json.containsKey("columnHeaders")) { |
| 956 columnHeaders = _json["columnHeaders"].map((value) => new ResultTableColum
nHeaders.fromJson(value)).toList(); | 948 columnHeaders = _json["columnHeaders"] |
| 949 .map((value) => new ResultTableColumnHeaders.fromJson(value)) |
| 950 .toList(); |
| 957 } | 951 } |
| 958 if (_json.containsKey("kind")) { | 952 if (_json.containsKey("kind")) { |
| 959 kind = _json["kind"]; | 953 kind = _json["kind"]; |
| 960 } | 954 } |
| 961 if (_json.containsKey("rows")) { | 955 if (_json.containsKey("rows")) { |
| 962 rows = _json["rows"]; | 956 rows = _json["rows"]; |
| 963 } | 957 } |
| 964 } | 958 } |
| 965 | 959 |
| 966 core.Map<core.String, core.Object> toJson() { | 960 core.Map<core.String, core.Object> toJson() { |
| 967 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 961 final core.Map<core.String, core.Object> _json = |
| 962 new core.Map<core.String, core.Object>(); |
| 968 if (columnHeaders != null) { | 963 if (columnHeaders != null) { |
| 969 _json["columnHeaders"] = columnHeaders.map((value) => (value).toJson()).to
List(); | 964 _json["columnHeaders"] = |
| 965 columnHeaders.map((value) => (value).toJson()).toList(); |
| 970 } | 966 } |
| 971 if (kind != null) { | 967 if (kind != null) { |
| 972 _json["kind"] = kind; | 968 _json["kind"] = kind; |
| 973 } | 969 } |
| 974 if (rows != null) { | 970 if (rows != null) { |
| 975 _json["rows"] = rows; | 971 _json["rows"] = rows; |
| 976 } | 972 } |
| 977 return _json; | 973 return _json; |
| 978 } | 974 } |
| 979 } | 975 } |
| OLD | NEW |