# README
gads
Package gads provides a wrapper for the Google Adwords SOAP API.
installation
go get github.com/emiddleton/gads
setup
In order to access the API you will need to sign up for an MMC account[1], get a developer token[2] and setup authentication[3]. There is a tool in the setup_oauth2 directory that will help you setup a configuration file.
- http://www.google.com/adwords/myclientcenter/
- https://developers.google.com/adwords/api/docs/signingup
- https://developers.google.com/adwords/api/docs/guides/authentication
usage
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 := campaignService.Get(
gads.Selector{
Fields: []string{
"Id",
"Name",
"Status",
},
},
)
Note: This package is a work-in-progress, and may occasionally make backwards-incompatible changes.
See godoc for further documentation and examples.
about
Gads is developed by Edward Middleton
# Packages
No description provided by the author
No description provided by the author
setup_oauth2 is a tool for creating a gads configuration file config.json from the installed application credential stored in credentials.json.
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewAWQLClient is a constructor for AWQLClient.
No description provided by the author
NewBiddingScheme returns new instance of BiddingScheme.
NewBiddingStrategyService returns new instance of BiddingStrategyService.
No description provided by the author
NewBudgetService creates a new budgetService.
No description provided by the author
No description provided by the author
NewCampaignExtensionSettingService is a constructor for CampaignExtensionSettingService.
No description provided by the author
NewCampaignService creates a new campaignService.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCustomerService creates a CustomerService.
No description provided by the author
NewDataService returns new instance of DataService.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
.
NewManagedCustomerService is the ManagedCustomerService constructor.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewReportDefinitionService creates a ReportDefinitionService that can be accessed with Auth object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTargetRoasBiddingScheme returns new instance of TargetRoasBiddingScheme.
No description provided by the author
NewTextLabel returns an new Label struct for creating a new TextLabel.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
AWQL formats.
AWQL formats.
AWQL formats.
AWQL formats.
AWQL formats.
AWQL formats.
DateRangeTypeAllTime represents the data of the all time (be careful).
DateRangeTypeCustom is the type used when you specify manually the range of the report.
DateRangeTypeLast14Days represents the data of only the last 14 days.
DateRangeTypeLast30Days represents the data of only the last 30 days.
DateRangeTypeLast7Days represents the data of only the last 7 days.
DateRangeTypeLastBusinessWeek represents the data of only the last business week.
DateRangeTypeLastWeek represents the data of only the last week.
DateRangeTypeLastWeekSunSat represents the data of only the last week from sunday to saturday.
DateRangeTypeThisMonth represents the data of only this month.
DateRangeTypeThisWeekMonToday represents the data of only this week from monday to today.
DateRangeTypeThisWeekSunToday represents the data of only this week, from sunday to today.
DateRangeTypeToday represents the data of only today.
DateRangeTypeYesterday represents the data of only yesterday.
DownloadFormatCSV is when you want pure csv in return, with the first line that contains.
DownloadFormatCSVGzipped is when you want csv but compressed in gzip.
DownloadFormatTSV is when you want like csv but separated with tabs.
DownloadFormatXML is when you want xml in return, eventually parsable in the api in the future.
DownloadFormatXMLGzipped is when you want xml but compressed in gzip format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProductPartitionCriterion is a criterion representing a group of items - Use the Type : ProductPartition.
ProductPartitionCriterion is a criterion representing a group of items - Use the Type : ProductPartition.
used for developpement, if true all unknown field will raise an error.
# Variables
No description provided by the author
ErrorMissingCustomerId symbolizes that the library cant interrogate the api without a Client Customer Id.
Reports.
No description provided by the author
exceptions.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AdScheduleCriterion struct 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.
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AWQLClient struct for AWQL caller.
No description provided by the author
No description provided by the author
AWQLRequest struct for awql request.
BaseResponse is the common structure of every response received from Google Adwords in the most common case.
No description provided by the author
No description provided by the author
BiddingScheme struct for ManualCpcBiddingScheme.
No description provided by the author
BiddingStrategyService servie for bidding strategies.
A Budget represents an allotment of money to be spent over a fixed period of time.
No description provided by the author
No description provided by the author
A budgetService holds the connection information for the budget service.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CampaignExtensionSetting is used to add or modify extensions being served for the specified campaign.
CampaignExtensionSettingService (v201809) Service used to manage extensions at the campaign level.
No description provided by the author
No description provided by the author
CampaignService A campaignService holds the connection information for the campaign service.
No description provided by the author
No description provided by the author
No description provided by the author
CommonAd define the parent type Ad type as defined https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.Ad.
No description provided by the author
CommonExtensionFeedItem is the Parent type for all ExtensionFeedItem.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CriterionBidLandscape struct for CriterionBidLandscape.
No description provided by the author
Customer represents a customer in the Google Adwords API.
No description provided by the author
CustomerService fetches or modify Customer properties.
No description provided by the author
No description provided by the author
No description provided by the author
DataService struct for service.
Selector structs
.
Rule structs.
No description provided by the author
DynamicSearchAd represents the equivalent object documented here https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.DynamicSearchAd.
No description provided by the author
ExpandedTextAd epresents the equivalent object documented here https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.ExpandedTextAd.
No description provided by the author
ExtensionSetting specifies when and which extensions should serve at a given level (customer, campaign, or ad group).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ImageAd represents the equivalent object documented here https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.ImageAd.
No description provided by the author
No description provided by the author
Label represents a label.
No description provided by the author
LandscapePoint struct for LandscapePoint.
No description provided by the author
LocationName: DisplayType: TargetingStatus: ACTIVE, OBSOLETE, PHASING_OUT ParentLocations:.
No description provided by the author
No description provided by the author
ManagedCustomer represents the accounts handled by the current clientCustomerID https://developers.google.com/adwords/api/docs/reference/v201809/ManagedCustomerService.ManagedCustomer.
ManagedCustomerLink represents the status of the link between the current account and the account it manages https://developers.google.com/adwords/api/docs/reference/v201809/ManagedCustomerService.ManagedCustomerLink.
ManagedCustomerLinkResult is the response of the MutateLink service @see https://developers.google.com/adwords/api/docs/reference/v201809/ManagedCustomerService.MutateLinkResults.
ManagedCustomerMoveOperation is one operation in the move actions.
ManagedCustomerService represents the api that handle links between accounts.
Media represents an audio, image or video file.
No description provided by the author
MobileAppCategoryId: https://developers.google.com/adwords/api/docs/appendix/mobileappcategories DisplayName:.
AppId: "{platform}-{platform_native_id}" DisplayName:.
DeviceName: ManufacturerName: DeviceType: DEVICE_TYPE_MOBILE, DEVICE_TYPE_TABLET OperatingSystemName:.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Name: OsMajorVersion: OsMinorVersion: OperatorType: GREATER_THAN_EQUAL_TO, EQUAL_TO, UNKNOWN.
No description provided by the author
No description provided by the author
No description provided by the author
PartialFailureError represents a.
Url:.
PlatformId: Desktop 30000 HighEndMobile 30001 Tablet 30002.
No description provided by the author
No description provided by the author
No description provided by the author
Argument: Operand: id, product_type, brand, adwords_grouping, condition, adwords_labels.
No description provided by the author
No description provided by the author
No description provided by the author
RadiusDistanceUnits: KILOMETERS, MILES RadiusUnits:.
No description provided by the author
if you exceed the quota given by google.
ReportDefinition represents a request for the report API https://developers.google.com/adwords/api/docs/guides/reporting.
ReportDefinitionService is the service you call when you want to access reports.
No description provided by the author
No description provided by the author
No description provided by the author
ServiceLink struct for customer service link.
No description provided by the author
SharedBiddingStrategy struct of entity for BiddingStrategyService.
No description provided by the author
No description provided by the author
SitelinkFeedItem represents a sitelink extension.
No description provided by the author
No description provided by the author
No description provided by the author
TargetRoasBiddingScheme struct for TargetRoasBiddingScheme.
No description provided by the author
TemplateAd represents the equivalent object documented here https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.TemplateAd.
No description provided by the author
No description provided by the author
TextAd represents the TextAd object as documented here https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupAdService.TextAd.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Ad is the common interface for accessing properties shared by all child types of ads.
BiddingSchemeInterface interface for bidding scheme.
ConversionTracker is an interface for conversion tackers.
No description provided by the author
ExtensionFeedItem is an interface all extension feed item implements.
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AWQLFormat type for AWQL format.
A BiddingStrategyOperations maps operations to the bidding strategy they will be performed on.
A BudgetOperations maps operations to the budgets they will be performed on.
No description provided by the author
No description provided by the author
CampaignExtensionSettingOperations is a conveniency map on CampaignExtensionSetting to manipulate it can have the 3 following keys (case sensitive)
ADD SET REMOVE.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Date is a google date, a simple type inference with methods.
DateRangeType is the date range when you want.
DownloadFormat is the return type of the reports that you want to fetch.
No description provided by the author
No description provided by the author
LabelOperations is a map of operations to perform on Label's.
LinkStatus represents the state of the link.
No description provided by the author
ManagedCustomerLinkOperations are used when you change links between mcc and classic adwords account.
ManagedCustomerMoveOperations are performed when you move an account inside the hierarchy.
No description provided by the author
No description provided by the author
No description provided by the author