I noticed in the PHP library, BatchJobUtils' constructor has a 
required $uploadUrl param. *Isn't upload URL unnecessary when polling a 
batch job?*

In my case, I am using a queue system to poll the batch job.

Since I can't get the upload URL using BatchJobService->get (Doc says "This 
field is only returned when calling BatchJobService.mutate 
<https://developers.google.com/adwords/api/docs/reference/v201609/BatchJobService.html#mutate>
 with an ADD operation."),

*it means that I have to store the redundant upload URL in my database. 
Please let me know if this is true.*

Sample code for downloading batch job results:

    $batchJobUtils = new \BatchJobUtils(*$batchJob->uploadUrl->url*);
    if ($batchJob->downloadUrl !== null && $batchJob->downloadUrl->url !== 
null) {
        $xmlResponse = 
$batchJobUtils->DownloadBatchJobResults($batchJob->downloadUrl->url);

    }


Reading the Java sample code, instead of BatchJobUtils it's BatchJobHelper. 
BatchJobHelper does not have the required upload URL param.

AdWordsSession session = new 
AdWordsSession.Builder().fromFile().withOAuth2Credential(oAuth2Credential).build();

BatchJobHelper batchJobHelper = new BatchJobHelper(session);

batchJobHelper.downloadBatchJobMutateResponse(batchJob.getDownloadUrl().getUrl());

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/eff28263-b347-4d90-8712-fa8083455bc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Polling a batch... JC Lee
    • Re: Pollin... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
      • Re: Po... JC Lee
        • Re... 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum

Reply via email to