I am using v2009 of adwords API with PHP5. I would like to use
BulkMutateJobService to package my operations into a single job.
According to google docs to achieve that I need to follow the steps:
1. Construct the operations I want to perform (as the standard mutate
operations).
$adgroupad1 = new AdGroupAd();
$adgroupad2 = new AdGroupAd();
2. Construct an OperationStream object and set its fields:
$operations = array(
new AdGroupAdOperation( $adgroupad1, NULL, 'ADD' ),
new AdGroupAdOperation( $adgroupad2, NULL, 'ADD' )
);
$scopingEntityId = new EntityId( 'ADGROUP_ID', 425513 );
$adStream = array (new OperationStream( $scopingEntityId,
$operations ));
3. Construct a BulkMutateRequest object and set its fields:
$part1 = new BulkMutateRequest( 0, $adStream );
$job = new BulkMutateJob();
$job->numRequestParts = 1;
$job->request = $part1;
4. Finally, construct the BulkMutateJob object and set its fields:
$jobOperation = array ( new JobOperation( $job, 'ADD' ) );
$job = $bulkMutateJobService->mutate( $jobOperation );
...
When testing the script on sandbox I got this error message:
SoapFault Object ( [message:protected] =>
[JobError.JOB_TYPE_NOT_SUPPORTED @ operation] ...
Did I forget about anything? Is it the problem with JobOperation
( $job, 'ADD' ) object type or BulkMutateJob() is not being accepted
by JobOperation() ?
Many thanks, Marcin
--
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.