Skip to content

Commit

Permalink
Merge pull request #567 from googleads/release-V20.1.0-b064df57c1febf…
Browse files Browse the repository at this point in the history
…0b45df

Changes for release V20.1.0.
  • Loading branch information
Raibaz authored Jun 7, 2024
2 parents 3674716 + 60792f3 commit 21487aa
Show file tree
Hide file tree
Showing 1,525 changed files with 817,129 additions and 1,205 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
20.1.0
======
- Added support for version 17.0 of the Google Ads API
- Updated code examples to remove usage of the `PageSize` parameter for `GoogleAdsService.Search`:
* GetAccountHierarchy
* GetChangeSummary
* GetAdGroupBidModifiers
* AuthenticateInAspNetWebApplication
* GetResponsiveSearchAd
* GetAllDisapprovedAds
* UpdateAudienceTargetRestriction
* AddPerformanceMaxProductListingGroupTree
* AddPerformanceMaxRetailCampaign
* AddShoppingProductListingGroupTree
- Removed the NavigateSearchResultPagesCachingTokens example as it is now obsolete


20.0.0
======
- Added support for version 16.1 of the Google Ads API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example illustrates how to create a new customer under a given manager account.
Expand Down Expand Up @@ -76,7 +76,7 @@ public static void Main(string[] args)
public void Run(GoogleAdsClient client, long managerCustomerId)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V16.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);

Customer customer = new Customer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This example gets the account hierarchy of the specified manager account. If you don't
Expand Down Expand Up @@ -70,8 +70,6 @@ public static void Main(string[] args)
options.LoginCustomerId);
}

private const int PAGE_SIZE = 1000;

/// <summary>
/// Returns a description about the code example.
/// </summary>
Expand Down Expand Up @@ -99,10 +97,10 @@ public void Run(GoogleAdsClient googleAdsClient, long? managerCustomerId = null,
}

GoogleAdsServiceClient googleAdsServiceClient =
googleAdsClient.GetService(Services.V16.GoogleAdsService);
googleAdsClient.GetService(Services.V17.GoogleAdsService);

CustomerServiceClient customerServiceClient =
googleAdsClient.GetService(Services.V16.CustomerService);
googleAdsClient.GetService(Services.V17.CustomerService);

// List of Customer IDs to handle.
List<long> seedCustomerIds = new List<long>();
Expand Down Expand Up @@ -162,8 +160,7 @@ FROM customer_client
PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> response =
googleAdsServiceClient.Search(
managerCustomerId.ToString(),
query,
pageSize: PAGE_SIZE
query
);

// Iterate over all rows in all pages to get all customer clients under the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using Google.Protobuf;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V16.Enums.ChangeEventResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V16.Enums.ResourceChangeOperationEnum.Types;
using static Google.Ads.GoogleAds.V16.Resources.ChangeEvent.Types;
using static Google.Ads.GoogleAds.V17.Enums.ChangeEventResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.ResourceChangeOperationEnum.Types;
using static Google.Ads.GoogleAds.V17.Resources.ChangeEvent.Types;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example gets the changes in an account during the last 25 days.
Expand Down Expand Up @@ -76,7 +76,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V16.GoogleAdsService);
Services.V17.GoogleAdsService);

// Construct a query to find details for recent changes in your account.
// The LIMIT clause is required for the change_event resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V16.Enums.ChangeStatusResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.ChangeStatusResourceTypeEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example gets a list of which resources have been changed in your account
Expand Down Expand Up @@ -57,11 +57,6 @@ public static void Main(string[] args)
options.CustomerId);
}

/// <summary>
/// The page size to be used by default.
/// </summary>
private const int PAGE_SIZE = 1_000;

/// <summary>
/// Returns a description about the code example.
/// </summary>
Expand All @@ -78,7 +73,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V16.GoogleAdsService);
Services.V17.GoogleAdsService);

string searchQuery = @"
SELECT
Expand All @@ -97,11 +92,9 @@ change_status.last_change_date_time DURING LAST_14_DAYS
ORDER BY change_status.last_change_date_time
LIMIT 10000";

