Documentation
¶
Overview ¶
Package audienceinsights provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT.
Index ¶
- func NewInsightsGetAudiencesOverlappingAudiencesRequest(server string, audienceId string, ...) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type HttpRequestDoer
- type InsightsAudiencesOverlapAudienceMetadata
- type InsightsAudiencesOverlapAudienceMetadataV2
- type InsightsAudiencesOverlapEntry
- type InsightsAudiencesOverlapEntryV2
- type InsightsError
- type InsightsGetAudiencesOverlappingAudiencesParams
- type InsightsGetAudiencesOverlappingAudiencesParamsAdType
- type InsightsGetAudiencesOverlappingAudiencesResp
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInsightsGetAudiencesOverlappingAudiencesRequest ¶
func NewInsightsGetAudiencesOverlappingAudiencesRequest(server string, audienceId string, params *InsightsGetAudiencesOverlappingAudiencesParams) (*http.Request, error)
NewInsightsGetAudiencesOverlappingAudiencesRequest generates requests for InsightsGetAudiencesOverlappingAudiences
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn // A callback for modifying response which are generated after receive from the network. ResponseEditors []ResponseEditorFn // The user agent header identifies your application, its version number, and the platform and programming language you are using. // You must include a user agent header in each request submitted to the sales partner API. UserAgent string }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) InsightsGetAudiencesOverlappingAudiences ¶
type ClientInterface ¶
type ClientInterface interface { // InsightsGetAudiencesOverlappingAudiences request InsightsGetAudiencesOverlappingAudiences(ctx context.Context, audienceId string, params *InsightsGetAudiencesOverlappingAudiencesParams) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseEditorFn ¶ added in v0.0.2
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) InsightsGetAudiencesOverlappingAudiencesWithResponse ¶
func (c *ClientWithResponses) InsightsGetAudiencesOverlappingAudiencesWithResponse(ctx context.Context, audienceId string, params *InsightsGetAudiencesOverlappingAudiencesParams) (*InsightsGetAudiencesOverlappingAudiencesResp, error)
InsightsGetAudiencesOverlappingAudiencesWithResponse request returning *InsightsGetAudiencesOverlappingAudiencesResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // InsightsGetAudiencesOverlappingAudiencesWithResponse request InsightsGetAudiencesOverlappingAudiencesWithResponse(ctx context.Context, audienceId string, params *InsightsGetAudiencesOverlappingAudiencesParams) (*InsightsGetAudiencesOverlappingAudiencesResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InsightsAudiencesOverlapAudienceMetadata ¶
type InsightsAudiencesOverlapAudienceMetadata struct { // AudienceId The identifier of an audience. AudienceId string `json:"audienceId"` // Category The type of the overlapping audience. Category string `json:"category"` // ImpressionsForecastRange 30-day impression forecast provides an estimated range of how many times an ad could be displayed using the audience over the next 30 days. The impression forecast is for the individual audience. It can be defined by both upper and lower bound, or just by one of the bounds. ImpressionsForecastRange *struct { LowerBound *int `json:"lowerBound,omitempty"` UpperBound *int `json:"upperBound,omitempty"` } `json:"impressionsForecastRange,omitempty"` // Name Audience name Name string `json:"name"` // Size Audience size is a relative measure of how large the overlapping audience is compared to all Amazon audiences. A size of 6 indicates that the audience is larger than 60% of all Amazon audiences. Size int `json:"size"` }
InsightsAudiencesOverlapAudienceMetadata Information about any audience included in the response.
type InsightsAudiencesOverlapAudienceMetadataV2 ¶
type InsightsAudiencesOverlapAudienceMetadataV2 struct { AudienceForecast *struct { // DailyImpressions The available impressions across all inventory types (e.g. display, video, and mobile). This is an estimate and is not guaranteed. It will take at least 2 weeks for the impressions to become available for new audiences. Note: forecasted daily impressions are not available when SD adType is selected. DailyImpressions *struct { LowerBound *int `json:"lowerBound,omitempty"` UpperBound *int `json:"upperBound,omitempty"` } `json:"dailyImpressions,omitempty"` // DailyReach The unique devices reachable across all inventory types (e.g. display, video, and mobile). This is an estimate and is not guaranteed. It will take at least 2 weeks for the reach to become available for new audiences. DailyReach *struct { LowerBound *int `json:"lowerBound,omitempty"` UpperBound *int `json:"upperBound,omitempty"` } `json:"dailyReach,omitempty"` } `json:"audienceForecast,omitempty"` // AudienceId The identifier of an audience. AudienceId string `json:"audienceId"` // Category The type of the overlapping audience. Category string `json:"category"` // Name Audience name Name string `json:"name"` }
InsightsAudiencesOverlapAudienceMetadataV2 Information about any audience included in the response.
type InsightsAudiencesOverlapEntry ¶
type InsightsAudiencesOverlapEntry struct { // Affinity Affinity is a measure of how similar the overlapping audience is to the audience selected to generate the audience overlap insights. An affinity of 2 indicates that the overlapping audience is twice as likely to fall into the audience selected than the average audience on Amazon. Affinity *float32 `json:"affinity,omitempty"` // AudienceMetadata Information about any audience included in the response. AudienceMetadata *InsightsAudiencesOverlapAudienceMetadata `json:"audienceMetadata,omitempty"` }
InsightsAudiencesOverlapEntry Contains information about the overlapping audiences and their affinity with the audience requested.
type InsightsAudiencesOverlapEntryV2 ¶
type InsightsAudiencesOverlapEntryV2 struct { // Affinity Affinity is a measure of how similar the overlapping audience is to the audience selected to generate the audience overlap insights. An affinity of 2 indicates that the overlapping audience is twice as likely to fall into the audience selected than the average audience on Amazon. Affinity *float32 `json:"affinity,omitempty"` // AudienceMetadata Information about any audience included in the response. AudienceMetadata *InsightsAudiencesOverlapAudienceMetadataV2 `json:"audienceMetadata,omitempty"` }
InsightsAudiencesOverlapEntryV2 Contains information about the overlapping audiences and their affinity with the provided audience.
type InsightsError ¶
type InsightsError struct { // Message Detailed information about the error that occurred. Message string `json:"message"` // RequestId A unique value generated by the server to identify the request. RequestId string `json:"requestId"` }
InsightsError The error returned from the server.
type InsightsGetAudiencesOverlappingAudiencesParams ¶
type InsightsGetAudiencesOverlappingAudiencesParams struct { // AdType The advertising program. AdType InsightsGetAudiencesOverlappingAudiencesParamsAdType `form:"adType" json:"adType"` // AdvertiserId The identifier of the advertiser you'd like to retrieve overlapping audiences for. This parameter is required for the DSP adType, but is optional for the SD adType. AdvertiserId *string `form:"advertiserId,omitempty" json:"advertiserId,omitempty"` // MinimumAudienceSize If specified, the sizes of all returned overlapping audiences will be at least the provided size. This parameter is supported only for request to return `application/vnd.insightsaudiencesoverlap.v1+json`. MinimumAudienceSize *int `form:"minimumAudienceSize,omitempty" json:"minimumAudienceSize,omitempty"` // MaximumAudienceSize If specified, the sizes of all returned overlapping audiences will be at most the provided size. This parameter is supported only for request to return `application/vnd.insightsaudiencesoverlap.v1+json`. MaximumAudienceSize *int `form:"maximumAudienceSize,omitempty" json:"maximumAudienceSize,omitempty"` // MinimumOverlapAffinity If specified, the affinities of all returned overlapping audiences will be at least the provided affinity. MinimumOverlapAffinity *float32 `form:"minimumOverlapAffinity,omitempty" json:"minimumOverlapAffinity,omitempty"` // MaximumOverlapAffinity If specified, the affinities of all returned overlapping audiences will be at most the provided affinity. MaximumOverlapAffinity *float32 `form:"maximumOverlapAffinity,omitempty" json:"maximumOverlapAffinity,omitempty"` // AudienceCategory If specified, the categories of all returned overlapping audiences will be one of the provided categories. AudienceCategory *[]string `form:"audienceCategory,omitempty" json:"audienceCategory,omitempty"` // MaxResults Sets the maximum number of overlapping audiences in the response. This parameter is supported only for request to return `application/vnd.insightsaudiencesoverlap.v2+json`. MaxResults *int `form:"maxResults,omitempty" json:"maxResults,omitempty"` // NextToken Token to be used to request additional overlapping audiences. If not provided, the top 30 overlapping audiences are returned. Note: subsequent calls must be made using the same parameters as used in previous requests. NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"` // AmazonAdvertisingAPIClientId The identifier of a client associated with a "Login with Amazon" account. AmazonAdvertisingAPIClientId string `json:"Amazon-Advertising-API-ClientId"` // AmazonAdvertisingAPIScope The identifier of a profile associated with the advertiser account. Use `GET` method on Profiles resource to list profiles associated with the access token passed in the HTTP Authorization header. AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"` }
InsightsGetAudiencesOverlappingAudiencesParams defines parameters for InsightsGetAudiencesOverlappingAudiences.
type InsightsGetAudiencesOverlappingAudiencesParamsAdType ¶
type InsightsGetAudiencesOverlappingAudiencesParamsAdType string
InsightsGetAudiencesOverlappingAudiencesParamsAdType defines parameters for InsightsGetAudiencesOverlappingAudiences.
const ( DSP InsightsGetAudiencesOverlappingAudiencesParamsAdType = "DSP" SD InsightsGetAudiencesOverlappingAudiencesParamsAdType = "SD" )
Defines values for InsightsGetAudiencesOverlappingAudiencesParamsAdType.
type InsightsGetAudiencesOverlappingAudiencesResp ¶
type InsightsGetAudiencesOverlappingAudiencesResp struct { Body []byte HTTPResponse *http.Response ApplicationvndInsightsaudiencesoverlapV1JSON200 *struct { // Marketplace The locale used to generate the overlapping audiences. Marketplace string `json:"marketplace"` // NextToken If present, there are more overlapping audiences than initially returned. Use this token to call the operation again and have the additional overlapping audiences returned. The token is valid for 8 hours from the initial request. Note: subsequent calls must be made using the same parameters as used in previous requests. NextToken *string `json:"nextToken,omitempty"` // OverlappingAudiences The list of overlapping audiences. OverlappingAudiences []InsightsAudiencesOverlapEntry `json:"overlappingAudiences"` // RequestedAudienceMetadata Information about any audience included in the response. RequestedAudienceMetadata *InsightsAudiencesOverlapAudienceMetadata `json:"requestedAudienceMetadata,omitempty"` } ApplicationvndInsightsaudiencesoverlapV2JSON200 *struct { // Marketplace The locale used to generate the overlapping audiences. Marketplace string `json:"marketplace"` // NextToken If present, there are more overlapping audiences than initially returned. Use this token to call the operation again and have the additional overlapping audiences returned. The token is valid for 8 hours from the initial request. Note: subsequent calls must be made using the same parameters as used in previous requests. NextToken *string `json:"nextToken,omitempty"` // OverlappingAudiences The list of overlapping audiences. OverlappingAudiences []InsightsAudiencesOverlapEntryV2 `json:"overlappingAudiences"` // RequestedAudienceMetadata Information about any audience included in the response. RequestedAudienceMetadata InsightsAudiencesOverlapAudienceMetadataV2 `json:"requestedAudienceMetadata"` } ApplicationvndInsightserrorV1JSON400 *InsightsError ApplicationvndInsightserrorV1JSON403 *InsightsError ApplicationvndInsightserrorV1JSON404 *InsightsError }
func ParseInsightsGetAudiencesOverlappingAudiencesResp ¶
func ParseInsightsGetAudiencesOverlappingAudiencesResp(rsp *http.Response) (*InsightsGetAudiencesOverlappingAudiencesResp, error)
ParseInsightsGetAudiencesOverlappingAudiencesResp parses an HTTP response from a InsightsGetAudiencesOverlappingAudiencesWithResponse call
func (InsightsGetAudiencesOverlappingAudiencesResp) Status ¶
func (r InsightsGetAudiencesOverlappingAudiencesResp) Status() string
Status returns HTTPResponse.Status
func (InsightsGetAudiencesOverlappingAudiencesResp) StatusCode ¶
func (r InsightsGetAudiencesOverlappingAudiencesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function