Skip to content

Commit

Permalink
Changes for version 6.1.0. (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnashOommen authored Dec 14, 2020
1 parent 2baae33 commit 6ad5191
Show file tree
Hide file tree
Showing 22 changed files with 1,432 additions and 52 deletions.
24 changes: 24 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
6.1.0
=====

- Fixed a few code examples
- SetupRemarketing.cs
- GetAccountHierarchy.cs
- AddShoppingProductListingGroupTree.cs
- UpdateSitelink.cs
- GetAdGroupBidModifiers.cs
- Fixed the build badge URL in the README.md file.
- Added region tags in all code examples. This makes it easier to embed the code examples
in the developer guides.
- Fixed a broken urls to guide references in some code examples.
- Added new code examples for FeedItemSets.
- Feeds\CreateFeedItemSet.cs
- Feeds\GetFeedItemsOfFeedItemSet.cs
- Feeds\LinkFeedItemSet.cs
- Added a profiler for the client library to capture client time breakdown by serialization, deserialization and over-the-wire times.
- Bumped the protobuf and grpc dependencies. This is required due to https://github.com/protocolbuffers/protobuf/issues/8027. The full version bump lists are:
- Google.Protobuf: 3.14.0
- Grpc.Core: 2.34.0
- Microsoft.Extensions.Configuration: 5.0.0.
- System.Configuration.ConfigurationManager: 5.0.0

6.0.0
=====
- Added support for v6 of Google Ads API. See
Expand Down
61 changes: 54 additions & 7 deletions examples/AdvancedOperations/GetAdGroupBidModifiers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Google.Ads.GoogleAds.V6.Services;
using Google.Api.Gax;
using System;
using static Google.Ads.GoogleAds.V6.Resources.AdGroupBidModifier;

namespace Google.Ads.GoogleAds.Examples.V6
{
Expand Down Expand Up @@ -67,10 +68,20 @@ public void Run(GoogleAdsClient client, long customerId, long? adGroupId)
GoogleAdsServiceClient googleAdsService =
client.GetService(Services.V6.GoogleAdsService);

string searchQuery =
"SELECT ad_group.id, ad_group_bid_modifier.criterion_id, "
+ "ad_group_bid_modifier.bid_modifier, ad_group_bid_modifier.device.type, "
+ "campaign.id FROM ad_group_bid_modifier";
string searchQuery = @"
SELECT
ad_group.id, ad_group_bid_modifier.criterion_id, campaign.id,
ad_group_bid_modifier.bid_modifier,
ad_group_bid_modifier.device.type,
ad_group_bid_modifier.hotel_date_selection_type.type,
ad_group_bid_modifier.hotel_advance_booking_window.min_days,
ad_group_bid_modifier.hotel_advance_booking_window.max_days,
ad_group_bid_modifier.hotel_length_of_stay.min_nights,
ad_group_bid_modifier.hotel_length_of_stay.max_nights,
ad_group_bid_modifier.hotel_check_in_day.day_of_week,
ad_group_bid_modifier.preferred_content.type
FROM
ad_group_bid_modifier";

if (adGroupId != null)
{
Expand Down Expand Up @@ -99,12 +110,48 @@ public void Run(GoogleAdsClient client, long customerId, long? adGroupId)
AdGroup adGroup = googleAdsRow.AdGroup;
Campaign campaign = googleAdsRow.Campaign;
Console.WriteLine("Ad group bid modifier with criterion ID {0}, bid " +
"modifier value {1:0.00}, device type {2} was found in an ad group " +
"with ID {3} of campaign ID {4}.",
"modifier value {1:0.00} was found in an ad group with ID {2} of " +
"campaign ID {3}.",
adGroupBidModifier.CriterionId,
adGroupBidModifier.BidModifier,
adGroupBidModifier.Device.Type,
adGroup.Id, campaign.Id);

string criterionDetails = " - Criterion type: " +
$"{adGroupBidModifier.CriterionCase}, ";
switch (adGroupBidModifier.CriterionCase)
{
case CriterionOneofCase.Device:
criterionDetails += $"Type: {adGroupBidModifier.Device.Type}";
break;

case CriterionOneofCase.HotelAdvanceBookingWindow:
criterionDetails +=
$"Min Days: {adGroupBidModifier.HotelAdvanceBookingWindow.MinDays}," +
$"Max Days: {adGroupBidModifier.HotelAdvanceBookingWindow.MaxDays}";
break;

case CriterionOneofCase.HotelCheckInDay:
criterionDetails += $"Day of the week: " +
$"{adGroupBidModifier.HotelCheckInDay.DayOfWeek}";
break;

case CriterionOneofCase.HotelDateSelectionType:
criterionDetails += $"Date selection type: " +
$"{adGroupBidModifier.HotelDateSelectionType.Type}";
break;

case CriterionOneofCase.HotelLengthOfStay:
criterionDetails +=
$"Min Nights: {adGroupBidModifier.HotelLengthOfStay.MinNights}," +
$"Max Nights: {adGroupBidModifier.HotelLengthOfStay.MaxNights}";
break;

case CriterionOneofCase.PreferredContent:
criterionDetails +=
$"Type: {adGroupBidModifier.PreferredContent.Type}";
break;
}
Console.WriteLine(criterionDetails);
}
}
catch (GoogleAdsException e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<Project>{C691BD4D-683D-425B-8BC7-52F161475C7C}</Project>
<Name>Google.Ads.GoogleAds</Name>
</ProjectReference>
<Reference Condition="!Exists('..\..\..\src\Google.Ads.GoogleAds.csproj')" Include="Google.Ads.GoogleAds, Version=6.0.0.0, Culture=neutral, PublicKeyToken=52807268f2b614dc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Ads.GoogleAds.6.0.0\lib\net472\Google.Ads.GoogleAds.dll</HintPath>
<Reference Condition="!Exists('..\..\..\src\Google.Ads.GoogleAds.csproj')" Include="Google.Ads.GoogleAds, Version=6.1.0.0, Culture=neutral, PublicKeyToken=52807268f2b614dc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Ads.GoogleAds.6.1.0\lib\net472\Google.Ads.GoogleAds.dll</HintPath>
</Reference>
<Reference Include="Google.Api.CommonProtos, Version=2.2.0.0, Culture=neutral, PublicKeyToken=3ec5ea7f18953e47, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Api.CommonProtos.2.2.0\lib\net461\Google.Api.CommonProtos.dll</HintPath>
Expand Down Expand Up @@ -81,40 +81,46 @@
<Reference Include="Google.LongRunning, Version=2.1.0.0, Culture=neutral, PublicKeyToken=185c282632e132a0, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.LongRunning.2.1.0\lib\net461\Google.LongRunning.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.13.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.13.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.14.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Protobuf.3.14.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Auth, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Grpc.Auth.2.33.1\lib\net45\Grpc.Auth.dll</HintPath>
<HintPath>..\..\..\packages\Grpc.Auth.2.34.0\lib\net45\Grpc.Auth.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Grpc.Core.2.33.1\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\..\..\packages\Grpc.Core.2.34.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Grpc.Core.Api.2.33.1\lib\net45\Grpc.Core.Api.dll</HintPath>
<HintPath>..\..\..\packages\Grpc.Core.Api.2.34.0\lib\net45\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.Configuration, Version=3.1.9.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
<Reference Include="Microsoft.Extensions.Configuration, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.9.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Configuration.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives, Version=3.1.9.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Primitives.3.1.9\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
<Reference Include="Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Interactive.Async, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Interactive.Async.5.0.0\lib\net461\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="System.Linq.Async, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Linq.Async.5.0.0\lib\net461\System.Linq.Async.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
Expand All @@ -124,11 +130,14 @@
<HintPath>..\..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0-preview.6.20305.6\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<HintPath>..\..\..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
Expand Down
14 changes: 11 additions & 3 deletions examples/Authentication/AuthenticateInWebApplication/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.13.0.0" newVersion="3.13.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.14.0.0" newVersion="3.14.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
Expand All @@ -134,11 +134,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.9.0" newVersion="3.1.9.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.9.0" newVersion="3.1.9.0" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis.Core" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
Expand All @@ -160,6 +160,14 @@
<assemblyIdentity name="Google.Api.Gax.Grpc.GrpcCore" publicKeyToken="3ec5ea7f18953e47" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Configuration" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
Expand Down
Loading

0 comments on commit 6ad5191

Please sign in to comment.