// Create a request that will retrieve all changes using pages of the specified
// page size.
// Create a request that will retrieve all changes.
SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
{
PageSize = PAGE_SIZE,
Query = searchQuery,
CustomerId = customerId.ToString()
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V16.Enums.AccessRoleEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example sends an invitation email to a user to manage a customer
Expand Down Expand Up @@ -92,7 +92,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
{
// Get the CustomerUserAccessInvitationService.
CustomerUserAccessInvitationServiceClient service = client.GetService(
Services.V16.CustomerUserAccessInvitationService);
Services.V17.CustomerUserAccessInvitationService);

// [START invite_user_with_access_role]
MutateCustomerUserAccessInvitationRequest invitationRequest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using static Google.Ads.GoogleAds.V16.Enums.ManagerLinkStatusEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.ManagerLinkStatusEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example demonstrates how to link an existing Google Ads manager customer
Expand Down Expand Up @@ -124,7 +124,7 @@ private string CreateInvitation(GoogleAdsClient client, long managerCustomerId,
{
// Get the CustomerClientLinkService.
CustomerClientLinkServiceClient customerClientLinkService =
client.GetService(Services.V16.CustomerClientLinkService);
client.GetService(Services.V17.CustomerClientLinkService);

// Create a client with the manager customer ID as login customer ID.
client.Config.LoginCustomerId = managerCustomerId.ToString();
Expand Down Expand Up @@ -175,7 +175,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService =
client.GetService(Services.V16.GoogleAdsService);
client.GetService(Services.V17.GoogleAdsService);

// Create a client with the manager customer ID as login customer ID.
client.Config.LoginCustomerId = managerCustomerId.ToString();
Expand Down Expand Up @@ -211,7 +211,7 @@ private void AcceptInvitation(GoogleAdsClient client, long clientCustomerId,
{
// Get the CustomerManagerLinkService.
CustomerManagerLinkServiceClient customerManagerLinkService =
client.GetService(Services.V16.CustomerManagerLinkService);
client.GetService(Services.V17.CustomerManagerLinkService);

// Create a client with the client customer ID as login customer ID.
client.Config.LoginCustomerId = clientCustomerId.ToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example lists the resource names for the customers that the authenticating user
Expand Down Expand Up @@ -70,7 +70,7 @@ public static void Main(string[] args)
public void Run(GoogleAdsClient client)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V16.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Resources;
using Google.Ads.GoogleAds.V16.Services;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Resources;
using Google.Ads.GoogleAds.V17.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;
using System.Linq;
using static Google.Ads.GoogleAds.V16.Enums.AccessRoleEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example updates the access role of a user, given the email address.
Expand Down Expand Up @@ -131,7 +131,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V16.GoogleAdsService);
Services.V17.GoogleAdsService);

// Create the search query. Use the LIKE query for filtering to ignore the text case
// for email address when searching for a match.
Expand Down Expand Up @@ -175,7 +175,7 @@ private void ModifyUserAccess(GoogleAdsClient client, long customerId, long user
{
// Get the CustomerUserAccessService.
CustomerUserAccessServiceClient userAccessService = client.GetService(
Services.V16.CustomerUserAccessService);
Services.V17.CustomerUserAccessService);

// Creates the modified user access.
CustomerUserAccess userAccess = new CustomerUserAccess()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V16.Errors;
using Google.Ads.GoogleAds.V16.Services;
using static Google.Ads.GoogleAds.V16.Enums.IdentityVerificationProgramEnum.Types;
using static Google.Ads.GoogleAds.V16.Enums.IdentityVerificationProgramStatusEnum.Types;
using Google.Ads.GoogleAds.V17.Errors;
using Google.Ads.GoogleAds.V17.Services;
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramEnum.Types;
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramStatusEnum.Types;
using System;
using Google.Ads.GoogleAds.Config;
using Google.Ads.GoogleAds.Extensions.Config;

namespace Google.Ads.GoogleAds.Examples.V16
namespace Google.Ads.GoogleAds.Examples.V17
{
/// <summary>
/// This code example illustrates how to retrieve the status of the advertiser identity
Expand Down Expand Up @@ -130,7 +130,7 @@ private static IdentityVerification GetIdentityVerification(
GoogleAdsClient client, long customerId)
{
IdentityVerificationServiceClient identityVerificationService =
client.GetService(Services.V16.IdentityVerificationService);
client.GetService(Services.V17.IdentityVerificationService);

try {
GetIdentityVerificationResponse response =
Expand Down Expand Up @@ -179,7 +179,7 @@ private static IdentityVerification GetIdentityVerification(
private static void StartIdentityVerification(GoogleAdsClient client, long customerId)
{
IdentityVerificationServiceClient identityVerificationService =
client.GetService(Services.V16.IdentityVerificationService);
client.GetService(Services.V17.IdentityVerificationService);

StartIdentityVerificationRequest request = new StartIdentityVerificationRequest()
{
Expand Down
Loading

0 comments on commit 21487aa

Please sign in to comment.