Skip to content

Commit

Permalink
Release v2.8 of the client library. (#155)
Browse files Browse the repository at this point in the history
* Release v2.8 of the client library.
  • Loading branch information
AnashOommen authored Mar 4, 2020
1 parent f5fb602 commit 8fade34
Show file tree
Hide file tree
Showing 1,316 changed files with 420,183 additions and 8,673 deletions.
27 changes: 25 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
2.8.0
=====

- Added support for v3 of Google Ads API.
- Upgraded all code examples and tests to use v3.
- Fixed AddShoppingProductListingGroupTree example to work with v3.
- Made changes to logging and exception handling framework to support streaming methods.
- The generated stubs no longer use the ExceptionCustomization feature of gax libraries, since the
exception handling logic have moved to grpc interceptors. These stub classes have been removed from
the distribution.
- Convert GetCampaigns and GetKeywordStats examples to use server streaming.
See https://developers.google.com/google-ads/api/docs/reporting/streaming to learn more about
server streaming.
- Add an empty `custom_nupkg` folder in the repo to help with testing dependent packages that are
custom-built from GitHub sources.
- Fixed the visibility of several test classes and methods.
- Added new code examples:
- AddPrices
- AddGoogleMyBusinessLocationExtensions
- AddAppCampaign
- UpdateCampaignCriterionBidModifier
- Refactored all the grpc metadata keynames into a standalone class.

2.7.0
=====

- Added new code examples.
- AdvancedOperations\AddAdCustomerizer.cs
- AdvancedOperations\AddSmartDisplayAd.cs
- BasicOperations\AddResponsiveSearchAd.cs
- BasicOperations\AddAdGroup.cs renamed to BasicOperations\AddAdGroups.cs
- BasicOperations\AddAdGroup.cs renamed to BasicOperations\AddAdGroups.cs
- CampaignManagement\AddCampaignLabels.cs
- CampaignManagement\GetCampaignsByLabel.cs
- CampaignManagement\SetAdParameters.cs
Expand Down Expand Up @@ -57,7 +80,7 @@ should build and run against the csproj instead.
=====
- Optimize for a check on section name if it is empty in the GoogleAdsConfig class.
- Add a specialized ConfigSetting class named StringConfigSetting for string
settings, so its parsing can be bypassed. Switch all string-based setting parsing to this type in
settings, so its parsing can be bypassed. Switch all string-based setting parsing to this type in
the GoogleAdsConfig class.
- Expose the Dictionary constructor in the base class at GoogleAdsConfig level.
- Improve how DEFAULT_TIMEOUT is represented in GoogleAdsConfig class.
Expand Down
2 changes: 2 additions & 0 deletions custom_nupkg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Custom dependent nuget packages which were locally built to validate a fix.
*.nupkg
10 changes: 5 additions & 5 deletions examples/AccountManagement/CreateCustomer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Resources;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Resources;
using Google.Ads.GoogleAds.V3.Services;

using System;

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

Customer customer = new Customer()
{
Expand Down
10 changes: 5 additions & 5 deletions examples/AccountManagement/GetAccountChanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Services;
using Google.Api.Gax;
using static Google.Ads.GoogleAds.V2.Enums.ChangeStatusResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.ChangeStatusResourceTypeEnum.Types;

using System;

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

string searchQuery = "SELECT change_status.resource_name, " +
"change_status.last_change_date_time, change_status.resource_type, " +
Expand Down
10 changes: 5 additions & 5 deletions examples/AccountManagement/GetAccountInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Resources;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Resources;
using Google.Ads.GoogleAds.V3.Services;

using System;

namespace Google.Ads.GoogleAds.Examples.V2
namespace Google.Ads.GoogleAds.Examples.V3
{
/// <summary>
/// This code example lists basic information about an advertising account, like the name,
Expand Down Expand Up @@ -63,7 +63,7 @@ public override string Description
public void Run(GoogleAdsClient client, long customerId)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V2.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V3.CustomerService);

try
{
Expand Down
16 changes: 8 additions & 8 deletions examples/AccountManagement/LinkManagerToClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.Util;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Resources;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Resources;
using Google.Ads.GoogleAds.V3.Services;

using System;
using System.Linq;
using static Google.Ads.GoogleAds.V2.Enums.ManagerLinkStatusEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.ManagerLinkStatusEnum.Types;

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

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

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

// Create a client with the manager customer ID as login customer ID.
client.Config.LoginCustomerId = clientCustomerId.ToString();
Expand Down
8 changes: 4 additions & 4 deletions examples/AccountManagement/ListAccessibleCustomers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Services;

using System;

namespace Google.Ads.GoogleAds.Examples.V2
namespace Google.Ads.GoogleAds.Examples.V3
{
/// <summary>
/// This code example lists the resource names for the customers that the authenticating user
Expand Down Expand Up @@ -64,7 +64,7 @@ public override string Description
public void Run(GoogleAdsClient client)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V2.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V3.CustomerService);

try
{
Expand Down
32 changes: 16 additions & 16 deletions examples/AdvancedOperations/AddAdCustomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Common;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Resources;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Common;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Resources;
using Google.Ads.GoogleAds.V3.Services;

using System;
using System.Collections.Generic;
using System.Linq;
using static Google.Ads.GoogleAds.V2.Enums.AdCustomizerPlaceholderFieldEnum.Types;
using static Google.Ads.GoogleAds.V2.Enums.FeedAttributeTypeEnum.Types;
using static Google.Ads.GoogleAds.V2.Enums.PlaceholderTypeEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.AdCustomizerPlaceholderFieldEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.FeedAttributeTypeEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.PlaceholderTypeEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V2
namespace Google.Ads.GoogleAds.Examples.V3
{
/// <summary>
/// This code example adds an ad customizer feed and associates it with the customer.
Expand Down Expand Up @@ -80,7 +80,7 @@ public void Run(GoogleAdsClient client, long customerId, long adGroupId1, long a
{
// Get the AdGroupBidModifierService.
AdGroupBidModifierServiceClient adGroupBidModifierService =
client.GetService(Services.V2.AdGroupBidModifierService);
client.GetService(Services.V3.AdGroupBidModifierService);

string feedName = "Ad Customizer example feed " + ExampleUtilities.GetRandomString();

Expand Down Expand Up @@ -121,7 +121,7 @@ private string CreateAdCustomizerFeed(GoogleAdsClient client, long customerId,
string feedName)
{
// Get the FeedServiceClient.
FeedServiceClient feedService = client.GetService(Services.V2.FeedService);
FeedServiceClient feedService = client.GetService(Services.V3.FeedService);

// Creates three feed attributes: a name, a price and a date. The attribute names
// are arbitrary choices and will be used as placeholders in the ad text fields.
Expand Down Expand Up @@ -175,7 +175,7 @@ private Dictionary<string, FeedAttribute> GetFeedAttributes(GoogleAdsClient clie
{
// Get the GoogleAdsServiceClient.
GoogleAdsServiceClient googleAdsService =
client.GetService(Services.V2.GoogleAdsService);
client.GetService(Services.V3.GoogleAdsService);

string query = $"SELECT feed.attributes, feed.name FROM feed WHERE " +
$"feed.resource_name = '{feedResourceName}'";
Expand Down Expand Up @@ -213,11 +213,11 @@ private void CreateAdCustomizerMapping(GoogleAdsClient client, long customerId,
{
// Get the FeedMappingService.
FeedMappingServiceClient feedMappingService =
client.GetService(Services.V2.FeedMappingService);
client.GetService(Services.V3.FeedMappingService);

// Map the feed attributes to ad customizer placeholder fields.
// For a full list of ad customizer placeholder fields, see
// https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v2.enums#google.ads.googleads.v2.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField
// https://developers.google.com/google-ads/api/reference/rpc/Google.Ads.GoogleAds.V3.enums#Google.Ads.GoogleAds.V3.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField
AttributeFieldMapping nameFieldMapping = new AttributeFieldMapping()
{
FeedAttributeId = feedAttributes["Name"].Id,
Expand Down Expand Up @@ -268,7 +268,7 @@ private List<string> CreateFeedItems(GoogleAdsClient client, long customerId,
{
// Get the FeedItemServiceClient.
FeedItemServiceClient feedItemService =
client.GetService(Services.V2.FeedItemService);
client.GetService(Services.V3.FeedItemService);

List<FeedItemOperation> feedItemOperations = new List<FeedItemOperation>();

Expand Down Expand Up @@ -353,7 +353,7 @@ private void CreateFeedItemTargets(GoogleAdsClient client,
{
// Get the FeedItemTargetServiceClient.
FeedItemTargetServiceClient feedItemTargetService =
client.GetService(Services.V2.FeedItemTargetService);
client.GetService(Services.V3.FeedItemTargetService);

// Bind each feed item to a specific ad group to make sure it will only be used to
// customize ads inside that ad group; using the feed item elsewhere will result
Expand Down Expand Up @@ -396,7 +396,7 @@ private void CreateAdsWithCustomizations(GoogleAdsClient client, long customerId
{
// Get the AdGroupAdServiceClient.
AdGroupAdServiceClient adGroupAdService =
client.GetService(Services.V2.AdGroupAdService);
client.GetService(Services.V3.AdGroupAdService);


// Creates an expanded text ad using the feed attribute names as placeholders.
Expand Down
14 changes: 7 additions & 7 deletions examples/AdvancedOperations/AddAdGroupBidModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
// limitations under the License.

using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V2.Common;
using Google.Ads.GoogleAds.V2.Errors;
using Google.Ads.GoogleAds.V2.Resources;
using Google.Ads.GoogleAds.V2.Services;
using Google.Ads.GoogleAds.V3.Common;
using Google.Ads.GoogleAds.V3.Errors;
using Google.Ads.GoogleAds.V3.Resources;
using Google.Ads.GoogleAds.V3.Services;

using System;
using static Google.Ads.GoogleAds.V2.Enums.DeviceEnum.Types;
using static Google.Ads.GoogleAds.V3.Enums.DeviceEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V2
namespace Google.Ads.GoogleAds.Examples.V3
{
/// <summary>
/// This code example demonstrates how to add an ad group bid modifier for mobile devices.
Expand Down Expand Up @@ -76,7 +76,7 @@ public void Run(GoogleAdsClient client, long customerId, long adGroupId,
{
// Get the AdGroupBidModifierService.
AdGroupBidModifierServiceClient adGroupBidModifierService =
client.GetService(Services.V2.AdGroupBidModifierService);
client.GetService(Services.V3.AdGroupBidModifierService);

// Creates an ad group bid modifier for mobile devices with the specified ad group
// ID and bid modifier value.
Expand Down
Loading

0 comments on commit 8fade34

Please sign in to comment.