dspadvertiser

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package dspadvertiser 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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetDspAdvertisersAdvertiserIdRequest

func NewGetDspAdvertisersAdvertiserIdRequest(server string, advertiserId string, params *GetDspAdvertisersAdvertiserIdParams) (*http.Request, error)

NewGetDspAdvertisersAdvertiserIdRequest generates requests for GetDspAdvertisersAdvertiserId

func NewGetDspAdvertisersRequest

func NewGetDspAdvertisersRequest(server string, params *GetDspAdvertisersParams) (*http.Request, error)

NewGetDspAdvertisersRequest generates requests for GetDspAdvertisers

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) GetDspAdvertisers

func (c *Client) GetDspAdvertisers(ctx context.Context, params *GetDspAdvertisersParams) (*http.Response, error)

func (*Client) GetDspAdvertisersAdvertiserId

func (c *Client) GetDspAdvertisersAdvertiserId(ctx context.Context, advertiserId string, params *GetDspAdvertisersAdvertiserIdParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetDspAdvertisers request
	GetDspAdvertisers(ctx context.Context, params *GetDspAdvertisersParams) (*http.Response, error)

	// GetDspAdvertisersAdvertiserId request
	GetDspAdvertisersAdvertiserId(ctx context.Context, advertiserId string, params *GetDspAdvertisersAdvertiserIdParams) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) GetDspAdvertisersAdvertiserIdWithResponse

func (c *ClientWithResponses) GetDspAdvertisersAdvertiserIdWithResponse(ctx context.Context, advertiserId string, params *GetDspAdvertisersAdvertiserIdParams) (*GetDspAdvertisersAdvertiserIdResp, error)

GetDspAdvertisersAdvertiserIdWithResponse request returning *GetDspAdvertisersAdvertiserIdResp

func (*ClientWithResponses) GetDspAdvertisersWithResponse

func (c *ClientWithResponses) GetDspAdvertisersWithResponse(ctx context.Context, params *GetDspAdvertisersParams) (*GetDspAdvertisersResp, error)

GetDspAdvertisersWithResponse request returning *GetDspAdvertisersResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetDspAdvertisersWithResponse request
	GetDspAdvertisersWithResponse(ctx context.Context, params *GetDspAdvertisersParams) (*GetDspAdvertisersResp, error)

	// GetDspAdvertisersAdvertiserIdWithResponse request
	GetDspAdvertisersAdvertiserIdWithResponse(ctx context.Context, advertiserId string, params *GetDspAdvertisersAdvertiserIdParams) (*GetDspAdvertisersAdvertiserIdResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DspAdvertiserV1

type DspAdvertiserV1 struct {
	// AdvertiserId The advertiser identifier.
	AdvertiserId *string `json:"advertiserId,omitempty"`

	// Country The country code.
	Country *DspCountryV1 `json:"country,omitempty"`

	// Currency The supported currencies.
	Currency *DspSupportedCurrencyV1 `json:"currency,omitempty"`

	// Name The advertiser name.
	Name *string `json:"name,omitempty"`

	// Timezone The advertiser timezone.
	// - America/Anchorage
	// - America/Caracas
	// - America/Chicago
	// - America/Denver
	// - America/Halifax
	// - America/Los_Angeles
	// - America/New_York
	// - America/Sao_Paulo
	// - America/St_Johns
	// - Asia/Almaty
	// - Asia/Baghdad
	// - Asia/Bangkok
	// - Asia/Hong_Kong
	// - Asia/Kabul
	// - Asia/Kathmandu
	// - Asia/Kolkata
	// - Asia/Magadan
	// - Asia/Shanghai
	// - Asia/Tehran
	// - Asia/Tokyo
	// - Asia/Yekaterinburg
	// - Asia/Yerevan
	// - Atlantic/Azores
	// - Atlantic/South_Georgia
	// - Australia/Brisbane
	// - Australia/Darwin
	// - Europe/London
	// - Europe/Paris
	// - Indian/Cocos
	// - Pacific/Fiji
	// - Pacific/Honolulu
	// - Pacific/Kwajalein
	// - Pacific/Midway
	Timezone *DspTimezoneV1 `json:"timezone,omitempty"`

	// Url The URL of the advertiser’s website.
	Url *string `json:"url,omitempty"`
}

DspAdvertiserV1 The DSP Advertiser object

type DspAdvertisersV1

type DspAdvertisersV1 struct {
	// Response List of advertisers with complete information.
	Response *[]DspAdvertiserV1 `json:"response,omitempty"`

	// TotalResults Total number of advertisers which satisfy the filtering criteria. This number is given to support pagination and tell the client if there are more advertisers to be fetched.
	TotalResults *int32 `json:"totalResults,omitempty"`
}

DspAdvertisersV1 List of advertisers along with total number of advertisers which satisfy the filtering criteria.

type DspCountryV1

type DspCountryV1 string

DspCountryV1 The country code.

const (
	AT DspCountryV1 = "AT"
	BR DspCountryV1 = "BR"
	CA DspCountryV1 = "CA"
	CN DspCountryV1 = "CN"
	DE DspCountryV1 = "DE"
	ES DspCountryV1 = "ES"
	FR DspCountryV1 = "FR"
	GB DspCountryV1 = "GB"
	IN DspCountryV1 = "IN"
	IT DspCountryV1 = "IT"
	JP DspCountryV1 = "JP"
	MX DspCountryV1 = "MX"
	US DspCountryV1 = "US"
)

Defines values for DspCountryV1.

type DspErrorV1

type DspErrorV1 struct {
	// Errors List of errors. Useful in case of validation errors
	Errors *[]DspSubErrorV1 `json:"errors,omitempty"`

	// Message A human-readable description of the response.
	Message string `json:"message"`

	// RequestId A value will be used to identify your request uniquely.
	RequestId *string `json:"requestId,omitempty"`
}

DspErrorV1 Error response object.

type DspSubErrorV1

type DspSubErrorV1 struct {
	// ErrorType Enumerated error type.
	ErrorType string `json:"errorType"`

	// Field Request body field which is cause of the error.
	Field *string `json:"field,omitempty"`

	// Message Detailed error description
	Message string `json:"message"`
}

DspSubErrorV1 Error Object

type DspSupportedCurrencyV1

type DspSupportedCurrencyV1 string

DspSupportedCurrencyV1 The supported currencies.

Defines values for DspSupportedCurrencyV1.

type DspTimezoneV1

type DspTimezoneV1 = string

DspTimezoneV1 The advertiser timezone. - America/Anchorage - America/Caracas - America/Chicago - America/Denver - America/Halifax - America/Los_Angeles - America/New_York - America/Sao_Paulo - America/St_Johns - Asia/Almaty - Asia/Baghdad - Asia/Bangkok - Asia/Hong_Kong - Asia/Kabul - Asia/Kathmandu - Asia/Kolkata - Asia/Magadan - Asia/Shanghai - Asia/Tehran - Asia/Tokyo - Asia/Yekaterinburg - Asia/Yerevan - Atlantic/Azores - Atlantic/South_Georgia - Australia/Brisbane - Australia/Darwin - Europe/London - Europe/Paris - Indian/Cocos - Pacific/Fiji - Pacific/Honolulu - Pacific/Kwajalein - Pacific/Midway

type GetDspAdvertisersAdvertiserIdParams

type GetDspAdvertisersAdvertiserIdParams struct {
	// AmazonAdvertisingAPIClientId The client identifier of the customer making the request.
	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. For DSP profiles, the `type` field of the `accountInfo` object must be set to `agency` and the `subType` must not be `AMAZON_ATTRIBUTION`.
	AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"`
}

GetDspAdvertisersAdvertiserIdParams defines parameters for GetDspAdvertisersAdvertiserId.

type GetDspAdvertisersAdvertiserIdResp

type GetDspAdvertisersAdvertiserIdResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DspAdvertiserV1
	JSON400      *DspErrorV1
	JSON401      *DspErrorV1
	JSON403      *DspErrorV1
	JSON404      *DspErrorV1
	JSON422      *DspErrorV1
	JSON429      *DspErrorV1
	JSON500      *DspErrorV1
	JSON502      *DspErrorV1
	JSON503      *DspErrorV1
	JSON504      *DspErrorV1
}

