api: google.golang.org/api/adexchangebuyer/v1.2 Index | Files

package adexchangebuyer

import "google.golang.org/api/adexchangebuyer/v1.2"

Package adexchangebuyer provides access to the Ad Exchange Buyer API.

For product documentation, see: https://developers.google.com/ad-exchange/buyer-rest

Creating a client

Usage example:

import "google.golang.org/api/adexchangebuyer/v1.2"
...
ctx := context.Background()
adexchangebuyerService, err := adexchangebuyer.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

adexchangebuyerService, err := adexchangebuyer.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
adexchangebuyerService, err := adexchangebuyer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Package Files

adexchangebuyer-gen.go

Constants

const (
    // Manage your Ad Exchange buyer account configuration
    AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer"
)

OAuth2 scopes used by this API.

type Account Uses

type Account struct {
    // BidderLocation: Your bidder locations that have distinct URLs.
    BidderLocation []*AccountBidderLocation `json:"bidderLocation,omitempty"`

    // CookieMatchingNid: The nid parameter value used in cookie match
    // requests. Please contact your technical account manager if you need
    // to change this.
    CookieMatchingNid string `json:"cookieMatchingNid,omitempty"`

    // CookieMatchingUrl: The base URL used in cookie match requests.
    CookieMatchingUrl string `json:"cookieMatchingUrl,omitempty"`

    // Id: Account id.
    Id  int64 `json:"id,omitempty"`

    // Kind: Resource type.
    Kind string `json:"kind,omitempty"`

    // MaximumActiveCreatives: The maximum number of active creatives that
    // an account can have, where a creative is active if it was inserted or
    // bid with in the last 30 days. Please contact your technical account
    // manager if you need to change this.
    MaximumActiveCreatives int64 `json:"maximumActiveCreatives,omitempty"`

    // MaximumTotalQps: The sum of all bidderLocation.maximumQps values
    // cannot exceed this. Please contact your technical account manager if
    // you need to change this.
    MaximumTotalQps int64 `json:"maximumTotalQps,omitempty"`

    // NumberActiveCreatives: The number of creatives that this account
    // inserted or bid with in the last 30 days.
    NumberActiveCreatives int64 `json:"numberActiveCreatives,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "BidderLocation") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "BidderLocation") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

Account: Configuration data for an Ad Exchange buyer account.

func (*Account) MarshalJSON Uses

func (s *Account) MarshalJSON() ([]byte, error)

type AccountBidderLocation Uses

type AccountBidderLocation struct {
    // MaximumQps: The maximum queries per second the Ad Exchange will send.
    MaximumQps int64 `json:"maximumQps,omitempty"`

    // Region: The geographical region the Ad Exchange should send requests
    // from. Only used by some quota systems, but always setting the value
    // is recommended. Allowed values:
    // - ASIA
    // - EUROPE
    // - US_EAST
    // - US_WEST
    Region string `json:"region,omitempty"`

    // Url: The URL to which the Ad Exchange will send bid requests.
    Url string `json:"url,omitempty"`

    // ForceSendFields is a list of field names (e.g. "MaximumQps") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "MaximumQps") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*AccountBidderLocation) MarshalJSON Uses

func (s *AccountBidderLocation) MarshalJSON() ([]byte, error)

type AccountsGetCall Uses

type AccountsGetCall struct {
    // contains filtered or unexported fields
}

func (*AccountsGetCall) Context Uses

func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsGetCall) Do Uses

func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error)

Do executes the "adexchangebuyer.accounts.get" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AccountsGetCall) Fields Uses

func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsGetCall) Header Uses

func (c *AccountsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsGetCall) IfNoneMatch Uses

func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsList Uses

type AccountsList struct {
    // Items: A list of accounts.
    Items []*Account `json:"items,omitempty"`

    // Kind: Resource type.
    Kind string `json:"kind,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

AccountsList: An account feed lists Ad Exchange buyer accounts that the user has access to. Each entry in the feed corresponds to a single buyer account.

func (*AccountsList) MarshalJSON Uses

func (s *AccountsList) MarshalJSON() ([]byte, error)

type AccountsListCall Uses

type AccountsListCall struct {
    // contains filtered or unexported fields
}

func (*AccountsListCall) Context Uses

func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsListCall) Do Uses

func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsList, error)

