|
1 | 1 | part of youtubeanalytics_v1beta1_api; |
2 | 2 |
|
| 3 | +class BatchReportDefinitionsResource_ { |
| 4 | + |
| 5 | + final Client _client; |
| 6 | + |
| 7 | + BatchReportDefinitionsResource_(Client client) : |
| 8 | + _client = client; |
| 9 | + |
| 10 | + /** |
| 11 | + * Retrieves a list of available batch report definitions. |
| 12 | + * |
| 13 | + * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of. |
| 14 | + * |
| 15 | + * [optParams] - Additional query parameters |
| 16 | + */ |
| 17 | + async.Future<BatchReportDefinitionList> list(core.String onBehalfOfContentOwner, {core.Map optParams}) { |
| 18 | + var url = "batchReportDefinitions"; |
| 19 | + var urlParams = new core.Map(); |
| 20 | + var queryParams = new core.Map(); |
| 21 | + |
| 22 | + var paramErrors = new core.List(); |
| 23 | + if (onBehalfOfContentOwner == null) paramErrors.add("onBehalfOfContentOwner is required"); |
| 24 | + if (onBehalfOfContentOwner != null) queryParams["onBehalfOfContentOwner"] = onBehalfOfContentOwner; |
| 25 | + if (optParams != null) { |
| 26 | + optParams.forEach((key, value) { |
| 27 | + if (value != null && queryParams[key] == null) { |
| 28 | + queryParams[key] = value; |
| 29 | + } |
| 30 | + }); |
| 31 | + } |
| 32 | + |
| 33 | + if (!paramErrors.isEmpty) { |
| 34 | + throw new core.ArgumentError(paramErrors.join(" / ")); |
| 35 | + } |
| 36 | + |
| 37 | + var response; |
| 38 | + response = _client.request(url, "GET", urlParams: urlParams, queryParams: queryParams); |
| 39 | + return response |
| 40 | + .then((data) => new BatchReportDefinitionList.fromJson(data)); |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +class BatchReportsResource_ { |
| 45 | + |
| 46 | + final Client _client; |
| 47 | + |
| 48 | + BatchReportsResource_(Client client) : |
| 49 | + _client = client; |
| 50 | + |
| 51 | + /** |
| 52 | + * Retrieves a list of processed batch reports. |
| 53 | + * |
| 54 | + * [batchReportDefinitionId] - The batchReportDefinitionId parameter specifies the ID of the batch reportort definition for which you are retrieving reports. |
| 55 | + * |
| 56 | + * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of. |
| 57 | + * |
| 58 | + * [optParams] - Additional query parameters |
| 59 | + */ |
| 60 | + async.Future<BatchReportList> list(core.String batchReportDefinitionId, core.String onBehalfOfContentOwner, {core.Map optParams}) { |
| 61 | + var url = "batchReports"; |
| 62 | + var urlParams = new core.Map(); |
| 63 | + var queryParams = new core.Map(); |
| 64 | + |
| 65 | + var paramErrors = new core.List(); |
| 66 | + if (batchReportDefinitionId == null) paramErrors.add("batchReportDefinitionId is required"); |
| 67 | + if (batchReportDefinitionId != null) queryParams["batchReportDefinitionId"] = batchReportDefinitionId; |
| 68 | + if (onBehalfOfContentOwner == null) paramErrors.add("onBehalfOfContentOwner is required"); |
| 69 | + if (onBehalfOfContentOwner != null) queryParams["onBehalfOfContentOwner"] = onBehalfOfContentOwner; |
| 70 | + if (optParams != null) { |
| 71 | + optParams.forEach((key, value) { |
| 72 | + if (value != null && queryParams[key] == null) { |
| 73 | + queryParams[key] = value; |
| 74 | + } |
| 75 | + }); |
| 76 | + } |
| 77 | + |
| 78 | + if (!paramErrors.isEmpty) { |
| 79 | + throw new core.ArgumentError(paramErrors.join(" / ")); |
| 80 | + } |
| 81 | + |
| 82 | + var response; |
| 83 | + response = _client.request(url, "GET", urlParams: urlParams, queryParams: queryParams); |
| 84 | + return response |
| 85 | + .then((data) => new BatchReportList.fromJson(data)); |
| 86 | + } |
| 87 | +} |
| 88 | + |
3 | 89 | class ReportsResource_ { |
4 | 90 |
|
5 | 91 | final Client _client; |
|
0 commit comments