Skip to content

Commit

Permalink
Release v2.9.0 of the library. (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnashOommen authored May 5, 2020
1 parent 4f84d6b commit 8cb2a0a
Show file tree
Hide file tree
Showing 800 changed files with 20,259 additions and 8,825 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
2.9.0
=====
- Changed the buildstatus image to be .svg format. Updated the path in the README.md file.
- Fixed https://github.com/googleads/google-ads-dotnet/issues/157
- Fixed https://github.com/googleads/google-ads-dotnet/issues/158
- Fixed https://github.com/googleads/google-ads-dotnet/issues/159
- Fixed https://github.com/googleads/google-ads-dotnet/issues/160
- Added support for v3_1 of Google Ads API.
- Added new code examples.
- BasicOperations/UpdateExpandedTextAd.cs
- CampaignManagement/AddCompleteCampaignsUsingMutateJob.cs
- BasicOperations/GetResponsiveSearchAds.cs
- Extensions/AddAffiliateLocationExtensions.cs
- AccountManagement/GetAccountHierarchy.cs
- AccountManagement/AcceptServiceLinks.cs
- CampaignManagement/GraduateCampaignExperiment.cs
- Remarketing/UploadCallConversion.cs
- Targeting/SearchForTargetableLanguagesAndCarriers.cs
- Remarketing/AddCustomerMatchUserList.cs
- ShoppingAds/ApproveMerchantCenterLink.cs
- Renamed some code examples to make the names consistent with other library examples.
- ErrorHandling/HandlePartialFailures.cs => ErrorHandling/HandlePartialFailure.cs
- Extensions/UpdateFeedItemAttributeValue.cs => Extensions/UpdateFlightsFeedItemStringAttributeValue.cs
- Targeting/GetGeoTargetConstantsByName.cs => Targeting/GetGeoTargetConstantsByNames.cs
- Fixed broken code examples.
- BasicOperations/AddResponsiveSearchAd.cs
- BasicOperations/GetExpandedTextAds.cs
- Updated Billing/GetAccountBudgets.cs example to retrieve adjusted spending limit, and to use
streaming instead of paged retrieval.
- Fixed the logging handler to handle situations where customer ID is not part of the request body.
- Add throw statement to all code examples. Add exception handling where missing.
- Standardized the INSERT_ADGROUP_ID placeholder name for parameters in various code examples.
- Renamed ResourceNames.CampaignExperiments method to ResourceNames.CampaignExperiment for consistency.

2.8.0
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,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=2.8.0.0, Culture=neutral, PublicKeyToken=52807268f2b614dc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Ads.GoogleAds.2.8.0\lib\net452\Google.Ads.GoogleAds.dll</HintPath>
<Reference Condition="!Exists('..\..\..\src\Google.Ads.GoogleAds.csproj')" Include="Google.Ads.GoogleAds, Version=2.9.0.0, Culture=neutral, PublicKeyToken=52807268f2b614dc, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Google.Ads.GoogleAds.2.9.0\lib\net452\Google.Ads.GoogleAds.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Ads.GoogleAds" version="2.8.0" targetFramework="net452" />
<package id="Google.Ads.GoogleAds" version="2.9.0" targetFramework="net452" />
<package id="Google.Api.CommonProtos" version="1.7.0" targetFramework="net452" />
<package id="Google.Api.Gax" version="2.10.0" targetFramework="net452" />
<package id="Google.Api.Gax.Grpc" version="2.10.0" targetFramework="net452" />
Expand Down
88 changes: 44 additions & 44 deletions examples/Billing/GetAccountBudgets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ public void Run(GoogleAdsClient client, long customerId)
Services.V3.GoogleAdsService);

// Construct a GAQL query which will retrieve AccountBudgetProposals.
String searchQuery =
String query =
@"SELECT
account_budget.status,
account_budget.billing_setup,
account_budget.approved_spending_limit_micros,
account_budget.approved_spending_limit_type,
account_budget.proposed_spending_limit_micros,
account_budget.proposed_spending_limit_type,
account_budget.adjusted_spending_limit_micros,
account_budget.adjusted_spending_limit_type,
account_budget.approved_start_date_time,
account_budget.proposed_start_date_time,
account_budget.approved_end_date_time,
Expand All @@ -85,54 +87,52 @@ public void Run(GoogleAdsClient client, long customerId)
FROM
account_budget";

