【发布时间】:2013-08-29 18:57:18
【问题描述】:
我正在使用 Google Adwords API 测试帐户测试报告使用情况。我有以下代码可以下载Adgroup Performance Report:
ReportDefinition definition = new ReportDefinition()
{
reportName = "Adgroup Report",
reportType = ReportDefinitionReportType.ADGROUP_PERFORMANCE_REPORT,
downloadFormat = DownloadFormat.CSVFOREXCEL,
dateRangeType = ReportDefinitionDateRangeType.YESTERDAY,
selector = new Selector
{
fields = new string[] { "Clicks" }
}
};
ReportUtilities utilities = new ReportUtilities(user) { ReportVersion = "v201206" };
ClientReport report = utilities.DownloadClientReport(definition, reportPath);
我收到以下错误:
Invalid ReportDefinition Xml:cvc-complex-type.2.4.a:发现以元素“选择器”开头的无效内容。应为 '{"https://adwords.google.com/api/adwords/cm/v201206":id, "https://adwords.google.com/api/adwords/cm/v201206":selector}' 之一。
我错过了什么?
【问题讨论】:
标签: .net google-ads-api