func ParseGetDspAdvertisersAdvertiserIdResp

func ParseGetDspAdvertisersAdvertiserIdResp(rsp *http.Response) (*GetDspAdvertisersAdvertiserIdResp, error)

ParseGetDspAdvertisersAdvertiserIdResp parses an HTTP response from a GetDspAdvertisersAdvertiserIdWithResponse call

func (GetDspAdvertisersAdvertiserIdResp) Status

Status returns HTTPResponse.Status

func (GetDspAdvertisersAdvertiserIdResp) StatusCode

func (r GetDspAdvertisersAdvertiserIdResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDspAdvertisersParams

type GetDspAdvertisersParams struct {
	// StartIndex Sets a cursor into the requested set of advertisers. Use in conjunction with the count parameter to control pagination of the returned array. 0-indexed record offset for the result set, defaults to 0.
	StartIndex *int32 `form:"startIndex,omitempty" json:"startIndex,omitempty"`

	// Count Sets the number of advertisers to be returned in a single call. Maximum of 100 advertisers per call.
	Count *int32 `form:"count,omitempty" json:"count,omitempty"`

	// AdvertiserIdFilter List of comma separated advertiser ids to filter the advertisers. If no advertiser ids provided, all advertisers in this entity will be returned.
	AdvertiserIdFilter *string `form:"advertiserIdFilter,omitempty" json:"advertiserIdFilter,omitempty"`

	// AmazonAdvertisingAPIClientId The client identifier of the customer making the request.
	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. For DSP profiles, the `type` field of the `accountInfo` object must be set to `agency` and the `subType` must not be `AMAZON_ATTRIBUTION`.
	AmazonAdvertisingAPIScope string `json:"Amazon-Advertising-API-Scope"`
}

GetDspAdvertisersParams defines parameters for GetDspAdvertisers.

type GetDspAdvertisersResp

type GetDspAdvertisersResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DspAdvertisersV1
	JSON400      *DspErrorV1
	JSON401      *DspErrorV1
	JSON403      *DspErrorV1
	JSON404      *DspErrorV1
	JSON422      *DspErrorV1
	JSON429      *DspErrorV1
	JSON500      *DspErrorV1
	JSON502      *DspErrorV1
	JSON503      *DspErrorV1
	JSON504      *DspErrorV1
}

func ParseGetDspAdvertisersResp

func ParseGetDspAdvertisersResp(rsp *http.Response) (*GetDspAdvertisersResp, error)

ParseGetDspAdvertisersResp parses an HTTP response from a GetDspAdvertisersWithResponse call

func (GetDspAdvertisersResp) Status

func (r GetDspAdvertisersResp) Status() string

Status returns HTTPResponse.Status

func (GetDspAdvertisersResp) StatusCode

func (r GetDspAdvertisersResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn added in v0.0.2

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL