/// <summary>Snippet for GetKeywordThemeConstant</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetKeywordThemeConstant() { // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = KeywordThemeConstantServiceClient.Create(); // Initialize request argument(s) string resourceName = "keywordThemeConstants/[EXPRESS_CATEGORY_ID]~[EXPRESS_SUB_CATEGORY_ID]"; // Make the request KeywordThemeConstant response = keywordThemeConstantServiceClient.GetKeywordThemeConstant(resourceName); }
/// <summary>Snippet for GetKeywordThemeConstant</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetKeywordThemeConstantResourceNames() { // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = KeywordThemeConstantServiceClient.Create(); // Initialize request argument(s) KeywordThemeConstantName resourceName = KeywordThemeConstantName.FromExpressCategoryExpressSubCategory("[EXPRESS_CATEGORY_ID]", "[EXPRESS_SUB_CATEGORY_ID]"); // Make the request KeywordThemeConstant response = keywordThemeConstantServiceClient.GetKeywordThemeConstant(resourceName); }
/// <summary>Snippet for GetKeywordThemeConstantAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetKeywordThemeConstantRequestObjectAsync() { // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = await KeywordThemeConstantServiceClient.CreateAsync(); // Initialize request argument(s) GetKeywordThemeConstantRequest request = new GetKeywordThemeConstantRequest { ResourceNameAsKeywordThemeConstantName = KeywordThemeConstantName.FromExpressCategoryExpressSubCategory("[EXPRESS_CATEGORY_ID]", "[EXPRESS_SUB_CATEGORY_ID]"), }; // Make the request KeywordThemeConstant response = await keywordThemeConstantServiceClient.GetKeywordThemeConstantAsync(request); }
/// <summary>Snippet for GetKeywordThemeConstantAsync</summary> public async Task GetKeywordThemeConstantAsync() { // Snippet: GetKeywordThemeConstantAsync(string, CallSettings) // Additional: GetKeywordThemeConstantAsync(string, CancellationToken) // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = await KeywordThemeConstantServiceClient.CreateAsync(); // Initialize request argument(s) string resourceName = "keywordThemeConstants/[EXPRESS_CATEGORY_ID]~[EXPRESS_SUB_CATEGORY_ID]"; // Make the request KeywordThemeConstant response = await keywordThemeConstantServiceClient.GetKeywordThemeConstantAsync(resourceName); // End snippet }
/// <summary>Snippet for GetKeywordThemeConstant</summary> public void GetKeywordThemeConstantRequestObject() { // Snippet: GetKeywordThemeConstant(GetKeywordThemeConstantRequest, CallSettings) // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = KeywordThemeConstantServiceClient.Create(); // Initialize request argument(s) GetKeywordThemeConstantRequest request = new GetKeywordThemeConstantRequest { ResourceNameAsKeywordThemeConstantName = KeywordThemeConstantName.FromExpressCategoryExpressSubCategory("[EXPRESS_CATEGORY_ID]", "[EXPRESS_SUB_CATEGORY_ID]"), }; // Make the request KeywordThemeConstant response = keywordThemeConstantServiceClient.GetKeywordThemeConstant(request); // End snippet }
/// <summary>Snippet for GetKeywordThemeConstantAsync</summary> public async Task GetKeywordThemeConstantResourceNamesAsync() { // Snippet: GetKeywordThemeConstantAsync(KeywordThemeConstantName, CallSettings) // Additional: GetKeywordThemeConstantAsync(KeywordThemeConstantName, CancellationToken) // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = await KeywordThemeConstantServiceClient.CreateAsync(); // Initialize request argument(s) KeywordThemeConstantName resourceName = KeywordThemeConstantName.FromExpressCategoryExpressSubCategory("[EXPRESS_CATEGORY_ID]", "[EXPRESS_SUB_CATEGORY_ID]"); // Make the request KeywordThemeConstant response = await keywordThemeConstantServiceClient.GetKeywordThemeConstantAsync(resourceName); // End snippet }
/// <summary>Snippet for SuggestKeywordThemeConstants</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void SuggestKeywordThemeConstantsRequestObject() { // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = KeywordThemeConstantServiceClient.Create(); // Initialize request argument(s) SuggestKeywordThemeConstantsRequest request = new SuggestKeywordThemeConstantsRequest { QueryText = "", CountryCode = "", LanguageCode = "", }; // Make the request SuggestKeywordThemeConstantsResponse response = keywordThemeConstantServiceClient.SuggestKeywordThemeConstants(request); }
/// <summary>Snippet for SuggestKeywordThemeConstantsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task SuggestKeywordThemeConstantsRequestObjectAsync() { // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = await KeywordThemeConstantServiceClient.CreateAsync(); // Initialize request argument(s) SuggestKeywordThemeConstantsRequest request = new SuggestKeywordThemeConstantsRequest { QueryText = "", CountryCode = "", LanguageCode = "", }; // Make the request SuggestKeywordThemeConstantsResponse response = await keywordThemeConstantServiceClient.SuggestKeywordThemeConstantsAsync(request); }
/// <summary>Snippet for SuggestKeywordThemeConstantsAsync</summary> public async Task SuggestKeywordThemeConstantsRequestObjectAsync() { // Snippet: SuggestKeywordThemeConstantsAsync(SuggestKeywordThemeConstantsRequest, CallSettings) // Additional: SuggestKeywordThemeConstantsAsync(SuggestKeywordThemeConstantsRequest, CancellationToken) // Create client KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = await KeywordThemeConstantServiceClient.CreateAsync(); // Initialize request argument(s) SuggestKeywordThemeConstantsRequest request = new SuggestKeywordThemeConstantsRequest { QueryText = "", CountryCode = "", LanguageCode = "", }; // Make the request SuggestKeywordThemeConstantsResponse response = await keywordThemeConstantServiceClient.SuggestKeywordThemeConstantsAsync(request); // End snippet }
// [END add_smart_campaign_11] // [START add_smart_campaign] /// <summary> /// Retrieves KeywordThemeConstants that are derived from autocomplete data for the /// given keyword text. /// </summary> /// <param name="client">The Google Ads client.</param> /// <param name="keywordText">A keyword used for generating keyword auto completions. /// </param> /// <returns>A list of KeywordThemeConstants.</returns> private IEnumerable <KeywordThemeConstant> GetKeywordTextAutoCompletions( GoogleAdsClient client, string keywordText) { KeywordThemeConstantServiceClient keywordThemeConstantServiceClient = client.GetService(Services.V10.KeywordThemeConstantService); SuggestKeywordThemeConstantsRequest request = new SuggestKeywordThemeConstantsRequest { QueryText = keywordText, CountryCode = COUNTRY_CODE, LanguageCode = LANGUAGE_CODE }; SuggestKeywordThemeConstantsResponse response = keywordThemeConstantServiceClient.SuggestKeywordThemeConstants(request); Console.WriteLine($"Retrieved {response.KeywordThemeConstants.Count} keyword theme " + $"constants using the keyword '{keywordText}'."); return(response.KeywordThemeConstants.ToList()); }