Do executes the "adexchangebuyer.accounts.list" call. Exactly one of *AccountsList or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccountsList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AccountsListCall) Fields Uses

func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsListCall) Header Uses

func (c *AccountsListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AccountsListCall) IfNoneMatch Uses

func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AccountsPatchCall Uses

type AccountsPatchCall struct {
    // contains filtered or unexported fields
}

func (*AccountsPatchCall) Context Uses

func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsPatchCall) Do Uses

func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error)

Do executes the "adexchangebuyer.accounts.patch" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AccountsPatchCall) Fields Uses

func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsPatchCall) Header Uses

func (c *AccountsPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AccountsService Uses

type AccountsService struct {
    // contains filtered or unexported fields
}

func NewAccountsService Uses

func NewAccountsService(s *Service) *AccountsService

func (*AccountsService) Get Uses

func (r *AccountsService) Get(id int64) *AccountsGetCall

Get: Gets one account by ID.

func (*AccountsService) List Uses

func (r *AccountsService) List() *AccountsListCall

List: Retrieves the authenticated user's list of accounts.

func (*AccountsService) Patch Uses

func (r *AccountsService) Patch(id int64, account *Account) *AccountsPatchCall

Patch: Updates an existing account. This method supports patch semantics.

func (*AccountsService) Update Uses

func (r *AccountsService) Update(id int64, account *Account) *AccountsUpdateCall

Update: Updates an existing account.

type AccountsUpdateCall Uses

type AccountsUpdateCall struct {
    // contains filtered or unexported fields
}

func (*AccountsUpdateCall) Context Uses

func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AccountsUpdateCall) Do Uses

func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error)

Do executes the "adexchangebuyer.accounts.update" call. Exactly one of *Account or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Account.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AccountsUpdateCall) Fields Uses

func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AccountsUpdateCall) Header Uses

