Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet Class Reference

This code example creates a shared keyword list, adds keywords to the list and attaches it to an existing campaign. To get the list of campaigns, run GetCampaigns.cs. More...

Inheritance diagram for Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet:
Google.Api.Ads.AdWords.Examples.CSharp.ExampleBase

Public Member Functions

void Run (AdWordsUser user, long campaignId)
 Runs the code example. More...
 
SharedSet CreateSharedKeywordSet (AdWordsUser user)
 Create a shared keyword set. More...
 
SharedCriterion[] AddKeywordsToSharedSet (AdWordsUser user, long sharedSetId, string[] keywordTexts)
 Adds a set of keywords to a shared set. More...
 
CampaignSharedSet AttachSharedSetToCampaign (AdWordsUser user, long campaignId, long sharedSetId)
 Attaches a shared set to a campaign. More...
 

Static Public Member Functions

static void Main (string[] args)
 Main method, to run this code example as a standalone application. More...
 

Properties

override string Description [get]
 Returns a description about the code example. More...
 
- Properties inherited from Google.Api.Ads.AdWords.Examples.CSharp.ExampleBase
abstract string Description [get]
 Returns a description about the code example. More...
 

Detailed Description

This code example creates a shared keyword list, adds keywords to the list and attaches it to an existing campaign. To get the list of campaigns, run GetCampaigns.cs.

Member Function Documentation

SharedCriterion [] Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.AddKeywordsToSharedSet ( AdWordsUser  user,
long  sharedSetId,
string[]  keywordTexts 
)
inline

Adds a set of keywords to a shared set.

Parameters
userThe AdWords user.
sharedSetIdThe shared set id.
keywordTextsThe keywords to be added to the shared set.
Returns
The newly added set of shared criteria.

References Google.Api.Ads.Common.Lib.AdsUser.GetService().

CampaignSharedSet Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.AttachSharedSetToCampaign ( AdWordsUser  user,
long  campaignId,
long  sharedSetId 
)
inline

Attaches a shared set to a campaign.

Parameters
userThe AdWords user.
campaignIdThe campaign id.
sharedSetIdThe shared set id.
Returns
A CampaignSharedSet object that represents a binding between the specified campaign and the shared set.

References Google.Api.Ads.Common.Lib.AdsUser.GetService().

SharedSet Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.CreateSharedKeywordSet ( AdWordsUser  user)
inline

Create a shared keyword set.

Parameters
userThe AdWords user.
Returns
The shared set.

References Google.Api.Ads.Common.Lib.AdsUser.GetService().

static void Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.Main ( string[]  args)
inlinestatic

Main method, to run this code example as a standalone application.

Parameters
argsThe command line arguments.
void Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.Run ( AdWordsUser  user,
long  campaignId 
)
inline

Runs the code example.

Parameters
userThe AdWords user.
campaignIdId of the campaign to which keywords are added.

References Google.Api.Ads.AdWords.v201809.SharedSet.sharedSetId.

Property Documentation

override string Google.Api.Ads.AdWords.Examples.CSharp.v201809.CreateAndAttachSharedKeywordSet.Description
get

Returns a description about the code example.


The documentation for this class was generated from the following file: