Documentation ¶
Overview ¶
Package asa is a Go client library for accessing Apple's Apple Search Ads API. Usage Import the package as you normally would:
import "github.com/gungoren/apple-search-ads-go/asa"
Construct a new Apple Search Ads client, then use the various services on the client to access different parts of the Apple Search Ads API. For example:
client := asa.NewClient(nil) params := &asa.SearchAppsQuery{ Query: "face", ReturnOwnedApps: false, } // list all apps with the query "face" apps, _, err := client.App.SearchApps(context.Background(), params)
The client is divided into logical chunks closely corresponding to the layout and structure of Apple's own documentation at https://developer.apple.com/documentation/apple_search_ads. For more sample code snippets, head over to the https://github.com/gungoren/apple-search-ads-go/tree/master/examples directory. Authentication You may find that the code snippet above will always fail due to a lack of authorization. The Apple Search Ads API has no methods that allow for unauthorized requests. To make it easy to authenticate with Apple Search Ads, the apple-search-ads-go library offers a solution for signing and rotating JSON Web Tokens automatically. For example, the above snippet could be made to look a little more like this:
import ( "os" "time" "github.com/gungoren/apple-search-ads-go/asa" ) func main() { // Organization ID in Apple Search Ads orgID := "...." // Key ID for the given private key, described in Apple Search Ads keyID := "...." // Team ID for the given private key for the Apple Search Ads teamID := "...." // ClientID ID for the given private key for the Apple Search Ads clientID := "...." // A duration value for the lifetime of a token. Apple Search Ads does not accept a token with a lifetime of longer than 20 minutes expiryDuration = 20*time.Minute // The bytes of the private key created you have uploaded to it Apple Search Ads. privateKey = os.ReadFile("path/to/key") auth, err := asa.NewTokenConfig(orgID, keyID, teamID, clientID, expiryDuration, privateKey) if err != nil { return nil, err } client := asa.NewClient(auth.Client()) // list all apps with the "face" in the authenticated user's team params := &asa.SearchAppsQuery{ Offset: 0, Limit: 100, Query: "face", ReturnOwnedApps: true, } apps, _, err := client.App.SearchApps(context.Background(), params) if err != nil { return nil, err } }
The authenticated client created here will automatically regenerate the token if it expires. Also note that all Apple Search Ads APIs are scoped to the credentials of the pre-configured key, so you can't use this API to make queries against the entire App Store. For more information on creating the necessary credentials for the Apple Search Ads API, see the documentation at https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api. Pagination All requests for resource collections (apps, acls, ad groups, campaigns, etc.) support pagination. Responses for paginated resources will contain a Pagination property of type PageDetail, with TotalResults, StartIndex and ItemsPerPage.
auth, _ := asa.NewTokenConfig(orgID, keyID, teamID, clientID, expiryDuration, privateKey) client := asa.NewClient(auth.Client()) var allApps []asa.AppInfo params := &asa.SearchAppsQuery{ Offset: 0, Limit: 100, Query: "face", ReturnOwnedApps: false, } for { apps, _, err := client.App.SearchApps(context.Background(), params) if err != nil { return nil, err } allApps = append(allApps, apps.AppInfos...) pageDetail := apps.Pagination lastOffset := pageDetail.StartIndex + len(apps.AppInfos) if lastOffset < pageDetail.TotalResults { params.Offset += int32(len(apps.AppInfos)) } else { break } }
Index ¶
- Variables
- func Bool(v bool) *bool
- func Float(v float64) *float64
- func Int(v int) *int
- func String(v string) *string
- type APIErrorResponse
- type AccessControlListService
- type AdGroup
- type AdGroupCreativeSet
- type AdGroupCreativeSetListResponse
- type AdGroupCreativeSetResponse
- type AdGroupCreativeSetUpdate
- type AdGroupDeviceClass
- type AdGroupDisplayStatus
- type AdGroupGender
- type AdGroupListResponse
- type AdGroupPricingModel
- type AdGroupResponse
- type AdGroupService
- func (s *AdGroupService) CreateAdGroup(ctx context.Context, campaignID int64, adGroup *AdGroup) (*AdGroupResponse, *Response, error)
- func (s *AdGroupService) DeleteAdGroup(ctx context.Context, campaignID int64, adGroupID int64) (*Response, error)
- func (s *AdGroupService) FindAdGroups(ctx context.Context, campaignID int64, selector *Selector) (*AdGroupListResponse, *Response, error)
- func (s *AdGroupService) GetAdGroup(ctx context.Context, campaignID int64, adGroupID int64) (*AdGroupResponse, *Response, error)
- func (s *AdGroupService) GetAllAdGroups(ctx context.Context, campaignID int64, params *GetAllAdGroupsQuery) (*AdGroupListResponse, *Response, error)
- func (s *AdGroupService) UpdateAdGroup(ctx context.Context, campaignID int64, adGroupID int64, ...) (*AdGroupResponse, *Response, error)
- type AdGroupServingStatus
- type AdGroupStatus
- type AdGroupUpdateRequest
- type AdminAreaCriteria
- type AgeCriteria
- type AgeRange
- type AppDownloaderCriteria
- type AppInfo
- type AppInfoListResponse
- type AppPreviewDevicesMappingResponse
- type AppService
- type Asset
- type AssignAdGroupCreativeSetRequest
- type AuthTransport
- type BudgetOrder
- type BudgetOrderInfo
- type BudgetOrderInfoListResponse
- type BudgetOrderInfoResponse
- type BudgetOrderStatus
- type BudgetOrderSupplySources
- type BudgetService
- type Campaign
- type CampaignAdChannelType
- type CampaignAppDetail
- type CampaignCountryOrRegionServingStateReason
- type CampaignCountryOrRegionServingStateReasons
- type CampaignDisplayStatus
- type CampaignListResponse
- type CampaignResponse
- type CampaignService
- func (s *CampaignService) CreateCampaign(ctx context.Context, campaign *Campaign) (*CampaignResponse, *Response, error)
- func (s *CampaignService) DeleteCampaign(ctx context.Context, campaignID int64) (*Response, error)
- func (s *CampaignService) FindCampaigns(ctx context.Context, selector *Selector) (*CampaignListResponse, *Response, error)
- func (s *CampaignService) GetAllCampaigns(ctx context.Context, params *GetAllCampaignQuery) (*CampaignListResponse, *Response, error)
- func (s *CampaignService) GetCampaign(ctx context.Context, campaignID int64) (*CampaignResponse, *Response, error)
- func (s *CampaignService) UpdateCampaign(ctx context.Context, campaignID int64, req *UpdateCampaignRequest) (*CampaignResponse, *Response, error)
- type CampaignServingStateReason
- type CampaignServingStatus
- type CampaignStatus
- type CampaignSupplySource
- type CampaignUpdate
- type Client
- type Condition
- type ConditionOperator
- type CountryCriteria
- type CreateAdGroupCreativeSetRequest
- type CreativeSet
- type CreativeSetAsset
- type CreativeSetAssetsDetail
- type CreativeSetCreate
- type CreativeSetListResponse
- type CreativeSetLocaleDetail
- type CreativeSetResponse
- type CreativeSetStatus
- type CreativeSetStatusReason
- type CreativeSetUpdate
- type CreativeSetsService
- func (s *CreativeSetsService) AssignCreativeSetsToAdGroup(ctx context.Context, campaignID int64, adgroupID int64, ...) (*AdGroupCreativeSetResponse, *Response, error)
- func (s *CreativeSetsService) CreateAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, ...) (*AdGroupCreativeSetResponse, *Response, error)
- func (s *CreativeSetsService) DeleteAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, ...) (*IntegerResponse, *Response, error)
- func (s *CreativeSetsService) FindAdGroupCreativeSets(ctx context.Context, campaignID int64, body *FindAdGroupCreativeSetRequest) (*AdGroupCreativeSetListResponse, *Response, error)
- func (s *CreativeSetsService) FindCreativeSets(ctx context.Context, params *FindCreativeSetRequest) (*CreativeSetListResponse, *Response, error)
- func (s *CreativeSetsService) GetAppPreviewDeviceSizes(ctx context.Context) (*AppPreviewDevicesMappingResponse, *Response, error)
- func (s *CreativeSetsService) GetCreativeAppAssets(ctx context.Context, adamID int64, params *MediaCreativeSetRequest) (*MediaCreativeSetDetailResponse, *Response, error)
- func (s *CreativeSetsService) GetCreativeSetVariation(ctx context.Context, creativeSetID int64, params *GetCreativeSetVariationQuery) (*CreativeSetResponse, *Response, error)
- func (s *CreativeSetsService) UpdateAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, ...) (*AdGroupCreativeSetResponse, *Response, error)
- func (s *CreativeSetsService) UpdateCreativeSets(ctx context.Context, creativeSetID int64, request *CreativeSetUpdate) (*CreativeSetResponse, *Response, error)
- type CreativeSetsServingStateReason
- type Date
- type DateTime
- type DayPartCriteria
- type DaypartDetail
- type DeviceClassCriteria
- type Email
- type ErrInvalidEmail
- type ErrorMeta
- type ErrorResponse
- type ErrorResponseBody
- type ErrorResponseError
- type ErrorResponseItem
- type ErrorResponseItemMessageCode
- type ErrorSource
- type ExtendedSpendRow
- type FindAdGroupCreativeSetRequest
- type FindCreativeSetRequest
- type GenderCriteria
- type GeoEntityType
- type GeoRequest
- type GeoService
- type GetAllAdGroupsQuery
- type GetAllBudgetOrdersQuery
- type GetAllCampaignQuery
- type GetAllNegativeKeywordsQuery
- type GetAllTargetingKeywordsQuery
- type GetCreativeSetVariationQuery
- type GrandTotalsRow
- type InsightsObject
- type IntegerResponse
- type Keyword
- type KeywordBidRecommendation
- type KeywordListResponse
- type KeywordMatchType
- type KeywordResponse
- type KeywordService
- func (s *KeywordService) CreateAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, ...) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) CreateNegativeKeywords(ctx context.Context, campaignID int64, keyword []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) CreateTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, keyword []*Keyword) (*KeywordListResponse, *Response, error)
- func (s *KeywordService) DeleteAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, keywordIds []int64) (*IntegerResponse, *Response, error)
- func (s *KeywordService) DeleteNegativeKeywords(ctx context.Context, campaignID int64, keywordIds []int64) (*IntegerResponse, *Response, error)
- func (s *KeywordService) FindAdGroupNegativeKeywords(ctx context.Context, campaignID int64, selector *Selector) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) FindNegativeKeywords(ctx context.Context, campaignID int64, selector *Selector) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) FindTargetingKeywords(ctx context.Context, campaignID int64, selector *Selector) (*KeywordListResponse, *Response, error)
- func (s *KeywordService) GetAdGroupNegativeKeyword(ctx context.Context, campaignID int64, adGroupID int64, keywordID int64) (*NegativeKeywordResponse, *Response, error)
- func (s *KeywordService) GetAllAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, ...) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) GetAllNegativeKeywords(ctx context.Context, campaignID int64, params *GetAllNegativeKeywordsQuery) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) GetAllTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, ...) (*KeywordListResponse, *Response, error)
- func (s *KeywordService) GetNegativeKeyword(ctx context.Context, campaignID int64, keywordID int64) (*NegativeKeywordResponse, *Response, error)
- func (s *KeywordService) GetTargetingKeyword(ctx context.Context, campaignID int64, adGroupID int64, keywordID int64) (*KeywordResponse, *Response, error)
- func (s *KeywordService) UpdateAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, ...) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) UpdateNegativeKeywords(ctx context.Context, campaignID int64, updateRequests []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
- func (s *KeywordService) UpdateTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, ...) (*KeywordListResponse, *Response, error)
- type KeywordStatus
- type KeywordUpdateRequest
- type LOCInvoiceDetails
- type ListGeoQuery
- type LocalityCriteria
- type MediaAppPreviewOrScreenshots
- type MediaAppPreviewOrScreenshotsAssetType
- type MediaAppPreviewOrScreenshotsDetail
- type MediaAppPreviewOrScreenshotsOrientation
- type MediaCreativeSetDetailResponse
- type MediaCreativeSetRequest
- type MetaDataObject
- type Money
- type NegativeKeyword
- type NegativeKeywordListResponse
- type NegativeKeywordResponse
- type PageDetail
- type Pagination
- type PaymentModel
- type Rate
- type ReportingDataResponse
- type ReportingKeywordMatchType
- type ReportingRequest
- type ReportingRequestGranularity
- type ReportingRequestGroupBy
- type ReportingRequestTimeZone
- type ReportingResponse
- type ReportingResponseBody
- type ReportingService
- func (s *ReportingService) GetAdGroupLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
- func (s *ReportingService) GetAdLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
- func (s *ReportingService) GetCampaignLevelReports(ctx context.Context, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
- func (s *ReportingService) GetKeywordLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
- func (s *ReportingService) GetSearchTermLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
- type Response
- type Row
- type SearchAppsQuery
- type SearchEntity
- type SearchEntityListResponse
- type SearchGeoQuery
- type SearchTermSource
- type Selector
- type ServingStateReason
- type SortOrder
- type Sorting
- type SpendRow
- type TargetDimensions
- type UpdateCampaignRequest
- type UserACL
- type UserACLListResponse
- type UserACLRoleName
Constants ¶
This section is empty.
Variables ¶
var ErrHTTPTokenBadRequest = errors.New("generate auth token failed with")
ErrHTTPTokenBadRequest happens when apple generate token http request failed.
var ErrInvalidPrivateKey = errors.New("key could not be parsed as a valid ecdsa.PrivateKey")
ErrInvalidPrivateKey happens when a key cannot be parsed as a ECDSA PKCS8 private key.
var ErrMissingPEM = errors.New("no PEM blob found")
ErrMissingPEM happens when the bytes cannot be decoded as a PEM block.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func Float ¶
Float is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
Types ¶
type APIErrorResponse ¶
type APIErrorResponse struct {
Error ErrorResponseBody `json:"error,omitempty"`
}
APIErrorResponse A container for the error response body
https://developer.apple.com/documentation/apple_search_ads/apierrorresponse
type AccessControlListService ¶
type AccessControlListService service
AccessControlListService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/calling_the_apple_search_ads_api
func (*AccessControlListService) GetUserACL ¶
func (s *AccessControlListService) GetUserACL(ctx context.Context) (*UserACLListResponse, *Response, error)
GetUserACL Fetches roles and organizations that the API has access to
https://developer.apple.com/documentation/apple_search_ads/get_user_acl
type AdGroup ¶
type AdGroup struct { AutomatedKeywordsOptIn bool `json:"automatedKeywordsOptIn,omitempty"` CampaignID int64 `json:"campaignID,omitempty"` CpaGoal *Money `json:"cpaGoal,omitempty"` DefaultBidAmount *Money `json:"defaultBidAmount"` Deleted bool `json:"deleted"` DisplayStatus AdGroupDisplayStatus `json:"displayStatus"` EndTime DateTime `json:"endTime,omitempty"` ID int64 `json:"id,omitempty"` ModificationTime DateTime `json:"modificationTime,omitempty"` Name string `json:"name,omitempty"` OrgID int64 `json:"orgId,omitempty"` PricingModel AdGroupPricingModel `json:"pricingModel"` ServingStateReasons []ServingStateReason `json:"servingStateReasons,omitempty"` ServingStatus AdGroupServingStatus `json:"servingStatus"` StartTime DateTime `json:"startTime,omitempty"` Status AdGroupStatus `json:"status,omitempty"` TargetDimensions *TargetDimensions `json:"targetDimensions,omitempty"` }
AdGroup is the response to ad group requests
https://developer.apple.com/documentation/apple_search_ads/adgroup
type AdGroupCreativeSet ¶
type AdGroupCreativeSet struct { AdGroupID int64 `json:"adGroupId,omitempty"` CampaignID int64 `json:"campaignId,omitempty"` CreativeSetID int64 `json:"creativeSetId,omitempty"` Deleted bool `json:"deleted"` ID int64 `json:"id"` ModificationTime DateTime `json:"modificationTime"` ServingStatus AdGroupServingStatus `json:"servingStatus"` ServingStatusReasons []CreativeSetsServingStateReason `json:"servingStatusReasons"` Status AdGroupStatus `json:"status"` }
AdGroupCreativeSet is the assignment relationship between an ad group and a Creative Set
https://developer.apple.com/documentation/apple_search_ads/adgroupcreativeset
type AdGroupCreativeSetListResponse ¶
type AdGroupCreativeSetListResponse struct { AdGroupCreativeSets []*AdGroupCreativeSet `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
AdGroupCreativeSetListResponse is the response details of ad group Creative Set requests
https://developer.apple.com/documentation/apple_search_ads/adgroupcreativesetlistresponse
type AdGroupCreativeSetResponse ¶
type AdGroupCreativeSetResponse struct { AdGroupCreativeSet *AdGroupCreativeSet `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
AdGroupCreativeSetResponse is a container for the ad group Creative Set response body
https://developer.apple.com/documentation/apple_search_ads/adgroupcreativesetresponse
type AdGroupCreativeSetUpdate ¶
type AdGroupCreativeSetUpdate struct {
Status AdGroupStatus `json:"status"`
}
AdGroupCreativeSetUpdate is the response to ad group Creative Set update requests
https://developer.apple.com/documentation/apple_search_ads/adgroupcreativesetupdate
type AdGroupDeviceClass ¶
type AdGroupDeviceClass string
AdGroupDeviceClass is targeting criteria values for device class targeting.
const ( // AdGroupDeviceClassIpad is for ad group targeting criteria values for Ipad. AdGroupDeviceClassIpad AdGroupDeviceClass = "IPAD" // AdGroupDeviceClassIphone is for ad group targeting criteria values for Iphone. AdGroupDeviceClassIphone AdGroupDeviceClass = "IPHONE" )
type AdGroupDisplayStatus ¶
type AdGroupDisplayStatus string
AdGroupDisplayStatus defines model for AdGroupDisplayStatus.
https://developer.apple.com/documentation/apple_search_ads/adgroup
const ( // AdGroupDisplayStatusDelete is for an ad group display status on Deleted. AdGroupDisplayStatusDelete AdGroupDisplayStatus = "DELETED" // AdGroupDisplayStatusOnHold is for an ad group display status on On Hold. AdGroupDisplayStatusOnHold AdGroupDisplayStatus = "ON_HOLD" // AdGroupDisplayStatusPaused is for an ad group display status on Paused. AdGroupDisplayStatusPaused AdGroupDisplayStatus = "PAUSED" // AdGroupDisplayStatusRunning is for an ad group display status on Running. AdGroupDisplayStatusRunning AdGroupDisplayStatus = "RUNNING" )
type AdGroupGender ¶
type AdGroupGender string
AdGroupGender is the targeting criteria values for gender.
const ( // AdGroupGenderFemale is the targeting gender criteria for Female. AdGroupGenderFemale AdGroupGender = "F" // AdGroupGenderMale is the targeting gender criteria for Male. AdGroupGenderMale AdGroupGender = "M" )
type AdGroupListResponse ¶
type AdGroupListResponse struct { AdGroups []*AdGroup `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
AdGroupListResponse is the response details of ad group requests
https://developer.apple.com/documentation/apple_search_ads/adgrouplistresponse
type AdGroupPricingModel ¶
type AdGroupPricingModel string
AdGroupPricingModel defines model for AdGroupPricingModel.
https://developer.apple.com/documentation/apple_search_ads/adgroup
const ( // AdGroupPricingModelCPC is for an ad group pricing model CPC. AdGroupPricingModelCPC AdGroupPricingModel = "CPC" // AdGroupPricingModelCPM is for an ad group pricing model CPM. AdGroupPricingModelCPM AdGroupPricingModel = "CPM" )
type AdGroupResponse ¶
type AdGroupResponse struct { AdGroup *AdGroup `json:"data,omitempty"` Error *APIErrorResponse `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
AdGroupResponse is a container for the ad group response body
https://developer.apple.com/documentation/apple_search_ads/adgroupresponse
type AdGroupService ¶
type AdGroupService service
AdGroupService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/ad_groups
func (*AdGroupService) CreateAdGroup ¶
func (s *AdGroupService) CreateAdGroup(ctx context.Context, campaignID int64, adGroup *AdGroup) (*AdGroupResponse, *Response, error)
CreateAdGroup creates an ad group as part of a campaign
https://developer.apple.com/documentation/apple_search_ads/create_an_ad_group
func (*AdGroupService) DeleteAdGroup ¶
func (s *AdGroupService) DeleteAdGroup(ctx context.Context, campaignID int64, adGroupID int64) (*Response, error)
DeleteAdGroup deletes an ad group with a campaign and ad group identifier.
https://developer.apple.com/documentation/apple_search_ads/delete_an_adgroup
func (*AdGroupService) FindAdGroups ¶
func (s *AdGroupService) FindAdGroups(ctx context.Context, campaignID int64, selector *Selector) (*AdGroupListResponse, *Response, error)
FindAdGroups fetches ad groups within a campaign
https://developer.apple.com/documentation/apple_search_ads/find_ad_groups
func (*AdGroupService) GetAdGroup ¶
func (s *AdGroupService) GetAdGroup(ctx context.Context, campaignID int64, adGroupID int64) (*AdGroupResponse, *Response, error)
GetAdGroup fetches a specific ad group with a campaign and ad group identifier
https://developer.apple.com/documentation/apple_search_ads/get_an_ad_group
func (*AdGroupService) GetAllAdGroups ¶
func (s *AdGroupService) GetAllAdGroups(ctx context.Context, campaignID int64, params *GetAllAdGroupsQuery) (*AdGroupListResponse, *Response, error)
GetAllAdGroups fetches all ad groups with a campaign identifier.
https://developer.apple.com/documentation/apple_search_ads/get_all_ad_groups
func (*AdGroupService) UpdateAdGroup ¶
func (s *AdGroupService) UpdateAdGroup(ctx context.Context, campaignID int64, adGroupID int64, req *AdGroupUpdateRequest) (*AdGroupResponse, *Response, error)
UpdateAdGroup updates an ad group with an ad group identifier.
https://developer.apple.com/documentation/apple_search_ads/update_an_ad_group
type AdGroupServingStatus ¶
type AdGroupServingStatus string
AdGroupServingStatus is the status of whether the ad group is serving.
const ( // AdGroupServingStatusNotRunning is for an ad group serving status Not Running. AdGroupServingStatusNotRunning AdGroupServingStatus = "NOT_RUNNING" // AdGroupServingStatusRunning is for an ad group serving status Running. AdGroupServingStatusRunning AdGroupServingStatus = "RUNNING" )
type AdGroupStatus ¶
type AdGroupStatus string
AdGroupStatus is the user-controlled status to enable or pause the ad group.
const ( // AdGroupStatusEnabled is for an ad group status Enabled. AdGroupStatusEnabled AdGroupStatus = "ENABLED" // AdGroupStatusPaused is for an ad group status Paused. AdGroupStatusPaused AdGroupStatus = "PAUSED" )
type AdGroupUpdateRequest ¶
type AdGroupUpdateRequest struct { AutomatedKeywordsOptIn bool `json:"automatedKeywordsOptIn,omitempty"` CpaGoal *Money `json:"cpaGoal,omitempty"` DefaultBidAmount *Money `json:"defaultBidAmount,omitempty"` EndTime DateTime `json:"endTime,omitempty"` Name string `json:"name,omitempty"` StartTime DateTime `json:"startTime,omitempty"` Status AdGroupStatus `json:"status,omitempty"` TargetingDimensions *TargetDimensions `json:"targetingDimensions"` }
AdGroupUpdateRequest is the response to ad group update requests
https://developer.apple.com/documentation/apple_search_ads/adgroupupdate
type AdminAreaCriteria ¶
type AdminAreaCriteria struct {
Included []string `json:"included,omitempty"`
}
AdminAreaCriteria is the defined targeted audience by administrative area
https://developer.apple.com/documentation/apple_search_ads/adminareacriteria
type AgeCriteria ¶
type AgeCriteria struct {
Included []*AgeRange `json:"included,omitempty"`
}
AgeCriteria is the defined targeted audience to include using the age demographic
https://developer.apple.com/documentation/apple_search_ads/agecriteria
type AgeRange ¶
type AgeRange struct { MaxAge int32 `json:"maxAge,omitempty"` MinAge int32 `json:"minAge,omitempty"` }
AgeRange is the defined target audience to include using the age range demographic
https://developer.apple.com/documentation/apple_search_ads/agerange
type AppDownloaderCriteria ¶
type AppDownloaderCriteria struct { Included []string `json:"included,omitempty"` Excluded []string `json:"excluded,omitempty"` }
AppDownloaderCriteria is the defined targeted audience according to app downloads
https://developer.apple.com/documentation/apple_search_ads/appdownloadercriteria
type AppInfo ¶
type AppInfo struct { AdamID int64 `json:"adamId,omitempty"` AppName string `json:"appName,omitempty"` CountryOrRegionCodes []string `json:"countryOrRegionCodes,omitempty"` DeveloperName string `json:"developerName"` }
AppInfo is the response to an app search request
https://developer.apple.com/documentation/apple_search_ads/appinfo
type AppInfoListResponse ¶
type AppInfoListResponse struct { AppInfos []*AppInfo `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
AppInfoListResponse is the response details of app search requests
https://developer.apple.com/documentation/apple_search_ads/appinfolistresponse
type AppPreviewDevicesMappingResponse ¶
AppPreviewDevicesMappingResponse is the app preview device mapping response to display name and size mapping requests
https://developer.apple.com/documentation/apple_search_ads/apppreviewdevicesmappingresponse
type AppService ¶
type AppService service
AppService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/search_apps_and_geolocations
func (*AppService) SearchApps ¶
func (s *AppService) SearchApps(ctx context.Context, params *SearchAppsQuery) (*AppInfoListResponse, *Response, error)
SearchApps Searches for iOS apps to promote in a campaign
https://developer.apple.com/documentation/apple_search_ads/search_for_ios_apps
type Asset ¶
type Asset struct { AppPreviewDevice string `json:"appPreviewDevice,omitempty"` AssetGenID string `json:"assetGenId,omitempty"` Deleted bool `json:"deleted"` Orientation MediaAppPreviewOrScreenshotsOrientation `json:"orientation"` Type MediaAppPreviewOrScreenshotsAssetType `json:"type"` }
Asset is the assets for creating Creative Sets
https://developer.apple.com/documentation/apple_search_ads/asset
type AssignAdGroupCreativeSetRequest ¶
type AssignAdGroupCreativeSetRequest struct {
CreativeSetID int64 `json:"creativeSetID"`
}
AssignAdGroupCreativeSetRequest is the request to assign a Creative Set to an ad group
https://developer.apple.com/documentation/apple_search_ads/assignadgroupcreativesetrequest
type AuthTransport ¶
type AuthTransport struct { Transport http.RoundTripper // contains filtered or unexported fields }
AuthTransport is an http.RoundTripper implementation that stores the JWT created. If the token expires, the Rotate function should be called to update the stored token.
func NewTokenConfig ¶
func NewTokenConfig(orgID string, keyID string, teamID string, clientID string, expireDuration time.Duration, privateKey []byte) (*AuthTransport, error)
NewTokenConfig returns a new AuthTransport instance that customizes the Authentication header of the request during transport. It can be customized further by supplying a custom http.RoundTripper instance to the Transport field.
func (*AuthTransport) Client ¶
func (t *AuthTransport) Client() *http.Client
Client returns a new http.Client instance for use with apple_search_ads.Client.
type BudgetOrder ¶
type BudgetOrder struct { BillingEmail string `json:"billingEmail,omitempty"` Budget *Money `json:"budget,omitempty"` ClientName string `json:"clientName,omitempty"` EndDate DateTime `json:"endDate,omitempty"` ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` OrderNumber string `json:"orderNumber,omitempty"` ParentOrgID int64 `json:"parentOrgId,omitempty"` PrimaryBuyerEmail string `json:"primaryBuyerEmail"` PrimaryBuyerName string `json:"primaryBuyerName"` StartDate DateTime `json:"startDate"` Status BudgetOrderStatus `json:"status"` SupplySources BudgetOrderSupplySources `json:"supplySources"` }
BudgetOrder is the response to requests for budget order details
https://developer.apple.com/documentation/apple_search_ads/budgetorder
type BudgetOrderInfo ¶
type BudgetOrderInfo struct {
Bo *BudgetOrder `json:"bo"`
}
BudgetOrderInfo is the response to a request for specific details of a budget order
https://developer.apple.com/documentation/apple_search_ads/budgetorderinfo
type BudgetOrderInfoListResponse ¶
type BudgetOrderInfoListResponse struct { BudgetOrderInfos []*BudgetOrderInfo `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
BudgetOrderInfoListResponse is the response details to budget order requests
https://developer.apple.com/documentation/apple_search_ads/budgetorderinfolistresponse
type BudgetOrderInfoResponse ¶
type BudgetOrderInfoResponse struct { BudgetOrder *BudgetOrderInfo `json:"data"` Error *ErrorResponseBody `json:"error"` Pagination *PageDetail `json:"pagination"` }
BudgetOrderInfoResponse is a container for the budget order response body
https://developer.apple.com/documentation/apple_search_ads/budgetorderinforesponse
type BudgetOrderStatus ¶
type BudgetOrderStatus string
BudgetOrderStatus is the system-controlled status indicator for the budget order.
const ( // BudgetOrderStatusActive is for a budget order status on Active. BudgetOrderStatusActive BudgetOrderStatus = "ACTIVE" // BudgetOrderStatusCanceled is for a budget order status on Canceled. BudgetOrderStatusCanceled BudgetOrderStatus = "CANCELED" // BudgetOrderStatusExhausted is for a budget order status on Exhausted. BudgetOrderStatusExhausted BudgetOrderStatus = "EXHAUSTED" // BudgetOrderStatusInActive is for a budget order status on InActive. BudgetOrderStatusInActive BudgetOrderStatus = "INACTIVE" // BudgetOrderStatusComplete is for a budget order status on Completed. BudgetOrderStatusComplete BudgetOrderStatus = "COMPLETED" )
type BudgetOrderSupplySources ¶
type BudgetOrderSupplySources string
BudgetOrderSupplySources is the supply source of ads to use in a budget order and a campaign.
const ( // BudgetOrderSupplySourcesAppStoreSearchResults is for a budget order supply sources on App Store Search Results. BudgetOrderSupplySourcesAppStoreSearchResults BudgetOrderSupplySources = "APPSTORE_SEARCH_RESULTS" // BudgetOrderSupplySourcesAppStoreSearchTab is for a budget order supply sources on App Store Search Tab. BudgetOrderSupplySourcesAppStoreSearchTab BudgetOrderSupplySources = "APPSTORE_SEARCH_TAB" )
type BudgetService ¶
type BudgetService service
BudgetService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/campaigns
func (*BudgetService) GetAllBudgetOrders ¶
func (s *BudgetService) GetAllBudgetOrders(ctx context.Context, params *GetAllBudgetOrdersQuery) (*BudgetOrderInfoListResponse, *Response, error)
GetAllBudgetOrders Fetches all assigned budget orders for an organization
https://developer.apple.com/documentation/apple_search_ads/get_all_budget_orders
func (*BudgetService) GetBudgetOrder ¶
func (s *BudgetService) GetBudgetOrder(ctx context.Context, boID int64) (*BudgetOrderInfoResponse, *Response, error)
GetBudgetOrder Fetches a specific budget order using a budget order identifier
https://developer.apple.com/documentation/apple_search_ads/get_a_budget_order
type Campaign ¶
type Campaign struct { AdamID int64 `json:"adamId,omitempty"` AdChannelType CampaignAdChannelType `json:"adChannelType,omitempty"` BillingEvent string `json:"billingEvent,omitempty"` BudgetAmount *Money `json:"budgetAmount,omitempty"` BudgetOrders []int64 `json:"budgetOrders,omitempty"` CountriesOrRegions []string `json:"countriesOrRegions,omitempty"` CountryOrRegionServingStateReasons CampaignCountryOrRegionServingStateReasons `json:"countryOrRegionServingStateReasons,omitempty"` DailyBudgetAmount *Money `json:"dailyBudgetAmount,omitempty"` Deleted bool `json:"deleted,omitempty"` DisplayStatus CampaignDisplayStatus `json:"displayStatus,omitempty"` EndTime *DateTime `json:"endTime,omitempty"` ID int64 `json:"id,omitempty"` LocInvoiceDetails *LOCInvoiceDetails `json:"locInvoiceDetails,omitempty"` ModificationTime DateTime `json:"modificationTime,omitempty"` Name string `json:"name,omitempty"` OrgID int64 `json:"orgId,omitempty"` PaymentModel PaymentModel `json:"paymentModel,omitempty"` ServingStateReasons []CampaignServingStateReason `json:"servingStateReasons,omitempty"` ServingStatus CampaignServingStatus `json:"servingStatus,omitempty"` StartTime DateTime `json:"startTime,omitempty"` Status CampaignStatus `json:"status,omitempty"` SupplySources []CampaignSupplySource `json:"supplySources,omitempty"` }
Campaign is the response to a request to create and fetch campaigns
https://developer.apple.com/documentation/apple_search_ads/campaign
type CampaignAdChannelType ¶
type CampaignAdChannelType string
CampaignAdChannelType is the channel type of ad in a campaign.
const ( // CampaignAdChannelTypeSearch When supplySources is APPSTORE_SEARCH_RESULTS, the adChannelType must be SEARCH. CampaignAdChannelTypeSearch CampaignAdChannelType = "SEARCH" // CampaignAdChannelTypeDisplay When supplySources is APPSTORE_SEARCH_TAB, the adChannelType must be DISPLAY. CampaignAdChannelTypeDisplay CampaignAdChannelType = "DISPLAY" )
type CampaignAppDetail ¶
CampaignAppDetail is the app data to fetch from campaign-level reports
https://developer.apple.com/documentation/apple_search_ads/campaignappdetail
type CampaignCountryOrRegionServingStateReason ¶
type CampaignCountryOrRegionServingStateReason string
CampaignCountryOrRegionServingStateReason is a reason that returns when a campaign can’t run for a specified country or region.
const ( // CampaignCountryOrRegionServingStateReasonAppNotEligible is for a campaign country or region serving state reason on APP_NOT_ELIGIBLE. CampaignCountryOrRegionServingStateReasonAppNotEligible CampaignCountryOrRegionServingStateReason = "APP_NOT_ELIGIBLE" // CampaignCountryOrRegionServingStateReasonAppNotEligibleSearchAds is for a campaign country or region serving state reason on APP_NOT_ELIGIBLE_SEARCHADS. CampaignCountryOrRegionServingStateReasonAppNotEligibleSearchAds CampaignCountryOrRegionServingStateReason = "APP_NOT_ELIGIBLE_SEARCHADS" // CampaignCountryOrRegionServingStateReasonAppNotPublishedYet is for a campaign country or region serving state reason on APP_NOT_PUBLISHED_YET. CampaignCountryOrRegionServingStateReasonAppNotPublishedYet CampaignCountryOrRegionServingStateReason = "APP_NOT_PUBLISHED_YET" // CampaignCountryOrRegionServingStateReasonSapinLawAgentUnknown is for a campaign country or region serving state reason on SAPIN_LAW_AGENT_UNKNOWN. CampaignCountryOrRegionServingStateReasonSapinLawAgentUnknown CampaignCountryOrRegionServingStateReason = "SAPIN_LAW_AGENT_UNKNOWN" // CampaignCountryOrRegionServingStateReasonSapinLawFrenchBizUnknown is for a campaign country or region serving state reason on SAPIN_LAW_FRENCH_BIZ_UNKNOWN. CampaignCountryOrRegionServingStateReasonSapinLawFrenchBizUnknown CampaignCountryOrRegionServingStateReason = "SAPIN_LAW_FRENCH_BIZ_UNKNOWN" // CampaignCountryOrRegionServingStateReasonSapinLawFrenchBiz is for a campaign country or region serving state reason on SAPIN_LAW_FRENCH_BIZ. CampaignCountryOrRegionServingStateReasonSapinLawFrenchBiz CampaignCountryOrRegionServingStateReason = "SAPIN_LAW_FRENCH_BIZ" )
type CampaignCountryOrRegionServingStateReasons ¶
type CampaignCountryOrRegionServingStateReasons map[string][]CampaignCountryOrRegionServingStateReason
CampaignCountryOrRegionServingStateReasons is the reasons why a campaign can’t run
type CampaignDisplayStatus ¶
type CampaignDisplayStatus string
CampaignDisplayStatus is the status of the campaign.
const ( // CampaignDisplayStatusRunning is for a campaign status on RUNNING. CampaignDisplayStatusRunning CampaignDisplayStatus = "RUNNING" // CampaignDisplayStatusOnHold is for a campaign status on ON_HOLD. CampaignDisplayStatusOnHold CampaignDisplayStatus = "ON_HOLD" // CampaignDisplayStatusPaused is for a campaign status on PAUSED. CampaignDisplayStatusPaused CampaignDisplayStatus = "PAUSED" // CampaignDisplayStatusDeleted is for a campaign status on DELETED. CampaignDisplayStatusDeleted CampaignDisplayStatus = "DELETED" )
type CampaignListResponse ¶
type CampaignListResponse struct { Campaigns []*Campaign `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
CampaignListResponse is the response details of campaign requests
https://developer.apple.com/documentation/apple_search_ads/campaignlistresponse
type CampaignResponse ¶
type CampaignResponse struct { Campaign *Campaign `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
CampaignResponse is a container for the campaign response body
https://developer.apple.com/documentation/apple_search_ads/campaignresponse
type CampaignService ¶
type CampaignService service
CampaignService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/campaigns
func (*CampaignService) CreateCampaign ¶
func (s *CampaignService) CreateCampaign(ctx context.Context, campaign *Campaign) (*CampaignResponse, *Response, error)
CreateCampaign Creates a campaign to promote an app
https://developer.apple.com/documentation/apple_search_ads/create_a_campaign
func (*CampaignService) DeleteCampaign ¶
DeleteCampaign Deletes a specific campaign by campaign identifier
https://developer.apple.com/documentation/apple_search_ads/delete_a_campaign
func (*CampaignService) FindCampaigns ¶
func (s *CampaignService) FindCampaigns(ctx context.Context, selector *Selector) (*CampaignListResponse, *Response, error)
FindCampaigns Fetches campaigns with selector operators
https://developer.apple.com/documentation/apple_search_ads/find_campaigns
func (*CampaignService) GetAllCampaigns ¶
func (s *CampaignService) GetAllCampaigns(ctx context.Context, params *GetAllCampaignQuery) (*CampaignListResponse, *Response, error)
GetAllCampaigns Fetches all of an organization’s assigned campaigns
https://developer.apple.com/documentation/apple_search_ads/get_all_campaigns
func (*CampaignService) GetCampaign ¶
func (s *CampaignService) GetCampaign(ctx context.Context, campaignID int64) (*CampaignResponse, *Response, error)
GetCampaign Fetches a specific campaign by campaign identifier
https://developer.apple.com/documentation/apple_search_ads/get_a_campaign
func (*CampaignService) UpdateCampaign ¶
func (s *CampaignService) UpdateCampaign(ctx context.Context, campaignID int64, req *UpdateCampaignRequest) (*CampaignResponse, *Response, error)
UpdateCampaign Updates a campaign with a campaign identifier
https://developer.apple.com/documentation/apple_search_ads/update_a_campaign
type CampaignServingStateReason ¶
type CampaignServingStateReason string
CampaignServingStateReason is a reason that displays when a campaign can’t run.
const ( // CampaignServingStateReasonNoPaymentMethodOnFile is for a campaign serving state reason for NO_PAYMENT_METHOD_ON_FILE. CampaignServingStateReasonNoPaymentMethodOnFile CampaignServingStateReason = "NO_PAYMENT_METHOD_ON_FILE" // CampaignServingStateReasonMissingBoOrInvoicingFields is for a campaign serving state reason for MISSING_BO_OR_INVOICING_FIELDS. CampaignServingStateReasonMissingBoOrInvoicingFields CampaignServingStateReason = "MISSING_BO_OR_INVOICING_FIELDS" // CampaignServingStateReasonPausedByUser is for a campaign serving state reason for PAUSED_BY_USER. CampaignServingStateReasonPausedByUser CampaignServingStateReason = "PAUSED_BY_USER" // CampaignServingStateReasonDeletedByUser is for a campaign serving state reason for DELETED_BY_USER. CampaignServingStateReasonDeletedByUser CampaignServingStateReason = "DELETED_BY_USER" // CampaignServingStateReasonCampaignEndDateReached is for a campaign serving state reason for CAMPAIGN_END_DATE_REACHED. CampaignServingStateReasonCampaignEndDateReached CampaignServingStateReason = "CAMPAIGN_END_DATE_REACHED" // CampaignServingStateReasonCampaignStartDateInFuture is for a campaign serving state reason for CAMPAIGN_START_DATE_IN_FUTURE. CampaignServingStateReasonCampaignStartDateInFuture CampaignServingStateReason = "CAMPAIGN_START_DATE_IN_FUTURE" // CampaignServingStateReasonDailyCapExhausted is for a campaign serving state reason for DAILY_CAP_EXHAUSTED. CampaignServingStateReasonDailyCapExhausted CampaignServingStateReason = "DAILY_CAP_EXHAUSTED" // CampaignServingStateReasonTotalBudgetExhausted is for a campaign serving state reason for TOTAL_BUDGET_EXHAUSTED. CampaignServingStateReasonTotalBudgetExhausted CampaignServingStateReason = "TOTAL_BUDGET_EXHAUSTED" // CampaignServingStateReasonCreditCardDeclined is for a campaign serving state reason for CREDIT_CARD_DECLINED. CampaignServingStateReasonCreditCardDeclined CampaignServingStateReason = "CREDIT_CARD_DECLINED" // CampaignServingStateReasonAppNotEligible is for a campaign serving state reason for APP_NOT_ELIGIBLE. CampaignServingStateReasonAppNotEligible CampaignServingStateReason = "APP_NOT_ELIGIBLE" // CampaignServingStateReasonAppNotEligibleSearchads is for a campaign serving state reason for APP_NOT_ELIGIBLE_SEARCHADS. CampaignServingStateReasonAppNotEligibleSearchads CampaignServingStateReason = "APP_NOT_ELIGIBLE_SEARCHADS" // CampaignServingStateReasonAppNotPublishedYet is for a campaign serving state reason for APP_NOT_PUBLISHED_YET. CampaignServingStateReasonAppNotPublishedYet CampaignServingStateReason = "APP_NOT_PUBLISHED_YET" // CampaignServingStateReasonBoStartDateInFuture is for a campaign serving state reason for BO_START_DATE_IN_FUTURE. CampaignServingStateReasonBoStartDateInFuture CampaignServingStateReason = "BO_START_DATE_IN_FUTURE" // CampaignServingStateReasonBoEndDateReached is for a campaign serving state reason for BO_END_DATE_REACHED. CampaignServingStateReasonBoEndDateReached CampaignServingStateReason = "BO_END_DATE_REACHED" // CampaignServingStateReasonBoExhausted is for a campaign serving state reason for BO_EXHAUSTED. CampaignServingStateReasonBoExhausted CampaignServingStateReason = "BO_EXHAUSTED" // CampaignServingStateReasonOrgPaymentTypeChanged is for a campaign serving state reason for ORG_PAYMENT_TYPE_CHANGED. CampaignServingStateReasonOrgPaymentTypeChanged CampaignServingStateReason = "ORG_PAYMENT_TYPE_CHANGED" // CampaignServingStateReasonOrgSuspendedPolicyViolation is for a campaign serving state reason for ORG_SUSPENDED_POLICY_VIOLATION. CampaignServingStateReasonOrgSuspendedPolicyViolation CampaignServingStateReason = "ORG_SUSPENDED_POLICY_VIOLATION" // CampaignServingStateReasonOrgSuspendedFraud is for a campaign serving state reason for ORG_SUSPENDED_FRAUD. CampaignServingStateReasonOrgSuspendedFraud CampaignServingStateReason = "ORG_SUSPENDED_FRAUD" // CampaignServingStateReasonOrgChargeBackDisputed is for a campaign serving state reason for ORG_CHARGE_BACK_DISPUTED. CampaignServingStateReasonOrgChargeBackDisputed CampaignServingStateReason = "ORG_CHARGE_BACK_DISPUTED" // CampaignServingStateReasonPausedBySystem is for a campaign serving state reason for PAUSED_BY_SYSTEM. CampaignServingStateReasonPausedBySystem CampaignServingStateReason = "PAUSED_BY_SYSTEM" // CampaignServingStateReasonLocExhausted is for a campaign serving state reason for LOC_EXHAUSTED. CampaignServingStateReasonLocExhausted CampaignServingStateReason = "LOC_EXHAUSTED" // CampaignServingStateReasonTaxVerificationPending is for a campaign serving state reason for TAX_VERIFICATION_PENDING. CampaignServingStateReasonTaxVerificationPending CampaignServingStateReason = "TAX_VERIFICATION_PENDING" // CampaignServingStateReasonSapinLawAgentUnknown is for a campaign serving state reason for SAPIN_LAW_AGENT_UNKNOWN. CampaignServingStateReasonSapinLawAgentUnknown CampaignServingStateReason = "SAPIN_LAW_AGENT_UNKNOWN" // CampaignServingStateReasonSapinLawFrenchBizUnknown is for a campaign serving state reason for SAPIN_LAW_FRENCH_BIZ_UNKNOWN. CampaignServingStateReasonSapinLawFrenchBizUnknown CampaignServingStateReason = "SAPIN_LAW_FRENCH_BIZ_UNKNOWN" // CampaignServingStateReasonSapinLawFrenchBiz is for a campaign serving state reason for SAPIN_LAW_FRENCH_BIZ. CampaignServingStateReasonSapinLawFrenchBiz CampaignServingStateReason = "SAPIN_LAW_FRENCH_BIZ" // CampaignServingStateReasonNoEligibleCountries is for a campaign serving state reason for NO_ELIGIBLE_COUNTRIES. CampaignServingStateReasonNoEligibleCountries CampaignServingStateReason = "NO_ELIGIBLE_COUNTRIES" // CampaignServingStateReasonAdGroupMissing is for a campaign serving state reason for AD_GROUP_MISSING. CampaignServingStateReasonAdGroupMissing CampaignServingStateReason = "AD_GROUP_MISSING" )
type CampaignServingStatus ¶
type CampaignServingStatus string
CampaignServingStatus is the status of the campaign.
const ( // CampaignServingStatusRunning is for a campaign serving status source on RUNNING. CampaignServingStatusRunning CampaignServingStatus = "RUNNING" // CampaignServingStatusNotRunning is for a campaign supply source on NOT_RUNNING. CampaignServingStatusNotRunning CampaignServingStatus = "NOT_RUNNING" )
type CampaignStatus ¶
type CampaignStatus string
CampaignStatus is the user-controlled status to enable or pause the campaign.
const ( // CampaignStatusEnabled is for a campaign status on ENABLED. CampaignStatusEnabled CampaignStatus = "ENABLED" // CampaignStatusPaused is for a campaign status source on PAUSED. CampaignStatusPaused CampaignStatus = "PAUSED" )
type CampaignSupplySource ¶
type CampaignSupplySource string
CampaignSupplySource is the supply source of ads to use in a campaign.
const ( // CampaignSupplySourceAppstoreSearchResults is for a campaign supply source on APPSTORE_SEARCH_RESULTS. CampaignSupplySourceAppstoreSearchResults CampaignSupplySource = "APPSTORE_SEARCH_RESULTS" // CampaignSupplySourceNews is for a campaign supply source on NEWS. CampaignSupplySourceNews CampaignSupplySource = "NEWS" // CampaignSupplySourceStocks is for a campaign supply source on STOCKS. CampaignSupplySourceStocks CampaignSupplySource = "STOCKS" )
type CampaignUpdate ¶
type CampaignUpdate struct { BudgetAmount *Money `json:"budgetAmount,omitempty"` BudgetOrders int64 `json:"budgetOrders,omitempty"` CountriesOrRegions []string `json:"countriesOrRegions,omitempty"` DailyBudgetAmount *Money `json:"dailyBudgetAmount,omitempty"` LOCInvoiceDetails LOCInvoiceDetails `json:"locInvoiceDetails,omitempty"` Name string `json:"name,omitempty"` Status *CampaignStatus `json:"status,omitempty"` }
CampaignUpdate is the list of campaign fields that are updatable
https://developer.apple.com/documentation/apple_search_ads/campaignupdate
type Client ¶
type Client struct { UserAgent string Campaigns *CampaignService AdGroups *AdGroupService Reporting *ReportingService Keywords *KeywordService Budget *BudgetService App *AppService Geo *GeoService CreativeSets *CreativeSetsService AccessControlList *AccessControlListService // contains filtered or unexported fields }
Client is the root instance of the Apple Search Ads API.
func (*Client) SetHTTPDebug ¶
SetHTTPDebug this enables global http request/response dumping for this API.
type Condition ¶
type Condition struct { Field string `json:"field,omitempty"` Operator ConditionOperator `json:"operator,omitempty"` Values []string `json:"values,omitempty"` }
Condition is the list of condition objects that allow users to filter a list of records
https://developer.apple.com/documentation/apple_search_ads/condition
type ConditionOperator ¶
type ConditionOperator string
ConditionOperator is the operator values compare attributes to a list of specified values.
const ( // ConditionOperatorBetween is the attribute matches the values within a specified range. The values can be numbers, text, or dates. ConditionOperatorBetween ConditionOperator = "BETWEEN" // ConditionOperatorContains is the attribute matches the value in the specified list. ConditionOperatorContains ConditionOperator = "CONTAINS" // ConditionOperatorContainsAll is the attribute has all of the values in the specified list. ConditionOperatorContainsAll ConditionOperator = "CONTAINS_ALL" // ConditionOperatorContainsAny is the attribute contains any of the values in the specified list. ConditionOperatorContainsAny ConditionOperator = "CONTAINS_ANY" // ConditionOperatorEndsWith is the attribute matches the suffix of a string. ConditionOperatorEndsWith ConditionOperator = "ENDSWITH" // ConditionOperatorEquals is the attribute contains exact values. ConditionOperatorEquals ConditionOperator = "EQUALS" // ConditionOperatorGreaterThan is the value is greater than the specified value. ConditionOperatorGreaterThan ConditionOperator = "GREATER_THAN" // ConditionOperatorLessThan is the value is less than the specified value. ConditionOperatorLessThan ConditionOperator = "LESS_THAN" // ConditionOperatorStartsWith is the attribute matches the prefix of a string. ConditionOperatorStartsWith ConditionOperator = "STARTSWITH" // ConditionOperatorIn is the attribute matches any value in a list of specified values. ConditionOperatorIn ConditionOperator = "IN" // ConditionOperatorLike is the attribute like the value in the specified value. ConditionOperatorLike ConditionOperator = "LIKE" // ConditionOperatorNotEqual is the attribute not contains exact values. ConditionOperatorNotEqual ConditionOperator = "NOT_EQUALS" // ConditionOperatorIs is the attribute contains any of the values in the specified list. ConditionOperatorIs ConditionOperator = "IS" )
type CountryCriteria ¶
type CountryCriteria struct {
Included []string `json:"included,omitempty"`
}
CountryCriteria is the defined targeted audience by country or region
https://developer.apple.com/documentation/apple_search_ads/countrycriteria
type CreateAdGroupCreativeSetRequest ¶
type CreateAdGroupCreativeSetRequest struct {
CreativeSet *CreativeSetCreate `json:"creativeSet,omitempty"`
}
CreateAdGroupCreativeSetRequest is the response to a request to create an ad group Creative Set
https://developer.apple.com/documentation/apple_search_ads/createadgroupcreativesetrequest
type CreativeSet ¶
type CreativeSet struct { ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` AdamID int64 `json:"adamID,omitempty"` CreativeSetAssets []*CreativeSetAsset `json:"creativeSetAssets,omitempty"` LanguageCode string `json:"languageCode,omitempty"` OrgID int64 `json:"orgID,omitempty"` Status CreativeSetStatus `json:"status,omitempty"` StatusReasons []CreativeSetStatusReason `json:"statusReasons,omitempty"` }
CreativeSet is the basic details of a Creative Set
https://developer.apple.com/documentation/apple_search_ads/creativeset
type CreativeSetAsset ¶
type CreativeSetAsset struct { Asset *Asset `json:"asset,omitempty"` ID int64 `json:"id,omitempty"` }
CreativeSetAsset is the assets of a Creative Set
https://developer.apple.com/documentation/apple_search_ads/creativesetasset
type CreativeSetAssetsDetail ¶
type CreativeSetAssetsDetail struct {
CreativeSetDetails map[string]CreativeSetLocaleDetail `json:"creativeSetDetails,omitempty"`
}
CreativeSetAssetsDetail is the asset details to create a Creative Set
https://developer.apple.com/documentation/apple_search_ads/creativesetassetsdetail
type CreativeSetCreate ¶
type CreativeSetCreate struct { AdamID int64 `json:"adamId,omitempty"` Name string `json:"name,omitempty"` LanguageCode string `json:"languageCode,omitempty"` AssetsGenIds []string `json:"assetsGenIds,omitempty"` }
CreativeSetCreate is the response to creating a Creative Set
https://developer.apple.com/documentation/apple_search_ads/creativesetcreate
type CreativeSetListResponse ¶
type CreativeSetListResponse struct { CreativeSets []*CreativeSet `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
CreativeSetListResponse is the response to the request to find Creative Sets
https://developer.apple.com/documentation/apple_search_ads/creativesetlistresponse
type CreativeSetLocaleDetail ¶
type CreativeSetLocaleDetail struct { AppPreviewDeviceWithAssets map[string]MediaAppPreviewOrScreenshotsDetail `json:"appPreviewDeviceWithAssets,omitempty"` IsPrimaryLocale bool `json:"isPrimaryLocale,omitempty"` LanguageCode string `json:"languageCode,omitempty"` LanguageDisplayName string `json:"languageDisplayName"` }
CreativeSetLocaleDetail is the localized information about a Creative Set
https://developer.apple.com/documentation/apple_search_ads/creativesetlocaledetail
type CreativeSetResponse ¶
type CreativeSetResponse struct { CreativeSet *CreativeSet `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` }
CreativeSetResponse is the response to update a Creative Set request
https://developer.apple.com/documentation/apple_search_ads/creativesetresponse
type CreativeSetStatus ¶
type CreativeSetStatus string
CreativeSetStatus is the user-controlled status to enable or pause the Creative Set.
const ( // CreativeSetStatusValid is for a creative set status on Valid. CreativeSetStatusValid CreativeSetStatus = "VALID" // CreativeSetStatusInvalid is for a creative set status on InValid. CreativeSetStatusInvalid CreativeSetStatus = "INVALID" )
type CreativeSetStatusReason ¶
type CreativeSetStatusReason string
CreativeSetStatusReason is the reason for the Creative Set status.
const ( // CreativeSetStatusReasonAssetDeleted is for a creative set status reason on Asset Deleted. CreativeSetStatusReasonAssetDeleted CreativeSetStatusReason = "ASSET_DELETED" )
type CreativeSetUpdate ¶
type CreativeSetUpdate struct {
Name string `json:"name"`
}
CreativeSetUpdate is the details of an update to a Creative Set request
https://developer.apple.com/documentation/apple_search_ads/creativesetupdate
type CreativeSetsService ¶
type CreativeSetsService service
CreativeSetsService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/creative_sets
func (*CreativeSetsService) AssignCreativeSetsToAdGroup ¶
func (s *CreativeSetsService) AssignCreativeSetsToAdGroup(ctx context.Context, campaignID int64, adgroupID int64, request *AssignAdGroupCreativeSetRequest) (*AdGroupCreativeSetResponse, *Response, error)
AssignCreativeSetsToAdGroup Creates a Creative Set assignment to an ad group
https://developer.apple.com/documentation/apple_search_ads/assign_creative_sets_to_an_ad_group
func (*CreativeSetsService) CreateAdGroupCreativeSets ¶
func (s *CreativeSetsService) CreateAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, body *CreateAdGroupCreativeSetRequest) (*AdGroupCreativeSetResponse, *Response, error)
CreateAdGroupCreativeSets Creates a Creative Set and assigns it to an ad group
https://developer.apple.com/documentation/apple_search_ads/create_ad_group_creative_sets
func (*CreativeSetsService) DeleteAdGroupCreativeSets ¶
func (s *CreativeSetsService) DeleteAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, adGroupCreativeSetIDs []int64) (*IntegerResponse, *Response, error)
DeleteAdGroupCreativeSets Deletes Creative Sets from a specified ad group
https://developer.apple.com/documentation/apple_search_ads/delete_ad_group_creative_sets
func (*CreativeSetsService) FindAdGroupCreativeSets ¶
func (s *CreativeSetsService) FindAdGroupCreativeSets(ctx context.Context, campaignID int64, body *FindAdGroupCreativeSetRequest) (*AdGroupCreativeSetListResponse, *Response, error)
FindAdGroupCreativeSets Fetches all assigned Creative Sets for ad groups
https://developer.apple.com/documentation/apple_search_ads/find_ad_group_creative_sets
func (*CreativeSetsService) FindCreativeSets ¶
func (s *CreativeSetsService) FindCreativeSets(ctx context.Context, params *FindCreativeSetRequest) (*CreativeSetListResponse, *Response, error)
FindCreativeSets Fetches all assigned Creative Sets for an organization
https://developer.apple.com/documentation/apple_search_ads/find_creative_sets
func (*CreativeSetsService) GetAppPreviewDeviceSizes ¶
func (s *CreativeSetsService) GetAppPreviewDeviceSizes(ctx context.Context) (*AppPreviewDevicesMappingResponse, *Response, error)
GetAppPreviewDeviceSizes Fetches supported app preview device size mappings
func (*CreativeSetsService) GetCreativeAppAssets ¶
func (s *CreativeSetsService) GetCreativeAppAssets(ctx context.Context, adamID int64, params *MediaCreativeSetRequest) (*MediaCreativeSetDetailResponse, *Response, error)
GetCreativeAppAssets Fetches assets to use with Creative Sets
func (*CreativeSetsService) GetCreativeSetVariation ¶
func (s *CreativeSetsService) GetCreativeSetVariation(ctx context.Context, creativeSetID int64, params *GetCreativeSetVariationQuery) (*CreativeSetResponse, *Response, error)
GetCreativeSetVariation Get a Creative Set Ad Variation
https://developer.apple.com/documentation/apple_search_ads/get_a_creative_set_ad_variation
func (*CreativeSetsService) UpdateAdGroupCreativeSets ¶
func (s *CreativeSetsService) UpdateAdGroupCreativeSets(ctx context.Context, campaignID int64, adgroupID int64, adGroupCreativeSetID int64, body *AdGroupCreativeSetUpdate) (*AdGroupCreativeSetResponse, *Response, error)
UpdateAdGroupCreativeSets Updates an ad group Creative Set using an identifier
https://developer.apple.com/documentation/apple_search_ads/update_ad_group_creative_sets
func (*CreativeSetsService) UpdateCreativeSets ¶
func (s *CreativeSetsService) UpdateCreativeSets(ctx context.Context, creativeSetID int64, request *CreativeSetUpdate) (*CreativeSetResponse, *Response, error)
UpdateCreativeSets Updates a Creative Set name using an identifier
https://developer.apple.com/documentation/apple_search_ads/update_creative_sets
type CreativeSetsServingStateReason ¶
type CreativeSetsServingStateReason string
CreativeSetsServingStateReason is a reason when a adgroupcreativeset is not running.
const ( // CreativeSetsServingStateReasonPausedBySystem is for a adgroup creative set serving state reason for PAUSED_BY_SYSTEM. CreativeSetsServingStateReasonPausedBySystem CreativeSetsServingStateReason = "PAUSED_BY_SYSTEM" // CreativeSetsServingStateReasonPausedByUser is for a adgroup creative set serving state reason for PAUSED_BY_USER. CreativeSetsServingStateReasonPausedByUser CreativeSetsServingStateReason = "PAUSED_BY_USER" // CreativeSetsServingStateReasonDeletedByUser is for a adgroup creative set serving state reason for DELETED_BY_USER. CreativeSetsServingStateReasonDeletedByUser CreativeSetsServingStateReason = "DELETED_BY_USER" // CreativeSetsServingStateReasonCreativeSetInvalid is for a adgroup creative set serving state reason for CREATIVE_SET_INVALID. CreativeSetsServingStateReasonCreativeSetInvalid CreativeSetsServingStateReason = "CREATIVE_SET_INVALID" )
type Date ¶
Date represents a date with no time component.
func (Date) MarshalJSON ¶
MarshalJSON is a custom marshaller for time-less dates.
func (*Date) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller for time-less dates.
type DateTime ¶
DateTime represents a date with an ISO8601-like date-time.
func (DateTime) MarshalJSON ¶
MarshalJSON is a custom marshaller for date-times.
func (*DateTime) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller for date-times.
type DayPartCriteria ¶
type DayPartCriteria struct {
UserTime *DaypartDetail `json:"userTime,omitempty"`
}
DayPartCriteria is the defined targeted audience to include for a specific time of day
https://developer.apple.com/documentation/apple_search_ads/daypartcriteria
type DaypartDetail ¶
type DaypartDetail struct {
Included []int32 `json:"included,omitempty"`
}
DaypartDetail is the defined targeted audience to include by a specific time of day
https://developer.apple.com/documentation/apple_search_ads/daypartdetail
type DeviceClassCriteria ¶
type DeviceClassCriteria struct {
Included []AdGroupDeviceClass `json:"included,omitempty"`
}
DeviceClassCriteria is the defined targeted audience to include by device type
https://developer.apple.com/documentation/apple_search_ads/deviceclasscriteria
type Email ¶
type Email string
Email is a validated email address string.
func (Email) MarshalJSON ¶
MarshalJSON is a custom marshaler for email addresses.
func (*Email) UnmarshalJSON ¶
UnmarshalJSON is a custom unmarshaller for email addresses.
type ErrInvalidEmail ¶
type ErrInvalidEmail struct {
Value string
}
ErrInvalidEmail occurs when the value does not conform to the library author's understanding of what constitutes a valid email address, and cannot be marshaled or unmarshaled into JSON.
func (ErrInvalidEmail) Error ¶
func (e ErrInvalidEmail) Error() string
type ErrorMeta ¶
type ErrorMeta struct { // AssociatedErrors is a map of routes to array of errors that are associated with the current error. AssociatedErrors map[string][]ErrorResponseError `json:"associatedErrors,omitempty"` }
ErrorMeta is an undocumented type that contains associations to other errors, grouped by route.
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response `json:"-"` Errors []ErrorResponseError `json:"errors,omitempty"` }
ErrorResponse contains information with error details that an API returns in the response body whenever the API request is not successful.
func (ErrorResponse) Error ¶
func (e ErrorResponse) Error() string
type ErrorResponseBody ¶
type ErrorResponseBody struct {
Errors []ErrorResponseItem `json:"errors,omitempty"`
}
ErrorResponseBody is a container for the error response body
https://developer.apple.com/documentation/apple_search_ads/errorresponsebody
type ErrorResponseError ¶
type ErrorResponseError struct { // Code is a machine-readable indication of the type of error. The code is a hierarchical // value with levels of specificity separated by the '.' character. This value is parseable // for programmatic error handling in code. Code string `json:"code"` // Detail is a detailed explanation of the error. Do not use this field for programmatic error handling. Detail string `json:"detail"` // ID is a unique identifier of a specific instance of an error, request, and response. // Use this ID when providing feedback to or debugging issues with Apple. ID *string `json:"id,omitempty"` // Source wraps one of two possible types of values: source.parameter, provided when a query // parameter produced the error, or source.JsonPointer, provided when a problem with the entity // produced the error. Source *ErrorSource `json:"source,omitempty"` // Status is the HTTP status code of the error. This status code usually matches the // response's status code; however, if the request produces multiple errors, these two // codes may differ. Status string `json:"status"` // Title is a summary of the error. Do not use this field for programmatic error handling. Title string `json:"title"` // Meta is an undocumented field associating an error to many other errors. Meta *ErrorMeta `json:"meta,omitempty"` }
ErrorResponseError is a model used in ErrorResponse to describe a single error from the API.
func (ErrorResponseError) String ¶
func (e ErrorResponseError) String(level int) string
type ErrorResponseItem ¶
type ErrorResponseItem struct { Field string `json:"field,omitempty"` Message string `json:"message,omitempty"` MessageCode ErrorResponseItemMessageCode `json:"messageCode,omitempty"` }
ErrorResponseItem is the error response details in the response body
https://developer.apple.com/documentation/apple_search_ads/errorresponseitem
type ErrorResponseItemMessageCode ¶
type ErrorResponseItemMessageCode string
ErrorResponseItemMessageCode is a system-assigned error code.
const ( ErrorResponseItemMessageCode = "UNAUTHORIZED" // ErrorResponseItemMessageCodeInvalidDateFormat is for an error response item message code on INVALID_DATE_FORMAT. ErrorResponseItemMessageCodeInvalidDateFormat ErrorResponseItemMessageCode = "INVALID_DATE_FORMAT" )ErrorResponseItemMessageCodeUnauthorized
type ErrorSource ¶
type ErrorSource struct { // A JSON pointer that indicates the location in the request entity where the error originates. Pointer string `json:"pointer,omitempty"` // The query parameter that produced the error. Parameter string `json:"parameter,omitempty"` }
ErrorSource is the union of two API types: `ErrorResponse.Errors.JsonPointer` and `ErrorResponse.Errors.Parameter`.
https://developer.apple.com/documentation/appstoreconnectapi/errorresponse/errors/jsonpointer https://developer.apple.com/documentation/appstoreconnectapi/errorresponse/errors/parameter
type ExtendedSpendRow ¶
type ExtendedSpendRow struct { AvgCPA *Money `json:"avgCPA,omitempty"` AvgCPT *Money `json:"avgCPT,omitempty"` AvgCPM *Money `json:"avgCPM,omitempty"` ConversionRate float64 `json:"conversionRate,omitempty"` Impressions int64 `json:"impressions,omitempty"` Installs int64 `json:"installs,omitempty"` LatOffInstalls int64 `json:"latOffInstalls,omitempty"` LatOnInstalls int64 `json:"latOnInstalls,omitempty"` LocalSpend *Money `json:"localSpend,omitempty"` NewDownloads int64 `json:"newDownloads,omitempty"` ReDownloads int64 `json:"redownloads,omitempty"` Taps int64 `json:"taps,omitempty"` Ttr float64 `json:"ttr,omitempty"` Date Date `json:"date,omitempty"` }
ExtendedSpendRow is the descriptions of metrics with dates
https://developer.apple.com/documentation/apple_search_ads/extendedspendrow
type FindAdGroupCreativeSetRequest ¶
type FindAdGroupCreativeSetRequest struct {
Selector *Selector `json:"selector"`
}
FindAdGroupCreativeSetRequest Selector objects available to filter returned data.
https://developer.apple.com/documentation/apple_search_ads/findadgroupcreativesetrequest
type FindCreativeSetRequest ¶
type FindCreativeSetRequest struct { Selector *Selector `json:"selector,omitempty"` IncludeDeletedCreativeSetAssets bool `json:"includeDeletedCreativeSetAssets,omitempty"` }
FindCreativeSetRequest is the request to find Creative Sets
https://developer.apple.com/documentation/apple_search_ads/findcreativesetrequest
type GenderCriteria ¶
type GenderCriteria struct {
Included []AdGroupGender `json:"included,omitempty"`
}
GenderCriteria is the defined targeted audience to include using the gender demographic
https://developer.apple.com/documentation/apple_search_ads/gendercriteria
type GeoEntityType ¶
type GeoEntityType string
GeoEntityType is the locations available for targeting.
const ( // GeoEntityTypeCountry is for a geo targeting locations on Country. GeoEntityTypeCountry GeoEntityType = "Country" // GeoEntityTypeAdminArea is for a geo targeting locations on AdminArea. GeoEntityTypeAdminArea GeoEntityType = "AdminArea" // GeoEntityTypeLocality is for a geo targeting locations on Locality. GeoEntityTypeLocality GeoEntityType = "Locality" )
type GeoRequest ¶
type GeoRequest struct { Entity GeoEntityType `json:"entity"` ID string `json:"id"` }
GeoRequest is the geosearch request
https://developer.apple.com/documentation/apple_search_ads/georequest
type GeoService ¶
type GeoService service
GeoService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/search_apps_and_geolocations
func (*GeoService) GetGeos ¶
func (s *GeoService) GetGeos(ctx context.Context, query *ListGeoQuery, params []*GeoRequest) (*SearchEntityListResponse, *Response, error)
GetGeos Gets geolocation details using a geoidentifier
https://developer.apple.com/documentation/apple_search_ads/get_a_list_of_geolocations
func (*GeoService) SearchGeos ¶
func (s *GeoService) SearchGeos(ctx context.Context, params *SearchGeoQuery) (*SearchEntityListResponse, *Response, error)
SearchGeos Fetches a list of geolocations for audience refinement
https://developer.apple.com/documentation/apple_search_ads/search_for_geolocations
type GetAllAdGroupsQuery ¶
type GetAllAdGroupsQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
GetAllAdGroupsQuery defines query parameter for GetAllAdGroups endpoint.
type GetAllBudgetOrdersQuery ¶
type GetAllBudgetOrdersQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
GetAllBudgetOrdersQuery defines query parameter for GetAllBudgetOrders endpoint.
type GetAllCampaignQuery ¶
type GetAllCampaignQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
GetAllCampaignQuery defines query parameter for GetAllCampaigns endpoint.
type GetAllNegativeKeywordsQuery ¶
type GetAllNegativeKeywordsQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
GetAllNegativeKeywordsQuery defines query parameter for GetAllNegativeKeywords endpoint.
type GetAllTargetingKeywordsQuery ¶
type GetAllTargetingKeywordsQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
GetAllTargetingKeywordsQuery defines query parameter for GetAllTargetingKeywords endpoint.
type GetCreativeSetVariationQuery ¶
type GetCreativeSetVariationQuery struct {
IncludeDeletedCreativeSetAssets bool `url:"includeDeletedCreativeSetAssets,omitempty"`
}
GetCreativeSetVariationQuery defines query parameter for GetCreativeSetVariation endpoint.
type GrandTotalsRow ¶
type GrandTotalsRow struct { Other bool `json:"other,omitempty"` Total *SpendRow `json:"total,omitempty"` }
GrandTotalsRow is the summary of cumulative metrics
https://developer.apple.com/documentation/apple_search_ads/grandtotalsrow
type InsightsObject ¶
type InsightsObject struct {
BidRecommendation *KeywordBidRecommendation `json:"bidRecommendation,omitempty"`
}
InsightsObject is a parent object for bid recommendations
https://developer.apple.com/documentation/apple_search_ads/insightsobject
type IntegerResponse ¶
type IntegerResponse struct { Data int32 `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
IntegerResponse is a common integer type response
https://developer.apple.com/documentation/apple_search_ads/integerresponse
type Keyword ¶
type Keyword struct { AdGroupID int64 `json:"adGroupId,omitempty"` BidAmount Money `json:"bidAmount,omitempty"` Deleted bool `json:"deleted,omitempty"` ID int64 `json:"id,omitempty"` MatchType KeywordMatchType `json:"matchType,omitempty"` ModificationTime DateTime `json:"modificationTime,omitempty"` Status KeywordStatus `json:"status,omitempty"` Text string `json:"text,omitempty"` }
Keyword defines model for Keyword.
https://developer.apple.com/documentation/apple_search_ads/keyword
type KeywordBidRecommendation ¶
type KeywordBidRecommendation struct { BidMax *Money `json:"bidMax,omitempty"` BidMin *Money `json:"bidMin,omitempty"` }
KeywordBidRecommendation is the bid recommendation range for a keyword
https://developer.apple.com/documentation/apple_search_ads/keywordbidrecommendation
type KeywordListResponse ¶
type KeywordListResponse struct { Keywords []*Keyword `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
KeywordListResponse defines model for Keyword List Response.
https://developer.apple.com/documentation/apple_search_ads/keywordlistresponse
type KeywordMatchType ¶
type KeywordMatchType string
KeywordMatchType is an automated keyword and bidding strategy.
const ( // KeywordMatchTypeBroad is used this value to ensure your ads don’t run on relevant, close variants of a keyword, such as singulars, plurals, misspellings, synonyms, related searches, and phrases that include that term (fully or partially). KeywordMatchTypeBroad KeywordMatchType = "Broad" // KeywordMatchTypeExact is used this value for the most control over searches your ad may appear in. You can target a specific term and its close variants, such as common misspellings and plurals. Your ad may receive fewer impressions as a result, but your tap-through rates (TTRs) and conversions on those impressions may be higher because you’re reaching users most interested in your app. KeywordMatchTypeExact KeywordMatchType = "Exact" )
type KeywordResponse ¶
type KeywordResponse struct { Keyword *Keyword `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
KeywordResponse is a container for the targeting keywords response body.
https://developer.apple.com/documentation/apple_search_ads/keywordresponse
type KeywordService ¶
type KeywordService service
KeywordService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/targeting_keywords_and_negative_keywords
func (*KeywordService) CreateAdGroupNegativeKeywords ¶
func (s *KeywordService) CreateAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, keyword []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
CreateAdGroupNegativeKeywords Creates negative keywords in a specific ad group
https://developer.apple.com/documentation/apple_search_ads/create_ad_group_negative_keywords
func (*KeywordService) CreateNegativeKeywords ¶
func (s *KeywordService) CreateNegativeKeywords(ctx context.Context, campaignID int64, keyword []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
CreateNegativeKeywords Creates negative keywords for a campaign
https://developer.apple.com/documentation/apple_search_ads/create_campaign_negative_keywords
func (*KeywordService) CreateTargetingKeywords ¶
func (s *KeywordService) CreateTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, keyword []*Keyword) (*KeywordListResponse, *Response, error)
CreateTargetingKeywords Creates targeting keywords in ad groups
https://developer.apple.com/documentation/apple_search_ads/create_targeting_keywords
func (*KeywordService) DeleteAdGroupNegativeKeywords ¶
func (s *KeywordService) DeleteAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, keywordIds []int64) (*IntegerResponse, *Response, error)
DeleteAdGroupNegativeKeywords Deletes negative keywords from an ad group
https://developer.apple.com/documentation/apple_search_ads/delete_ad_group_negative_keywords
func (*KeywordService) DeleteNegativeKeywords ¶
func (s *KeywordService) DeleteNegativeKeywords(ctx context.Context, campaignID int64, keywordIds []int64) (*IntegerResponse, *Response, error)
DeleteNegativeKeywords Deletes negative keywords from a campaign
https://developer.apple.com/documentation/apple_search_ads/delete_campaign_negative_keywords
func (*KeywordService) FindAdGroupNegativeKeywords ¶
func (s *KeywordService) FindAdGroupNegativeKeywords(ctx context.Context, campaignID int64, selector *Selector) (*NegativeKeywordListResponse, *Response, error)
FindAdGroupNegativeKeywords Fetches negative keywords in a campaign’s ad groups
https://developer.apple.com/documentation/apple_search_ads/find_ad_group_negative_keywords
func (*KeywordService) FindNegativeKeywords ¶
func (s *KeywordService) FindNegativeKeywords(ctx context.Context, campaignID int64, selector *Selector) (*NegativeKeywordListResponse, *Response, error)
FindNegativeKeywords Fetches negative keywords for campaigns
https://developer.apple.com/documentation/apple_search_ads/find_campaign_negative_keywords
func (*KeywordService) FindTargetingKeywords ¶
func (s *KeywordService) FindTargetingKeywords(ctx context.Context, campaignID int64, selector *Selector) (*KeywordListResponse, *Response, error)
FindTargetingKeywords Fetches targeting keywords in a campaign’s ad groups
https://developer.apple.com/documentation/apple_search_ads/create_targeting_keywords
func (*KeywordService) GetAdGroupNegativeKeyword ¶
func (s *KeywordService) GetAdGroupNegativeKeyword(ctx context.Context, campaignID int64, adGroupID int64, keywordID int64) (*NegativeKeywordResponse, *Response, error)
GetAdGroupNegativeKeyword Fetches a specific negative keyword in an ad group
https://developer.apple.com/documentation/apple_search_ads/get_an_ad_group_negative_keyword
func (*KeywordService) GetAllAdGroupNegativeKeywords ¶
func (s *KeywordService) GetAllAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, params *GetAllNegativeKeywordsQuery) (*NegativeKeywordListResponse, *Response, error)
GetAllAdGroupNegativeKeywords Fetches all negative keywords in ad groups
https://developer.apple.com/documentation/apple_search_ads/get_all_ad_group_negative_keywords
func (*KeywordService) GetAllNegativeKeywords ¶
func (s *KeywordService) GetAllNegativeKeywords(ctx context.Context, campaignID int64, params *GetAllNegativeKeywordsQuery) (*NegativeKeywordListResponse, *Response, error)
GetAllNegativeKeywords Fetches all negative keywords in a campaign
https://developer.apple.com/documentation/apple_search_ads/get_all_campaign_negative_keywords
func (*KeywordService) GetAllTargetingKeywords ¶
func (s *KeywordService) GetAllTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, params *GetAllTargetingKeywordsQuery) (*KeywordListResponse, *Response, error)
GetAllTargetingKeywords Fetches all targeting keywords in ad groups
https://developer.apple.com/documentation/apple_search_ads/get_all_targeting_keywords_in_an_ad_group
func (*KeywordService) GetNegativeKeyword ¶
func (s *KeywordService) GetNegativeKeyword(ctx context.Context, campaignID int64, keywordID int64) (*NegativeKeywordResponse, *Response, error)
GetNegativeKeyword Fetches a specific negative keyword in a campaign
https://developer.apple.com/documentation/apple_search_ads/get_a_campaign_negative_keyword
func (*KeywordService) GetTargetingKeyword ¶
func (s *KeywordService) GetTargetingKeyword(ctx context.Context, campaignID int64, adGroupID int64, keywordID int64) (*KeywordResponse, *Response, error)
GetTargetingKeyword Fetches a specific targeting keyword in an ad group
https://developer.apple.com/documentation/apple_search_ads/get_a_targeting_keyword_in_an_ad_group
func (*KeywordService) UpdateAdGroupNegativeKeywords ¶
func (s *KeywordService) UpdateAdGroupNegativeKeywords(ctx context.Context, campaignID int64, adGroupID int64, updateRequests []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
UpdateAdGroupNegativeKeywords Updates negative keywords in an ad group
https://developer.apple.com/documentation/apple_search_ads/update_ad_group_negative_keywords
func (*KeywordService) UpdateNegativeKeywords ¶
func (s *KeywordService) UpdateNegativeKeywords(ctx context.Context, campaignID int64, updateRequests []*NegativeKeyword) (*NegativeKeywordListResponse, *Response, error)
UpdateNegativeKeywords Updates negative keywords in a campaign
https://developer.apple.com/documentation/apple_search_ads/update_campaign_negative_keywords
func (*KeywordService) UpdateTargetingKeywords ¶
func (s *KeywordService) UpdateTargetingKeywords(ctx context.Context, campaignID int64, adGroupID int64, updateRequests []*KeywordUpdateRequest) (*KeywordListResponse, *Response, error)
UpdateTargetingKeywords Updates targeting keywords in ad groups
https://developer.apple.com/documentation/apple_search_ads/update_targeting_keywords
type KeywordStatus ¶
type KeywordStatus string
KeywordStatus defines model for Keyword Status.
const ( // KeywordStatusActive is for a keyword status on Active state. KeywordStatusActive KeywordStatus = "ACTIVE" // KeywordStatusPaused is for a keyword status on Paused state. KeywordStatusPaused KeywordStatus = "PAUSED" )
type KeywordUpdateRequest ¶
type KeywordUpdateRequest struct { AdGroupID int64 `json:"adGroupId,omitempty"` BidAmount *Money `json:"bidAmount,omitempty"` Deleted bool `json:"deleted,omitempty"` ID int64 `json:"id,omitempty"` MatchType KeywordMatchType `json:"matchType"` ModificationTime DateTime `json:"modificationTime"` }
KeywordUpdateRequest Targeting keyword parameters to use in requests and responses
https://developer.apple.com/documentation/apple_search_ads/keywordupdaterequest
type LOCInvoiceDetails ¶
type LOCInvoiceDetails struct { BillingContactEmail string `json:"billingContactEmail,omitempty"` BuyerEmail string `json:"buyerEmail,omitempty"` BuyerName string `json:"buyerName,omitempty"` ClientName string `json:"clientName,omitempty"` OrderNumber string `json:"orderNumber,omitempty"` }
LOCInvoiceDetails is the response to a request to fetch campaign details for a standard invoicing payment model
https://developer.apple.com/documentation/apple_search_ads/locinvoicedetails
type ListGeoQuery ¶
type ListGeoQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` }
ListGeoQuery defines query parameter for GetGeos endpoint.
type LocalityCriteria ¶
type LocalityCriteria struct {
Included []string `json:"included,omitempty"`
}
LocalityCriteria is the defined targeted audience by locality
https://developer.apple.com/documentation/apple_search_ads/localitycriteria
type MediaAppPreviewOrScreenshots ¶
type MediaAppPreviewOrScreenshots struct { AssetGenID string `json:"assetGenId,omitempty"` AssetType MediaAppPreviewOrScreenshotsAssetType `json:"assetType"` AssetURL string `json:"assetURL,omitempty"` Orientation MediaAppPreviewOrScreenshotsOrientation `json:"orientation"` SortPosition int64 `json:"sortPosition,omitempty"` SourceHeight int32 `json:"sourceHeight,omitempty"` SourceWidth int32 `json:"sourceWidth,omitempty"` }
MediaAppPreviewOrScreenshots is the asset details of the app preview or app screenshots
https://developer.apple.com/documentation/apple_search_ads/mediaappprevieworscreenshots
type MediaAppPreviewOrScreenshotsAssetType ¶
type MediaAppPreviewOrScreenshotsAssetType string
MediaAppPreviewOrScreenshotsAssetType The type of asset.
const ( // MediaAppPreviewOrScreenshotsAssetTypeAppPreview is for a media app preview screenshot asset type on App Preview. MediaAppPreviewOrScreenshotsAssetTypeAppPreview MediaAppPreviewOrScreenshotsAssetType = "APP_PREVIEW" // MediaAppPreviewOrScreenshotsAssetTypeScreenshot is for a media app preview screenshot asset type on App Screenshot. MediaAppPreviewOrScreenshotsAssetTypeScreenshot MediaAppPreviewOrScreenshotsAssetType = "SCREENSHOT" )
type MediaAppPreviewOrScreenshotsDetail ¶
type MediaAppPreviewOrScreenshotsDetail struct { DeviceDisplayName string `json:"deviceDisplayName,omitempty"` FallBackDevicesDisplayNames map[string]string `json:"fallBackDevicesDisplayNames,omitempty"` Screenshots []*MediaAppPreviewOrScreenshots `json:"screenshots,omitempty"` AppPreviews []*MediaAppPreviewOrScreenshots `json:"appPreviews,omitempty"` }
MediaAppPreviewOrScreenshotsDetail is the app asset details of a device
https://developer.apple.com/documentation/apple_search_ads/mediaappprevieworscreenshotsdetail
type MediaAppPreviewOrScreenshotsOrientation ¶
type MediaAppPreviewOrScreenshotsOrientation string
MediaAppPreviewOrScreenshotsOrientation is the orientation of the asset that you upload to App Store Connect.
const ( // MediaAppPreviewOrScreenshotsOrientationPortrait is for a media app preview or screenshots orientation on Portrait. MediaAppPreviewOrScreenshotsOrientationPortrait MediaAppPreviewOrScreenshotsOrientation = "PORTRAIT" // MediaAppPreviewOrScreenshotsOrientationLandscape is for a media app preview or screenshots orientation on Landscape. MediaAppPreviewOrScreenshotsOrientationLandscape MediaAppPreviewOrScreenshotsOrientation = "LANDSCAPE" // MediaAppPreviewOrScreenshotsOrientationUnknown is for a media app preview or screenshots orientation on Unknown. MediaAppPreviewOrScreenshotsOrientationUnknown MediaAppPreviewOrScreenshotsOrientation = "UNKNOWN" )
type MediaCreativeSetDetailResponse ¶
type MediaCreativeSetDetailResponse struct {
CreativeSetAssetsDetail *CreativeSetAssetsDetail `json:"data,omitempty"`
}
MediaCreativeSetDetailResponse is the response data to Creative Set asset requests
https://developer.apple.com/documentation/apple_search_ads/mediacreativesetdetailresponse
type MediaCreativeSetRequest ¶
type MediaCreativeSetRequest struct { AssetsGenIds []string `json:"assetsGenIds,omitempty"` CountryOrRegions []string `json:"countryOrRegions"` }
MediaCreativeSetRequest is the request body for getting Creative Set assets
https://developer.apple.com/documentation/apple_search_ads/mediacreativesetrequest
type MetaDataObject ¶
type MetaDataObject struct { AdGroupID int64 `json:"adGroupID,omitempty"` AdGroupName string `json:"adGroupName,omitempty"` CampaignID int64 `json:"campaignId,omitempty"` CampaignName string `json:"campaignName,omitempty"` Deleted bool `json:"deleted,omitempty"` CampaignStatus CampaignStatus `json:"campaignStatus,omitempty"` App *CampaignAppDetail `json:"app,omitempty"` ServingStatus CampaignServingStatus `json:"servingStatus,omitempty"` ServingStateReasons []CampaignServingStateReason `json:"servingStateReasons,omitempty"` CountriesOrRegions []string `json:"countriesOrRegions,omitempty"` ModificationTime DateTime `json:"modificationTime,omitempty"` TotalBudget *Money `json:"totalBudget,omitempty"` DailyBudget *Money `json:"dailyBudget,omitempty"` DisplayStatus CampaignDisplayStatus `json:"displayStatus,omitempty"` SupplySources []CampaignSupplySource `json:"supplySources,omitempty"` AdChannelType CampaignAdChannelType `json:"adChannelType,omitempty"` OrgID int `json:"orgId,omitempty"` AdID int64 `json:"adId,omitempty"` AdName string `json:"adName,omitempty"` CountryOrRegionServingStateReasons *CampaignCountryOrRegionServingStateReasons `json:"countryOrRegionServingStateReasons,omitempty"` BillingEvent string `json:"billingEvent,omitempty"` Keyword string `json:"keyword,omitempty"` KeywordID int64 `json:"keywordID,omitempty"` MatchType *ReportingKeywordMatchType `json:"matchType,omitempty"` CountryOrRegion string `json:"countryOrRegion,omitempty"` SearchTermText *string `json:"SearchTermText,omitempty"` SearchTermSource *SearchTermSource `json:"searchTermSource,omitempty"` CreativeID int64 `json:"creativeId,omitempty"` CreativeType string `json:"creativeType,omitempty"` ProductPageID string `json:"productPageId,omitempty"` }
MetaDataObject is the report response objects
https://developer.apple.com/documentation/apple_search_ads/metadataobject
type Money ¶
Money is the response to requests for budget amounts in campaigns
https://developer.apple.com/documentation/apple_search_ads/money
type NegativeKeyword ¶
type NegativeKeyword struct { AdGroupID int64 `json:"adGroupId,omitempty"` CampaignID int64 `json:"campaignId,omitempty"` Deleted bool `json:"deleted,omitempty"` ID int64 `json:"id,omitempty"` MatchType KeywordMatchType `json:"matchType,omitempty"` ModificationTime DateTime `json:"modificationTime,omitempty"` Status KeywordStatus `json:"status,omitempty"` Text string `json:"text,omitempty"` }
NegativeKeyword Negative keyword parameters to use in requests and responses
https://developer.apple.com/documentation/apple_search_ads/negativekeyword
type NegativeKeywordListResponse ¶
type NegativeKeywordListResponse struct { Keywords []*NegativeKeyword `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
NegativeKeywordListResponse The response details of negative keyword requests
https://developer.apple.com/documentation/apple_search_ads/negativekeywordlistresponse
type NegativeKeywordResponse ¶
type NegativeKeywordResponse struct { NegativeKeyword *NegativeKeyword `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
NegativeKeywordResponse is a container for the negative keyword response body
https://developer.apple.com/documentation/apple_search_ads/negativekeywordresponse
type PageDetail ¶
type PageDetail struct { TotalResults int `json:"totalResults"` StartIndex int `json:"startIndex"` ItemsPerPage int `json:"itemsPerPage"` }
PageDetail is the number of items that return in the page
https://developer.apple.com/documentation/apple_search_ads/pagedetail
type Pagination ¶
Pagination is the procedure to refine returned results using limit and offset parameters
https://developer.apple.com/documentation/apple_search_ads/pagination
type PaymentModel ¶
type PaymentModel string
PaymentModel is the payment model that you set through the Search Ads UI.
const ( // PaymentModelPayG is a pay-as-you-go payment mode. PaymentModelPayG PaymentModel = "PAYG" // PaymentModelLoc is a line-of-credit payment model. PaymentModelLoc PaymentModel = "LOC" // PaymentModelNotSet is represent there is no set payment method. PaymentModelNotSet PaymentModel = "" )
type Rate ¶
type Rate struct { // The number of requests per hour the client is currently limited to. Limit int `json:"limit"` // The number of remaining requests the client can make this hour. Remaining int `json:"remaining"` }
Rate represents the rate limit for the current client.
https://developer.apple.com/documentation/appstoreconnectapi/identifying_rate_limits
type ReportingDataResponse ¶
type ReportingDataResponse struct { Rows []Row `json:"row,omitempty"` GrandTotals *GrandTotalsRow `json:"grandTotals,omitempty"` }
ReportingDataResponse is the total metrics for a report
https://developer.apple.com/documentation/apple_search_ads/reportingdataresponse
type ReportingKeywordMatchType ¶
type ReportingKeywordMatchType string
ReportingKeywordMatchType is an automated keyword and bidding strategy.
const ( // ReportingKeywordMatchTypeAuto Use this value to specify that the system serves impressions with optimized keywords, in addition to those you explicitly add to the ad group. ReportingKeywordMatchTypeAuto ReportingKeywordMatchType = "AUTO" // ReportingKeywordMatchTypeExact Use this value to ensure your ads don’t run on relevant, close variants of a keyword, such as singulars, plurals, misspellings, synonyms, related searches, and phrases that include that term. ReportingKeywordMatchTypeExact ReportingKeywordMatchType = "EXACT" // ReportingKeywordMatchTypeBroad Use this value for the most control over searches your ad may appear in. You can target a specific term and its close variants, such as common misspellings and plurals. Your ad may receive fewer impressions as a result, but your tap-through rates (TTRs) and conversions on those impressions may be higher because you’re reaching users most interested in your app. ReportingKeywordMatchTypeBroad ReportingKeywordMatchType = "BROAD" )
type ReportingRequest ¶
type ReportingRequest struct { StartTime Date `json:"startTime,omitempty"` EndTime Date `json:"endTime,omitempty"` Granularity ReportingRequestGranularity `json:"granularity,omitempty"` TimeZone ReportingRequestTimeZone `json:"timeZone,omitempty"` GroupBy []ReportingRequestGroupBy `json:"groupBy,omitempty"` ReturnGrandTotals bool `json:"returnGrandTotals"` ReturnRecordsWithNoMetrics bool `json:"returnRecordsWithNoMetrics"` ReturnRowTotals bool `json:"returnRowTotals"` Selector *Selector `json:"selector,omitempty"` }
ReportingRequest is the report request body
https://developer.apple.com/documentation/apple_search_ads/reportingrequest
type ReportingRequestGranularity ¶
type ReportingRequestGranularity string
ReportingRequestGranularity is the report data organized by hour, day, week, and month.
const ( // ReportingRequestGranularityTypeHourly is for a reporting request granularity on Hourly. ReportingRequestGranularityTypeHourly ReportingRequestGranularity = "HOURLY" // ReportingRequestGranularityTypeDaily is for a reporting request granularity on Daily. ReportingRequestGranularityTypeDaily ReportingRequestGranularity = "DAILY" // ReportingRequestGranularityTypeWeekly is for a reporting request granularity on Weekly. ReportingRequestGranularityTypeWeekly ReportingRequestGranularity = "WEEKLY" // ReportingRequestGranularityTypeMonthly is for a reporting request granularity on Monthly. ReportingRequestGranularityTypeMonthly ReportingRequestGranularity = "MONTHLY" )
type ReportingRequestGroupBy ¶
type ReportingRequestGroupBy string
ReportingRequestGroupBy is used to group responses by selected dimensions.
const ( // ReportingRequestGroupByTypeAdminArea is for a reporting request group by on adminArea. ReportingRequestGroupByTypeAdminArea ReportingRequestGroupBy = "adminArea" // ReportingRequestGroupByTypeAgeRange is for a reporting request group by on ageRange. ReportingRequestGroupByTypeAgeRange ReportingRequestGroupBy = "ageRange" // ReportingRequestGroupByTypeCountryCode is for a reporting request group by on countryCode. ReportingRequestGroupByTypeCountryCode ReportingRequestGroupBy = "countryCode" // ReportingRequestGroupByTypeCountryOrRegion is for a reporting request group by on countryOrRegion. ReportingRequestGroupByTypeCountryOrRegion ReportingRequestGroupBy = "countryOrRegion" // ReportingRequestGroupByTypeDeviceClass is for a reporting request group by on deviceClass. ReportingRequestGroupByTypeDeviceClass ReportingRequestGroupBy = "deviceClass" // ReportingRequestGroupByTypeGender is for a reporting request group by on gender. ReportingRequestGroupByTypeGender ReportingRequestGroupBy = "gender" // ReportingRequestGroupByTypeLocality is for a reporting request group by on locality. ReportingRequestGroupByTypeLocality ReportingRequestGroupBy = "locality" )
type ReportingRequestTimeZone ¶
type ReportingRequestTimeZone string
ReportingRequestTimeZone is the default timeZone during account creation through the Apple Search Ads UI.
const ( // ReportingRequestTimeZoneUTC is for a reporting request timezone on UTC. ReportingRequestTimeZoneUTC ReportingRequestTimeZone = "UTC" // ReportingRequestTimeZoneORTZ is for a reporting request timezone on ORTZ (organization time zone). ReportingRequestTimeZoneORTZ ReportingRequestTimeZone = "ORTZ" )
type ReportingResponse ¶
type ReportingResponse struct {
ReportingDataResponse *ReportingDataResponse `json:"reportingDataResponse,omitempty"`
}
ReportingResponse is a container for report metrics
https://developer.apple.com/documentation/apple_search_ads/reportingresponse
type ReportingResponseBody ¶
type ReportingResponseBody struct { ReportingCampaign *ReportingResponse `json:"data,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` }
ReportingResponseBody is a container for the report response body
https://developer.apple.com/documentation/apple_search_ads/reportingresponsebody
type ReportingService ¶
type ReportingService service
ReportingService handles communication with build-related methods of the Apple Search Ads API
https://developer.apple.com/documentation/apple_search_ads/reports
func (*ReportingService) GetAdGroupLevelReports ¶
func (s *ReportingService) GetAdGroupLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
GetAdGroupLevelReports fetches reports for ad groups within a campaig
https://developer.apple.com/documentation/apple_search_ads/get_ad_group-level_reports
func (*ReportingService) GetAdLevelReports ¶
func (s *ReportingService) GetAdLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
GetAdLevelReports fetches reports for Ads within a campaign
https://developer.apple.com/documentation/apple_search_ads/get_ad-level_reports
func (*ReportingService) GetCampaignLevelReports ¶
func (s *ReportingService) GetCampaignLevelReports(ctx context.Context, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
GetCampaignLevelReports fetches reports for campaigns
https://developer.apple.com/documentation/apple_search_ads/get_campaign-level_reports
func (*ReportingService) GetKeywordLevelReports ¶
func (s *ReportingService) GetKeywordLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
GetKeywordLevelReports fetches reports for targeting keywords within a campaign
https://developer.apple.com/documentation/apple_search_ads/get_keyword-level_reports
func (*ReportingService) GetSearchTermLevelReports ¶
func (s *ReportingService) GetSearchTermLevelReports(ctx context.Context, campaignID int64, params *ReportingRequest) (*ReportingResponseBody, *Response, error)
GetSearchTermLevelReports fetches reports for search terms within a campaign
https://developer.apple.com/documentation/apple_search_ads/get_search_term-level_reports
type Response ¶
Response is a Apple Search Ads API response. This wraps the standard http.Response returned from Apple and provides convenient access to things like rate limit.
type Row ¶
type Row struct { Other bool `json:"other,omitempty"` Granularity []*ExtendedSpendRow `json:"granularity,omitempty"` Total *SpendRow `json:"total,omitempty"` Metadata *MetaDataObject `json:"metadata,omitempty"` Insights *InsightsObject `json:"insights,omitempty"` }
Row is the report metrics organized by time granularity.
https://developer.apple.com/documentation/apple_search_ads/row
type SearchAppsQuery ¶
type SearchAppsQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` Query string `url:"query,omitempty"` ReturnOwnedApps bool `url:"returnOwnedApps,omitempty"` }
SearchAppsQuery defines query parameter for SearchApps endpoint.
type SearchEntity ¶
type SearchEntity struct { DisplayName string `json:"displayName,omitempty"` Entity string `json:"entity,omitempty"` ID string `json:"id,omitempty"` }
SearchEntity is the list of geolocations that includes the geoidentifier and entity type
https://developer.apple.com/documentation/apple_search_ads/searchentity
type SearchEntityListResponse ¶
type SearchEntityListResponse struct { SearchEntities []*SearchEntity `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
SearchEntityListResponse is the response details of geosearch requests
https://developer.apple.com/documentation/apple_search_ads/searchentitylistresponse
type SearchGeoQuery ¶
type SearchGeoQuery struct { Limit int32 `url:"limit,omitempty"` Offset int32 `url:"offset,omitempty"` Query string `url:"query,omitempty"` CountryCode string `url:"countrycode,omitempty"` Entity GeoEntityType `url:"entity,omitempty"` }
SearchGeoQuery defines query parameter for SearchGeos endpoint.
type SearchTermSource ¶
type SearchTermSource string
SearchTermSource is the source of the keyword to use as a search term.
const ( // SearchTermSourceAuto is the value to use to ensure Search Match automatically matches your ads. SearchTermSourceAuto SearchTermSource = "AUTO" // SearchTermSourceTargeted is a bidded keyword. SearchTermSourceTargeted SearchTermSource = "TARGETED" )
type Selector ¶
type Selector struct { Conditions []*Condition `json:"conditions,omitempty"` Fields []string `json:"fields,omitempty"` OrderBy []*Sorting `json:"orderBy,omitempty"` Pagination *Pagination `json:"pagination,omitempty"` }
Selector is the selector objects available to filter returned data
https://developer.apple.com/documentation/apple_search_ads/selector
type ServingStateReason ¶
type ServingStateReason string
ServingStateReason is that displays when an ad group isn’t running.
const ( // ServingStateReasonAdGroupPausedByUser is for an ad group serving state reason Ad Group Paused By User. ServingStateReasonAdGroupPausedByUser ServingStateReason = "AD_GROUP_PAUSED_BY_USER" // ServingStateReasonAdGroupEndDateReached is for an ad group serving state reason Ad Group End Date Reached. ServingStateReasonAdGroupEndDateReached ServingStateReason = "ADGROUP_END_DATE_REACHED" // ServingStateReasonAppNotSupport is for an ad group serving state reason App Not Support. ServingStateReasonAppNotSupport ServingStateReason = "APP_NOT_SUPPORT" // ServingStateReasonAudienceBelowThreshold is for an ad group serving state reason Audience Below Threshold. ServingStateReasonAudienceBelowThreshold ServingStateReason = "AUDIENCE_BELOW_THRESHOLD" // ServingStateReasonCampaignNotRunning is for an ad group serving state reason Campaign Not Running. ServingStateReasonCampaignNotRunning ServingStateReason = "CAMPAIGN_NOT_RUNNING" // ServingStateReasonDeletedByUser is for an ad group serving state reason Deleted By User. ServingStateReasonDeletedByUser ServingStateReason = "DELETED_BY_USER" // ServingStateReasonPendingAudienceVerification is for an ad group serving state reason Pending Audience Verification. ServingStateReasonPendingAudienceVerification ServingStateReason = "PENDING_AUDIENCE_VERIFICATION" // ServingStateReasonStartDateInTheFuture is for an ad group serving state reason Start Date in The Future. ServingStateReasonStartDateInTheFuture ServingStateReason = "START_DATE_IN_THE_FUTURE" )
type Sorting ¶
Sorting is the order of grouped results
https://developer.apple.com/documentation/apple_search_ads/sorting
type SpendRow ¶
type SpendRow struct { AvgCPA *Money `json:"avgCPA,omitempty"` AvgCPT *Money `json:"avgCPT,omitempty"` AvgCPM *Money `json:"avgCPM,omitempty"` ConversionRate float64 `json:"conversionRate,omitempty"` Impressions int64 `json:"impressions,omitempty"` Installs int64 `json:"installs,omitempty"` LatOffInstalls int64 `json:"latOffInstalls,omitempty"` LatOnInstalls int64 `json:"latOnInstalls,omitempty"` LocalSpend *Money `json:"localSpend,omitempty"` NewDownloads int64 `json:"newDownloads,omitempty"` ReDownloads int64 `json:"redownloads,omitempty"` Taps int64 `json:"taps,omitempty"` Ttr float64 `json:"ttr,omitempty"` }
SpendRow is the reporting response metrics
https://developer.apple.com/documentation/apple_search_ads/spendrow
type TargetDimensions ¶
type TargetDimensions struct { AdminArea *AdminAreaCriteria `json:"adminArea,omitempty"` Age *AgeCriteria `json:"age,omitempty"` AppDownloaders *AppDownloaderCriteria `json:"appDownloaders"` Country *CountryCriteria `json:"country,omitempty"` DayPart *DayPartCriteria `json:"daypart,omitempty"` DeviceClass *DeviceClassCriteria `json:"deviceClass,omitempty"` Gender *GenderCriteria `json:"gender,omitempty"` Locality *LocalityCriteria `json:"locality,omitempty"` }
TargetDimensions is the criteria to use with ad groups to narrow the audience that views the ads
https://developer.apple.com/documentation/apple_search_ads/targetingdimensions
type UpdateCampaignRequest ¶
type UpdateCampaignRequest struct { Campaign *CampaignUpdate `json:"campaign"` ClearGeoTargetingOnCountryOrRegionChange bool `json:"clearGeoTargetingOnCountryOrRegionChange"` }
UpdateCampaignRequest is the payload properties to clear Geo Targeting from a campaign
https://developer.apple.com/documentation/apple_search_ads/updatecampaignrequest
type UserACL ¶
type UserACL struct { Currency string `json:"currency"` OrgID int64 `json:"orgId"` OrgName string `json:"orgName"` ParentOrgID int64 `json:"parentOrgId"` PaymentModel PaymentModel `json:"paymentModel,omitempty"` RoleNames []UserACLRoleName `json:"roleNames"` TimeZone ReportingRequestTimeZone `json:"timeZone"` }
UserACL is the response to ACL requests
https://developer.apple.com/documentation/apple_search_ads/useracl
type UserACLListResponse ¶
type UserACLListResponse struct { UserAcls []*UserACL `json:"data,omitempty"` Error *ErrorResponseBody `json:"error,omitempty"` Pagination *PageDetail `json:"pagination,omitempty"` }
UserACLListResponse is a container for ACL call responses
https://developer.apple.com/documentation/apple_search_ads/useracllistresponse
type UserACLRoleName ¶
type UserACLRoleName string
UserACLRoleName governs what a user can see and do within the account.
const ( // UserACLRoleNameAPIAccountManager is for Manage all campaigns within an account with read-and-write capabilities. UserACLRoleNameAPIAccountManager UserACLRoleName = "API Account Manager" // UserACLRoleNameAPIAccountReadOnly is for View reporting across the account with read-only permission. UserACLRoleNameAPIAccountReadOnly UserACLRoleName = "API Account Read Only" // UserACLRoleNameLimitedAccessAPIReadWrite is for View reporting. UserACLRoleNameLimitedAccessAPIReadWrite UserACLRoleName = "Limited Access: API Read & Write" // UserACLRoleNameLimitedAccessAPIReadOnly is View reporting across the organization. UserACLRoleNameLimitedAccessAPIReadOnly UserACLRoleName = "Limited Access: API Read Only" )