Skip to content

Commit 9cf9c7d

Browse files
authored
Various fixes for the early April intermediary release (#416)
* Remove hasPartnersBadge() * Replace references to AdWords API docs * Remove domain name and language code from DSA example
1 parent 50a6575 commit 9cf9c7d

12 files changed

Lines changed: 17 additions & 18 deletions

File tree

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/CreateCustomer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ private void runExample(GoogleAdsClient googleAdsClient, Long managerId) {
9696
// Optional: Sets additional attributes of the customer.
9797
.setTrackingUrlTemplate("{lpurl}?device={device}")
9898
.setFinalUrlSuffix("keyword={keyword}&matchtype={matchtype}&adgroupid={adgroupid}")
99-
.setHasPartnersBadge(false)
10099
.build();
101100

102101
// Sends the request to create the customer.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddDynamicPageFeed.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
import java.util.List;
6868
import java.util.Map;
6969

70-
/** Adds a page feed with URLs for a Dynamic Search Ads Campaign. */
70+
/**
71+
* Adds a page feed with URLs for a Dynamic Search Ads Campaign.
72+
*/
7173
public class AddDynamicPageFeed {
7274

7375
private static final int PAGE_SIZE = 1_000;
@@ -412,11 +414,10 @@ private static void updateCampaignDsaSetting(
412414
private static DynamicSearchAdsSetting getDsaSetting(
413415
GoogleAdsClient googleAdsClient, long customerId, long campaignId) {
414416
// Creates the query.
415-
// You must request all DSA fields in order to update the DSA settings in the following step.
416417
String query =
417418
String.format(
418-
"SELECT campaign.id, campaign.name, campaign.dynamic_search_ads_setting.domain_name,"
419-
+ " campaign.dynamic_search_ads_setting.language_code,"
419+
"SELECT campaign.id, "
420+
+ " campaign.name, "
420421
+ " campaign.dynamic_search_ads_setting.use_supplied_urls_only "
421422
+ "FROM campaign "
422423
+ "WHERE campaign.id = '%s'",
@@ -446,8 +447,7 @@ private static DynamicSearchAdsSetting getDsaSetting(
446447
.getResults(0)
447448
.getCampaign()
448449
.hasDynamicSearchAdsSetting()) {
449-
throw new IllegalArgumentException(
450-
String.format("Campaign with ID '%s' is not a " + "DSA campaign.", campaignId));
450+
throw new IllegalArgumentException("Campaign with ID '%s' is not a DSA campaign.");
451451
}
452452

453453
// Retrieves and returns the DSA setting.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/extensions/AddAffiliateLocationExtensions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static class AddAffiliateLocationExtensionsParams extends CodeSamplePara
7575
names = ArgumentNames.CHAIN_ID,
7676
description =
7777
"The retail chain ID. See"
78-
+ " https://developers.google.com/adwords/api/docs/appendix/codes-formats#chain-idsfor"
78+
+ " https://developers.google.com/google-ads/api/reference/data/codes-formats#chain-ids"
7979
+ " a complete list of valid retail chain IDs",
8080
required = true)
8181
private long chainId;

google-ads-examples/src/main/java/com/google/ads/googleads/examples/extensions/AddGeoTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public class AddGeoTarget {
3535

3636
// A list of country codes can be referenced here:
37-
// https://developers.google.com/adwords/api/docs/appendix/geotargeting
37+
// https://developers.google.com/google-ads/api/reference/data/geotargets
3838
private static long GEO_TARGET_CONSTANT_ID = 2840L; // US
3939

4040
private static class AddGeoTargetParams extends CodeSampleParams {

google-ads-examples/src/main/java/com/google/ads/googleads/examples/extensions/AddSitelinks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private static List<String> createExtensionFeedItems(
183183

184184
// Targets this sitelink for United States only.
185185
// A list of country codes can be referenced here:
186-
// https://developers.google.com/adwords/api/docs/appendix/geotargeting
186+
// https://developers.google.com/google-ads/api/reference/data/geotargets
187187
String unitedStates = ResourceNames.geoTargetConstant(2840);
188188

189189
ExtensionFeedItem extensionFeedItem2 =

google-ads-examples/src/main/java/com/google/ads/googleads/examples/hotelads/AddHotelListingGroupTree.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private static void addLevel2Nodes(
283283
List<AdGroupCriterionOperation> operations,
284284
long percentCpcBidMicroAmount) {
285285
// The criterion ID for Japan is 2392.
286-
// See https://developers.google.com/adwords/api/docs/appendix/geotargeting for criteria ID
286+
// See https://developers.google.com/google-ads/api/reference/data/geotargets for criteria IDs
287287
// of other countries.
288288
long japanGeoTargetConstantId = 2392;
289289
ListingDimensionInfo japanDimensionInfo =

google-ads-examples/src/main/java/com/google/ads/googleads/examples/planning/AddKeywordPlan.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ private static String createKeywordPlanCampaign(
171171
.setKeywordPlanNetwork(KeywordPlanNetwork.GOOGLE_SEARCH)
172172
.setKeywordPlan(keywordPlanResource);
173173

174-
// See https://developers.google.com/adwords/api/docs/appendix/geotargeting
174+
// See https://developers.google.com/google-ads/api/reference/data/geotargets
175175
// for the list of geo target IDs.
176176
campaign.addGeoTargets(
177177
KeywordPlanGeoTarget.newBuilder()
178178
// Geo-target constant 2840 is for USA.
179179
.setGeoTargetConstant(ResourceNames.geoTargetConstant(2840))
180180
.build());
181181

182-
// See https://developers.google.com/adwords/api/docs/appendix/codes-formats#languages
182+
// See https://developers.google.com/google-ads/api/reference/data/codes-formats#languages
183183
// for the list of language criteria IDs.
184184
//
185185
// Language criteria 1000 is for English.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/planning/ForecastReach.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private void getReachCurve(
257257
* @param reachPlanServiceClient instance of Reach Plan Service client.
258258
* @param customerId the customer ID for the reach forecast.
259259
* @param locationId location ID to plan for. To find a valid location ID, either see
260-
* https://developers.google.com/adwords/api/docs/appendix/geotargeting or call
260+
* https://developers.google.com/google-ads/api/reference/data/geotargets or call
261261
* ReachPlanServiceClient.listPlannableLocations().
262262
* @param currencyCode three-character ISO 4217 currency code.
263263
* @param budgetMicros budget in currency to plan for.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/planning/GenerateKeywordIdeas.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static class GenerateKeywordIdeasParams extends CodeSampleParams {
4747
description =
4848
"Location criteria IDs. For example, specify 21167 for New York. For more information"
4949
+ " on determining this value, see: "
50-
+ " https://developers.google.com/adwords/api/docs/appendix/geotargeting.")
50+
+ " https://developers.google.com/google-ads/api/reference/data/geotargets.")
5151
private List<Long> locationIds;
5252

5353
@Parameter(

google-ads-examples/src/main/java/com/google/ads/googleads/examples/targeting/AddCampaignTargetingCriteria.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private static class AddCampaignTargetingCriteriaParams extends CodeSampleParams
6060
description =
6161
"A location criterion ID. For example, specify 21167 for New York. For more information"
6262
+ " on determining this value, see: "
63-
+ " https://developers.google.com/adwords/api/docs/appendix/geotargeting.")
63+
+ " https://developers.google.com/google-ads/api/reference/data/geotargets.")
6464
private Long locationId;
6565
}
6666

0 commit comments

Comments
 (0)