I need to add 20 ipAddresses to a campaign IpBlock using Google Adwords 
API. I need to conserve my API calls and potentially improve speed, so is 
it possible to NegativeCampaignCriterion using an ipAddressArray instead of 
one ipAddress at a time. Appreciate pointers if it is possible to add an 
array of ipAddresses for exclusion. 

My current snippet:
foreach ($ipAddressExclusionsAddArray as $ipAddress) {
    $IpBlock = new IpBlock();
    $IpBlock->ipAddress = $ipAddress;
    $IpBlock->type = 'IP_BLOCK';
    $campaignCriteria = new NegativeCampaignCriterion($campaignID, null, 
$IpBlock);
    $addOperations[] = new CampaignCriterionOperation($campaignCriteria, 
'ADD');
} // each ip address

My attempt to use "new NegativeCampaignCriterion($campaignID, 
null, $ipAddressExclusionsAddArray);" without the foreach loop, resulted in 
api error. 

Similarly, is it possible to remove an array of ipAddress exclusions. 

Appreciate your time!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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
--- 
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 [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4fe3f0fe-9555-436d-ae88-9f67726324bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to