Skip to content

Commit

Permalink
Commit v22.3.0 to github
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Seeley committed Oct 12, 2017
1 parent 7b7a93e commit 6ed4e1f
Show file tree
Hide file tree
Showing 715 changed files with 165,693 additions and 26,988 deletions.
18 changes: 18 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
22.3.0
======
AdWords:
- Fixed issue #117.
- Fixed issue #111.
- Fixed issue #76
- Added support for v201710.
- MapUtilities class was rewritten to use generics. New extension method ToDict() can be
used on MediaEntry[] fields to convert them into a Dictionary. See Miscellaneous\UploadImage.cs
for an example.

DFP:
- Fixed issue #117.
- Fixed issue #111.

Common:
-

22.2.0
======
AdWords:
Expand Down
93 changes: 93 additions & 0 deletions examples/AdWords/CSharp/AdWords.Examples.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
<None Include="v201702\Solutions\GetNewKeywords\README.md" />
<None Include="v201708\Solutions\BudgetUtilizationReport\README.md" />
<None Include="v201708\Solutions\GetNewKeywords\README.md" />
<None Include="v201710\Solutions\BudgetUtilizationReport\README.md" />
<None Include="v201710\Solutions\GetNewKeywords\README.md" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand Down Expand Up @@ -339,6 +341,97 @@
<Compile Include="v201708\Targeting\GetCampaignTargetingCriteria.cs" />
<Compile Include="v201708\Targeting\GetTargetableLanguagesAndCarriers.cs" />
<Compile Include="v201708\Targeting\LookupLocation.cs" />
<Compile Include="v201710\AccountManagement\AcceptServiceLink.cs" />
<Compile Include="v201710\AccountManagement\CreateAccount.cs" />
<Compile Include="v201710\AccountManagement\GetAccountChanges.cs" />
<Compile Include="v201710\AccountManagement\GetAccountHierarchy.cs" />
<Compile Include="v201710\AdvancedOperations\AddAdCustomizers.cs" />
<Compile Include="v201710\AdvancedOperations\AddAdGroupBidModifier.cs" />
<Compile Include="v201710\AdvancedOperations\AddClickToDownloadAd.cs" />
<Compile Include="v201710\AdvancedOperations\AddDynamicPageFeed.cs" />
<Compile Include="v201710\AdvancedOperations\AddDynamicSearchAdsCampaign.cs" />
<Compile Include="v201710\AdvancedOperations\AddExpandedTextAdWithUpgradedUrls.cs" />
<Compile Include="v201710\AdvancedOperations\AddHtml5Ad.cs" />
<Compile Include="v201710\AdvancedOperations\AddResponsiveDisplayAd.cs" />
<Compile Include="v201710\AdvancedOperations\AddUniversalAppCampaign.cs" />
<Compile Include="v201710\AdvancedOperations\CreateAndAttachSharedKeywordSet.cs" />
<Compile Include="v201710\AdvancedOperations\FindAndRemoveCriteriaFromSharedSet.cs" />
<Compile Include="v201710\AdvancedOperations\GetAdGroupBidModifiers.cs" />
<Compile Include="v201710\AdvancedOperations\UsePortfolioBiddingStrategy.cs" />
<Compile Include="v201710\BasicOperations\AddAdGroupDemographicCriteria.cs" />
<Compile Include="v201710\BasicOperations\AddAdGroups.cs" />
<Compile Include="v201710\BasicOperations\AddCampaigns.cs" />
<Compile Include="v201710\BasicOperations\AddExpandedTextAds.cs" />
<Compile Include="v201710\BasicOperations\AddKeywords.cs" />
<Compile Include="v201710\BasicOperations\GetAdGroups.cs" />
<Compile Include="v201710\BasicOperations\GetCampaigns.cs" />
<Compile Include="v201710\BasicOperations\GetCampaignsWithAwql.cs" />
<Compile Include="v201710\BasicOperations\GetExpandedTextAds.cs" />
<Compile Include="v201710\BasicOperations\GetKeywords.cs" />
<Compile Include="v201710\BasicOperations\PauseAd.cs" />
<Compile Include="v201710\BasicOperations\RemoveAd.cs" />
<Compile Include="v201710\BasicOperations\RemoveAdGroup.cs" />
<Compile Include="v201710\BasicOperations\RemoveCampaign.cs" />
<Compile Include="v201710\BasicOperations\RemoveKeyword.cs" />
<Compile Include="v201710\BasicOperations\UpdateAdGroup.cs" />
<Compile Include="v201710\BasicOperations\UpdateCampaign.cs" />
<Compile Include="v201710\BasicOperations\UpdateKeyword.cs" />
<Compile Include="v201710\CampaignManagement\AddCampaignGroupsAndPerformanceTargets.cs" />
<Compile Include="v201710\CampaignManagement\AddCampaignLabels.cs" />
<Compile Include="v201710\CampaignManagement\AddCompleteCampaignsUsingBatchJob.cs" />
<Compile Include="v201710\CampaignManagement\AddCompleteCampaignsUsingStreamingBatchJob.cs" />
<Compile Include="v201710\CampaignManagement\AddDraft.cs" />
<Compile Include="v201710\CampaignManagement\AddKeywordsUsingIncrementalBatchJob.cs" />
<Compile Include="v201710\CampaignManagement\AddTrial.cs" />
<Compile Include="v201710\CampaignManagement\GetAllDisapprovedAds.cs" />
<Compile Include="v201710\CampaignManagement\GetAllDisapprovedAdsWithAwql.cs" />
<Compile Include="v201710\CampaignManagement\GetCampaignsByLabel.cs" />
<Compile Include="v201710\CampaignManagement\GraduateTrial.cs" />
<Compile Include="v201710\CampaignManagement\SetAdParameters.cs" />
<Compile Include="v201710\CampaignManagement\SetBidModifier.cs" />
<Compile Include="v201710\CampaignManagement\ValidateTextAd.cs" />
<Compile Include="v201710\ErrorHandling\HandlePartialFailures.cs" />
<Compile Include="v201710\ErrorHandling\HandlePolicyViolationError.cs" />
<Compile Include="v201710\ErrorHandling\HandleRateExceededError.cs" />
<Compile Include="v201710\Extensions\AddGoogleMyBusinessLocationExtensions.cs" />
<Compile Include="v201710\Extensions\AddPrices.cs" />
<Compile Include="v201710\Extensions\AddSitelinks.cs" />
<Compile Include="v201710\Extensions\AddSitelinksUsingFeeds.cs" />
<Compile Include="v201710\Migration\MigrateToExtensionSettings.cs" />
<Compile Include="v201710\Miscellaneous\GetAllVideosAndImages.cs" />
<Compile Include="v201710\Miscellaneous\UploadImage.cs" />
<Compile Include="v201710\Miscellaneous\UploadMediaBundle.cs" />
<Compile Include="v201710\Optimization\EstimateKeywordTraffic.cs" />
<Compile Include="v201710\Optimization\GetAdGroupBidSimulations.cs" />
<Compile Include="v201710\Optimization\GetCampaignCriterionBidModifierSimulations.cs" />
<Compile Include="v201710\Optimization\GetKeywordBidSimulations.cs" />
<Compile Include="v201710\Optimization\GetKeywordIdeas.cs" />
<Compile Include="v201710\Remarketing\AddAudience.cs" />
<Compile Include="v201710\Remarketing\AddConversionTrackers.cs" />
<Compile Include="v201710\Remarketing\AddCrmBasedUserList.cs" />
<Compile Include="v201710\Remarketing\AddRuleBasedRemarketingList.cs" />
<Compile Include="v201710\Remarketing\UploadOfflineCallConversions.cs" />
<Compile Include="v201710\Remarketing\UploadOfflineConversions.cs" />
<Compile Include="v201710\Remarketing\UploadOfflineData.cs" />
<Compile Include="v201710\Reporting\DownloadCriteriaReportWithAwql.cs" />
<Compile Include="v201710\Reporting\DownloadCriteriaReportWithSelector.cs" />
<Compile Include="v201710\Reporting\GetReportFields.cs" />
<Compile Include="v201710\Reporting\ParallelReportDownload.cs" />
<Compile Include="v201710\Reporting\StreamCriteriaReportResults.cs" />
<Compile Include="v201710\Reporting\StreamCriteriaReportToPoco.cs" />
<Compile Include="v201710\Reporting\StreamReportToPredefinedReportRowType.cs" />
<Compile Include="v201710\ShoppingCampaigns\AddProductPartitionTree.cs" />
<Compile Include="v201710\ShoppingCampaigns\AddProductScope.cs" />
<Compile Include="v201710\ShoppingCampaigns\AddShoppingCampaign.cs" />
<Compile Include="v201710\ShoppingCampaigns\AddShoppingCampaignForShowcaseAds.cs" />
<Compile Include="v201710\ShoppingCampaigns\GetProductCategoryTaxonomy.cs" />
<Compile Include="v201710\Solutions\BudgetUtilizationReport\BudgetUtilizationReport.cs" />
<Compile Include="v201710\Solutions\GetNewKeywords\GetNewKeywords.cs" />
<Compile Include="v201710\Targeting\AddCampaignTargetingCriteria.cs" />
<Compile Include="v201710\Targeting\AddCustomerNegativeCriteria.cs" />
<Compile Include="v201710\Targeting\GetCampaignTargetingCriteria.cs" />
<Compile Include="v201710\Targeting\GetTargetableLanguagesAndCarriers.cs" />
<Compile Include="v201710\Targeting\LookupLocation.cs" />
<Compile Include="ExampleBase.cs" />
<Compile Include="ExampleUtilities.cs" />
<Compile Include="Program.cs" />
Expand Down
4 changes: 2 additions & 2 deletions examples/AdWords/CSharp/OAuth/Properties/Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
[assembly: AssemblyProduct("AdWords API DotNet Client Library")]
[assembly: AssemblyCopyright("Copyright 2011, Google Inc. All Rights Reserved.")]

