Skip to content

Commit 89d826c

Browse files
committed
Adding support for AdWords v201509.
1 parent 97743df commit 89d826c

File tree

134 files changed

+8040
-83
lines changed

Some content is hidden

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

134 files changed

+8040
-83
lines changed

ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
3.8.0 - 10/7/2015
2+
* Added support for AdWords v201509.
3+
* Replaced references to MCC accounts with AdWords manager accounts.
4+
* Added upload_media_bundle as a new misc example for AdWords v201509.
5+
* Added add_html5_ad as a new advanced_operations example for AdWords v201509.
6+
* Added add_crm_based_user_list as a new remarketing example for AdWords
7+
v201509.
8+
9+
3.7.1 - 9/4/2015
10+
* Fixed issue #68.
11+
* Updated the get_keywords AdWords sample.
12+
113
3.7.0 - 8/20/2015
214
* Update ServiceAccount constructor to open p12 file in binary mode.
315
* Added support for v201508 for the Doubleclick for Publishers Client Library.

examples/adwords/adwords_appengine_demo/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ to build and host web applications.
1111
In order for the web application to communicate with AdWords API, we will use
1212
the [Google Ads Python Client Library](https://github.com/googleads/googleads-python-lib).
1313

14-
In this demo, a user signs in and provides their MCC Client Customer Id and
14+
In this demo, a user signs in and provides their AdWords manager account id and
1515
other credentials that are used to access the AdWords API and provide the
1616
following functionality:
1717

examples/adwords/adwords_appengine_demo/handlers/api_handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ class APIHandler(object):
3131
# The user-agent sent in requests from this demo.
3232
_USER_AGENT = 'AppEngine Googleads Demo v%s' % VERSION
3333

34-
def __init__(self, client_id, client_secret, refresh_token, mcc_cid,
35-
dev_token):
34+
def __init__(self, client_id, client_secret, refresh_token,
35+
manager_account_id, dev_token):
3636
"""Initializes an APIHandler.
3737
3838
Args:
3939
client_id: The client customer id retrieved from the Developers Console.
4040
client_secret: The client secret retrieved from the Developers Console.
4141
refresh_token: The refresh token retrieved with generate_refresh_token.py.
42-
mcc_cid: The AdWords MCC Account Client Customer Id.
42+
manager_account_id: The AdWords manager account Id.
4343
dev_token: The AdWords Developer Token.
4444
"""
4545
credentials = GoogleRefreshTokenClient(client_id, client_secret,
4646
refresh_token)
4747
self.client = AdWordsClient(dev_token, credentials, self._USER_AGENT,
48-
mcc_cid)
48+
manager_account_id)
4949

5050
def AddAdGroup(self, client_customer_id, campaign_id, name, status):
5151
"""Create a new ad group.
@@ -133,7 +133,7 @@ def AddCampaign(self, client_customer_id, campaign_name, ad_channel_type,
133133
campaign_service.mutate(operations)
134134

135135
def GetAccounts(self):
136-
"""Return the client accounts associated with the user's MCC account.
136+
"""Return the client accounts associated with the user's manager account.
137137
138138
Returns:
139139
list List of ManagedCustomer data objects.

examples/adwords/adwords_appengine_demo/handlers/ndb_handler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ def InitUser():
4242
return app_user
4343

4444

45-
def UpdateUserCredentials(client_id, client_secret, refresh_token, mcc_cid,
46-
developer_token):
45+
def UpdateUserCredentials(client_id, client_secret, refresh_token,
46+
manager_account_id, developer_token):
4747
"""Update the credentials associated with application user.
4848
4949
Args:
5050
client_id: str Client Id retrieved from the developer's console.
5151
client_secret: str Client Secret retrieved from the developer's console.
5252
refresh_token: str Refresh token generated with the above client id/secret.
53-
mcc_cid: str Customer Id for the AdWords MCC account.
53+
manager_account_id: str Customer Id for the AdWords manager account.
5454
developer_token: str Developer Token for the AdWords account.
5555
"""
5656
app_user = AppUser.query(AppUser.user == users.get_current_user()).fetch()[0]
5757

5858
app_user.client_id = client_id
5959
app_user.client_secret = client_secret
6060
app_user.refresh_token = refresh_token
61-
app_user.mcc_cid = mcc_cid
61+
app_user.manager_account_id = manager_account_id
6262
app_user.developer_token = developer_token
6363

6464
app_user.put()

examples/adwords/adwords_appengine_demo/models/app_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ class AppUser(ndb.Model):
3232
client_id = ndb.StringProperty(required=False)
3333
client_secret = ndb.StringProperty(required=False)
3434
refresh_token = ndb.StringProperty(required=False)
35-
mcc_cid = ndb.StringProperty(required=False)
35+
adwords_manager_cid = ndb.StringProperty(required=False)
3636
developer_token = ndb.StringProperty(required=False)

examples/adwords/adwords_appengine_demo/templates/show_credentials.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
value="{{ refresh_token }}"/></td>
2424
</tr>
2525
<tr>
26-
<th><label for="mcc_cid">MCC Customer Id: </label></th>
27-
<td><input type="text" name="mcc_cid" size="35"
28-
value="{{ mcc_cid }}"/></td>
26+
<th><label for="adwords_manager_cid">AdWords Manager Account Id: </label></th>
27+
<td><input type="text" name="manager_account_id" size="35"
28+
value="{{ manager_account_id }}"/></td>
2929
</tr>
3030
<tr>
3131
<th><label for="dev_token">Developer Token: </label></th>

examples/adwords/adwords_appengine_demo/views/add_adgroup_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def post(self):
4949
handler = APIHandler(app_user.client_id,
5050
app_user.client_secret,
5151
app_user.refresh_token,
52-
app_user.mcc_cid,
52+
app_user.adwords_manager_cid,
5353
app_user.developer_token)
5454

5555
# Create new ad group.

examples/adwords/adwords_appengine_demo/views/add_campaign_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def post(self):
4949
handler = APIHandler(app_user.client_id,
5050
app_user.client_secret,
5151
app_user.refresh_token,
52-
app_user.mcc_cid,
52+
app_user.adwords_manager_cid,
5353
app_user.developer_token)
5454

5555
# Create new campaign.

examples/adwords/adwords_appengine_demo/views/init_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get(self):
3232
app_user = InitUser()
3333

3434
if (app_user.client_id and app_user.client_secret and
35-
app_user.mcc_cid and app_user.developer_token and
35+
app_user.adwords_manager_cid and app_user.developer_token and
3636
app_user.refresh_token):
3737
self.redirect('/showAccounts')
3838
else:

examples/adwords/adwords_appengine_demo/views/show_accounts_view.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
"""Handles request to view accounts associated with MCC Cluent Customer Id."""
17+
"""Handles request to view accounts associated with manager account Id."""
1818

1919

2020
import os
@@ -28,7 +28,7 @@
2828

2929

3030
class ShowAccounts(webapp2.RequestHandler):
31-
"""View showing the client accounts for a given MCC Client Customer Id."""
31+
"""View showing the client accounts for a given manager account Id."""
3232

3333
def get(self):
3434
"""Handle get request."""
@@ -46,7 +46,7 @@ def get(self):
4646
handler = APIHandler(app_user.client_id,
4747
app_user.client_secret,
4848
app_user.refresh_token,
49-
app_user.mcc_cid,
49+
app_user.adwords_manager_cid,
5050
app_user.developer_token)
5151

5252
# Fetch account info for each client account and place in template.

0 commit comments

Comments
 (0)