Hi Oliver,
  It's hardcoded in the 
ReportDownloader<http://code.google.com/p/google-api-ads-java/source/browse/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/utils/v201206/ReportDownloader.java#45>class.
  Using a per-version class allows us to provide typechecking on the 
ReportDefinition object (since the generated code doesn't implement a 
similar interface or superclass) as well as segregate any changes in Report 
Download protocol that may occur.  The AdHocReportDownloader implements all 
the version-agnostic stuff and really isn't intended to be used externally 
(although you could, if you really wanted to - you just need to serialize 
the ReportDefinition object to an XML string yourself).

- Kevin Winter
AdWords API Team

On Friday, August 10, 2012 8:32:11 AM UTC-4, Oliver wrote:
>
> Thanks Anash.
>
> Out of interest, if #1 uses #3 internally, where does #3 get the 
> apiVersion field needed? It's not passed to #1, and I don't see it in the 
> session either.
>
>
>
>
>
> On Friday, August 10, 2012 9:50:47 AM UTC+1, Anash P. Oommen wrote:
>>
>> Hi Oliver,
>>
>> My recommendation would be to use 1), since it internally uses 3). Also, 
>> 2) is from the old AdWords API Java library, so if you are not using the 
>> new library, then you need to use 2).
>>
>> Cheers,
>> Anash P. Oommen,
>> AdWords API Advisor.
>>
>> On Thursday, 9 August 2012 13:21:06 UTC+5:30, Oliver wrote:
>>>
>>> 1) Looking at the code examples here:
>>>
>>> http://code.google.com/p/google-api-ads-java/source/browse/#git%2Fexamples%2Fadwords_axis%2Fsrc%2Fmain%2Fjava%2Fadwords%2Faxis%2Fv201206%2Freporting
>>>
>>> Adhoc reports are downloaded by doing:
>>> ReportDownloadResponse response = new *ReportDownloader*
>>> (session).downloadReport(reportDefinition);
>>>
>>> 2) In the following set of examples for v201206:
>>> http://google-api-adwords-java.googlecode.com/svn/trunk/examples/v201206/
>>>
>>> Adhoc reports are downloaded by doing:
>>> ReportDownloadResponse response = *ReportUtils*.downloadReport(user, 
>>> reportDefinition, fos);
>>>
>>> 3) In other example code for v201206 (I can't remember where), the 
>>> reports are downloaded this way:
>>> ReportDownloadResponse response = new *AdHocReportDownloadHelper*(session, 
>>> apiVerion).downloadReport(reportDefinition);
>>>
>>>
>>> I was wondering if, going forward, which one the API team recommends us 
>>> to use? and how do they compare in terms of speed?
>>>
>>> Oliver
>>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to