func (c *AccountsUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type Creative Uses

type Creative struct {
    // HTMLSnippet: The HTML snippet that displays the ad when inserted in
    // the web page. If set, videoURL should not be set.
    HTMLSnippet string `json:"HTMLSnippet,omitempty"`

    // AccountId: Account id.
    AccountId int64 `json:"accountId,omitempty"`

    // AdvertiserId: Detected advertiser id, if any. Read-only. This field
    // should not be set in requests.
    AdvertiserId googleapi.Int64s `json:"advertiserId,omitempty"`

    // AdvertiserName: The name of the company being advertised in the
    // creative.
    AdvertiserName string `json:"advertiserName,omitempty"`

    // AgencyId: The agency id for this creative.
    AgencyId int64 `json:"agencyId,omitempty,string"`

    // ApiUploadTimestamp: The last upload timestamp of this creative if it
    // was uploaded via API. Read-only. The value of this field is
    // generated, and will be ignored for uploads. (formatted RFC 3339
    // timestamp).
    ApiUploadTimestamp string `json:"apiUploadTimestamp,omitempty"`

    // Attribute: All attributes for the ads that may be shown from this
    // snippet.
    Attribute []int64 `json:"attribute,omitempty"`

    // BuyerCreativeId: A buyer-specific id identifying the creative in this
    // ad.
    BuyerCreativeId string `json:"buyerCreativeId,omitempty"`

    // ClickThroughUrl: The set of destination urls for the snippet.
    ClickThroughUrl []string `json:"clickThroughUrl,omitempty"`

    // Corrections: Shows any corrections that were applied to this
    // creative. Read-only. This field should not be set in requests.
    Corrections []*CreativeCorrections `json:"corrections,omitempty"`

    // DisapprovalReasons: The reasons for disapproval, if any. Note that
    // not all disapproval reasons may be categorized, so it is possible for
    // the creative to have a status of DISAPPROVED with an empty list for
    // disapproval_reasons. In this case, please reach out to your TAM to
    // help debug the issue. Read-only. This field should not be set in
    // requests.
    DisapprovalReasons []*CreativeDisapprovalReasons `json:"disapprovalReasons,omitempty"`

    // FilteringReasons: The filtering reasons for the creative. Read-only.
    // This field should not be set in requests.
    FilteringReasons *CreativeFilteringReasons `json:"filteringReasons,omitempty"`

    // Height: Ad height.
    Height int64 `json:"height,omitempty"`

    // ImpressionTrackingUrl: The set of urls to be called to record an
    // impression.
    ImpressionTrackingUrl []string `json:"impressionTrackingUrl,omitempty"`

    // Kind: Resource type.
    Kind string `json:"kind,omitempty"`

    // ProductCategories: Detected product categories, if any. Read-only.
    // This field should not be set in requests.
    ProductCategories []int64 `json:"productCategories,omitempty"`

    // RestrictedCategories: All restricted categories for the ads that may
    // be shown from this snippet.
    RestrictedCategories []int64 `json:"restrictedCategories,omitempty"`

    // SensitiveCategories: Detected sensitive categories, if any.
    // Read-only. This field should not be set in requests.
    SensitiveCategories []int64 `json:"sensitiveCategories,omitempty"`

    // Status: Creative serving status. Read-only. This field should not be
    // set in requests.
    Status string `json:"status,omitempty"`

    // VendorType: All vendor types for the ads that may be shown from this
    // snippet.
    VendorType []int64 `json:"vendorType,omitempty"`

    // Version: The version for this creative. Read-only. This field should
    // not be set in requests.
    Version int64 `json:"version,omitempty"`

    // VideoURL: The url to fetch a video ad. If set, HTMLSnippet should not
    // be set.
    VideoURL string `json:"videoURL,omitempty"`

    // Width: Ad width.
    Width int64 `json:"width,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "HTMLSnippet") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "HTMLSnippet") to include
    // in API requests with the JSON null value. By default, fields with
    // empty values are omitted from API requests. However, any field with
    // an empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

Creative: A creative and its classification data.

func (*Creative) MarshalJSON Uses

func (s *Creative) MarshalJSON() ([]byte, error)

type CreativeCorrections Uses

type CreativeCorrections struct {
    // Details: Additional details about the correction.
    Details []string `json:"details,omitempty"`

    // Reason: The type of correction that was applied to the creative.
    Reason string `json:"reason,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Details") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Details") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*CreativeCorrections) MarshalJSON Uses

func (s *CreativeCorrections) MarshalJSON() ([]byte, error)

type CreativeDisapprovalReasons Uses

type CreativeDisapprovalReasons struct {
    // Details: Additional details about the reason for disapproval.
    Details []string `json:"details,omitempty"`

    // Reason: The categorized reason for disapproval.
    Reason string `json:"reason,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Details") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Details") to include in
    // API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

func (*CreativeDisapprovalReasons) MarshalJSON Uses

func (s *CreativeDisapprovalReasons) MarshalJSON() ([]byte, error)

type CreativeFilteringReasons Uses

type CreativeFilteringReasons struct {
    // Date: The date in ISO 8601 format for the data. The data is collected
    // from 00:00:00 to 23:59:59 in PST.
    Date string `json:"date,omitempty"`

    // Reasons: The filtering reasons.
    Reasons []*CreativeFilteringReasonsReasons `json:"reasons,omitempty"`

    // ForceSendFields is a list of field names (e.g. "Date") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Date") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

CreativeFilteringReasons: The filtering reasons for the creative. Read-only. This field should not be set in requests.

func (*CreativeFilteringReasons) MarshalJSON Uses

func (s *CreativeFilteringReasons) MarshalJSON() ([]byte, error)

type CreativeFilteringReasonsReasons Uses

type CreativeFilteringReasonsReasons struct {
    // FilteringCount: The number of times the creative was filtered for the
    // status. The count is aggregated across all publishers on the
    // exchange.
    FilteringCount int64 `json:"filteringCount,omitempty,string"`

    // FilteringStatus: The filtering status code. Please refer to the
    // creative-status-codes.txt file for different statuses.
    FilteringStatus int64 `json:"filteringStatus,omitempty"`

    // ForceSendFields is a list of field names (e.g. "FilteringCount") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "FilteringCount") to
    // include in API requests with the JSON null value. By default, fields
    // with empty values are omitted from API requests. However, any field
    // with an empty value appearing in NullFields will be sent to the
    // server as null. It is an error if a field in this list has a
    // non-empty value. This may be used to include null fields in Patch
    // requests.
    NullFields []string `json:"-"`
}

func (*CreativeFilteringReasonsReasons) MarshalJSON Uses

func (s *CreativeFilteringReasonsReasons) MarshalJSON() ([]byte, error)

type CreativesGetCall Uses

type CreativesGetCall struct {
    // contains filtered or unexported fields
}

func (*CreativesGetCall) Context Uses

func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CreativesGetCall) Do Uses

func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error)

Do executes the "adexchangebuyer.creatives.get" call. Exactly one of *Creative or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Creative.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CreativesGetCall) Fields Uses

func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CreativesGetCall) Header Uses

func (c *CreativesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CreativesGetCall) IfNoneMatch Uses

func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type CreativesInsertCall Uses

type CreativesInsertCall struct {
    // contains filtered or unexported fields
}

func (*CreativesInsertCall) Context Uses

func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CreativesInsertCall) Do Uses

func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error)

Do executes the "adexchangebuyer.creatives.insert" call. Exactly one of *Creative or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Creative.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CreativesInsertCall) Fields Uses

func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CreativesInsertCall) Header Uses

func (c *CreativesInsertCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CreativesList Uses

type CreativesList struct {
    // Items: A list of creatives.
    Items []*Creative `json:"items,omitempty"`

    // Kind: Resource type.
    Kind string `json:"kind,omitempty"`

    // NextPageToken: Continuation token used to page through creatives. To
    // retrieve the next page of results, set the next request's "pageToken"
    // value to this.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the
    // server.
    googleapi.ServerResponse `json:"-"`

    // ForceSendFields is a list of field names (e.g. "Items") to
    // unconditionally include in API requests. By default, fields with
    // empty values are omitted from API requests. However, any non-pointer,
    // non-interface field appearing in ForceSendFields will be sent to the
    // server regardless of whether the field is empty or not. This may be
    // used to include empty fields in Patch requests.
    ForceSendFields []string `json:"-"`

    // NullFields is a list of field names (e.g. "Items") to include in API
    // requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. However, any field with an
    // empty value appearing in NullFields will be sent to the server as
    // null. It is an error if a field in this list has a non-empty value.
    // This may be used to include null fields in Patch requests.
    NullFields []string `json:"-"`
}

CreativesList: The creatives feed lists the active creatives for the Ad Exchange buyer accounts that the user has access to. Each entry in the feed corresponds to a single creative.

func (*CreativesList) MarshalJSON Uses

func (s *CreativesList) MarshalJSON() ([]byte, error)

type CreativesListCall Uses

type CreativesListCall struct {
    // contains filtered or unexported fields
}

func (*CreativesListCall) Context Uses

func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CreativesListCall) Do Uses

func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesList, error)

Do executes the "adexchangebuyer.creatives.list" call. Exactly one of *CreativesList or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CreativesList.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CreativesListCall) Fields Uses

func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*CreativesListCall) Header Uses

func (c *CreativesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CreativesListCall) IfNoneMatch Uses

func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CreativesListCall) MaxResults Uses

func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall

MaxResults sets the optional parameter "maxResults": Maximum number of entries returned on one result page. If not set, the default is 100.

func (*CreativesListCall) PageToken Uses

func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall

PageToken sets the optional parameter "pageToken": A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

func (*CreativesListCall) Pages Uses

func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesList) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CreativesListCall) StatusFilter Uses

func (c *CreativesListCall) StatusFilter(statusFilter string) *CreativesListCall

StatusFilter sets the optional parameter "statusFilter": When specified, only creatives having the given status are returned.

Possible values:

"approved" - Creatives which have been approved.
"disapproved" - Creatives which have been disapproved.
"not_checked" - Creatives whose status is not yet checked.

type CreativesService Uses

type CreativesService struct {
    // contains filtered or unexported fields
}

func NewCreativesService Uses

func NewCreativesService(s *Service) *CreativesService

func (*CreativesService) Get Uses

func (r *CreativesService) Get(accountId int64, buyerCreativeId string) *CreativesGetCall

Get: Gets the status for a single creative. A creative will be available 30-40 minutes after submission.

func (*CreativesService) Insert Uses

func (r *CreativesService) Insert(creative *Creative) *CreativesInsertCall

Insert: Submit a new creative.

func (*CreativesService) List Uses

func (r *CreativesService) List() *CreativesListCall

List: Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    Accounts *AccountsService

    Creatives *CreativesService
    // contains filtered or unexported fields
}

func New Uses

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService Uses

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Package adexchangebuyer imports 14 packages (graph). Updated 2019-07-12. Refresh now. Tools for package owners.