Hi all I have discovered the validate_only property of the client, however
this property seems not to work as I would expect.
I am trying to change the bids for some keywords and I hoped to get a mock
response for testing purpose before going to real production mode.
However, even though I set this flag - the requests are executed on the
account:
Am I missing something?
def change_keyword_bid_value(client, kw_list, verbose = 0, mode = 'TEST'):
ad_group_criterion_service =
client.GetAdGroupCriterionService(version=API_VERSION)
all_operations = []
for kw in kw_list:
criterion_id = kw['id']
ad_group_id =kw['AdGroupId']
newbid = kw['microAmount']
operation = {
'operator': 'SET',
'operand': {
'xsi_type': 'BiddableAdGroupCriterion',
'adGroupId': str(ad_group_id),
'criterion': {
'id': str(criterion_id)
},
'biddingStrategyConfiguration': {
'bids': [
{
'xsi_type': 'CpcBid',
'bid': {
'microAmount': str(newbid)
}
}
]
}
}
}
all_operations.append(operation)
client.partial_failure = True
client.validate_only = True
valid, failures =
partial_failure_process_chunks(ad_group_criterion_service, all_operations,
time_delay=10)
if verbose>1:
for el in valid:
print el
for el in failures:
print el
return valid, failures
On Wednesday, March 26, 2014 10:47:44 AM UTC+1, Luca Fiaschi wrote:
>
> Hi all,
> I have to execute some operations with service.Mutate(operations)
> is there a generic way to get a dry run for this service (get mock
> response but do actually modify the live account)
>
> Thanks
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/d/optout.