Documentation ¶
Overview ¶
Package gads provides a wrapper for the Google Adwords SOAP API. In order to access the API you will need to sign up for an MMC account[1], get a developer token[2], setup authentication[3]. The is a tool in the setup_oauth2 directory that will setup a configuration file.
The package is comprised of services used to manipulate various adwords structures. To access a service you need to create an gads.Auth and parse it to the service initializer, then can call the service methods on the service object.
authConf, err := NewCredentials(context.TODO()) campaignService := gads.NewCampaignService(&authConf.Auth) campaigns, totalCount, err := cs.Get( gads.Selector{ Fields: []string{ "Id", "Name", "Status", }, }, )
1. http://www.google.com/adwords/myclientcenter/
2. https://developers.google.com/adwords/api/docs/signingup
3. https://developers.google.com/adwords/api/docs/guides/authentication
Index ¶
- Variables
- func AddSearchAdGroup(auth *Auth, CampaignId int64)
- func AddSearchCampaignCriterion(auth *Auth, CampaignId int64)
- func AddSearchKeywords(auth *Auth, adGroupId int64)
- func CreateAppCampaign(budgetId, targetCpa int64, name, appId string)
- func CreateSearchCampaign(name string)
- type AWQLQuery
- type AccountLabel
- type AdError
- type AdGroup
- type AdGroupAd
- type AdGroupAdLabel
- type AdGroupAdLabelOperations
- type AdGroupAdOperations
- type AdGroupAdService
- func (s *AdGroupAdService) CreateAd(AdGroupId int64, AdType, FinalUrl, Path1, Path2 string, ...) (adGroupAds AdGroupAds, err error)
- func (s AdGroupAdService) Get(selector Selector) (adGroupAds AdGroupAds, totalCount int64, err error)
- func (s *AdGroupAdService) Mutate(adGroupAdOperations AdGroupAdOperations) (adGroupAds AdGroupAds, err error)
- func (s *AdGroupAdService) MutateLabel(adGroupAdLabelOperations AdGroupAdLabelOperations) (adGroupAdLabels []AdGroupAdLabel, err error)
- func (s *AdGroupAdService) Query(query string) (adGroupAds AdGroupAds, totalCount int64, err error)
- func (s *AdGroupAdService) UpdateExpandedTextAd(FinalUrl, Path1, Path2 string, Headlines, Descriptions []string) error
- func (s *AdGroupAdService) UpdateResponsiveSearchAd(FinalUrl, Path1, Path2 string, Headlines, Descriptions []string) error
- func (s *AdGroupAdService) UpgradeUrl(adUrlUpgrades []AdUrlUpgrade) (adGroupAds AdGroupAds, err error)
- type AdGroupAds
- type AdGroupBidLandscape
- type AdGroupBidModifierService
- type AdGroupCriterionLabel
- type AdGroupCriterionLabelOperations
- type AdGroupCriterionOperation
- type AdGroupCriterionOperations
- type AdGroupCriterionService
- func (s AdGroupCriterionService) Get(selector Selector) (adGroupCriterions AdGroupCriterions, totalCount int64, err error)
- func (s *AdGroupCriterionService) Mutate(adGroupCriterionOperations AdGroupCriterionOperations) (adGroupCriterions AdGroupCriterions, err error)
- func (s *AdGroupCriterionService) MutateLabel(adGroupCriterionLabelOperations AdGroupCriterionLabelOperations) (adGroupCriterionLabels []AdGroupCriterionLabel, err error)
- func (s *AdGroupCriterionService) MutateOperations(operations []AdGroupCriterionOperation) (adGroupCriterions AdGroupCriterions, err error)
- func (s *AdGroupCriterionService) Query(query string) (adGroupCriterions AdGroupCriterions, totalCount int64, err error)
- type AdGroupCriterions
- type AdGroupEstimate
- type AdGroupEstimateRequest
- type AdGroupExperimentData
- type AdGroupExtensionSetting
- type AdGroupExtensionSettingOperations
- type AdGroupExtensionSettingService
- type AdGroupFeed
- type AdGroupFeedOperations
- type AdGroupFeedService
- func (s AdGroupFeedService) Get(selector Selector) (adGroupFeeds []AdGroupFeed, err error)
- func (s *AdGroupFeedService) Mutate(adGroupFeedOperations AdGroupFeedOperations) (adGroupFeeds []AdGroupFeed, err error)
- func (s *AdGroupFeedService) Query(query string) (adGroupFeeds []AdGroupFeed, err error)
- type AdGroupLabel
- type AdGroupLabelOperations
- type AdGroupOperations
- type AdGroupService
- func (s *AdGroupService) Get(selector Selector) (adGroups []AdGroup, totalCount int64, err error)
- func (s *AdGroupService) Mutate(adGroupOperations AdGroupOperations) (adGroups []AdGroup, err error)
- func (s *AdGroupService) MutateLabel(adGroupLabelOperations AdGroupLabelOperations) (adGroupLabels []AdGroupLabel, err error)
- func (s *AdGroupService) Query(query string) (adGroups []AdGroup, totalCount int64, err error)
- type AdGroupServiceError
- type AdParam
- type AdParamService
- type AdScheduleCriterion
- type AdSetting
- type AdUrlUpgrade
- type Address
- type AdwordsUserListService
- func (s AdwordsUserListService) Get(selector Selector) (userLists []UserList, err error)
- func (s *AdwordsUserListService) Mutate(userListOperations UserListOperations) (adwordsUserLists []UserList, err error)
- func (s *AdwordsUserListService) MutateMembers(mutateMembersOperations MutateMembersOperations) (adwordsUserLists []UserList, err error)
- type AgeRangeCriterion
- type ApiError
- type ApiExceptionFault
- type AppAd
- type AppUrl
- type Asset
- type AssetLink
- type AssetOperations
- type AssetsService
- type Attribute
- type Auth
- type AuthConfig
- type BatchJob
- type BatchJobHelper
- type BatchJobOperation
- type BatchJobOperations
- type BatchJobPage
- type BatchJobProcessingError
- type BatchJobService
- type Bid
- type BidLandscape
- type BiddableAdGroupCriterion
- type BiddingScheme
- type BiddingStrategyConfiguration
- type BiddingStrategyService
- type BooleanAttribute
- type Budget
- type BudgetError
- type BudgetOperations
- type BudgetOrderService
- type BudgetService
- type CallConversionType
- type CallFeedItem
- type Campaign
- type CampaignAppSetting
- type CampaignCriterion
- type CampaignCriterionOperations
- type CampaignCriterionService
- func (s *CampaignCriterionService) Get(selector Selector) (campaignCriterions CampaignCriterions, totalCount int64, err error)
- func (s *CampaignCriterionService) GetScheduleCriterions(selector Selector) (campaignCriterions []CampaignScheduleCriterion, totalCount int64, err error)
- func (s *CampaignCriterionService) Mutate(campaignCriterionOperations CampaignCriterionOperations) (campaignCriterions CampaignCriterions, err error)
- func (s *CampaignCriterionService) Query(query string) (campaignCriterions CampaignCriterions, totalCount int64, err error)
- func (s *CampaignCriterionService) SetSchedule(campaignid int64, start, end int) error
- type CampaignCriterions
- type CampaignEstimate
- type CampaignEstimateRequest
- type CampaignExtensionSetting
- type CampaignExtensionSettingOperations
- type CampaignExtensionSettingService
- type CampaignFeedService
- type CampaignLabel
- type CampaignLabelOperations
- type CampaignOperations
- type CampaignScheduleCriterion
- type CampaignService
- func (s *CampaignService) Get(selector Selector) (campaigns []Campaign, totalCount int64, err error)
- func (s *CampaignService) Mutate(campaignOperations CampaignOperations) (campaigns []Campaign, err error)
- func (s *CampaignService) MutateLabel(campaignLabelOperations CampaignLabelOperations) (campaignLabels []CampaignLabel, err error)
- func (s *CampaignService) Query(query string) (campaigns []Campaign, totalCount int64, err error)
- type CampaignSetting
- type CampaignSharedSet
- type CampaignSharedSetOperation
- type CampaignSharedSetService
- type CarrierCriterion
- type CategoryProductsAndServicesSearchParameter
- type CompetitionSearchParameter
- type ConstantDataService
- func (s *ConstantDataService) GetAgeRangeCriterion() (ageRanges []AgeRangeCriterion, err error)
- func (s *ConstantDataService) GetCarrierCriterion() (carriers []CarrierCriterion, err error)
- func (s *ConstantDataService) GetGenderCriterion() (genders []GenderCriterion, err error)
- func (s *ConstantDataService) GetLanguageCriterion() (languages []LanguageCriterion, err error)
- func (s *ConstantDataService) GetMobileDeviceCriterion() (mobileDevices []MobileDeviceCriterion, err error)
- func (s *ConstantDataService) GetOperatingSystemVersionCriterion() (operatingSystemVersions []OperatingSystemVersionCriterion, err error)
- func (s *ConstantDataService) GetProductBiddingCategoryCriterion(selector Selector) (categoryData []ProductBiddingCategoryData, err error)
- func (s *ConstantDataService) GetUserInterestCriterion() (userInterests []UserInterestCriterion, err error)
- func (s *ConstantDataService) GetVerticalCriterion() (verticals []VerticalCriterion, err error)
- type ContentLabelCriterion
- type ConversionTracker
- type ConversionTrackerService
- type ConversionTrackingSettings
- type Cpc
- type CpcAmount
- type Credentials
- type Criterion
- type CriterionBidLandscape
- type CriterionError
- type CriterionType
- type CustomParameter
- type CustomParameters
- type Customer
- type CustomerFeedService
- type CustomerOperations
- type CustomerService
- type CustomerSyncService
- type DataService
- func (s *DataService) GetAdGroupBidLandscape(selector Selector) (adGroupBidLandscapes []AdGroupBidLandscape, totalCount int64, err error)
- func (s *DataService) GetCriterionBidLandscape(selector Selector) (criterionBidLandscapes []CriterionBidLandscape, totalCount int64, err error)
- func (s *DataService) QueryAdGroupBidLandscape(query string) (adGroupBidLandscapes []AdGroupBidLandscape, totalCount int64, err error)
- func (s *DataService) QueryCriterionBidLandscape(query string) (criterionBidLandscapes []CriterionBidLandscape, totalCount int64, err error)
- type DateRange
- type DateRuleItem
- type DayOfWeek
- type Dimensions
- type DisapprovalReason
- type DoubleAttribute
- type DraftService
- type DynamicSearchAd
- type EntityError
- type EnumValuePair
- type Error
- type ErrorsType
- type ExpandedTextAd
- type Extension
- type ExtensionFeedItem
- type ExtensionSetting
- type ExtensionSettingPlatform
- type Fault
- type Feed
- type FeedAttribute
- type FeedAttributeType
- type FeedItemAdGroupTargeting
- type FeedItemApprovalStatus
- type FeedItemAttributeError
- type FeedItemCampaignTargeting
- type FeedItemDevicePreference
- type FeedItemGeoRestriction
- type FeedItemPolicyData
- type FeedItemQualityApprovalStatus
- type FeedItemQualityDisapprovalReasons
- type FeedItemSchedule
- type FeedItemScheduling
- type FeedItemService
- type FeedItemStatus
- type FeedItemValidationStatus
- type FeedMappingService
- type FeedOrigin
- type FeedService
- type FeedStatus
- type FeedType
- type FrequencyCap
- type FullSizeInfo
- type GAContext
- type GAService
- type GenderCriterion
- type GeoPoint
- type GeoRestriction
- type HttpClient
- type IdeaTextFilterSearchParameter
- type IdeaTypeAttribute
- type ImageAd
- type ImageAsset
- type ImageUrl
- type IncludeAdultContentSearchParameter
- type IntegerSetAttribute
- type IpBlockCriterion
- type Keyword
- type KeywordCriterion
- type KeywordEstimate
- type KeywordEstimateRequest
- type KeywordMatchType
- type Label
- type LabelError
- type LabelOperations
- type LabelService
- type LandscapePoint
- type LanguageCriterion
- type LanguageSearchParameter
- type Location
- type LocationCriterion
- type LocationCriterionService
- type LocationCriterions
- type LocationSearchParameter
- type LocationTargetingStatus
- type LongAttribute
- type ManagedCustomer
- type ManagedCustomerLink
- type ManagedCustomerOperations
- type ManagedCustomerPage
- type ManagedCustomerService
- type Media
- type MediaService
- type MinuteOfHour
- type MobileAd
- type MobileAppCategoryCriterion
- type MobileApplicationCriterion
- type MobileDeviceCriterion
- type MoneyAttribute
- type MonthlySearchVolume
- type MonthlySearchVolumeAttribute
- type MutateErrors
- type MutateMembersOperand
- type MutateMembersOperations
- type MutateResult
- type MutateResults
- type NegativeAdGroupCriterion
- type NegativeCampaignCriterion
- type NetworkSearchParameter
- type NetworkSetting
- type NotEmptyError
- type NumberRuleItem
- type OAuthConfigArgs
- type OAuthTokenArgs
- type OfflineConversionService
- type OperatingSystemVersionCriterion
- type Operation
- type OperationError
- type OptAd
- type OrderBy
- type OtherCriterion
- type Page
- type Paging
- type PlacementCriterion
- type PlatformCriterion
- type PolicyData
- type Predicate
- type ProductAd
- type ProductBiddingCategory
- type ProductBiddingCategoryData
- type ProductCondition
- type ProductCriterion
- type ProductDimension
- type ProductPartition
- type ProductScope
- type ProgressStats
- type ProximityCriterion
- type QualityInfo
- type RateExceededError
- type RelatedToQuerySearchParameter
- type RelatedToUrlSearchParameter
- type RemarketingSettings
- type ReportDefinition
- type ReportDefinitionField
- type ReportDefinitionRequest
- type ReportDefinitionService
- type ReportDownloadError
- type ReportDownloadService
- type ResponsiveDisplayAd
- type ResponsiveSearchAd
- type Rule
- type RuleItemGroup
- type SearchParameter
- type SearchVolumeSearchParameter
- type SeedAdGroupIdSearchParameter
- type Selector
- type ServiceLink
- type ServiceUrl
- type SharedCriterion
- type SharedCriterionOperation
- type SharedCriterionService
- type SharedSet
- type SharedSetOperation
- type SharedSetService
- type StatsEstimate
- type StringAttribute
- type StringMapEntry
- type StringRuleItem
- type SystemFeedGenerationData
- type TargetCpa
- type TargetDetails
- type TargetError
- type TargetSettingDetail
- type TargetingIdea
- type TargetingIdeaSelector
- type TargetingIdeaService
- type TargetingIdeas
- type TemplateAd
- type TemplateElement
- type TemplateElementField
- type TemporaryUrl
- type TextAd
- type TextAsset
- type TrafficEstimatorSelector
- type TrafficEstimatorService
- type TrialService
- type UrlError
- type UserInterestCriterion
- type UserList
- func NewBasicUserList(name, description, status, integrationCode string, membershipLifeSpan int64, ...) (adwordsUserList UserList)
- func NewCrmBasedUserList(name, description string, membershipLifeSpan int64, optOutLink string) (adwordsUserList UserList)
- func NewDateSpecificRuleUserList(name, description, status, integrationCode string, membershipLifeSpan int64, ...) (adwordsUserList UserList)
- func NewExpressionRuleUserList(name, description, status, integrationCode string, membershipLifeSpan int64, ...) (adwordsUserList UserList)
- func NewLogicalUserList(name, description, status, integrationCode string, membershipLifeSpan int64, ...) (adwordsUserList UserList)
- func NewSimilarUserList(name, description, status, integrationCode string, membershipLifeSpan int64) (adwordsUserList UserList)
- type UserListConversionType
- type UserListCriterion
- type UserListLogicalRule
- type UserListOperations
- type VerticalCriterion
- type VideoAsset
- type WebpageCondition
- type WebpageCriterion
- type WebpageDescriptor
- type WebpageDescriptorAttribute
- type WebpageParameter
Constants ¶
This section is empty.
Variables ¶
var (
ERROR_NOT_YET_IMPLEMENTED = fmt.Errorf("Not yet implemented")
)
exceptions
Functions ¶
func AddSearchAdGroup ¶
func AddSearchKeywords ¶
func CreateAppCampaign ¶
A campaignService holds the connection information for the campaign service.
func CreateSearchCampaign ¶
func CreateSearchCampaign(name string)
A campaignService holds the connection information for the campaign service.
Types ¶
type AccountLabel ¶
type AdGroup ¶
type AdGroup struct { Id int64 `xml:"id,omitempty"` CampaignId int64 `xml:"campaignId,omitempty"` CampaignName string `xml:"campaignName,omitempty"` Name string `xml:"name,omitempty"` AdServingOptimizationStatus string `xml:"adServingOptimizationStatus,omitempty"` Status string `xml:"status,omitempty"` Settings []AdSetting `xml:"settings,omitempty"` BiddingStrategyConfiguration []BiddingStrategyConfiguration `xml:"biddingStrategyConfiguration,omitempty"` ContentBidCriterionTypeGroup *string `xml:"contentBidCriterionTypeGroup,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Labels []Label `xml:"labels,omitempty"` AdGroupType string `xml:"adGroupType,omitempty"` }
type AdGroupAd ¶
type AdGroupAdLabel ¶
type AdGroupAdLabelOperations ¶
type AdGroupAdLabelOperations map[string][]AdGroupAdLabel
type AdGroupAdOperations ¶
type AdGroupAdOperations map[string]AdGroupAds
type AdGroupAdService ¶
type AdGroupAdService struct {
Auth
}
func NewAdGroupAdService ¶
func NewAdGroupAdService(auth *Auth) *AdGroupAdService
func (*AdGroupAdService) CreateAd ¶
func (s *AdGroupAdService) CreateAd(AdGroupId int64, AdType, FinalUrl, Path1, Path2 string, Headlines, Descriptions []string) (adGroupAds AdGroupAds, err error)
func (AdGroupAdService) Get ¶
func (s AdGroupAdService) Get(selector Selector) (adGroupAds AdGroupAds, totalCount int64, err error)
Get returns an array of ad's and the total number of ad's matching the selector.
Example
ads, totalCount, err := adGroupAdService.Get( gads.Selector{ Fields: []string{ "AdGroupId", "Status", "AdGroupCreativeApprovalStatus", "AdGroupAdDisapprovalReasons", "AdGroupAdTrademarkDisapproved", }, Predicates: []gads.Predicate{ {"AdGroupId", "EQUALS", []string{adGroupId}}, }, }, )
Selectable fields are
"AdGroupId", "Id", "Url", "DisplayUrl", "CreativeFinalUrls", "CreativeFinalMobileUrls", "CreativeFinalAppUrls", "CreativeTrackingUrlTemplate", "CreativeUrlCustomParameters", "DevicePreference", "Status", "AdGroupCreativeApprovalStatus", "AdGroupAdDisapprovalReasons" "AdGroupAdTrademarkDisapproved", "Labels" TextAd "Headline", "Description1", "Description2" ImageAd "ImageCreativeName"
filterable fields are
"AdGroupId", "Id", "Url", "DisplayUrl", "CreativeFinalUrls", "CreativeFinalMobileUrls", "CreativeFinalAppUrls", "CreativeTrackingUrlTemplate", "CreativeUrlCustomParameters", "DevicePreference", "Status", "AdGroupCreativeApprovalStatus", "AdGroupAdDisapprovalReasons" "Labels" TextAd specific fields "Headline", "Description1", "Description2" ImageAd specific fields "ImageCreativeName"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupAdService#get
func (*AdGroupAdService) Mutate ¶
func (s *AdGroupAdService) Mutate(adGroupAdOperations AdGroupAdOperations) (adGroupAds AdGroupAds, err error)
Mutate allows you to add, modify and remove ads, returning the modified ads.
Example
ads, err := adGroupAdService.Mutate( gads.AdGroupAdOperations{ "ADD": { gads.NewTextAd( adGroup.Id, "https://classdo.com/en", "classdo.com", "test headline", "test line one", "test line two", "PAUSED", ), }, "SET": { modifiedAd, }, "REMOVE": { adNeedingRemoval, }, }, )
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupAdService#mutate
func (*AdGroupAdService) MutateLabel ¶
func (s *AdGroupAdService) MutateLabel(adGroupAdLabelOperations AdGroupAdLabelOperations) (adGroupAdLabels []AdGroupAdLabel, err error)
MutateLabel allows you to add and removes labels from ads.
Example
ads, err := adGroupAdService.MutateLabel( gads.AdGroupAdLabelOperations{ "ADD": { gads.AdGroupAdLabel{AdGroupAdId: 3200, LabelId: 5353}, gads.AdGroupAdLabel{AdGroupAdId: 4320, LabelId: 5643}, }, "REMOVE": { gads.AdGroupAdLabel{AdGroupAdId: 3653, LabelId: 5653}, }, }
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupAdService#mutateLabel
func (*AdGroupAdService) Query ¶
func (s *AdGroupAdService) Query(query string) (adGroupAds AdGroupAds, totalCount int64, err error)
Query is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupAdService#query
func (*AdGroupAdService) UpdateExpandedTextAd ¶
func (s *AdGroupAdService) UpdateExpandedTextAd(FinalUrl, Path1, Path2 string, Headlines, Descriptions []string) error
func (*AdGroupAdService) UpdateResponsiveSearchAd ¶
func (s *AdGroupAdService) UpdateResponsiveSearchAd(FinalUrl, Path1, Path2 string, Headlines, Descriptions []string) error
func (*AdGroupAdService) UpgradeUrl ¶
func (s *AdGroupAdService) UpgradeUrl(adUrlUpgrades []AdUrlUpgrade) (adGroupAds AdGroupAds, err error)
Query is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupAdService#upgradeUrl
type AdGroupAds ¶
type AdGroupAds []interface{}
func (AdGroupAds) MarshalXML ¶
func (a1 AdGroupAds) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*AdGroupAds) UnmarshalXML ¶
func (aga *AdGroupAds) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type AdGroupBidLandscape ¶
type AdGroupBidLandscape struct { BidLandscape Type string `xml:"type"` LandscapeCurrent bool `xml:"landscapeCurrent"` Errors []error `xml:"-"` }
type AdGroupBidModifierService ¶
type AdGroupBidModifierService struct {
Auth
}
func NewAdGroupBidModifierService ¶
func NewAdGroupBidModifierService(auth *Auth) *AdGroupBidModifierService
type AdGroupCriterionLabel ¶
type AdGroupCriterionLabelOperations ¶
type AdGroupCriterionLabelOperations map[string][]AdGroupCriterionLabel
type AdGroupCriterionOperation ¶
type AdGroupCriterionOperation struct { Action string `xml:"operator"` AdGroupCriterion interface{} `xml:"operand"` }
type AdGroupCriterionOperations ¶
type AdGroupCriterionOperations map[string]AdGroupCriterions
type AdGroupCriterionService ¶
type AdGroupCriterionService struct {
Auth
}
func NewAdGroupCriterionService ¶
func NewAdGroupCriterionService(auth *Auth) *AdGroupCriterionService
func (AdGroupCriterionService) Get ¶
func (s AdGroupCriterionService) Get(selector Selector) (adGroupCriterions AdGroupCriterions, totalCount int64, err error)
Get returns an array of AdGroupCriterion's and the total number of AdGroupCriterion's matching the selector.
Example
adGroupCriterions, totalCount, err := adGroupCriterionService.Get( Selector{ Fields: []string{"Id","KeywordText","KeywordMatchType"}, Predicates: []Predicate{ {"AdGroupId", "EQUALS", []string{"432434"}}, }, }, )
Selectable fields are
"AdGroupId", "CriterionUse", "Id", "CriteriaType", "Labels" AgeRange "AgeRangeType", AppPaymentModel "AppPaymentModelType", CriterionUserInterest "UserInterestId", "UserInterestName", CriterionUserList "UserListId", "UserListName", "UserListMembershipStatus" Gender "GenderType" Keyword "KeywordText", "KeywordMatchType" MobileAppCategory "MobileAppCategoryId" MobileApplication "DisplayName" Placement "PlacementUrl" Product "Text" ProductPartition "PartitionType", "ParentCriterionId", "CaseValue" Vertical "VerticalId", "VerticalParentId", "Path" Webpage "Parameter", "CriteriaCoverage", "CriteriaSamples"
filterable fields are
"AdGroupId", "CriterionUse", "Id", "CriteriaType", "Labels" CriterionUserList "UserListMembershipStatus" Keyword "KeywordText", "KeywordMatchType" MobileApplication "DisplayName" Placement "PlacementUrl"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService#get
func (*AdGroupCriterionService) Mutate ¶
func (s *AdGroupCriterionService) Mutate(adGroupCriterionOperations AdGroupCriterionOperations) (adGroupCriterions AdGroupCriterions, err error)
func (*AdGroupCriterionService) MutateLabel ¶
func (s *AdGroupCriterionService) MutateLabel(adGroupCriterionLabelOperations AdGroupCriterionLabelOperations) (adGroupCriterionLabels []AdGroupCriterionLabel, err error)
MutateLabel allows you to add and removes labels from ad groups.
Example
adGroupCriterions, err := adGroupCriterionService.MutateLabel( gads.AdGroupCriterionLabelOperations{ "ADD": { gads.AdGroupCriterionLabel{AdGroupCriterionId: 3200, LabelId: 5353}, gads.AdGroupCriterionLabel{AdGroupCriterionId: 4320, LabelId: 5643}, }, "REMOVE": { gads.AdGroupCriterionLabel{AdGroupCriterionId: 3653, LabelId: 5653}, }, }, )
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService#mutateLabel
func (*AdGroupCriterionService) MutateOperations ¶
func (s *AdGroupCriterionService) MutateOperations(operations []AdGroupCriterionOperation) (adGroupCriterions AdGroupCriterions, err error)
func (*AdGroupCriterionService) Query ¶
func (s *AdGroupCriterionService) Query(query string) (adGroupCriterions AdGroupCriterions, totalCount int64, err error)
Query is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupCriterionService#query
type AdGroupCriterions ¶
type AdGroupCriterions []interface{}
func (*AdGroupCriterions) UnmarshalXML ¶
func (agcs *AdGroupCriterions) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type AdGroupEstimate ¶
type AdGroupEstimate struct {
KeywordEstimates []KeywordEstimate `xml:"keywordEstimates"`
}
type AdGroupEstimateRequest ¶
type AdGroupEstimateRequest struct { KeywordEstimateRequests []KeywordEstimateRequest `xml:"keywordEstimateRequests"` MaxCpc int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 maxCpc>microAmount"` }
type AdGroupExperimentData ¶
type AdGroupExtensionSetting ¶
type AdGroupExtensionSetting struct { AdGroupId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 adGroupId,omitempty"` ExtensionType FeedType `xml:"https://adwords.google.com/api/adwords/cm/v201809 extensionType,omitempty"` ExtensionSetting ExtensionSetting `xml:"https://adwords.google.com/api/adwords/cm/v201809 extensionSetting,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.AdGroupExtensionSetting An AdGroupExtensionSetting is used to add or modify extensions being served for the specified ad group.
type AdGroupExtensionSettingOperations ¶
type AdGroupExtensionSettingOperations map[string][]AdGroupExtensionSetting
type AdGroupExtensionSettingService ¶
type AdGroupExtensionSettingService struct {
Auth
}
func NewAdGroupExtensionSettingService ¶
func NewAdGroupExtensionSettingService(auth *Auth) *AdGroupExtensionSettingService
func (*AdGroupExtensionSettingService) Mutate ¶
func (s *AdGroupExtensionSettingService) Mutate(settingsOperations AdGroupExtensionSettingOperations) (settings []AdGroupExtensionSetting, err error)
func (*AdGroupExtensionSettingService) Query ¶
func (s *AdGroupExtensionSettingService) Query(query string) (settings []AdGroupExtensionSetting, totalCount int64, err error)
type AdGroupFeed ¶
type AdGroupFeed struct { }
type AdGroupFeedOperations ¶
type AdGroupFeedOperations struct { }
type AdGroupFeedService ¶
type AdGroupFeedService struct {
Auth
}
func NewAdGroupFeedService ¶
func NewAdGroupFeedService(auth *Auth) *AdGroupFeedService
func (AdGroupFeedService) Get ¶
func (s AdGroupFeedService) Get(selector Selector) (adGroupFeeds []AdGroupFeed, err error)
Get is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupFeedService#get
func (*AdGroupFeedService) Mutate ¶
func (s *AdGroupFeedService) Mutate(adGroupFeedOperations AdGroupFeedOperations) (adGroupFeeds []AdGroupFeed, err error)
Mutate is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupFeedService#mutate
func (*AdGroupFeedService) Query ¶
func (s *AdGroupFeedService) Query(query string) (adGroupFeeds []AdGroupFeed, err error)
Query is not yet implemented
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupFeedService#query
type AdGroupLabel ¶
type AdGroupLabelOperations ¶
type AdGroupLabelOperations map[string][]AdGroupLabel
type AdGroupOperations ¶
type AdGroupService ¶
type AdGroupService struct {
Auth
}
func NewAdGroupService ¶
func NewAdGroupService(auth *Auth) *AdGroupService
func (*AdGroupService) Get ¶
func (s *AdGroupService) Get(selector Selector) (adGroups []AdGroup, totalCount int64, err error)
Get returns an array of ad group's and the total number of ad group's matching the selector.
Example
ads, totalCount, err := adGroupService.Get( gads.Selector{ Fields: []string{ "Id", "CampaignId", "CampaignName", "Name", "Status", "Settings", "Labels", "ContentBidCriterionTypeGroup", "TrackingUrlTemplate", "UrlCustomParameters", }, Predicates: []gads.Predicate{ {"Id", "EQUALS", []string{adGroupId}}, }, }, )
Selectable fields are
"Id", "CampaignId", "CampaignName", "Name", "Status", "Settings", "Labels" "ContentBidCriterionTypeGroup", "TrackingUrlTemplate", "UrlCustomParameters"
filterable fields are
"Id", "CampaignId", "CampaignName", "Name", "Status", "Labels" "ContentBidCriterionTypeGroup", "TrackingUrlTemplate"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupService#get
func (*AdGroupService) Mutate ¶
func (s *AdGroupService) Mutate(adGroupOperations AdGroupOperations) (adGroups []AdGroup, err error)
Mutate allows you to add, modify and remove ad group's, returning the modified ad group's.
Example
ads, err := adGroupService.Mutate( gads.AdGroupOperations{ "ADD": { gads.AdGroup{ Name: "my ad group ", Status: "PAUSED", CampaignId: campaignId, BiddingStrategyConfiguration: []gads.BiddingStrategyConfiguration{ gads.BiddingStrategyConfiguration{ StrategyType: "MANUAL_CPC", Bids: []gads.Bid{ gads.Bid{ Type: "CpcBid", Amount: 10000, }, }, }, }, }, }, "SET": { modifiedAdGroup, }, "REMOVE": { adGroupNeedingRemoval, }, }, )
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupService#mutate
func (*AdGroupService) MutateLabel ¶
func (s *AdGroupService) MutateLabel(adGroupLabelOperations AdGroupLabelOperations) (adGroupLabels []AdGroupLabel, err error)
MutateLabel allows you to add and removes labels from ad groups.
Example
adGroups, err := adGroupService.MutateLabel( gads.AdGroupLabelOperations{ "ADD": { gads.AdGroupLabel{AdGroupId: 3200, LabelId: 5353}, gads.AdGroupLabel{AdGroupId: 4320, LabelId: 5643}, }, "REMOVE": { gads.AdGroupLabel{AdGroupId: 3653, LabelId: 5653}, }, }
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/AdGroupService#mutateLabel
type AdGroupServiceError ¶
type AdParamService ¶
type AdParamService struct {
Auth
}
func NewAdParamService ¶
func NewAdParamService(auth *Auth) *AdParamService
type AdScheduleCriterion ¶
type AdScheduleCriterion struct { Id int64 `xml:"id,omitempty"` DayOfWeek string `xml:"dayOfWeek"` StartHour string `xml:"startHour"` StartMinute string `xml:"startMinute"` EndHour string `xml:"endHour"` EndMinute string `xml:"endMinute"` }
DayOfWeek: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY StartHour: 0~23 inclusive StartMinute: ZERO, FIFTEEN, THIRTY, FORTY_FIVE EndHour: 0~24 inclusive EndMinute: ZERO, FIFTEEN, THIRTY, FORTY_FIVE
type AdSetting ¶
type AdSetting struct { XMLName xml.Name `xml:"settings"` Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` OptIn *bool `xml:"optIn"` Details []TargetSettingDetail `xml:"details"` }
type AdUrlUpgrade ¶
type Address ¶
type Address struct { StreetAddress string `xml:"streetAddress"` StreetAddress2 string `xml:"streetAddress2"` CityName string `xml:"cityName"` ProvinceCode string `xml:"provinceCode"` ProvinceName string `xml:"provinceName"` PostalCode string `xml:"postalCode"` CountryCode string `xml:"countryCode"` }
type AdwordsUserListService ¶
type AdwordsUserListService struct {
Auth
}
func NewAdwordsUserListService ¶
func NewAdwordsUserListService(auth *Auth) *AdwordsUserListService
func (AdwordsUserListService) Get ¶
func (s AdwordsUserListService) Get(selector Selector) (userLists []UserList, err error)
Get returns an array of adwords user lists and the total number of adwords user lists matching the selector.
Example
ads, totalCount, err := adwordsUserListService.Get( gads.Selector{ Fields: []string{ "Id", "Name", "Status", "Labels", }, Predicates: []gads.Predicate{ {"Id", "EQUALS", []string{adGroupId}}, }, }, )
Selectable fields are
"Id", "IsReadOnly", "Name", "Description", "Status", "IntegrationCode", "AccessReason", "AccountUserListStatus", "MembershipLifeSpan", "Size", "SizeRange", "SizeForSearch", "SizeRangeForSearch", "ListType" BasicUserList "ConversionType" LogicalUserList "Rules" SimilarUserList "SeedUserListId", "SeedUserListName", "SeedUserListDescription", "SeedUserListStatus", "SeedListSize"
filterable fields are
"Id", "Name", "Status", "IntegrationCode", "AccessReason", "AccountUserListStatus", "MembershipLifeSpan", "Size", "SizeForSearch", "ListType" SimilarUserList "SeedUserListId", "SeedListSize"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/AdwordsUserListService#get
func (*AdwordsUserListService) Mutate ¶
func (s *AdwordsUserListService) Mutate(userListOperations UserListOperations) (adwordsUserLists []UserList, err error)
Mutate adds/sets a collection of user lists. Returns a list of User Lists
Example
auls := gads.NewAdwordsUserListService(&config.Auth) crmList := gads.NewCrmBasedUserList("Test List", "Just a list to test with", 0, "http://mytest.com/optout") ops := gads.UserListOperations{ Operations: []gads.Operation{ gads.Operation{ Operator: "ADD", Operand: crmList, }, }, } resp, err := auls.Mutate(ops)
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/AdwordsUserListService#mutate
func (*AdwordsUserListService) MutateMembers ¶
func (s *AdwordsUserListService) MutateMembers(mutateMembersOperations MutateMembersOperations) (adwordsUserLists []UserList, err error)
mutateMembersOperations := gads.MutateMembersOperations{ Operations: []gads.Operation{ gads.Operation{ Operator: "ADD", Operand: mmo, }, }, } auls.MutateMembers(mutateMembersOperations)
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/AdwordsUserListService#mutateMembers
type AgeRangeCriterion ¶
type AgeRangeCriterion struct { Id int64 `xml:"id,omitempty"` AgeRangeType string `xml:"ageRangeType"` }
AgeRangeType: AGE_RANGE_18_24, AGE_RANGE_25_34, AGE_RANGE_35_44, AGE_RANGE_45_54, AGE_RANGE_55_64, AGE_RANGE_65_UP, AGE_RANGE_UNDETERMINED, UNKNOWN
type ApiError ¶
type ApiError struct {
Type string `xml:"type"`
}
type is equiv to errorString eg AuthorizationError.USER_PERMISSION_DENIED
type ApiExceptionFault ¶
type ApiExceptionFault struct { Message string `xml:"message"` Type string `xml:"ApplicationException.Type"` ErrorsType string Reason string Errors []interface{} `xml:"errors"` }
func (*ApiExceptionFault) UnmarshalXML ¶
func (aes *ApiExceptionFault) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error)
type AppAd ¶
type AppAd struct { AdGroupId int64 `xml:"-"` //Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Id int64 `xml:"id,omitempty"` Url string `xml:"url,omitempty"` DisplayUrl string `xml:"displayUrl,omitempty"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` FinalUrlSuffix string `xml:"finalUrlSuffix,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Headlines []AssetLink `xml:"headlines,omitempty"` Descriptions []AssetLink `xml:"descriptions,omitempty"` Images []AssetLink `xml:"images,omitempty"` Videos []AssetLink `xml:"videos,omitempty"` Labels []Label `xml:"-"` }
type Asset ¶
type Asset struct { Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Id int64 `xml:"assetId,omitempty"` AssetName string `xml:"assetName,omitempty"` ImageData string `xml:"imageData,omitempty"` AssetText string `xml:"assetText,omitempty"` YouTubeVideoId string `xml:"youTubeVideoId,omitempty"` FullSizeInfo *FullSizeInfo `xml:"fullSizeInfo,omitempty"` }
Media represents an audio, image or video file.
func NewImageAsset ¶
func NewTextAsset ¶
func NewYouTubeVideoAsset ¶
type AssetOperations ¶
type AssetsService ¶
type AssetsService struct {
Auth
}
func NewAssetsService ¶
func NewAssetsService(auth *Auth) *AssetsService
func (*AssetsService) Get ¶
func (s *AssetsService) Get(selector Selector) (assets []Asset, totalCount int64, err error)
func (*AssetsService) Mutate ¶
func (s *AssetsService) Mutate(assetOperations AssetOperations) (assets []Asset, err error)
type AuthConfig ¶
type AuthConfig struct { OAuth2Config *oauth2.Config `json:"oauth2.Config"` OAuth2Token *oauth2.Token `json:"oauth2.Token"` Auth Auth `json:"gads.Auth"` // contains filtered or unexported fields }
func NewCredentialsFromFile ¶
func NewCredentialsFromFile(pathToFile string) (ac AuthConfig, err error)
func NewCredentialsFromParams ¶
func NewCredentialsFromParams(creds Credentials) (config AuthConfig, err error)
func (*AuthConfig) Init ¶
func (ac *AuthConfig) Init()
func (AuthConfig) Save ¶
func (c AuthConfig) Save() error
Save writes the contents of AuthConfig back to the JSON file it was loaded from.
type BatchJob ¶
type BatchJob struct { Id int64 `xml:"id,omitempty" json:",string"` Status string `xml:"status,omitempty"` ProgressStats *ProgressStats `xml:"progressStats,omitempty"` UploadUrl *TemporaryUrl `xml:"uploadUrl,omitempty"` DownloadUrl *TemporaryUrl `xml:"downloadUrl,omitempty"` ProcessingErrors *BatchJobProcessingError `xml:"processingErrors,omitempty"` }
type BatchJobHelper ¶
type BatchJobHelper struct {
Auth
}
func NewBatchJobHelper ¶
func NewBatchJobHelper(auth *Auth) *BatchJobHelper
func (*BatchJobHelper) DownloadBatchJob ¶
func (s *BatchJobHelper) DownloadBatchJob(url TemporaryUrl) (mutateResults []MutateResults, err error)
DownloadBatchJob download batch operations from an BatchJob.DownloadUrl from BatchJobService.Get
Example ¶
mutateResult, err := batchJobHelper.DownloadBatchJob(*batchJobs.BatchJobs[0].DownloadUrl)
func (*BatchJobHelper) UploadBatchJobOperations ¶
func (s *BatchJobHelper) UploadBatchJobOperations(jobOperations []interface{}, url TemporaryUrl) (err error)
UploadBatchJobOperations uploads batch operations to an BatchJob.UploadUrl from BatchJobService.Mutate
Example ¶
ago := gads.AdGroupOperations{ "ADD": { gads.AdGroup{ Name: "test ad group " + rand_str(10), Status: "PAUSED", CampaignId: campaignId, }, gads.AdGroup{ Name: "test ad group " + rand_str(10), Status: "PAUSED", CampaignId: campaignId, }, }, }
var operations []interface{} operations = append(operations, ago) err = batchJobHelper.UploadBatchJobOperations(operations, UploadUrl)
type BatchJobOperation ¶
type BatchJobOperations ¶
type BatchJobOperations struct {
BatchJobOperations []BatchJobOperation
}
type BatchJobPage ¶
type BatchJobProcessingError ¶
type BatchJobService ¶
type BatchJobService struct {
Auth
}
func NewBatchJobService ¶
func NewBatchJobService(auth *Auth) *BatchJobService
func (*BatchJobService) Get ¶
func (s *BatchJobService) Get(selector Selector) (batchJobPage BatchJobPage, err error)
Get queries the status of existing BatchJobs
Example batchJobs, err := batchJobService.Get( gads.Selector{ Fields: []string{ "Id", "Status", "DownloadUrl", "ProcessingErrors", "ProgressStats", }, Predicates: []gads.Predicate{ {"Id", "EQUALS", []string{strconv.FormatInt(jobId, 10)}}, }, }, ) https://developers.google.com/adwords/api/docs/reference/v201809/BatchJobService#get
func (*BatchJobService) Mutate ¶
func (s *BatchJobService) Mutate(batchJobOperations BatchJobOperations) (batchJobs []BatchJob, err error)
Mutate allows you to create or update a BatchJob
Example resp, err := batchJobService.Mutate( gads.BatchJobOperations{ BatchJobOperations: []gads.BatchJobOperation{ gads.BatchJobOperation{ Operator: "ADD", Operand: gads.BatchJob{}, }, }, }, ) https://developers.google.com/adwords/api/docs/reference/v201809/BatchJobService#mutate
func (*BatchJobService) Query ¶
func (s *BatchJobService) Query()
type BidLandscape ¶
type BidLandscape struct { CampaignId *int64 `xml:"campaignId,omitempty"` AdGroupId *int64 `xml:"adGroupId,omitempty"` StartDate *string `xml:"startDate,omitempty"` EndDate *string `xml:"endDate,omitempty"` LandscapePoints []LandscapePoint `xml:"landscapePoints"` }
type BiddableAdGroupCriterion ¶
type BiddableAdGroupCriterion struct { AdGroupId int64 `xml:"adGroupId,omitempty"` CriterionUse string `xml:"criterionUse,omitempty"` Criterion Criterion `xml:"criterion,omitempty"` // BiddableAdGroupCriterion UserStatus string `xml:"userStatus,omitempty"` SystemServingStatus string `xml:"systemServingStatus,omitempty"` ApprovalStatus string `xml:"approvalStatus,omitempty"` DisapprovalReasons []string `xml:"disapprovalReasons,omitempty"` DestinationUrl string `xml:"destinationUrl,omitempty"` // TODO add ExperimentData FirstPageCpc *Cpc `xml:"firstPageCpc,omitempty"` TopOfPageCpc *Cpc `xml:"topOfPageCpc,omitempty"` QualityInfo *QualityInfo `xml:"qualityInfo,omitempty"` BiddingStrategyConfiguration *BiddingStrategyConfiguration `xml:"biddingStrategyConfiguration,omitempty"` BidModifier float64 `xml:"bidModifier,omitempty"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []string `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters CustomParameters `xml:"urlCustomParameters,omitempty"` Labels []Label `xml:"labels,omitempty"` }
func (BiddableAdGroupCriterion) MarshalXML ¶
func (bagc BiddableAdGroupCriterion) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*BiddableAdGroupCriterion) UnmarshalXML ¶
func (bagc *BiddableAdGroupCriterion) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type BiddingScheme ¶
type BiddingStrategyConfiguration ¶
type BiddingStrategyConfiguration struct { StrategyId int64 `xml:"biddingStrategyId,omitempty"` StrategyName string `xml:"biddingStrategyName,omitempty"` StrategyType string `xml:"biddingStrategyType,omitempty"` StrategySource string `xml:"biddingStrategySource,omitempty"` Scheme *BiddingScheme `xml:"biddingScheme,omitempty"` Bids []Bid `xml:"bids,omitempty"` }
type BiddingStrategyService ¶
type BiddingStrategyService struct {
Auth
}
func NewBiddingStrategyService ¶
func NewBiddingStrategyService(auth *Auth) *BiddingStrategyService
type BooleanAttribute ¶
type BooleanAttribute struct {
Value bool `xml:"value"`
}
type Budget ¶
type Budget struct { Id int64 `xml:"budgetId,omitempty"` // A unique identifier Name string `xml:"name,omitempty"` // A descriptive name Period string `xml:"period,omitempty"` // The period to spend the budget Amount int64 `xml:"amount>microAmount,omitempty"` // The amount in cents Delivery string `xml:"deliveryMethod,omitempty"` // The rate at which the budget spent. valid options are STANDARD or ACCELERATED. References int64 `xml:"referenceCount,omitempty"` // The number of campaigns using the budget Status string `xml:"status,omitempty"` // The status of the budget. can be ENABLED, REMOVED, UNKNOWN }
A Budget represents an allotment of money to be spent over a fixed period of time.
type BudgetError ¶
type BudgetError struct {
EntityError
}
type BudgetOperations ¶
A BudgetOperations maps operations to the budgets they will be performed on. Budgets operations can be 'ADD', 'REMOVE' or 'SET'
type BudgetOrderService ¶
type BudgetOrderService struct {
Auth
}
func NewBudgetOrderService ¶
func NewBudgetOrderService(auth *Auth) *BudgetOrderService
type BudgetService ¶
type BudgetService struct {
Auth
}
A budgetService holds the connection information for the budget service.
func NewBudgetService ¶
func NewBudgetService(auth *Auth) *BudgetService
NewBudgetService creates a new budgetService
func (*BudgetService) Get ¶
func (s *BudgetService) Get(selector Selector) (budgets []Budget, totalCount int64, err error)
Get returns budgets matching a given selector and the total count of matching budgets.
func (*BudgetService) Mutate ¶
func (s *BudgetService) Mutate(budgetOperations BudgetOperations) (budgets []Budget, err error)
Mutate takes a budgetOperations and creates, modifies or destroys the associated budgets.
type CallConversionType ¶
type CallConversionType struct {
ConversionTypeId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 conversionTypeId,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.CallConversionType Conversion type for a call extension.
type CallFeedItem ¶
type CallFeedItem struct { ExtensionFeedItem CallPhoneNumber string `xml:"https://adwords.google.com/api/adwords/cm/v201809 callPhoneNumber,omitempty"` CallCountryCode string `xml:"https://adwords.google.com/api/adwords/cm/v201809 callCountryCode,omitempty"` CallTracking bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 callTracking,omitempty"` CallConversionType CallConversionType `xml:"https://adwords.google.com/api/adwords/cm/v201809 callConversionType,omitempty"` DisableCallConversionTracking bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 disableCallConversionTracking,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.CallFeedItem Represents a Call extension.
type Campaign ¶
type Campaign struct { Id int64 `xml:"id,omitempty"` Name string `xml:"name,omitempty"` BudgetAmount int64 `xml:"-"` Status string `xml:"status,omitempty"` // Status: "ENABLED", "PAUSED", "REMOVED" ServingStatus *string `xml:"servingStatus,omitempty"` // ServingStatus: "SERVING", "NONE", "ENDED", "PENDING", "SUSPENDED" StartDate string `xml:"startDate,omitempty"` EndDate string `xml:"endDate,omitempty"` BudgetId int64 `xml:"budget>budgetId,omitempty"` BudgetDeliveryMethod string `xml:"-"` ConversionOptimizerEligibility *conversionOptimizerEligibility `xml:"conversionOptimizerEligibility,omitempty"` AdServingOptimizationStatus string `xml:"adServingOptimizationStatus,omitempty"` FrequencyCap *FrequencyCap `xml:"frequencyCap,omitempty"` Settings []CampaignSetting `xml:"settings,omitempty"` AdvertisingChannelType string `xml:"advertisingChannelType,omitempty"` // "UNKNOWN", "SEARCH", "DISPLAY", "SHOPPING" AdvertisingChannelSubType string `xml:"advertisingChannelSubType,omitempty"` // "UNKNOWN", "SEARCH_MOBILE_APP", "DISPLAY_MOBILE_APP", "SEARCH_EXPRESS", "DISPLAY_EXPRESS" NetworkSetting *NetworkSetting `xml:"networkSetting,omitempty"` Labels []Label `xml:"labels,omitempty"` BiddingStrategyConfiguration *BiddingStrategyConfiguration `xml:"biddingStrategyConfiguration,omitempty"` ForwardCompatibilityMap *map[string]string `xml:"forwardCompatibilityMap,omitempty"` TrackingUrlTemplate *string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Errors []error `xml:"-"` UniversalAppCampaignInfo *CampaignAppSetting `xml:"universalAppCampaignInfo,omitempty"` }
type CampaignAppSetting ¶
type CampaignAppSetting struct { UniversalAppBiddingStrategyGoalType string `xml:"biddingStrategyGoalType,omitempty"` AppId string `xml:"appId,omitempty"` AppVendor string `xml:"appVendor,omitempty"` Description1 string `xml:"description1,omitempty"` Description2 string `xml:"description2,omitempty"` Description3 string `xml:"description3,omitempty"` Description4 string `xml:"description4,omitempty"` }
type CampaignCriterion ¶
type CampaignCriterion struct { CampaignId int64 `xml:"campaignId"` IsNegative bool `xml:"isNegative,omitempty"` Criterion Criterion `xml:"criterion"` BidModifier *float64 `xml:"bidModifier,omitempty"` Errors []error `xml:"-"` }
func (CampaignCriterion) MarshalXML ¶
func (cc CampaignCriterion) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type CampaignCriterionOperations ¶
type CampaignCriterionOperations map[string]CampaignCriterions
type CampaignCriterionService ¶
type CampaignCriterionService struct {
Auth
}
func NewCampaignCriterionService ¶
func NewCampaignCriterionService(auth *Auth) *CampaignCriterionService
func (*CampaignCriterionService) Get ¶
func (s *CampaignCriterionService) Get(selector Selector) (campaignCriterions CampaignCriterions, totalCount int64, err error)
func (*CampaignCriterionService) GetScheduleCriterions ¶
func (s *CampaignCriterionService) GetScheduleCriterions(selector Selector) (campaignCriterions []CampaignScheduleCriterion, totalCount int64, err error)
func (*CampaignCriterionService) Mutate ¶
func (s *CampaignCriterionService) Mutate(campaignCriterionOperations CampaignCriterionOperations) (campaignCriterions CampaignCriterions, err error)
func (*CampaignCriterionService) Query ¶
func (s *CampaignCriterionService) Query(query string) (campaignCriterions CampaignCriterions, totalCount int64, err error)
func (*CampaignCriterionService) SetSchedule ¶
func (s *CampaignCriterionService) SetSchedule(campaignid int64, start, end int) error
type CampaignCriterions ¶
type CampaignCriterions []interface{}
func GenScheduleCriterions ¶
func GenScheduleCriterions(campaignid int64, start, end int) CampaignCriterions
func (*CampaignCriterions) UnmarshalXML ¶
func (ccs *CampaignCriterions) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type CampaignEstimate ¶
type CampaignEstimate struct {
AdGroupEstimates []AdGroupEstimate `xml:"adGroupEstimates"`
}
type CampaignEstimateRequest ¶
type CampaignEstimateRequest struct {
AdGroupEstimateRequests []AdGroupEstimateRequest `xml:"adGroupEstimateRequests"`
}
type CampaignExtensionSetting ¶
type CampaignExtensionSetting struct { CampaignId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 campaignId,omitempty"` ExtensionType FeedType `xml:"https://adwords.google.com/api/adwords/cm/v201809 extensionType,omitempty"` ExtensionSetting ExtensionSetting `xml:"https://adwords.google.com/api/adwords/cm/v201809 extensionSetting,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/CampaignExtensionSettingService.CampaignExtensionSetting A CampaignExtensionSetting is used to add or modify extensions being served for the specified campaign.
type CampaignExtensionSettingOperations ¶
type CampaignExtensionSettingOperations map[string][]CampaignExtensionSetting
type CampaignExtensionSettingService ¶
type CampaignExtensionSettingService struct {
Auth
}
func NewCampaignExtensionService ¶
func NewCampaignExtensionService(auth *Auth) *CampaignExtensionSettingService
func (*CampaignExtensionSettingService) Mutate ¶
func (s *CampaignExtensionSettingService) Mutate(settingsOperations CampaignExtensionSettingOperations) (settings []CampaignExtensionSetting, err error)
func (*CampaignExtensionSettingService) Query ¶
func (s *CampaignExtensionSettingService) Query(query string) (settings []CampaignExtensionSetting, totalCount int64, err error)
type CampaignFeedService ¶
type CampaignFeedService struct {
Auth
}
func NewCampaignFeedService ¶
func NewCampaignFeedService(auth *Auth) *CampaignFeedService
type CampaignLabel ¶
type CampaignLabelOperations ¶
type CampaignLabelOperations map[string][]CampaignLabel
type CampaignOperations ¶
type CampaignScheduleCriterion ¶
type CampaignScheduleCriterion struct { CampaignId int64 `xml:"campaignId"` IsNegative bool `xml:"isNegative,omitempty"` Criterion AdScheduleCriterion `xml:"criterion"` BidModifier *float64 `xml:"bidModifier,omitempty"` Errors []error `xml:"-"` }
type CampaignService ¶
type CampaignService struct {
Auth
}
A campaignService holds the connection information for the campaign service.
func NewCampaignService ¶
func NewCampaignService(auth *Auth) *CampaignService
NewCampaignService creates a new campaignService
func (*CampaignService) Get ¶
func (s *CampaignService) Get(selector Selector) (campaigns []Campaign, totalCount int64, err error)
Get returns an array of Campaign's and the total number of campaign's matching the selector.
Example
campaigns, totalCount, err := campaignService.Get( gads.Selector{ Fields: []string{ "AdGroupId", "Status", "AdGroupCreativeApprovalStatus", "AdGroupAdDisapprovalReasons", "AdGroupAdTrademarkDisapproved", }, Predicates: []gads.Predicate{ {"AdGroupId", "EQUALS", []string{adGroupId}}, }, }, )
Selectable fields are
"Id", "Name", "Status", "ServingStatus", "StartDate", "EndDate", "Settings", "AdvertisingChannelType", "AdvertisingChannelSubType", "Labels", "TrackingUrlTemplate", "UrlCustomParameters"
filterable fields are
"Id", "Name", "Status", "ServingStatus", "StartDate", "EndDate", "AdvertisingChannelType", "AdvertisingChannelSubType", "Labels", "TrackingUrlTemplate"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/CampaignService#get
func (*CampaignService) Mutate ¶
func (s *CampaignService) Mutate(campaignOperations CampaignOperations) (campaigns []Campaign, err error)
Mutate allows you to add and modify campaigns, returning the campaigns. Note that the "REMOVE" operator is not supported. To remove a campaign set its Status to "REMOVED".
Example
campaignNeedingRemoval.Status = "REMOVED" ads, err := campaignService.Mutate( gads.CampaignOperations{ "ADD": { gads.Campaign{ Name: "my campaign name", Status: "PAUSED", StartDate: time.Now().Format("20060102"), BudgetId: 321543214, Settings: []gads.CampaignSetting{ gads.NewRealTimeBiddingSetting(true), }, AdvertisingChannelType: "SEARCH", BiddingStrategyConfiguration: &gads.BiddingStrategyConfiguration{ StrategyType: "MANUAL_CPC", }, }, campaignNeedingRemoval, }, "SET": { modifiedCampaign, }, }
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/CampaignService#mutate
func (*CampaignService) MutateLabel ¶
func (s *CampaignService) MutateLabel(campaignLabelOperations CampaignLabelOperations) (campaignLabels []CampaignLabel, err error)
Mutate allows you to add and removes labels from campaigns.
Example
cls, err := campaignService.MutateLabel( gads.CampaignOperations{ "ADD": { gads.CampaignLabel{CampaignId: 3200, LabelId: 5353}, gads.CampaignLabel{CampaignId: 4320, LabelId: 5643}, }, "REMOVE": { gads.CampaignLabel{CampaignId: 3653, LabelId: 5653}, }, }
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/CampaignService#mutateLabel
type CampaignSetting ¶
type CampaignSetting struct { XMLName xml.Name `xml:"settings"` Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` //Type2 string `xml:"Setting.Type"` // GeoTargetTypeSetting PositiveGeoTargetType *string `xml:"positiveGeoTargetType,omitempty"` NegativeGeoTargetType *string `xml:"negativeGeoTargetType,omitempty"` // RealTimeBiddingSetting OptIn *bool `xml:"optIn,omitempty"` // DynamicSearchAdsSetting DomainName *string `xml:"domainName,omitempty"` LanguageCode *string `xml:"langaugeCode,omitempty"` // TrackingSetting TrackingUrl *string `xml:"trackingUrl,omitempty"` AppId string `xml:"appId,omitempty"` AppVendor string `xml:"appVendor,omitempty"` Description1 string `xml:"description1,omitempty"` Description2 string `xml:"description2,omitempty"` Description3 string `xml:"description3,omitempty"` Description4 string `xml:"description4,omitempty"` UniversalAppBiddingStrategyGoalType string `xml:"universalAppBiddingStrategyGoalType,omitempty"` Details []TargetDetails `xml:"details,omitempty"` }
func NewDynamicSearchAdsSetting ¶
func NewDynamicSearchAdsSetting(domainName, languageCode string) CampaignSetting
func NewGeoTargetTypeSetting ¶
func NewGeoTargetTypeSetting(positiveGeoTargetType, negativeGeoTargetType string) CampaignSetting
func NewRealTimeBiddingSetting ¶
func NewRealTimeBiddingSetting(optIn bool) CampaignSetting
func NewTrackingSetting ¶
func NewTrackingSetting(trackingUrl string) CampaignSetting
type CampaignSharedSet ¶
type CampaignSharedSet struct {}
type CampaignSharedSetOperation ¶
type CampaignSharedSetOperation struct {}
type CampaignSharedSetService ¶
type CampaignSharedSetService struct {
}func NewCampaignSharedSetService ¶
func NewCampaignSharedSetService(auth *Auth) *CampaignSharedSetService
func (CampaignSharedSetService) Get ¶
func (s CampaignSharedSetService) Get(selector Selector) (sharedSets []CampaignSharedSet, totalCount int64, err error)
func (CampaignSharedSetService) Mutate ¶
func (s CampaignSharedSetService) Mutate(operations []CampaignSharedSetOperation) error
type CarrierCriterion ¶
type CategoryProductsAndServicesSearchParameter ¶
type CategoryProductsAndServicesSearchParameter struct {
CategoryID int `xml:"categoryId"`
}
type CompetitionSearchParameter ¶
type CompetitionSearchParameter struct {
Levels []string `xml:"levels"`
}
type ConstantDataService ¶
type ConstantDataService struct {
Auth
}
func NewConstantDataService ¶
func NewConstantDataService(auth *Auth) *ConstantDataService
func (*ConstantDataService) GetAgeRangeCriterion ¶
func (s *ConstantDataService) GetAgeRangeCriterion() (ageRanges []AgeRangeCriterion, err error)
func (*ConstantDataService) GetCarrierCriterion ¶
func (s *ConstantDataService) GetCarrierCriterion() (carriers []CarrierCriterion, err error)
func (*ConstantDataService) GetGenderCriterion ¶
func (s *ConstantDataService) GetGenderCriterion() (genders []GenderCriterion, err error)
func (*ConstantDataService) GetLanguageCriterion ¶
func (s *ConstantDataService) GetLanguageCriterion() (languages []LanguageCriterion, err error)
func (*ConstantDataService) GetMobileDeviceCriterion ¶
func (s *ConstantDataService) GetMobileDeviceCriterion() (mobileDevices []MobileDeviceCriterion, err error)
func (*ConstantDataService) GetOperatingSystemVersionCriterion ¶
func (s *ConstantDataService) GetOperatingSystemVersionCriterion() (operatingSystemVersions []OperatingSystemVersionCriterion, err error)
func (*ConstantDataService) GetProductBiddingCategoryCriterion ¶
func (s *ConstantDataService) GetProductBiddingCategoryCriterion(selector Selector) (categoryData []ProductBiddingCategoryData, err error)
func (*ConstantDataService) GetUserInterestCriterion ¶
func (s *ConstantDataService) GetUserInterestCriterion() (userInterests []UserInterestCriterion, err error)
func (*ConstantDataService) GetVerticalCriterion ¶
func (s *ConstantDataService) GetVerticalCriterion() (verticals []VerticalCriterion, err error)
type ContentLabelCriterion ¶
type ContentLabelCriterion struct { Id int64 `xml:"id,omitempty"` ContentLabelType string `xml:"contentLabelType"` // ContentLabelType: "ADULTISH", "AFE", "BELOW_THE_FOLD", "CONFLICT", "DP", "EMBEDDED_VIDEO", "GAMES", "JACKASS", "PROFANITY", "UGC_FORUMS", "UGC_IMAGES", "UGC_SOCIAL", "UGC_VIDEOS", "SIRENS", "TRAGEDY", "VIDEO", "UNKNOWN" }
type ConversionTracker ¶
type ConversionTrackerService ¶
type ConversionTrackerService struct {
Auth
}
func NewConversionTrackerService ¶
func NewConversionTrackerService(auth *Auth) *ConversionTrackerService
func (*ConversionTrackerService) Get ¶
func (s *ConversionTrackerService) Get(selector Selector) (ConversionTrackers []ConversionTracker, totalCount int64, err error)
type Credentials ¶
type Credentials struct { Config OAuthConfigArgs Token OAuthTokenArgs Auth Auth }
type CriterionBidLandscape ¶
type CriterionBidLandscape struct { BidLandscape CriterionId *int64 `xml:"criterionId,omitempty"` }
type CriterionError ¶
type CriterionError struct {
EntityError
}
type CriterionType ¶
type CriterionType string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.Criterion.Type The types of criteria
type CustomParameter ¶
type CustomParameters ¶
type CustomParameters struct { CustomParameters []CustomParameter `xml:"parameters"` DoReplace bool `xml:"doReplace"` }
type Customer ¶
type Customer struct { CustomerId int64 `xml:"customerId,omitempty"` CurrencyCode string `xml:"currencyCode,omitempty"` DateTimeZone string `xml:"dateTimeZone,omitempty"` DescriptiveName string `xml:"descriptiveName,omitempty"` /* CanManageClients bool `xml:"canManageClients"` TestAccount bool `xml:"testAccount"` */ AutoTaggingEnabled bool `xml:"autoTaggingEnabled"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` ConversionTrackingSettings *ConversionTrackingSettings `xml:"conversionTrackingSettings,omitempty"` RemarketingSettings *RemarketingSettings `xml:"remarketingSettings,omitempty"` }
type CustomerFeedService ¶
type CustomerFeedService struct {
Auth
}
func NewCustomerFeedService ¶
func NewCustomerFeedService(auth *Auth) *CustomerFeedService
type CustomerOperations ¶
type CustomerService ¶
type CustomerService struct {
Auth
}
func NewCustomerService ¶
func NewCustomerService(auth *Auth) *CustomerService
func (*CustomerService) GetCustomers ¶
func (s *CustomerService) GetCustomers() (customers []Customer, err error)
func (*CustomerService) GetServiceLinks ¶
func (s *CustomerService) GetServiceLinks(selector Selector) (links []ServiceLink, err error)
func (*CustomerService) Mutate ¶
func (s *CustomerService) Mutate(customerOperations CustomerOperations) (customers []Customer, err error)
type CustomerSyncService ¶
type CustomerSyncService struct {
Auth
}
func NewCustomerSyncService ¶
func NewCustomerSyncService(auth *Auth) *CustomerSyncService
type DataService ¶
type DataService struct {
Auth
}
func NewDataService ¶
func NewDataService(auth *Auth) *DataService
func (*DataService) GetAdGroupBidLandscape ¶
func (s *DataService) GetAdGroupBidLandscape(selector Selector) (adGroupBidLandscapes []AdGroupBidLandscape, totalCount int64, err error)
GetAdGroupBidLandscape returns an array of AdGroupBidLandscape objects the selector.
Example
adGroupBidLandscape, totalCount, err := dataService.GetAdGroupBidLandscape( gads.Selector{ Fields: []string{ "AdGroupId", "Bid", "CampaignId", "LocalClicks", "LocalCost", "LocalImpressions", }, Predicates: []gads.Predicate{ {"AdGroupId", "EQUALS", []string{adGroupId}}, }, }, )
Selectable fields are
"AdGroupId", "Bid", "CampaignId", "EndDate", "LandscapeCurrent", "LandscapeType", "LocalClicks", "LocalCost", "LocalImpressions", "PromotedImpressions", "StartDate"
filterable fields are
"AdGroupId", "Bid", "CampaignId", "LandscapeCurrent", "LandscapeType", "LocalClicks", "LocalCost", "LocalImpressions", "PromotedImpressions"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/DataService#getadgroupbidlandscape https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201809-DataService
func (*DataService) GetCriterionBidLandscape ¶
func (s *DataService) GetCriterionBidLandscape(selector Selector) (criterionBidLandscapes []CriterionBidLandscape, totalCount int64, err error)
GetCriterionBidLandscape returns an array of CriterionBidLandscape objects the selector.
Example
criterionBidLandscape, totalCount, err := dataService.GetCriterionBidLandscape( gads.Selector{ Fields: []string{ "AdGroupId", "CriterionId", "Bid", "CampaignId", "LocalClicks", "LocalCost", "LocalImpressions", }, Predicates: []gads.Predicate{ {"CriterionId", "EQUALS", []string{criterionId}}, }, }, )
Selectable fields are
"AdGroupId", "Bid", "CampaignId", "CriterionId", "EndDate", "LandscapeCurrent", "LandscapeType", "LocalClicks", "LocalCost", "LocalImpressions", "PromotedImpressions", "StartDate"
filterable fields are
"AdGroupId", "Bid", "CampaignId", "CriterionId", "LandscapeCurrent", "LandscapeType", "LocalClicks", "LocalCost", "LocalImpressions", "PromotedImpressions"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/DataService#getcriterionbidlandscape https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201809-DataService
func (*DataService) QueryAdGroupBidLandscape ¶
func (s *DataService) QueryAdGroupBidLandscape(query string) (adGroupBidLandscapes []AdGroupBidLandscape, totalCount int64, err error)
QueryAdGroupBidLandscape returns a slice of AdGroupBidLandscapes based on passed in AWQL query
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/DataService#queryadgroupbidlandscape
func (*DataService) QueryCriterionBidLandscape ¶
func (s *DataService) QueryCriterionBidLandscape(query string) (criterionBidLandscapes []CriterionBidLandscape, totalCount int64, err error)
QueryCriterionBidLandscape returns a slice of CriterionBidLandscapes based on passed in AWQL query
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/DataService#querycriterionbidlandscape
type DateRuleItem ¶
type DateRuleItem struct { Key string `xml:"key>name"` Op string `xml:"op"` // "UNKNOWN", "EQUALS", "NOT_EQUAL", "BEFORE", "AFTER" Value string `xml:"string"` }
Rule structs
type DayOfWeek ¶
type DayOfWeek string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.DayOfWeek Days of the week. MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
type Dimensions ¶
type DisapprovalReason ¶
type DisapprovalReason struct {
ShortName string `xml:"https://adwords.google.com/api/adwords/cm/v201809 shortName,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.DisapprovalReason Container for information about why an AdWords entity was disapproved.
type DoubleAttribute ¶
type DoubleAttribute struct {
Value float64 `xml:"value"`
}
type DraftService ¶
type DraftService struct {
Auth
}
func NewDraftService ¶
func NewDraftService(auth *Auth) *DraftService
type DynamicSearchAd ¶
type DynamicSearchAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` Url string `xml:"url"` DisplayUrl string `xml:"displayUrl"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Status string `xml:"-"` }
type EntityError ¶
type EnumValuePair ¶
type ErrorsType ¶
type ErrorsType struct {
ApiExceptionFaults []ApiExceptionFault `xml:"ApiExceptionFault"`
}
func (ErrorsType) Error ¶
func (f ErrorsType) Error() string
type ExpandedTextAd ¶
type ExpandedTextAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` HeadlinePart1 string `xml:"headlinePart1,omitempty"` HeadlinePart2 string `xml:"headlinePart2,omitempty"` HeadlinePart3 string `xml:"headlinePart3,omitempty"` Description string `xml:"description,omitempty"` Description2 string `xml:"description2,omitempty"` Path1 string `xml:"path1,omitempty"` Path2 string `xml:"path2,omitempty"` ExperimentData *AdGroupExperimentData `xml:"-"` Status string `xml:"-"` Labels []Label `xml:"-"` BaseCampaignId *int64 `xml:"-"` BaseAdGroupId *int64 `xml:"-"` }
type ExtensionFeedItem ¶
type ExtensionFeedItem struct { XMLName xml.Name `json:"-" xml:"extensions"` FeedId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 feedId,omitempty"` FeedItemId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 feedItemId,omitempty"` Status *FeedItemStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 status,omitempty"` FeedType *FeedType `xml:"https://adwords.google.com/api/adwords/cm/v201809 feedType,omitempty"` StartTime string `xml:"https://adwords.google.com/api/adwords/cm/v201809 startTime,omitempty"` // special value "00000101 000000" may be used to clear an existing start time. EndTime string `xml:"https://adwords.google.com/api/adwords/cm/v201809 endTime,omitempty"` // special value "00000101 000000" may be used to clear an existing end time. DevicePreference *FeedItemDevicePreference `xml:"https://adwords.google.com/api/adwords/cm/v201809 devicePreference,omitempty"` Scheduling *FeedItemScheduling `xml:"https://adwords.google.com/api/adwords/cm/v201809 scheduling,omitempty"` CampaignTargeting *FeedItemCampaignTargeting `xml:"https://adwords.google.com/api/adwords/cm/v201809 campaignTargeting,omitempty"` AdGroupTargeting *FeedItemAdGroupTargeting `xml:"https://adwords.google.com/api/adwords/cm/v201809 adGroupTargeting,omitempty"` KeywordTargeting *Keyword `xml:"https://adwords.google.com/api/adwords/cm/v201809 keywordTargeting,omitempty"` GeoTargeting *Location `xml:"https://adwords.google.com/api/adwords/cm/v201809 geoTargeting,omitempty"` GeoTargetingRestriction *FeedItemGeoRestriction `xml:"https://adwords.google.com/api/adwords/cm/v201809 geoTargetingRestriction,omitempty"` PolicyData *[]FeedItemPolicyData `xml:"https://adwords.google.com/api/adwords/cm/v201809 policyData,omitempty"` ExtensionFeedItemType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 ExtensionFeedItem.Type,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.ExtensionFeedItem Contains base extension feed item data for an extension in an extension feed managed by AdWords.
type ExtensionSetting ¶
type ExtensionSetting struct { PlatformRestrictions ExtensionSettingPlatform `xml:"platformRestrictions,omitempty"` Extensions Extension `xml:"https://adwords.google.com/api/adwords/cm/v201809 extensions,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.ExtensionSetting A setting specifying when and which extensions should serve at a given level (customer, campaign, or ad group).
func (ExtensionSetting) MarshalXML ¶
func (s ExtensionSetting) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*ExtensionSetting) UnmarshalXML ¶
func (s *ExtensionSetting) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error)
type ExtensionSettingPlatform ¶
type ExtensionSettingPlatform string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.ExtensionSetting.Platform Different levels of platform restrictions DESKTOP, MOBILE, NONE
type Fault ¶
type Fault struct { XMLName xml.Name `xml:"Fault"` FaultCode string `xml:"faultcode"` FaultString string `xml:"faultstring"` Errors ErrorsType `xml:"detail"` }
type Feed ¶
type Feed struct { Id int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 id,omitempty"` Name string `xml:"https://adwords.google.com/api/adwords/cm/v201809 name,omitempty"` Attributes []FeedAttribute `xml:"https://adwords.google.com/api/adwords/cm/v201809 attributes,omitempty"` Status FeedStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 status,omitempty"` Origin FeedOrigin `xml:"https://adwords.google.com/api/adwords/cm/v201809 origin,omitempty"` SystemFeedGenerationData []SystemFeedGenerationData `xml:"https://adwords.google.com/api/adwords/cm/v201809 systemFeedGenerationData,omitempty"` }
A Feed identifies a source of data and its schema. The data for the Feed can either be user-entered via the FeedItemService or system-generated, in which case the data is provided automatically. https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.Feed
type FeedAttribute ¶
type FeedAttribute struct { Id int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 id,omitempty"` Name string `xml:"https://adwords.google.com/api/adwords/cm/v201809 name,omitempty"` Type FeedAttributeType `xml:"https://adwords.google.com/api/adwords/cm/v201809 type,omitempty"` IsPartOfKey bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 isPartOfKey,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.FeedAttribute FeedAttributes define the types of data expected to be present in a Feed. A single FeedAttribute specifies the expected type of the FeedItemAttributes with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as being part of a FeedItem's unique key.
type FeedAttributeType ¶
type FeedAttributeType string
https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.FeedAttribute.Type Possible data types.
type FeedItemAdGroupTargeting ¶
type FeedItemAdGroupTargeting struct {
TargetingAdGroupId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 TargetingAdGroupId,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemAdGroupTargeting Specifies the adgroup the request context must match in order for the feed item to be considered eligible for serving (aka the targeted adgroup). E.g., if the below adgroup targeting is set to adgroup = X, then the feed item can only serve under adgroup X.
type FeedItemApprovalStatus ¶
type FeedItemApprovalStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemApprovalStatus Feed item approval status UNCHECKED, APPROVED, DISAPPROVED
type FeedItemAttributeError ¶
type FeedItemAttributeError struct { FeedAttributeIds []int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 feedAttributeIds,omitempty"` ValidationErrorCode int `xml:"https://adwords.google.com/api/adwords/cm/v201809 validationErrorCode,omitempty"` ErrorInformation string `xml:"https://adwords.google.com/api/adwords/cm/v201809 errorInformation,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemAttributeError Contains validation error details for a set of feed attributes
type FeedItemCampaignTargeting ¶
type FeedItemCampaignTargeting struct {
TargetingCampaignId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 TargetingCampaignId,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemCampaignTargeting Specifies the campaign the request context must match in order for the feed item to be considered eligible for serving (aka the targeted campaign). E.g., if the below campaign targeting is set to campaignId = X, then the feed item can only serve under campaign X.
type FeedItemDevicePreference ¶
type FeedItemDevicePreference struct {
DevicePreference int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 devicePreference,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemDevicePreference Represents a FeedItem device preference
type FeedItemGeoRestriction ¶
type FeedItemGeoRestriction struct {
GeoRestriction GeoRestriction `xml:"https://adwords.google.com/api/adwords/cm/v201809 geoRestriction,omitempty"`
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemGeoRestriction Represents a FeedItem geo restriction.
type FeedItemPolicyData ¶
type FeedItemPolicyData struct { PolicyData PlaceholderType int `xml:"https://adwords.google.com/api/adwords/cm/v201809 placeholderType,omitempty"` FeedMappingId int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 feedMappingId,omitempty"` ValidationStatus FeedItemValidationStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 validationStatus,omitempty"` ApprovalStatus FeedItemApprovalStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 approvalStatus,omitempty"` ValidationErrors []FeedItemAttributeError `xml:"https://adwords.google.com/api/adwords/cm/v201809 validationErrors,omitempty"` QualityApprovalStatus FeedItemQualityApprovalStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 qualityApprovalStatus,omitempty"` QualityDisapprovalReasons FeedItemQualityDisapprovalReasons `xml:"https://adwords.google.com/api/adwords/cm/v201809 qualityDisapprovalReasons,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemPolicyData Contains offline-validation and approval results for a given FeedItem and FeedMapping. Each validation data indicates any issues found on the feed item when used in the context of the feed mapping.
type FeedItemQualityApprovalStatus ¶
type FeedItemQualityApprovalStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemQualityApprovalStatus Feed item quality evaluation approval status UNCHECKED, APPROVED, DISAPPROVED
type FeedItemQualityDisapprovalReasons ¶
type FeedItemQualityDisapprovalReasons string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemQualityDisapprovalReasons Feed item quality evaluation disapproval reasons.
type FeedItemSchedule ¶
type FeedItemSchedule struct { DayOfWeek DayOfWeek `xml:"https://adwords.google.com/api/adwords/cm/v201809 dayOfWeek,omitempty"` StartHour int `xml:"https://adwords.google.com/api/adwords/cm/v201809 startHour,omitempty"` StartMinute MinuteOfHour `xml:"https://adwords.google.com/api/adwords/cm/v201809 startMinute,omitempty"` EndHour int `xml:"https://adwords.google.com/api/adwords/cm/v201809 endHour,omitempty"` EndMinute MinuteOfHour `xml:"https://adwords.google.com/api/adwords/cm/v201809 endMinute,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemSchedule Represents a FeedItem schedule, which specifies a time interval on a given day when the feed item may serve. The FeedItemSchedule times are in the account's time zone.
type FeedItemScheduling ¶
type FeedItemScheduling struct {
// contains filtered or unexported fields
}
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemScheduling Represents a collection of FeedItem schedules specifying all time intervals for which the feed item may serve. Any time range not covered by the specified FeedItemSchedules will prevent the feed item from serving during those times.
type FeedItemService ¶
type FeedItemService struct {
Auth
}
func NewFeedItemService ¶
func NewFeedItemService(auth *Auth) *FeedItemService
type FeedItemStatus ¶
type FeedItemStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItem.Status ENABLED, REMOVED, UNKNOWN
type FeedItemValidationStatus ¶
type FeedItemValidationStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.FeedItemValidationStatus Validation status of a FeedItem UNCHECKED, ERROR, VALID
type FeedMappingService ¶
type FeedMappingService struct {
Auth
}
func NewFeedMappingService ¶
func NewFeedMappingService(auth *Auth) *FeedMappingService
type FeedOrigin ¶
type FeedOrigin string
Used to Specify who manages the FeedAttributes for the Feed. https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.Feed.Origin USER, ADWORDS, UNKNOWN
type FeedService ¶
type FeedService struct {
Auth
}
func NewFeedService ¶
func NewFeedService(auth *Auth) *FeedService
func (*FeedService) Query ¶
func (s *FeedService) Query(query string) (page []Feed, totalCount int64, err error)
https://developers.google.com/adwords/api/docs/reference/v201809/FeedService
type FeedStatus ¶
type FeedStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.Feed.Status Status of the Feed. ENABLED, REMOVED, UNKNOWN
type FeedType ¶
type FeedType string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.Feed.Type Feed hard type. Values coincide with placeholder type id. Enum: NONE, SITELINK, CALL, APP, REVIEW, AD_CUSTOMIZER, CALLOUT, STRUCTURED_SNIPPET, PRICE
type FrequencyCap ¶
type FullSizeInfo ¶
type GAService ¶
type GAService struct {
Auth
}
A campaignService holds the connection information for the campaign service.
func NewGAService ¶
NewCampaignService creates a new campaignService
type GenderCriterion ¶
type GeoRestriction ¶
type GeoRestriction string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.GeoRestriction A restriction used to determine if the request context's geo should be matched. UNKNOWN, LOCATION_OF_PRESENCE
type IdeaTypeAttribute ¶
type IdeaTypeAttribute struct {
Value string `xml:"value"`
}
type ImageAd ¶
type ImageAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` Url string `xml:"url"` DisplayUrl string `xml:"displayUrl"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Image int64 `xml:"imageId"` Name string `xml:"name"` AdToCopyImageFrom int64 `xml:"adToCopyImageFrom"` Status string `xml:"-"` Labels []Label `xml:"-"` }
type ImageAsset ¶
type IncludeAdultContentSearchParameter ¶
type IncludeAdultContentSearchParameter struct{}
type IntegerSetAttribute ¶
type IntegerSetAttribute struct {
Value []int `xml:"value"`
}
type IpBlockCriterion ¶
type IpBlockCriterion struct {
Id int64 `xml:"id,omitempty"`
}
type Keyword ¶
type Keyword struct { Id int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 id,omitempty"` Type CriterionType `xml:"https://adwords.google.com/api/adwords/cm/v201809 type,omitempty"` CriterionType CriterionType `xml:"https://adwords.google.com/api/adwords/cm/v201809 Criterion.Type,omitempty"` Text string `xml:"https://adwords.google.com/api/adwords/cm/v201809 text,omitempty"` MatchType KeywordMatchType `xml:"https://adwords.google.com/api/adwords/cm/v201809 matchType,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.Keyword Represents a keyword.
type KeywordCriterion ¶
type KeywordCriterion struct { Id int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 id,omitempty"` Text string `xml:"https://adwords.google.com/api/adwords/cm/v201809 text,omitempty"` // Text: up to 80 characters and ten words MatchType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 matchType,omitempty"` // MatchType: "EXACT", "PHRASE", "BROAD" }
type KeywordEstimate ¶
type KeywordEstimate struct { Min StatsEstimate `xml:"min"` Max StatsEstimate `xml:"max"` }
type KeywordEstimateRequest ¶
type KeywordEstimateRequest struct {
Keyword KeywordCriterion `xml:"keyword"`
}
type KeywordMatchType ¶
type KeywordMatchType string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.KeywordMatchType Match type of a keyword. i.e. the way we match a keyword string with search queries. EXACT, PHRASE, BROAD
type Label ¶
type Label struct { Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Id int64 `xml:"id,omitempty"` Name string `xml:"name,omitempty"` Status string `xml:"status,omitempty"` }
Label represents a label.
func NewTextLabel ¶
NewTextLabel returns an new Label struct for creating a new TextLabel.
type LabelError ¶
type LabelOperations ¶
LabelOperations is a map of operations to perform on Label's
type LabelService ¶
type LabelService struct {
Auth
}
func NewLabelService ¶
func NewLabelService(auth *Auth) *LabelService
func (LabelService) Get ¶
func (s LabelService) Get(selector Selector) (labels []Label, totalCount int64, err error)
Get returns an array of Label's and the total number of Label's matching the selector.
Example
labels, totalCount, err := labelService.Get( Selector{ Fields: []string{"LabelId","LabelName","LabelStatus"}, Predicates: []Predicate{ {"LabelStatus", "EQUALS", []string{"ENABLED"}}, }, }, )
Selectable fields are
"LabelId", "LabelName", "LabelStatus"
filterable fields are
"LabelId", "LabelName", "LabelStatus"
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/LabelService#get
func (*LabelService) Mutate ¶
func (s *LabelService) Mutate(labelOperations LabelOperations) (labels []Label, err error)
Mutate allows you to add, modify and remove labels, returning the modified labels.
Example
labels, err := labelService.Mutate( LabelOperations{ "ADD": { NewTextLabel("Label1"), NewTextLabel("Label2"), }, "SET": { modifiedLabel, }, "REMOVE": { Label{Type:"TextLabel",Id:10}, }, }, )
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201409/LabelService#mutate
type LandscapePoint ¶
type LanguageCriterion ¶
type LanguageSearchParameter ¶
type LanguageSearchParameter struct {
Languages []LanguageCriterion `xml:"languages"`
}
type Location ¶
type Location struct { Id int64 `xml:"https://adwords.google.com/api/adwords/cm/v201809 id,omitempty"` Type CriterionType `xml:"https://adwords.google.com/api/adwords/cm/v201809 type,omitempty"` CriterionType CriterionType `xml:"https://adwords.google.com/api/adwords/cm/v201809 Criterion.Type,omitempty"` LocationName string `xml:"https://adwords.google.com/api/adwords/cm/v201809 locationName,omitempty"` DisplayType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 displayType,omitempty"` TargetingStatus LocationTargetingStatus `xml:"https://adwords.google.com/api/adwords/cm/v201809 targetingStatus,omitempty"` ParentLocations []Location `xml:"https://adwords.google.com/api/adwords/cm/v201809 parentLocations,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.Location Represents Location criterion. A criterion of this type can only be created using an ID. LocationName: DisplayType: TargetingStatus: ACTIVE, OBSOLETE, PHASING_OUT ParentLocations:
type LocationCriterion ¶
type LocationCriterionService ¶
type LocationCriterionService struct {
Auth
}
func NewLocationCriterionService ¶
func NewLocationCriterionService(auth *Auth) *LocationCriterionService
func (*LocationCriterionService) Get ¶
func (s *LocationCriterionService) Get(selector Selector) (locationCriterions LocationCriterions, err error)
type LocationCriterions ¶
type LocationCriterions []LocationCriterion
type LocationSearchParameter ¶
type LocationSearchParameter struct {
Locations []Location `xml:"locations"`
}
type LocationTargetingStatus ¶
type LocationTargetingStatus string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.LocationTargetingStatus Enum that represents the different Targeting Status values for a Location criterion. ACTIVE, OBSOLETE, PHASING_OUT
type LongAttribute ¶
type LongAttribute struct {
Value int64 `xml:"value"`
}
type ManagedCustomer ¶
type ManagedCustomer struct { Name string `xml:"name"` CustomerId int64 `xml:"customerId,omitempty"` CanManageClients bool `xml:"canManageClients,omitempty"` CurrencyCode string `xml:"currencyCode"` DateTimeZone string `xml:"dateTimeZone"` TestAccount bool `xml:"testAccount,omitempty"` AccountLabels []AccountLabel `xml:"accountLabels,omitempty"` ExcludeHiddenAccounts bool `xml:"excludeHiddenAccounts,omitempty"` }
type ManagedCustomerLink ¶
type ManagedCustomerOperations ¶
type ManagedCustomerOperations map[string][]ManagedCustomer
type ManagedCustomerPage ¶
type ManagedCustomerPage struct { Size int64 `xml:"rval>totalNumEntries"` ManagedCustomers []ManagedCustomer `xml:"rval>entries"` ManagedCustomerLinks []ManagedCustomerLink `xml:"rval>links"` }
type ManagedCustomerService ¶
type ManagedCustomerService struct {
Auth
}
func NewManagedCustomerService ¶
func NewManagedCustomerService(auth *Auth) *ManagedCustomerService
func (*ManagedCustomerService) Get ¶
func (s *ManagedCustomerService) Get(selector Selector) (managedCustomerPage ManagedCustomerPage, totalCount int64, err error)
func (*ManagedCustomerService) Mutate ¶
func (s *ManagedCustomerService) Mutate(managedCustomerOperations ManagedCustomerOperations) (managedCustomers []ManagedCustomer, err error)
type Media ¶
type Media struct { Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Id int64 `xml:"mediaId,omitempty"` MediaType string `xml:"type"` // "AUDIO", "DYNAMIC_IMAGE", "ICON", "IMAGE", "STANDARD_ICON", "VIDEO" ReferenceId int64 `xml:"referenceId,omitempty"` Dimensions []Dimensions `xml:"dimensions"` Urls []ImageUrl `xml:"urls"` MimeType string `xml:"mimeType,omitempty"` // "IMAGE_JPEG", "IMAGE_GIF", "IMAGE_PNG", "FLASH", "TEXT_HTML", "PDF", "MSWORD", "MSEXCEL", "RTF", "AUDIO_WAV", "AUDIO_MP3" SourceUrl string `xml:"sourceUrl,omitempty"` Name string `xml:"name"` FileSize int64 `xml:"fileSize,omitempty"` // File size in bytes CreationTime string `xml:"createTime,omitempty"` // format is YYYY-MM-DD HH:MM:SS+TZ // Audio / Video DurationMillis int64 `xml:"durationMillis,omitempty"` StreamingUrl string `xml:"streamingUrl,omitempty"` ReadyToPlayOnWeb bool `xml:"readyToPlayOnTheWeb,omitempty"` // Image Data string `xml:"data,omitempty"` // base64Binary encoded raw image data // Video IndustryStandardCommercialIdentifier string `xml:"industryStandardCommercialIdentifier,omitempty"` AdvertisingId string `xml:"advertisingId,omitempty"` YouTubeVideoIdString string `xml:"youTubeVideoIdString,omitempty"` }
Media represents an audio, image or video file.
type MediaService ¶
type MediaService struct {
Auth
}
func NewMediaService ¶
func NewMediaService(auth *Auth) *MediaService
func (*MediaService) Get ¶
func (s *MediaService) Get(selector Selector) (medias []Media, totalCount int64, err error)
type MinuteOfHour ¶
type MinuteOfHour string
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.MinuteOfHour Minutes in an hour. Currently only 0, 15, 30, and 45 are supported ZERO, FIFTEEN, THIRTY, FORTY_FIVE
type MobileAd ¶
type MobileAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` Url string `xml:"url"` DisplayUrl string `xml:"displayUrl"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Headline string `xml:"headline"` Description string `xml:"description"` MarkupLanguages []string `xml:"markupLanguages"` MobileCarriers []string `xml:"mobileCarriers"` BusinessName string `xml:"businessName"` CountryCode string `xml:"countryCode"` PhoneNumber string `xml:"phoneNumber"` Status string `xml:"-"` Labels []Label `xml:"-"` }
type MobileAppCategoryCriterion ¶
type MobileAppCategoryCriterion struct { Id int64 `xml:"id,omitempty"` MobileAppCategoryId int64 `xml:"mobileAppCategoryId"` DisplayName string `xml:"displayName,omitempty"` }
MobileAppCategoryId:
https://developers.google.com/adwords/api/docs/appendix/mobileappcategories
DisplayName:
type MobileApplicationCriterion ¶
type MobileApplicationCriterion struct { Id int64 `xml:"id,omitempty"` AppId string `xml:"appId"` DisplayName string `xml:"displayName,omitempty"` }
AppId: "{platform}-{platform_native_id}" DisplayName:
type MobileDeviceCriterion ¶
type MobileDeviceCriterion struct { Id int64 `xml:"id,omitempty"` DeviceName string `xml:"deviceName,omitempty"` ManufacturerName string `xml:"manufacturerName,omitempty"` DeviceType string `xml:"deviceType,omitempty"` OperatingSystemName string `xml:"operatingSystemName,omitempty"` }
DeviceName: ManufacturerName: DeviceType: DEVICE_TYPE_MOBILE, DEVICE_TYPE_TABLET OperatingSystemName:
type MoneyAttribute ¶
type MoneyAttribute struct {
Value int64 `xml:"value>microAmount"`
}
type MonthlySearchVolume ¶
type MonthlySearchVolumeAttribute ¶
type MonthlySearchVolumeAttribute struct {
Value []MonthlySearchVolume `xml:"value"`
}
type MutateErrors ¶
type MutateErrors struct {
Errors EntityError `xml:"errors"`
}
type MutateMembersOperand ¶
type MutateMembersOperand struct { UserListId int64 `xml:"userListId"` DataType string `xml:"dataType"` RemoveAll *bool `xml:"removeAll"` Members []string `xml:"members"` }
func NewMutateMembersOperand ¶
func NewMutateMembersOperand() *MutateMembersOperand
func (MutateMembersOperand) MarshalXML ¶
func (mmo MutateMembersOperand) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type MutateMembersOperations ¶
type MutateResult ¶
type MutateResult interface{}
type MutateResults ¶
type MutateResults struct { Result MutateResult `xml:"result"` ErrorList []MutateErrors `xml:"errorList"` Index int `xml:"index"` }
func (*MutateResults) UnmarshalXML ¶
func (mr *MutateResults) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error)
type NegativeAdGroupCriterion ¶
type NegativeAdGroupCriterion struct { AdGroupId int64 `xml:"adGroupId"` CriterionUse string `xml:"criterionUse,omitempty"` Criterion Criterion `xml:"criterion"` }
func (NegativeAdGroupCriterion) MarshalXML ¶
func (nagc NegativeAdGroupCriterion) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*NegativeAdGroupCriterion) UnmarshalXML ¶
func (nagc *NegativeAdGroupCriterion) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type NegativeCampaignCriterion ¶
type NegativeCampaignCriterion struct { CampaignId int64 `xml:"campaignId"` IsNegative bool `xml:"isNegative,omitempty"` Criterion Criterion `xml:"criterion"` BidModifier *float64 `xml:"bidModifier,omitempty"` Errors []error `xml:"-"` }
func (NegativeCampaignCriterion) MarshalXML ¶
func (ncc NegativeCampaignCriterion) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type NetworkSearchParameter ¶
type NetworkSearchParameter struct {
NetworkSetting NetworkSetting `xml:"networkSetting"`
}
type NetworkSetting ¶
type NetworkSetting struct { TargetGoogleSearch bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 targetGoogleSearch"` TargetSearchNetwork bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 targetSearchNetwork"` TargetContentNetwork bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 targetContentNetwork"` TargetPartnerSearchNetwork bool `xml:"https://adwords.google.com/api/adwords/cm/v201809 targetPartnerSearchNetwork"` }
type NotEmptyError ¶
type NumberRuleItem ¶
type OAuthConfigArgs ¶
type OAuthTokenArgs ¶
type OfflineConversionService ¶
type OfflineConversionService struct {
Auth
}
func NewOfflineConversionService ¶
func NewOfflineConversionService(auth *Auth) *OfflineConversionService
type OperatingSystemVersionCriterion ¶
type OperatingSystemVersionCriterion struct { Id int64 `xml:"id,omitempty"` Name string `xml:"name,omitempty"` OsMajorVersion int64 `xml:"osMajorVersion,omitempty"` OsMinorVersion int64 `xml:"osMinorVersion,omitempty"` OperatorType string `xml:"operatorType,omitempty"` }
Name: OsMajorVersion: OsMinorVersion: OperatorType: GREATER_THAN_EQUAL_TO, EQUAL_TO, UNKNOWN
type OperationError ¶
type OptAd ¶
type OptAd struct { AdGroupId int64 `xml:"adGroupId,omitempty"` Id int64 `xml:"ad>id,omitempty"` Status string `xml:"status"` }
OptAd 用来开关ad
type OtherCriterion ¶
type OtherCriterion struct{}
type Page ¶
type Page struct { TotalNumEntries int `xml:"https://adwords.google.com/api/adwords/cm/v201809 totalNumEntries,omitempty"` PageType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 Page.Type,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.Page Contains the results from a get call.
type PlacementCriterion ¶
Url:
type PlatformCriterion ¶
type PlatformCriterion struct { Id int64 `xml:"id,omitempty"` PlatformName string `xml:"platformName,omitempty"` }
PlatformId:
Desktop 30000 HighEndMobile 30001 Tablet 30002
type PolicyData ¶
type PolicyData struct { DisapprovalReasons []DisapprovalReason `xml:"https://adwords.google.com/api/adwords/cm/v201809 disapprovalReasons,omitempty"` PolicyDataType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 PolicyData.Type,omitempty"` }
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupExtensionSettingService.PolicyData Approval and policy information attached to an entity.
type ProductBiddingCategory ¶
type ProductBiddingCategory ProductDimension
Represents a google_product_category level
type ProductBiddingCategoryData ¶
type ProductBiddingCategoryData struct { DimensionValue ProductBiddingCategory `xml:"dimensionValue"` ParentDimensionValue ProductBiddingCategory `xml:"parentDimensionValue"` Country string `xml:"country"` Status string `xml:"status"` DisplayValue []StringMapEntry `xml:"displayValue"` }
type ProductCondition ¶
Argument: Operand: id, product_type, brand, adwords_grouping, condition, adwords_labels
type ProductCriterion ¶
type ProductCriterion struct { Id int64 `xml:"id,omitempty"` Conditions []ProductCondition `xml:"conditions"` Text string `xml:"text,omitempty"` }
type ProductDimension ¶
type ProductDimension struct { Type string `xml:"ProductDimension.Type"` DimensionType string `xml:"type,omitempty"` Value string `xml:"value"` }
func (ProductDimension) MarshalXML ¶
func (s ProductDimension) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*ProductDimension) UnmarshalXML ¶
func (s *ProductDimension) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type ProductPartition ¶
type ProductPartition struct { Id int64 `xml:"id,omitempty"` CriteriaType string `xml:"type"` PartitionType string `xml:"partitionType,omitempty"` ParentCriterionId int64 `xml:"parentCriterionId,omitempty"` Dimension ProductDimension `xml:"caseValue"` Cpc *Cpc // This value is inherited from BiddableAdgroupCriterion }
func (ProductPartition) MarshalXML ¶
func (s ProductPartition) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type ProductScope ¶
type ProductScope struct { Id int64 `xml:"id,omitempty"` CriteriaType string `xml:"type"` Dimensions []ProductDimension `xml:"dimensions"` }
type ProgressStats ¶
type ProgressStats struct { NumOperationsExecuted int64 `xml:"numOperationsExecuted" json:",string"` NumOperationsSucceeded int64 `xml:"numOperationsSucceeded" json:",string"` EstimatedPercentExecuted int `xml:"estimatedPercentExecuted"` NumResultsWritten int64 `xml:"numResultsWritten" json:",string"` }
type ProximityCriterion ¶
type ProximityCriterion struct { Id int64 `xml:"id,omitempty"` GeoPoint GeoPoint `xml:"geoPoint"` RadiusDistanceUnits string `xml:"radiusDistanceUnits"` RadiusInUnits float64 `xml:"radiusInUnits"` Address Address `xml:"address"` }
RadiusDistanceUnits: KILOMETERS, MILES RadiusUnits:
type QualityInfo ¶
type QualityInfo struct {
QualityScore int64 `xml:"qualityScore,omitempty"`
}
type RateExceededError ¶
type RateExceededError struct { RateName string `xml:"rateName"` // For example OperationsByMinute RateScope string `xml:"rateScope"` // ACCOUNT or DEVELOPER ErrorString string `xml:"errorString"` Reason string `xml:"reason"` RetryAfterSeconds uint `xml:"retryAfterSeconds"` // Try again in... }
if you exceed the quota given by google
type RelatedToQuerySearchParameter ¶
type RelatedToQuerySearchParameter struct {
Queries []string `xml:"queries"`
}
type RemarketingSettings ¶
type RemarketingSettings struct {
Snippet string `xml:"snippet"`
}
type ReportDefinition ¶
type ReportDefinitionField ¶
type ReportDefinitionField struct { FieldName string `xml:"fieldName"` DisplayFieldName string `xml:"displayFieldName"` XmlAttributeName string `xml:"xmlAttributeName"` FieldType string `xml:"fieldType"` FieldBehavior string `xml:"fieldBehavior"` EnumValues []string `xml:"enumValues"` CanSelect bool `xml:"canSelect"` CanFilter bool `xml:"canFilter"` IsEnumType bool `xml:"isEnumType"` IsBeta bool `xml:"isBeta"` IsZeroRowCompatible bool `xml:"isZeroRowCompatible"` EnumValuePairs []EnumValuePair `xml:"enumValuePairs"` }
type ReportDefinitionRequest ¶
type ReportDefinitionRequest struct {
ReportType string `xml:"reportType"`
}
type ReportDefinitionService ¶
type ReportDefinitionService struct {
Auth
}
func NewReportDefinitionService ¶
func NewReportDefinitionService(auth *Auth) *ReportDefinitionService
func (*ReportDefinitionService) GetReportFields ¶
func (s *ReportDefinitionService) GetReportFields(report string) (fields []ReportDefinitionField, err error)
type ReportDownloadError ¶
type ReportDownloadService ¶
type ReportDownloadService struct {
Auth
}
func NewReportDownloadService ¶
func NewReportDownloadService(auth *Auth) *ReportDownloadService
func (*ReportDownloadService) AWQL ¶
func (s *ReportDownloadService) AWQL(awql string, fmt string) (interface{}, error)
func (*ReportDownloadService) Get ¶
func (s *ReportDownloadService) Get(reportDefinition ReportDefinition) (res interface{}, err error)
func (*ReportDownloadService) StreamAWQL ¶
func (s *ReportDownloadService) StreamAWQL(awql string, fmt string) (io.ReadCloser, error)
type ResponsiveDisplayAd ¶
type ResponsiveDisplayAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` MarketingImage Media `xml:"marketingImage"` LogoImage Media `xml:"logoImage"` ShortHeadline string `xml:"shortHeadline"` LongHeadline string `xml:"longHeadline"` Description string `xml:"description"` BusinessName string `xml:"businessName"` ExperimentData AdGroupExperimentData `xml:"-"` Status string `xml:"-"` Labels []Label `xml:"-"` BaseCampaignId int64 `xml:"-"` BaseAdGroupId int64 `xml:"-"` }
type ResponsiveSearchAd ¶
type ResponsiveSearchAd struct { AdGroupId int64 `xml:"-"` //Type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr"` Id int64 `xml:"id,omitempty"` Url string `xml:"url,omitempty"` DisplayUrl string `xml:"displayUrl,omitempty"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` FinalUrlSuffix string `xml:"finalUrlSuffix,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Headlines []AssetLink `xml:"headlines,omitempty"` Descriptions []AssetLink `xml:"descriptions,omitempty"` Labels []Label `xml:"-"` Status string `xml:"-"` Path1 string `xml:"path1,omitempty"` Path2 string `xml:"path2,omitempty"` }
func NewResponsiveSearchAd ¶
func NewResponsiveSearchAd(adGroupId int64, headlines, descriptions []AssetLink, finalUrls []string, path1, path2 string) ResponsiveSearchAd
type Rule ¶
type Rule struct {
Groups []RuleItemGroup `xml:"groups"`
}
type RuleItemGroup ¶
type RuleItemGroup struct {
Items []interface{} `xml:"items"`
}
type SearchParameter ¶
type SearchParameter interface{}
type SeedAdGroupIdSearchParameter ¶
type SeedAdGroupIdSearchParameter struct {
AdGroupID int64 `xml:"adGroupId"`
}
type ServiceLink ¶
type ServiceUrl ¶
func (ServiceUrl) String ¶
func (s ServiceUrl) String() string
type SharedCriterion ¶
type SharedCriterion struct {}
func (SharedCriterion) MarshalXML ¶
func (s SharedCriterion) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (*SharedCriterion) UnmarshalXML ¶
func (s *SharedCriterion) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error
type SharedCriterionOperation ¶
type SharedCriterionOperation struct {}
type SharedCriterionService ¶
type SharedCriterionService struct {
}func NewSharedCriterionService ¶
func NewSharedCriterionService(auth *Auth) *SharedCriterionService
func (SharedCriterionService) Get ¶
func (s SharedCriterionService) Get(selector Selector) (sharedCriteria []SharedCriterion, totalCount int64, err error)
func (SharedCriterionService) Mutate ¶
func (s SharedCriterionService) Mutate(operations []SharedCriterionOperation) error
type SharedSetOperation ¶
type SharedSetOperation struct {}
type SharedSetService ¶
type SharedSetService struct {
}func NewSharedSetService ¶
func NewSharedSetService(auth *Auth) *SharedSetService
func (SharedSetService) Get ¶
func (s SharedSetService) Get(selector Selector) (sharedSets []SharedSet, totalCount int64, err error)
func (SharedSetService) Mutate ¶
func (s SharedSetService) Mutate(operations []SharedSetOperation) ([]SharedSet, error)
type StatsEstimate ¶
type StatsEstimate struct { AverageCpc int64 `xml:"averageCpc>microAmount"` AveragePosition float64 `xml:"averagePosition"` ClickThroughRate float64 `xml:"clickThroughRate"` ClicksPerDay float64 `xml:"clicksPerDay"` ImpressionsPerDay float64 `xml:"impressionsPerDay"` TotalCost int64 `xml:"totalCost>microAmount"` }
type StringAttribute ¶
type StringAttribute struct {
Value string `xml:"value"`
}
type StringMapEntry ¶
type StringRuleItem ¶
type SystemFeedGenerationData ¶
type SystemFeedGenerationData struct {
SystemFeedGenerationDataType string `xml:"https://adwords.google.com/api/adwords/cm/v201809 SystemFeedGenerationData.Type,omitempty"`
}
Configuration data allowing feed items to be populated for a system feed. https://developers.google.com/adwords/api/docs/reference/v201809/FeedService.SystemFeedGenerationData
type TargetDetails ¶
type TargetError ¶
type TargetSettingDetail ¶
type TargetingIdea ¶
func (*TargetingIdea) UnmarshalXML ¶
func (ti *TargetingIdea) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) (err error)
type TargetingIdeaSelector ¶
type TargetingIdeaSelector struct { SearchParameters []SearchParameter `xml:"searchParameters"` IdeaType string `xml:"ideaType"` RequestType string `xml:"requestType"` RequestedAttributeTypes []string `xml:"requestedAttributeTypes"` Paging Paging `xml:"paging"` LocaleCode string `xml:"localeCode,omitempty"` CurrencyCode string `xml:"currencyCode,omitempty"` }
TargetingIdeaSelector A descriptor for finding TargetingIdeas that match the specified criteria. https://developers.google.com/adwords/api/docs/reference/v201809/TargetingIdeaService.TargetingIdeaSelector
func (TargetingIdeaSelector) MarshalXML ¶
func (tis TargetingIdeaSelector) MarshalXML(e *xml.Encoder, start xml.StartElement) error
type TargetingIdeaService ¶
type TargetingIdeaService struct {
Auth
}
TargetingIdeaService Use this service to generate new keyword ideas based on the parameters specified in the selector. See the TargetingIdeaSelector documentation for more details. You can also use this service to retrieve statistics for existing keyword ideas by setting the selector's requestType to RequestType.STATS and passing in the appropriate search parameters.
func NewTargetingIdeaService ¶
func NewTargetingIdeaService(auth *Auth) *TargetingIdeaService
NewTargetingIdeaService returns a new TargetingIdeaService
func (*TargetingIdeaService) Get ¶
func (s *TargetingIdeaService) Get(selector TargetingIdeaSelector) (targetingIdeas []TargetingIdeas, totalCount int64, err error)
Get Returns a page of ideas that match the query described by the specified TargetingIdeaSelector. https://developers.google.com/adwords/api/docs/reference/v201809/TargetingIdeaService
type TargetingIdeas ¶
type TargetingIdeas struct {
TargetingIdea []TargetingIdea `xml:"data"`
}
type TemplateAd ¶
type TemplateAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` Url string `xml:"url"` DisplayUrl string `xml:"displayUrl"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` TemplateId int64 `xml:"templateId"` AdUnionId int64 `xml:"adUnionId>id"` TemplateElements []TemplateElement `xml:"templateElements"` Dimensions []Dimensions `xml:"dimensions"` Name string `xml:"name"` Duration int64 `xml:"duration"` Status string `xml:"-"` Labels []Label `xml:"-"` // contains filtered or unexported fields }
type TemplateElement ¶
type TemplateElement struct { UniqueName string `xml:"uniqueName"` Fields []TemplateElementField `xml:"fields"` }
type TemplateElementField ¶
type TemporaryUrl ¶
type TextAd ¶
type TextAd struct { AdGroupId int64 `xml:"-"` Id int64 `xml:"id,omitempty"` Url string `xml:"url"` DisplayUrl string `xml:"displayUrl"` FinalUrls []string `xml:"finalUrls,omitempty"` FinalMobileUrls []string `xml:"finalMobileUrls,omitempty"` FinalAppUrls []AppUrl `xml:"finalAppUrls,omitempty"` TrackingUrlTemplate string `xml:"trackingUrlTemplate,omitempty"` UrlCustomParameters *CustomParameters `xml:"urlCustomParameters,omitempty"` Type string `xml:"type,omitempty"` DevicePreference int64 `xml:"devicePreference,omitempty"` Headline string `xml:"headline"` Description1 string `xml:"description1"` Description2 string `xml:"description2"` Status string `xml:"-"` Labels []Label `xml:"-"` }
type TrafficEstimatorSelector ¶
type TrafficEstimatorSelector struct {
CampaignEstimateRequests []CampaignEstimateRequest `xml:"campaignEstimateRequests"`
}
type TrafficEstimatorService ¶
type TrafficEstimatorService struct {
Auth
}
func NewTrafficEstimatorService ¶
func NewTrafficEstimatorService(auth *Auth) *TrafficEstimatorService
func (*TrafficEstimatorService) Get ¶
func (s *TrafficEstimatorService) Get(selector TrafficEstimatorSelector) (res []CampaignEstimate, err error)
Get returns an array of CampaignEstimates, holding AdGroupEstimates which hold KeywordEstimates, which hold the minimum and maximum values based on the requested keywords.
Example
keywordEstimateRequests := []KeywordEstimateRequest{ KeywordEstimateRequest{ KeywordCriterion{ Text: "mars cruise", MatchType: "BROAD", }, }, KeywordEstimateRequest{ KeywordCriterion{ Text: "cheap cruise", MatchType: "EXACT", }, }, KeywordEstimateRequest{ KeywordCriterion{ Text: "cruise", MatchType: "EXACT", }, }, } adGroupEstimateRequests := []AdGroupEstimateRequest{ AdGroupEstimateRequest{ KeywordEstimateRequests: keywordEstimateRequests, MaxCpc: 1000000, }, } campaignEstimateRequests := []CampaignEstimateRequest{ CampaignEstimateRequest{ AdGroupEstimateRequests: adGroupEstimateRequests, }, } estimates, err := trafficEstimatorService.Get(TrafficEstimatorSelector{ CampaignEstimateRequests: campaignEstimateRequests, }) if err != nil { panic(err) } for _, estimate := range estimates { for _, adGroupEstimate := range estimate.AdGroupEstimates { for _, keywordEstimate := range adGroupEstimate.KeywordEstimates { fmt.Printf("Avg cpc: %d", keywordEstimate.Min.AverageCpc) } } }
Relevant documentation
https://developers.google.com/adwords/api/docs/reference/v201809/TrafficEstimatorService#get
type TrialService ¶
type TrialService struct {
Auth
}
func NewTrialService ¶
func NewTrialService(auth *Auth) *TrialService
type UrlError ¶
type UrlError struct {
EntityError
}
type UserInterestCriterion ¶
type UserList ¶
type UserList struct { Id int64 `xml:"id,omitempty"` Readonly *bool `xml:"isReadOnly"` Name string `xml:"name"` Description string `xml:"description"` Status string `xml:"status"` // membership status "OPEN", "CLOSED" IntegrationCode string `xml:"integrationCode"` AccessReason string `xml:"accessReason"` // account access resson "OWNER", "SHARED", "LICENSED", "SUBSCRIBED" AccountUserListStatus string `xml:"accountUserListStatus"` // if share is still active "ACTIVE", "INACTIVE" MembershipLifeSpan int64 `xml:"membershipLifeSpan"` // number of days cookie stays on list Size *int64 `xml:"size,omitempty"` SizeRange *string `xml:"sizeRange,omitempty"` // size range "LESS_THEN_FIVE_HUNDRED","LESS_THAN_ONE_THOUSAND", "ONE_THOUSAND_TO_TEN_THOUSAND","TEN_THOUSAND_TO_FIFTY_THOUSAND","FIFTY_THOUSAND_TO_ONE_HUNDRED_THOUSAND","ONE_HUNDRED_THOUSAND_TO_THREE_HUNDRED_THOUSAND","THREE_HUNDRED_THOUSAND_TO_FIVE_HUNDRED_THOUSAND","FIVE_HUNDRED_THOUSAND_TO_ONE_MILLION","ONE_MILLION_TO_TWO_MILLION","TWO_MILLION_TO_THREE_MILLION","THREE_MILLION_TO_FIVE_MILLION","FIVE_MILLION_TO_TEN_MILLION","TEN_MILLION_TO_TWENTY_MILLION","TWENTY_MILLION_TO_THIRTY_MILLION","THIRTY_MILLION_TO_FIFTY_MILLION","OVER_FIFTY_MILLION" SizeForSearch *int64 `xml:"sizeForSearch,omitempty"` // estimated number of google.com users in this group SizeRangeForSearch *string `xml:"sizeRangeForSearch,omitempty"` // same values as size range but for search ListType *string `xml:"sizeType,omitempty"` // one of "UNKNOWN", "REMARKETING", "LOGICAL", "EXTERNAL_REMARKETING", "RULE_BASED", "SIMILAR" // LogicalUserList LogicalRules *[]UserListLogicalRule `xml:"rules,omitempty"` // BasicUserList ConversionTypes *[]UserListConversionType `xml:"conversionTypes"` // RuleUserList Rule *Rule `xml:"rule,omitempty"` StartDate *string `xml:"startDate,omitempty"` EndDate *string `xml:"endDate,omitempty"` // SimilarUserList SeedUserListId *int64 `xml:"seedUserListId,omitempty"` SeedUserListName *string `xml:"seedUserListName,omitempty"` SeedUserListDescription *string `xml:"seedUserListDescription,omitempty"` SeedUserListStatus *string `xml:"seedUserListStatus,omitempty"` SeedListSize *int64 `xml:"seedListSize,omitempty"` // CrmBasedUserList OptOutLink *string `xml:"optOutLink,omitempty"` // Keep track of xsi:type for mutate and mutateMembers Xsi_type string `xml:"http://www.w3.org/2001/XMLSchema-instance type,attr,omitempty"` }
func NewBasicUserList ¶
func NewBasicUserList(name, description, status, integrationCode string, membershipLifeSpan int64, conversionTypes []UserListConversionType) (adwordsUserList UserList)
func NewCrmBasedUserList ¶
func NewLogicalUserList ¶
func NewLogicalUserList(name, description, status, integrationCode string, membershipLifeSpan int64, logicalRules []UserListLogicalRule) (adwordsUserList UserList)
func NewSimilarUserList ¶
type UserListConversionType ¶
type UserListCriterion ¶
type UserListLogicalRule ¶
type UserListOperations ¶
type VerticalCriterion ¶
type VideoAsset ¶
type WebpageCondition ¶
type WebpageCriterion ¶
type WebpageCriterion struct { Id int64 `xml:"id,omitempty"` Parameter WebpageParameter `xml:"parameter"` CriteriaCoverage float64 `xml:"criteriaCoverage"` CriteriaSamples []string `xml:"criteriaSamples"` }
type WebpageDescriptor ¶
type WebpageDescriptorAttribute ¶
type WebpageDescriptorAttribute struct {
Value WebpageDescriptor `xml:"value"`
}
type WebpageParameter ¶
type WebpageParameter struct { CriterionName string `xml:"criterionName"` Conditions []WebpageCondition `xml:"conditions"` }
Source Files ¶
- ad_group.go
- ad_group_ad.go
- ad_group_ads.go
- ad_group_bid_modifier.go
- ad_group_criterion.go
- ad_group_extension.go
- ad_group_feed.go
- ad_param.go
- adwords_user_list.go
- app_campaign.go
- assets.go
- base.go
- batch_job.go
- batch_job_helper.go
- biddable_ad_group_criterion.go
- bidding_strategy.go
- budget.go
- budget_order.go
- campaign.go
- campaign_criterion.go
- campaign_extension.go
- campaign_feed.go
- campaign_shared_set.go
- constant_data.go
- conversion_tracker.go
- criterion.go
- customer.go
- customer_feed.go
- customer_sync.go
- data.go
- doc.go
- draft.go
- errors.go
- extension_setting.go
- feed.go
- feed_item.go
- feed_mapping.go
- ga.go
- label.go
- location_criterion.go
- managed_customer.go
- media.go
- negative_ad_group_criterion.go
- oauth2.go
- offline_conversion_feed.go
- page.go
- report_definition.go
- report_download.go
- search_campaign.go
- shared_criterion.go
- shared_set.go
- targeting_idea.go
- traffic_estimator.go
- trial.go
- xml.go
Directories ¶
Path | Synopsis |
---|---|
setup_oauth2 is a tool for creating a gads configuration file config.json from the installed application credential stored in credentials.json.
|
setup_oauth2 is a tool for creating a gads configuration file config.json from the installed application credential stored in credentials.json. |