Skip to content

Commit e8dea47

Browse files
committed
Removing AdWords v201502 and adding Batch Job Incremental Upload Support.
1 parent ecb39e9 commit e8dea47

File tree

110 files changed

+1224
-8859
lines changed

Some content is hidden

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

110 files changed

+1224
-8859
lines changed

ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
3.11.0 -- 11/24/2015
2+
* Removed support for AdWords v201502.
3+
* Added incremental upload support to BatchJobHelper.
4+
* Added the add_keywords_using_incremental_batch_job.py to advanced_operations
5+
examples.
6+
* Moved add_complete_campaigns_using_batch_job.py to advanced_operations.
7+
* The BatchJobHelper can now be used to parse the BatchJob response. Examples
8+
have been updated to demonstrate this.
9+
* The xmltodict library has been added as a new dependency.
10+
* Added option to set additional scopes in generate_refresh_token.py for
11+
AdWords and DFP.
12+
113
3.10.0 - 11/17/2015
214
* Removed support for DFP v201405 and v201408.
315
* Removed examples for v201411.

examples/adwords/authentication/generate_refresh_token.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"""Generates refresh token for AdWords using the Installed Application flow."""
1818

1919

20+
import argparse
2021
import sys
2122

2223
from oauth2client import client
@@ -29,13 +30,24 @@
2930
# The AdWords API OAuth 2.0 scope.
3031
SCOPE = u'https://www.googleapis.com/auth/adwords'
3132

33+
parser = argparse.ArgumentParser(description='Generates a refresh token with '
34+
'the provided credentials.')
35+
parser.add_argument('--client_id', default=CLIENT_ID,
36+
help='Client Id retrieved from the Developer\'s Console.')
37+
parser.add_argument('--client_secret', default=CLIENT_SECRET,
38+
help='Client Secret retrieved from the Developer\'s '
39+
'Console.')
40+
parser.add_argument('--additional_scopes', default=None,
41+
help='Additional scopes to apply when generating the '
42+
'refresh token. Each scope should be separated by a comma.')
3243

33-
def main():
44+
45+
def main(client_id, client_secret, scopes):
3446
"""Retrieve and display the access and refresh token."""
3547
flow = client.OAuth2WebServerFlow(
36-
client_id=CLIENT_ID,
37-
client_secret=CLIENT_SECRET,
38-
scope=[SCOPE],
48+
client_id=client_id,
49+
client_secret=client_secret,
50+
scope=scopes,
3951
user_agent='Ads Python Client Library',
4052
redirect_uri='urn:ietf:wg:oauth:2.0:oob')
4153

@@ -58,4 +70,10 @@ def main():
5870

5971

6072
if __name__ == '__main__':
61-
main()
73+
args = parser.parse_args()
74+
configured_scopes = [SCOPE]
75+
if args.client_id == CLIENT_ID or args.client_secret == CLIENT_SECRET:
76+
raise AttributeError('No client_id or client_secret specified.')
77+
if args.additional_scopes:
78+
configured_scopes.extend(args.additional_scopes.replace(' ', '').split(','))
79+
main(args.client_id, args.client_secret, configured_scopes)

examples/adwords/v201502/__init__.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/adwords/v201502/account_management/__init__.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/adwords/v201502/account_management/create_account.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

examples/adwords/v201502/account_management/get_account_changes.py

Lines changed: 0 additions & 104 deletions
This file was deleted.

examples/adwords/v201502/account_management/get_account_hierarchy.py

Lines changed: 0 additions & 94 deletions
This file was deleted.

examples/adwords/v201502/advanced_operations/__init__.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)