setting network targets for campaign - python, v2009

閲覧: 10 回
最初の未読メッセージにスキップ

david

未読、
2009/12/09 7:43:152009/12/09
To: AdWords API Forum
Hi,

How do you set the NetworkTargetList in python? In particular, I want
to create a campaign which is shown only on selected placements.

I've tried a bunch of things, which don't seem to work. I would really
like to see a completed example.

ALSO: is it possible to get better documentation with EXAMPLES for
python? What appears to be lacking is a thorough description of
operands and their formats (as in this case).

Thanks!

David

david

未読、
2009/12/09 14:35:182009/12/09
To: AdWords API Forum
This does NOT work:

operations = [
{
'operator': 'SET',
'operand': {
'type': 'NetworkTargetList',
'campaignId': cid,
'targets': [
{ 'type': 'NetworkCoverageType',
'networkCoverage' : 'CONTENT_NETWORK'
},
],
}
}
]

I get an error:
...

File "/home/abc/mypython2.6/lib/python2.6/site-packages/aw_api/
zsi_toolkit/SanityCheck.py", line 1430, in ValidateOperation
targets.append(ValidateTarget(item, web_services))
File "/home/abc/mypython2.6/lib/python2.6/site-packages/aw_api/
zsi_toolkit/SanityCheck.py", line 1007, in ValidateTarget
new_target.__dict__.__setitem__('_%s' % key, data)
AttributeError: 'dictproxy' object has no attribute '__setitem__'

AdWords API Advisor

未読、
2009/12/10 9:59:372009/12/10
To: AdWords API Forum
Hi David,

A new version of the AdWords API Python client library was released
yesterday, which includes new examples including one for setting
campaign targets:

http://code.google.com/p/google-api-adwords-python-lib/source/browse/trunk/examples/v200909/set_campaign_targets.py

Best,
- Eric Koleda, AdWords API Team
全員に返信
投稿者に返信
転送
新着メール 0 件