Skip to content

Commit 7465430

Browse files
author
Nicholas Chen
committed
v201602 support for DFP
1 parent c5d3f7c commit 7465430

File tree

215 files changed

+876
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+876
-329
lines changed

ChangeLog

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
3.13.0 -- 2/23/2016
2+
* Added support for DFP v201602.
3+
* Removed support for DFP v201411.
4+
* Removed examples for DFP v201502.
5+
* The library now applies a temporary patch to the suds-jurko dependency that
6+
resolves multiple issues. This patch will be removed when the suds-jurko
7+
library publicly exposes its 0.7 release. Thanks to GitHub user adiharush for
8+
suggesting the patch!
9+
* The LoadFromStorage function can now load credentials for either the
10+
installed application or service account (.p12 files only) OAuth 2.0 flows.
11+
* The googleads.yaml configuration file has been updated to reflect the changes
12+
to the LoadFromStorage function.
13+
* Resolved Issues:
14+
Issue #58: https://github.com/googleads/googleads-python-lib/issues/58
15+
Issue #62: https://github.com/googleads/googleads-python-lib/issues/62
16+
Issue #63: https://github.com/googleads/googleads-python-lib/issues/63
17+
Issue #68: https://github.com/googleads/googleads-python-lib/issues/68
18+
Issue #78: https://github.com/googleads/googleads-python-lib/issues/78
19+
120
3.12.0 -- 02/01/2016
221
* Removed DoubleClick Ad Exchange content. This API has been sunset.
322
* Added support for AdWords v201601.
@@ -11,6 +30,7 @@
1130
* The AdWords BatchJobHelper and IncrementalUploadHelper utilities now
1231
initialize URLs for v201601 and up.
1332
* The AdWords IncrementalUploadHelper is now serializable.
33+
>>>>>>> a4bf1f889e4cecee17f2e27a10d593452904cb8b
1434

1535
3.11.0 -- 11/24/2015
1636
* Removed support for AdWords v201502.

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ and DoubleClick for Publishers. The library provides easy ways to store your
66
authentication and create SOAP web service clients. It also contains example
77
code to help you get started integrating with our APIs.
88

9-
####Important Note Regarding DFP
10-
If you are using v201502 and newer in the DFP API, then performing actions on
11-
objects will fail with an 'args NULL' error due to a bug in the underlying SOAP
12-
client, more details here: https://github.com/googleads/googleads-python-lib/issues/58.
13-
14-
While the fix has been accepted and merged into the source, you will need to download
15-
the source files yourself and install them directly. The source can be located here:
16-
https://bitbucket.org/jurko/suds/downloads
17-
189
##How do I get started?
1910
####Installing the library
2011
Install or update the library from PyPI. If you're using pip, this is as easy

examples/adwords/v201506/advanced_operations/find_and_remove_criteria_from_shared_set.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def main(client, campaign_id):
106106

