Skip to content

Commit

Permalink
Ad Manager v202311 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
msaniscalchi committed Nov 7, 2023
1 parent 4d40a9e commit 4a411a3
Show file tree
Hide file tree
Showing 204 changed files with 319 additions and 335 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
40.0.0 -- 11/03/2023
* Added support for v202311.
* Removed support for v202211.
* Removed examples for v202302.

39.0.0 -- 08/14/2023
* Added support for v202308.
* Removed support for v202208.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The googleads Python client library
# The Google Ad Manager SOAP API Python client library

This client library simplifies accessing Google's SOAP Ads APIs - such as
Ad Manager. The library provides easy ways to store your authentication and
This client library simplifies accessing the Google Ad Manager SOAP API.
The library provides easy ways to store your authentication and
create SOAP web service clients. It also contains example code to help you get
started integrating with our APIs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
def main(client, advertiser_company_id):
# Initialize appropriate service.
activity_group_service = client.GetService('ActivityGroupService',
version='v202302')
version='v202311')

# Create a short-term activity group.
short_term_activity_group = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
def main(client):
# Initialize appropriate service.
activity_group_service = client.GetService(
'ActivityGroupService', version='v202302')
'ActivityGroupService', version='v202311')
# Create a statement to select activity groups.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('status = :status')
.WithBindVariable('status', 'ACTIVE'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
def main(client):
# Initialize appropriate service.
activity_group_service = client.GetService(
'ActivityGroupService', version='v202302')
'ActivityGroupService', version='v202311')

# Create a statement to select activity groups.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of activity groups at a time, paging
# through until all activity groups have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
def main(client, activity_group_id, advertiser_company_id):
# Initialize appropriate service.
activity_group_service = client.GetService('ActivityGroupService',
version='v202302')
version='v202311')

# Create statement object to select a single activity groups by ID.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('id = :activityGroupId')
.WithBindVariable('activityGroupId', int(activity_group_id))
.Limit(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

def main(client, activity_group_id):
# Initialize appropriate service.
activity_service = client.GetService('ActivityService', version='v202302')
activity_service = client.GetService('ActivityService', version='v202311')

# Create a daily visits activity.
daily_visits_activity = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

def main(client):
# Initialize appropriate service.
activity_service = client.GetService('ActivityService', version='v202302')
activity_service = client.GetService('ActivityService', version='v202311')
# Create a statement to select activities.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('status = :status')
.WithBindVariable('status', 'ACTIVE'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def main(client):
# Initialize appropriate service.
activity_service = client.GetService('ActivityService', version='v202302')
activity_service = client.GetService('ActivityService', version='v202311')

# Create a statement to select activities.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of activities at a time, paging
# through until all activities have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

def main(client, activity_id):
# Initialize appropriate service.
activity_service = client.GetService('ActivityService', version='v202302')
activity_service = client.GetService('ActivityService', version='v202311')

# Create statement object to select one activity by ID to update.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('id = :activityId')
.WithBindVariable('activityId', int(activity_id))
.Limit(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def main(client, traffic_forecast_segment_id):
# Initialize the adjustment service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')

# Create a new forecast adjustment for New Year's Day traffic.
this_new_years = datetime.date(datetime.date.today().year, 1, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

def main(client):
# Initialize the adjustment service and the network service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
network_service = client.GetService('NetworkService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')
network_service = client.GetService('NetworkService', version='v202311')

# Get the root ad unit id to target the whole site.
current_network = network_service.getCurrentNetwork()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def main(client):
# Initialize the adjustment service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')

# Create a statement to get all forecast adjustments.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small number of forecast adjustments at a time, paging
# through until all forecast adjustments have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def main(client):
# Initialize the adjustment service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')

# Create a statement to get all traffic forecast segments.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small number of segments at a time, paging through until all
# segments have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

def main(client, traffic_forecast_segment_id):
# Initialize the adjustment service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')

# Create a statement to get forecast adjustments for a given traffic forecast
# segment id.
statement = ad_manager.StatementBuilder(version='v202302').Where(
statement = ad_manager.StatementBuilder(version='v202311').Where(
'trafficForecastSegmentId = :segmentId').WithBindVariable(
'segmentId', traffic_forecast_segment_id)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

def main(client, adjustment_id):
# Initialize the adjustment service.
adjustment_service = client.GetService('AdjustmentService', version='v202302')
adjustment_service = client.GetService('AdjustmentService', version='v202311')

# Create a statement to select a single forecast adjustment by id.
statement = (
ad_manager.StatementBuilder(
version='v202302').Where('id = :id').WithBindVariable(
version='v202311').Where('id = :id').WithBindVariable(
'id', adjustment_id))

# Get the forecast adjustment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
def main(client, custom_targeting_key_id, custom_targeting_value_id):
# Initialize appropriate services.
audience_segment_service = client.GetService(
'AudienceSegmentService', version='v202302')
network_service = client.GetService('NetworkService', version='v202302')
'AudienceSegmentService', version='v202311')
network_service = client.GetService('NetworkService', version='v202311')

# Get the root ad unit ID used to target the entire network.
root_ad_unit_id = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
def main(client):
# Initialize appropriate service.
audience_segment_service = client.GetService(
'AudienceSegmentService', version='v202302')
'AudienceSegmentService', version='v202311')

# Create a statement to select audience segments.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of audience segments at a time, paging
# through until all audience segments have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
def main(client):
# Initialize appropriate service.
audience_segment_service = client.GetService(
'AudienceSegmentService', version='v202302')
'AudienceSegmentService', version='v202311')
# Create a statement to select audience segments.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('type = :type')
.WithBindVariable('type', 'FIRST_PARTY'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
def main(client, audience_segment_id):
# Initialize appropriate service.
audience_segment_service = client.GetService(
'AudienceSegmentService', version='v202302')
'AudienceSegmentService', version='v202311')

# Create statement object to get the specified first party audience segment.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('Type = :type AND Id = :audience_segment_id')
.WithBindVariable('audience_segment_id',
int(audience_segment_id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
def main(client, audience_segment_id):
# Initialize appropriate service.
audience_segment_service = client.GetService(
'AudienceSegmentService', version='v202302')
'AudienceSegmentService', version='v202311')

# Create statement object to get the specified first party audience segment.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('Type = :type AND Id = :audience_segment_id')
.WithBindVariable('audience_segment_id',
int(audience_segment_id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
def main(client):
# Initialize appropriate service.
cdn_config_service = client.GetService('CdnConfigurationService',
version='v202302')
version='v202311')

# Create cdn config objects.
# Only LIVE_STREAM_SOURCE_CONTENT is currently supported by the API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
def main(client):
# Initialize appropriate service.
cdn_config_service = client.GetService('CdnConfigurationService',
version='v202302')
version='v202311')

# Create a statement to select cdn configurations.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small number of configs at a time, paging
# through until all have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
def main(client, cms_metadata_key_id):
# Initialize appropriate service.
cms_metadata_service = client.GetService('CmsMetadataService',
version='v202302')
version='v202311')

# Create query.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('cmsKeyId = :cmsKeyId AND status = :status')
.WithBindVariable('status', 'INACTIVE')
.WithBindVariable('cmsKeyId', int(cms_metadata_key_id)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
def main(client):
# Initialize appropriate service.
cms_metadata_service = client.GetService(
'CmsMetadataService', version='v202302')
'CmsMetadataService', version='v202311')

# Create a statement to select CmsMetadataKeys.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of keys at a time, paging
# through until all keys have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
def main(client):
# Initialize appropriate service.
cms_metadata_service = client.GetService(
'CmsMetadataService', version='v202302')
'CmsMetadataService', version='v202311')

# Create a statement to select CmsMetadataValues.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of values at a time, paging
# through until all values have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
def main(client, cms_metadata_key_name):
# Initialize appropriate service.
cms_metadata_service = client.GetService(
'CmsMetadataService', version='v202302')
'CmsMetadataService', version='v202311')