[assembly: AssemblyVersion("22.2.0.0")]
[assembly: AssemblyFileVersion("22.2.0.0")]
[assembly: AssemblyVersion("22.3.0.0")]
[assembly: AssemblyFileVersion("22.3.0.0")]
4 changes: 2 additions & 2 deletions examples/AdWords/CSharp/Properties/Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
[assembly: AssemblyProduct("AdWords API DotNet Client Library")]
[assembly: AssemblyCopyright("Copyright 2011, Google Inc. All Rights Reserved.")]

[assembly: AssemblyVersion("22.2.0.0")]
[assembly: AssemblyFileVersion("22.2.0.0")]
[assembly: AssemblyVersion("22.3.0.0")]
[assembly: AssemblyFileVersion("22.3.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ public override string Description {
/// <param name="user">The AdWords user.</param>
/// <param name="serviceLinkId">The service link ID to accept.</param>
public void Run(AdWordsUser user, long serviceLinkId) {
// Get the CustomerService.
CustomerService customerService = (CustomerService) user.GetService(
AdWordsService.v201702.CustomerService);
using (CustomerService customerService = (CustomerService) user.GetService(
AdWordsService.v201702.CustomerService)) {

// Create the operation to set the status to ACTIVE.
ServiceLinkOperation op = new ServiceLinkOperation();
op.@operator = Operator.SET;
ServiceLink serviceLink = new ServiceLink();
serviceLink.serviceLinkId = serviceLinkId;
serviceLink.serviceType = ServiceType.MERCHANT_CENTER;
serviceLink.linkStatus = ServiceLinkLinkStatus.ACTIVE;
op.operand = serviceLink;
// Create the operation to set the status to ACTIVE.
ServiceLinkOperation op = new ServiceLinkOperation();
op.@operator = Operator.SET;
ServiceLink serviceLink = new ServiceLink();
serviceLink.serviceLinkId = serviceLinkId;
serviceLink.serviceType = ServiceType.MERCHANT_CENTER;
serviceLink.linkStatus = ServiceLinkLinkStatus.ACTIVE;
op.operand = serviceLink;

try {
// Update the service link.
ServiceLink[] mutatedServiceLinks =
customerService.mutateServiceLinks(new ServiceLinkOperation[] { op });
try {
// Update the service link.
ServiceLink[] mutatedServiceLinks =
customerService.mutateServiceLinks(new ServiceLinkOperation[] { op });

// Display the results.
foreach (ServiceLink mutatedServiceLink in mutatedServiceLinks) {
Console.WriteLine("Service link with service link ID {0}, type '{1}' updated to " +
"status: {2}.", mutatedServiceLink.serviceLinkId, mutatedServiceLink.serviceType,
mutatedServiceLink.linkStatus);
// Display the results.
foreach (ServiceLink mutatedServiceLink in mutatedServiceLinks) {
Console.WriteLine("Service link with service link ID {0}, type '{1}' updated to " +
"status: {2}.", mutatedServiceLink.serviceLinkId, mutatedServiceLink.serviceType,
mutatedServiceLink.linkStatus);
}
} catch (Exception e) {
throw new System.ApplicationException("Failed to update service link.", e);
}
} catch (Exception e) {
throw new System.ApplicationException("Failed to update service link.", e);
}
}
}
Expand Down
57 changes: 29 additions & 28 deletions examples/AdWords/CSharp/v201702/AccountManagement/CreateAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
using Google.Api.Ads.AdWords.v201702;

using System;
using System.Collections.Generic;
using System.IO;

namespace Google.Api.Ads.AdWords.Examples.CSharp.v201702 {

/// <summary>
/// This code example illustrates how to create an account. Note by default,
/// this account will only be accessible via its parent AdWords manager
/// account.
/// </summary>
public class CreateAccount : ExampleBase {

/// <summary>
/// Main method, to run this code example as a standalone application.
/// </summary>
Expand Down Expand Up @@ -56,36 +56,37 @@ public override string Description {
/// </summary>
/// <param name="user">The AdWords user.</param>
public void Run(AdWordsUser user) {
// Get the ManagedCustomerService.
ManagedCustomerService managedCustomerService = (ManagedCustomerService) user.GetService(
AdWordsService.v201702.ManagedCustomerService);
using (ManagedCustomerService managedCustomerService =
(ManagedCustomerService) user.GetService(
AdWordsService.v201702.ManagedCustomerService)) {

// Create account.
ManagedCustomer customer = new ManagedCustomer();
customer.name = "Customer created with ManagedCustomerService on " +
new DateTime().ToString();
customer.currencyCode = "EUR";
customer.dateTimeZone = "Europe/London";
// Create account.
ManagedCustomer customer = new ManagedCustomer();
customer.name = "Customer created with ManagedCustomerService on " +
new DateTime().ToString();
customer.currencyCode = "EUR";
customer.dateTimeZone = "Europe/London";

// Create operations.
ManagedCustomerOperation operation = new ManagedCustomerOperation();
operation.operand = customer;
operation.@operator = Operator.ADD;
try {
ManagedCustomerOperation[] operations = new ManagedCustomerOperation[] {operation};
// Add account.
ManagedCustomerReturnValue result = managedCustomerService.mutate(operations);
// Create operations.
ManagedCustomerOperation operation = new ManagedCustomerOperation();
operation.operand = customer;
operation.@operator = Operator.ADD;
try {
ManagedCustomerOperation[] operations = new ManagedCustomerOperation[] { operation };
// Add account.
ManagedCustomerReturnValue result = managedCustomerService.mutate(operations);

// Display accounts.
if (result.value != null && result.value.Length > 0) {
ManagedCustomer customerResult = result.value[0];
Console.WriteLine("Account with customer ID \"{0}\" was created.",
customerResult.customerId);
} else {
Console.WriteLine("No accounts were created.");
// Display accounts.
if (result.value != null && result.value.Length > 0) {
ManagedCustomer customerResult = result.value[0];
Console.WriteLine("Account with customer ID \"{0}\" was created.",
customerResult.customerId);
} else {
Console.WriteLine("No accounts were created.");
}
} catch (Exception e) {
throw new System.ApplicationException("Failed to create accounts.", e);
}
} catch (Exception e) {
throw new System.ApplicationException("Failed to create accounts.", e);
}
}
}
Expand Down
Loading

0 comments on commit 6ed4e1f

Please sign in to comment.