107107
while page['totalNumEntries'] > offset:
108108
page = shared_criterion_service.get(selector)
109-
if page['entries']:
109+
if 'entries' in page:
110110
for shared_criterion in page['entries']:
111111
if shared_criterion['criterion']['type'] == 'KEYWORD':
112112
print ('Shared negative keyword with ID %d and text "%s" was'
@@ -129,21 +129,22 @@ def main(client, campaign_id):
129129
selector['paging']['startIndex'] = offset
130130

131131
# Finally, remove the criteria.
132-
operations = [
133-
{
134-
'operator': 'REMOVE',
135-
'operand': {
136-
'criterion': {'id': criterion['criterionId']},
137-
'sharedSetId': criterion['sharedSetId']
138-
}
139-
} for criterion in criterion_ids
140-
]
141-
142-
response = shared_criterion_service.mutate(operations)
143-
if 'value' in response:
144-
for criterion in response['value']:
145-
print ('Criterion ID %d was successfully removed from shared set ID'
146-
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
132+
if criterion_ids:
133+
operations = [
134+
{
135+
'operator': 'REMOVE',
136+
'operand': {
137+
'criterion': {'id': criterion['criterionId']},
138+
'sharedSetId': criterion['sharedSetId']
139+
}
140+
} for criterion in criterion_ids
141+
]
142+
143+
response = shared_criterion_service.mutate(operations)
144+
if 'value' in response:
145+
for criterion in response['value']:
146+
print ('Criterion ID %d was successfully removed from shared set ID'
147+
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
147148
else:
148149
print 'No shared criteria were removed.'
149150

examples/adwords/v201509/advanced_operations/find_and_remove_criteria_from_shared_set.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def main(client, campaign_id):
106106

107107
while page['totalNumEntries'] > offset:
108108
page = shared_criterion_service.get(selector)
109-
if page['entries']:
109+
if 'entries' in page:
110110
for shared_criterion in page['entries']:
111111
if shared_criterion['criterion']['type'] == 'KEYWORD':
112112
print ('Shared negative keyword with ID %d and text "%s" was'
@@ -129,21 +129,22 @@ def main(client, campaign_id):
129129
selector['paging']['startIndex'] = offset
130130

131131
# Finally, remove the criteria.
132-
operations = [
133-
{
134-
'operator': 'REMOVE',
135-
'operand': {
136-
'criterion': {'id': criterion['criterionId']},
137-
'sharedSetId': criterion['sharedSetId']
138-
}
139-
} for criterion in criterion_ids
140-
]
141-
142-
response = shared_criterion_service.mutate(operations)
143-
if 'value' in response:
144-
for criterion in response['value']:
145-
print ('Criterion ID %d was successfully removed from shared set ID'
146-
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
132+
if criterion_ids:
133+
operations = [
134+
{
135+
'operator': 'REMOVE',
136+
'operand': {
137+
'criterion': {'id': criterion['criterionId']},
138+
'sharedSetId': criterion['sharedSetId']
139+
}
140+
} for criterion in criterion_ids
141+
]
142+
143+
response = shared_criterion_service.mutate(operations)
144+
if 'value' in response:
145+
for criterion in response['value']:
146+
print ('Criterion ID %d was successfully removed from shared set ID'
147+
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
147148
else:
148149
print 'No shared criteria were removed.'
149150

examples/adwords/v201601/advanced_operations/find_and_remove_criteria_from_shared_set.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def main(client, campaign_id):
106106

107107
while page['totalNumEntries'] > offset:
108108
page = shared_criterion_service.get(selector)
109-
if page['entries']:
109+
if 'entries' in page:
110110
for shared_criterion in page['entries']:
111111
if shared_criterion['criterion']['type'] == 'KEYWORD':
112112
print ('Shared negative keyword with ID %d and text "%s" was'
@@ -129,21 +129,22 @@ def main(client, campaign_id):
129129
selector['paging']['startIndex'] = offset
130130

131131
# Finally, remove the criteria.
132-
operations = [
133-
{
134-
'operator': 'REMOVE',
135-
'operand': {
136-
'criterion': {'id': criterion['criterionId']},
137-
'sharedSetId': criterion['sharedSetId']
138-
}
139-
} for criterion in criterion_ids
140-
]
141-
142-
response = shared_criterion_service.mutate(operations)
143-
if 'value' in response:
144-
for criterion in response['value']:
145-
print ('Criterion ID %d was successfully removed from shared set ID'
146-
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
132+
if criterion_ids:
133+
operations = [
134+
{
135+
'operator': 'REMOVE',
136+
'operand': {
137+
'criterion': {'id': criterion['criterionId']},
138+
'sharedSetId': criterion['sharedSetId']
139+
}
140+
} for criterion in criterion_ids
141+
]
142+
143+
response = shared_criterion_service.mutate(operations)
144+
if 'value' in response:
145+
for criterion in response['value']:
146+
print ('Criterion ID %d was successfully removed from shared set ID'
147+
'%d.' % (criterion['criterion']['id'], criterion['sharedSetId']))
147148
else:
148149
print 'No shared criteria were removed.'
149150

examples/dfp/v201502/activity_group_service/create_activity_groups.py renamed to examples/dfp/v201602/activity_group_service/create_activity_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
def main(client, advertiser_company_id):
3939
# Initialize appropriate service.
4040
activity_group_service = client.GetService('ActivityGroupService',
41-
version='v201502')
41+
version='v201602')
4242

4343
# Create a short-term activity group.
4444
short_term_activity_group = {

examples/dfp/v201502/activity_group_service/get_active_activity_groups.py renamed to examples/dfp/v201602/activity_group_service/get_active_activity_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
def main(client):
3434
# Initialize appropriate service.
3535
activity_group_service = client.GetService('ActivityGroupService',
36-
version='v201502')
36+
version='v201602')
3737

3838
# Create statement object to only select active activity groups.
3939
values = [{

examples/dfp/v201502/activity_group_service/get_all_activity_groups.py renamed to examples/dfp/v201602/activity_group_service/get_all_activity_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
def main(client):
3434
# Initialize appropriate service.
3535
activity_group_service = client.GetService('ActivityGroupService',
36-
version='v201502')
36+
version='v201602')
3737

3838
# Create a filter statement.
3939
statement = dfp.FilterStatement()

examples/dfp/v201502/activity_group_service/update_activity_groups.py renamed to examples/dfp/v201602/activity_group_service/update_activity_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
def main(client, activity_group_id, advertiser_company_id):
3838
# Initialize appropriate service.
3939
activity_group_service = client.GetService('ActivityGroupService',
40-
version='v201502')
40+
version='v201602')
4141

4242
# Create statement object to select a single activity groups by ID.
4343
values = [{

0 commit comments

Comments
 (0)