# Create a statement to select CmsMetadataValues for a particular key.
statement = (
ad_manager.StatementBuilder(version='v202302').Where(
ad_manager.StatementBuilder(version='v202311').Where(
'cmsKey = :cmsMetadataKeyName').WithBindVariable(
'cmsMetadataKeyName', cms_metadata_key_name))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

def main(client):
# Initialize appropriate service.
company_service = client.GetService('CompanyService', version='v202302')
company_service = client.GetService('CompanyService', version='v202311')

# Create company objects.
companies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

def main(client):
# Initialize appropriate service.
company_service = client.GetService('CompanyService', version='v202302')
company_service = client.GetService('CompanyService', version='v202311')
# Create a statement to select companies.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('type = :type')
.WithBindVariable('type', 'ADVERTISER'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def main(client):
# Initialize appropriate service.
company_service = client.GetService('CompanyService', version='v202302')
company_service = client.GetService('CompanyService', version='v202311')

# Create a statement to select companies.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of companies at a time, paging
# through until all companies have been retrieved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

def main(client, company_id):
# Initialize appropriate service.
company_service = client.GetService('CompanyService', version='v202302')
company_service = client.GetService('CompanyService', version='v202311')

# Create statement object to only select a single company by ID.
statement = (ad_manager.StatementBuilder(version='v202302')
statement = (ad_manager.StatementBuilder(version='v202311')
.Where('id = :id')
.WithBindVariable('id', int(company_id))
.Limit(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

def main(client, advertiser_company_id, agency_company_id):
# Initialize appropriate service.
contact_service = client.GetService('ContactService', version='v202302')
contact_service = client.GetService('ContactService', version='v202311')

# Create an advertiser contact.
advertiser_contact = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def main(client):
# Initialize appropriate service.
contact_service = client.GetService('ContactService', version='v202302')
contact_service = client.GetService('ContactService', version='v202311')

# Create a statement to select contacts.
statement = ad_manager.StatementBuilder(version='v202302')
statement = ad_manager.StatementBuilder(version='v202311')

# Retrieve a small amount of contacts at a time, paging
# through until all contacts have been retrieved.
Expand Down
Loading

0 comments on commit 4a411a3

Please sign in to comment.