// Creates a request that will retrieve all account budgets using pages of the
// specified page size.
SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
{
PageSize = PAGE_SIZE,
Query = searchQuery,
CustomerId = customerId.ToString()
};

try
{
// Issues the search request.
PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> searchPagedResponse =
googleAdsService.Search(request);
googleAdsService.SearchStream(customerId.ToString(), query,
delegate (SearchGoogleAdsStreamResponse resp)
{
// Displays the results
foreach (GoogleAdsRow googleAdsRow in resp.Results)
{
AccountBudget budget = googleAdsRow.AccountBudget;

Console.WriteLine(String.Format("Account budget '{0}' with status '{1}', " +
"billing setup '{2}', amount served {3:0.00}, total adjustments " +
"{4:0.00}, approved spending limit '{5}' (proposed '{6}', " +
"adjusted '{7}'), approved start time '{8}' (proposed '{9}'), " +
"approved end time '{10}' (proposed '{11}')",
budget.ResourceName,
budget.Status,
budget.BillingSetup,
budget.AmountServedMicros.Value / 1_000_000.0,
budget.TotalAdjustmentsMicros.Value / 1_000_000.0,
budget.ApprovedSpendingLimitMicros.HasValue
? String.Format(
"%.2f", budget.ApprovedSpendingLimitMicros.Value / 1_000_000.0)
: budget.ApprovedSpendingLimitType.ToString(),
budget.ProposedSpendingLimitMicros.HasValue
? String.Format(
"%.2f", budget.ProposedSpendingLimitMicros.Value / 1_000_000.0)
: budget.ProposedSpendingLimitType.ToString(),
budget.AdjustedSpendingLimitMicros.HasValue
? String.Format(
"%.2f", budget.AdjustedSpendingLimitMicros.Value / 1_000_000.0)
: budget.AdjustedSpendingLimitType.ToString(),
budget.ApprovedStartDateTime,
budget.ProposedStartDateTime,
String.IsNullOrEmpty(budget.ApprovedEndDateTime)
? budget.ApprovedEndTimeType.ToString()
: budget.ApprovedEndDateTime,
String.IsNullOrEmpty(budget.ProposedEndDateTime)
? budget.ProposedEndTimeType.ToString()
: budget.ProposedEndDateTime));

// Iterates over all rows in all pages and prints the requested field values for
// the account budget in each row.
foreach (GoogleAdsRow googleAdsRow in searchPagedResponse)
{
AccountBudget budget = googleAdsRow.AccountBudget;
}
}
);

Console.WriteLine(String.Format("Account budget '{0}' with status '{1}', " +
"billing setup '{2}', amount served {3:0.00}, total adjustments " +
"{4:0.00}, approved spending limit '{5}' (proposed '{6}'), approved " +
"start time '{7}' (proposed '{8}'), approved end time '{9}' " +
"(proposed '{10}')",
budget.ResourceName,
budget.Status,
budget.BillingSetup,
budget.AmountServedMicros.Value / 1_000_000.0,
budget.TotalAdjustmentsMicros.Value / 1_000_000.0,
budget.ApprovedSpendingLimitMicros.HasValue
? String.Format(
"%.2f", budget.ApprovedSpendingLimitMicros.Value / 1_000_000.0)
: budget.ApprovedSpendingLimitType.ToString(),
budget.ProposedSpendingLimitMicros.HasValue
? String.Format(
"%.2f", budget.ProposedSpendingLimitMicros.Value / 1_000_000.0)
: budget.ProposedSpendingLimitType.ToString(),
budget.ApprovedStartDateTime,
budget.ProposedStartDateTime,
String.IsNullOrEmpty(budget.ApprovedEndDateTime)
? budget.ApprovedEndTimeType.ToString()
: budget.ApprovedEndDateTime,
String.IsNullOrEmpty(budget.ProposedEndDateTime)
? budget.ProposedEndTimeType.ToString()
: budget.ProposedEndDateTime));
}
}
catch (GoogleAdsException e)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Google.Ads.GoogleAds.Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<None Remove="Migration\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Ads.GoogleAds" Version="2.8.0" />
<PackageReference Include="Google.Ads.GoogleAds" Version="2.9.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Web" />
Expand Down
Loading

0 comments on commit 8cb2a0a

Please sign in to comment.