Google 애드워즈 API 테스트 계정으로 보고서 사용을 테스트하고 있습니다. 나는 Adgroup Performance Report를 다운로드하려면 다음 코드를 :Google 애드워즈 API 보고서 유틸리티 - 선택자 예상
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: Invalid content was found starting with element 'selector'. One of '{" https://adwords.google.com/api/adwords/cm/v201206 ":id, " https://adwords.google.com/api/adwords/cm/v201206 ":selector}' is expected.
내가 놓치고 무엇을?
고마워요! 나는 이것을 완전히 놓쳤다. 나는 2012 년을 작성했다는 것을 몰랐다. v201206을 시도했지만 같은 오류가 발생했다. 그런 다음 v201302를 사용해 보았습니다. .NET 라이브러리를 사용하여 다운로드 한 버전 (생성 된 XML을 볼 수 있음)이 효과가 있다고 생각합니다. – Rivka