1
// Package adexchangeseller provides access to the Ad Exchange Seller API.
3
// See https://developers.google.com/ad-exchange/seller-rest/
7
// import "google.golang.org/api/adexchangeseller/v2.0"
9
// adexchangesellerService, err := adexchangeseller.New(oauthHttpClient)
10
package adexchangeseller
17
"google.golang.org/api/googleapi"
25
// Always reference these packages, just in case the auto-generated code
27
var _ = bytes.NewBuffer
30
var _ = json.NewDecoder
33
var _ = googleapi.Version
35
var _ = strings.Replace
37
const apiId = "adexchangeseller:v2.0"
38
const apiName = "adexchangeseller"
39
const apiVersion = "v2.0"
40
const basePath = "https://www.googleapis.com/adexchangeseller/v2.0/"
42
// OAuth2 scopes used by this API.
44
// View and manage your Ad Exchange data
45
AdexchangeSellerScope = "https://www.googleapis.com/auth/adexchange.seller"
47
// View your Ad Exchange data
48
AdexchangeSellerReadonlyScope = "https://www.googleapis.com/auth/adexchange.seller.readonly"
51
func New(client *http.Client) (*Service, error) {
53
return nil, errors.New("client is nil")
55
s := &Service{client: client, BasePath: basePath}
56
s.Accounts = NewAccountsService(s)
62
BasePath string // API endpoint base URL
64
Accounts *AccountsService
67
func NewAccountsService(s *Service) *AccountsService {
68
rs := &AccountsService{s: s}
69
rs.Adclients = NewAccountsAdclientsService(s)
70
rs.Alerts = NewAccountsAlertsService(s)
71
rs.Customchannels = NewAccountsCustomchannelsService(s)
72
rs.Metadata = NewAccountsMetadataService(s)
73
rs.Preferreddeals = NewAccountsPreferreddealsService(s)
74
rs.Reports = NewAccountsReportsService(s)
75
rs.Urlchannels = NewAccountsUrlchannelsService(s)
79
type AccountsService struct {
82
Adclients *AccountsAdclientsService
84
Alerts *AccountsAlertsService
86
Customchannels *AccountsCustomchannelsService
88
Metadata *AccountsMetadataService
90
Preferreddeals *AccountsPreferreddealsService
92
Reports *AccountsReportsService
94
Urlchannels *AccountsUrlchannelsService
97
func NewAccountsAdclientsService(s *Service) *AccountsAdclientsService {
98
rs := &AccountsAdclientsService{s: s}
102
type AccountsAdclientsService struct {
106
func NewAccountsAlertsService(s *Service) *AccountsAlertsService {
107
rs := &AccountsAlertsService{s: s}
111
type AccountsAlertsService struct {
115
func NewAccountsCustomchannelsService(s *Service) *AccountsCustomchannelsService {
116
rs := &AccountsCustomchannelsService{s: s}
120
type AccountsCustomchannelsService struct {
124
func NewAccountsMetadataService(s *Service) *AccountsMetadataService {
125
rs := &AccountsMetadataService{s: s}
126
rs.Dimensions = NewAccountsMetadataDimensionsService(s)
127
rs.Metrics = NewAccountsMetadataMetricsService(s)
131
type AccountsMetadataService struct {
134
Dimensions *AccountsMetadataDimensionsService
136
Metrics *AccountsMetadataMetricsService
139
func NewAccountsMetadataDimensionsService(s *Service) *AccountsMetadataDimensionsService {
140
rs := &AccountsMetadataDimensionsService{s: s}
144
type AccountsMetadataDimensionsService struct {
148
func NewAccountsMetadataMetricsService(s *Service) *AccountsMetadataMetricsService {
149
rs := &AccountsMetadataMetricsService{s: s}
153
type AccountsMetadataMetricsService struct {
157
func NewAccountsPreferreddealsService(s *Service) *AccountsPreferreddealsService {
158
rs := &AccountsPreferreddealsService{s: s}
162
type AccountsPreferreddealsService struct {
166
func NewAccountsReportsService(s *Service) *AccountsReportsService {
167
rs := &AccountsReportsService{s: s}
168
rs.Saved = NewAccountsReportsSavedService(s)
172
type AccountsReportsService struct {
175
Saved *AccountsReportsSavedService
178
func NewAccountsReportsSavedService(s *Service) *AccountsReportsSavedService {
179
rs := &AccountsReportsSavedService{s: s}
183
type AccountsReportsSavedService struct {
187
func NewAccountsUrlchannelsService(s *Service) *AccountsUrlchannelsService {
188
rs := &AccountsUrlchannelsService{s: s}
192
type AccountsUrlchannelsService struct {
196
type Account struct {
197
// Id: Unique identifier of this account.
198
Id string `json:"id,omitempty"`
200
// Kind: Kind of resource this is, in this case
201
// adexchangeseller#account.
202
Kind string `json:"kind,omitempty"`
204
// Name: Name of this account.
205
Name string `json:"name,omitempty"`
208
type Accounts struct {
209
// Etag: ETag of this response for caching purposes.
210
Etag string `json:"etag,omitempty"`
212
// Items: The accounts returned in this list response.
213
Items []*Account `json:"items,omitempty"`
215
// Kind: Kind of list this is, in this case adexchangeseller#accounts.
216
Kind string `json:"kind,omitempty"`
218
// NextPageToken: Continuation token used to page through accounts. To
219
// retrieve the next page of results, set the next request's "pageToken"
221
NextPageToken string `json:"nextPageToken,omitempty"`
224
type AdClient struct {
225
// ArcOptIn: Whether this ad client is opted in to ARC.
226
ArcOptIn bool `json:"arcOptIn,omitempty"`
228
// Id: Unique identifier of this ad client.
229
Id string `json:"id,omitempty"`
231
// Kind: Kind of resource this is, in this case
232
// adexchangeseller#adClient.
233
Kind string `json:"kind,omitempty"`
235
// ProductCode: This ad client's product code, which corresponds to the
236
// PRODUCT_CODE report dimension.
237
ProductCode string `json:"productCode,omitempty"`
239
// SupportsReporting: Whether this ad client supports being reported on.
240
SupportsReporting bool `json:"supportsReporting,omitempty"`
243
type AdClients struct {
244
// Etag: ETag of this response for caching purposes.
245
Etag string `json:"etag,omitempty"`
247
// Items: The ad clients returned in this list response.
248
Items []*AdClient `json:"items,omitempty"`
250
// Kind: Kind of list this is, in this case adexchangeseller#adClients.
251
Kind string `json:"kind,omitempty"`
253
// NextPageToken: Continuation token used to page through ad clients. To
254
// retrieve the next page of results, set the next request's "pageToken"
256
NextPageToken string `json:"nextPageToken,omitempty"`
260
// Id: Unique identifier of this alert. This should be considered an
261
// opaque identifier; it is not safe to rely on it being in any
262
// particular format.
263
Id string `json:"id,omitempty"`
265
// Kind: Kind of resource this is, in this case adexchangeseller#alert.
266
Kind string `json:"kind,omitempty"`
268
// Message: The localized alert message.
269
Message string `json:"message,omitempty"`
271
// Severity: Severity of this alert. Possible values: INFO, WARNING,
273
Severity string `json:"severity,omitempty"`
275
// Type: Type of this alert. Possible values: SELF_HOLD,
276
// MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION,
277
// PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER,
279
Type string `json:"type,omitempty"`
283
// Items: The alerts returned in this list response.
284
Items []*Alert `json:"items,omitempty"`
286
// Kind: Kind of list this is, in this case adexchangeseller#alerts.
287
Kind string `json:"kind,omitempty"`
290
type CustomChannel struct {
291
// Code: Code of this custom channel, not necessarily unique across ad
293
Code string `json:"code,omitempty"`
295
// Id: Unique identifier of this custom channel. This should be
296
// considered an opaque identifier; it is not safe to rely on it being
297
// in any particular format.
298
Id string `json:"id,omitempty"`
300
// Kind: Kind of resource this is, in this case
301
// adexchangeseller#customChannel.
302
Kind string `json:"kind,omitempty"`
304
// Name: Name of this custom channel.
305
Name string `json:"name,omitempty"`
307
// TargetingInfo: The targeting information of this custom channel, if
309
TargetingInfo *CustomChannelTargetingInfo `json:"targetingInfo,omitempty"`
312
type CustomChannelTargetingInfo struct {
313
// AdsAppearOn: The name used to describe this channel externally.
314
AdsAppearOn string `json:"adsAppearOn,omitempty"`
316
// Description: The external description of the channel.
317
Description string `json:"description,omitempty"`
319
// Location: The locations in which ads appear. (Only valid for content
320
// and mobile content ads). Acceptable values for content ads are:
321
// TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER,
322
// MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT,
323
// MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are:
324
// TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
325
Location string `json:"location,omitempty"`
327
// SiteLanguage: The language of the sites ads will be displayed on.
328
SiteLanguage string `json:"siteLanguage,omitempty"`
331
type CustomChannels struct {
332
// Etag: ETag of this response for caching purposes.
333
Etag string `json:"etag,omitempty"`
335
// Items: The custom channels returned in this list response.
336
Items []*CustomChannel `json:"items,omitempty"`
338
// Kind: Kind of list this is, in this case
339
// adexchangeseller#customChannels.
340
Kind string `json:"kind,omitempty"`
342
// NextPageToken: Continuation token used to page through custom
343
// channels. To retrieve the next page of results, set the next
344
// request's "pageToken" value to this.
345
NextPageToken string `json:"nextPageToken,omitempty"`
348
type Metadata struct {
349
Items []*ReportingMetadataEntry `json:"items,omitempty"`
351
// Kind: Kind of list this is, in this case adexchangeseller#metadata.
352
Kind string `json:"kind,omitempty"`
355
type PreferredDeal struct {
356
// AdvertiserName: The name of the advertiser this deal is for.
357
AdvertiserName string `json:"advertiserName,omitempty"`
359
// BuyerNetworkName: The name of the buyer network this deal is for.
360
BuyerNetworkName string `json:"buyerNetworkName,omitempty"`
362
// CurrencyCode: The currency code that applies to the fixed_cpm value.
363
// If not set then assumed to be USD.
364
CurrencyCode string `json:"currencyCode,omitempty"`
366
// EndTime: Time when this deal stops being active in seconds since the
367
// epoch (GMT). If not set then this deal is valid until manually
368
// disabled by the publisher.
369
EndTime uint64 `json:"endTime,omitempty,string"`
371
// FixedCpm: The fixed price for this preferred deal. In cpm micros of
372
// currency according to currencyCode. If set, then this preferred deal
373
// is eligible for the fixed price tier of buying (highest priority, pay
374
// exactly the configured fixed price).
375
FixedCpm int64 `json:"fixedCpm,omitempty,string"`
377
// Id: Unique identifier of this preferred deal.
378
Id int64 `json:"id,omitempty,string"`
380
// Kind: Kind of resource this is, in this case
381
// adexchangeseller#preferredDeal.
382
Kind string `json:"kind,omitempty"`
384
// StartTime: Time when this deal becomes active in seconds since the
385
// epoch (GMT). If not set then this deal is active immediately upon
387
StartTime uint64 `json:"startTime,omitempty,string"`
390
type PreferredDeals struct {
391
// Items: The preferred deals returned in this list response.
392
Items []*PreferredDeal `json:"items,omitempty"`
394
// Kind: Kind of list this is, in this case
395
// adexchangeseller#preferredDeals.
396
Kind string `json:"kind,omitempty"`
400
// Averages: The averages of the report. This is the same length as any
401
// other row in the report; cells corresponding to dimension columns are
403
Averages []string `json:"averages,omitempty"`
405
// Headers: The header information of the columns requested in the
406
// report. This is a list of headers; one for each dimension in the
407
// request, followed by one for each metric in the request.
408
Headers []*ReportHeaders `json:"headers,omitempty"`
410
// Kind: Kind this is, in this case adexchangeseller#report.
411
Kind string `json:"kind,omitempty"`
413
// Rows: The output rows of the report. Each row is a list of cells; one
414
// for each dimension in the request, followed by one for each metric in
415
// the request. The dimension cells contain strings, and the metric
416
// cells contain numbers.
417
Rows [][]string `json:"rows,omitempty"`
419
// TotalMatchedRows: The total number of rows matched by the report
420
// request. Fewer rows may be returned in the response due to being
421
// limited by the row count requested or the report row limit.
422
TotalMatchedRows int64 `json:"totalMatchedRows,omitempty,string"`
424
// Totals: The totals of the report. This is the same length as any
425
// other row in the report; cells corresponding to dimension columns are
427
Totals []string `json:"totals,omitempty"`
429
// Warnings: Any warnings associated with generation of the report.
430
Warnings []string `json:"warnings,omitempty"`
433
type ReportHeaders struct {
434
// Currency: The currency of this column. Only present if the header
435
// type is METRIC_CURRENCY.
436
Currency string `json:"currency,omitempty"`
438
// Name: The name of the header.
439
Name string `json:"name,omitempty"`
441
// Type: The type of the header; one of DIMENSION, METRIC_TALLY,
442
// METRIC_RATIO, or METRIC_CURRENCY.
443
Type string `json:"type,omitempty"`
446
type ReportingMetadataEntry struct {
447
// CompatibleDimensions: For metrics this is a list of dimension IDs
448
// which the metric is compatible with, for dimensions it is a list of
449
// compatibility groups the dimension belongs to.
450
CompatibleDimensions []string `json:"compatibleDimensions,omitempty"`
452
// CompatibleMetrics: The names of the metrics the dimension or metric
453
// this reporting metadata entry describes is compatible with.
454
CompatibleMetrics []string `json:"compatibleMetrics,omitempty"`
456
// Id: Unique identifier of this reporting metadata entry, corresponding
457
// to the name of the appropriate dimension or metric.
458
Id string `json:"id,omitempty"`
460
// Kind: Kind of resource this is, in this case
461
// adexchangeseller#reportingMetadataEntry.
462
Kind string `json:"kind,omitempty"`
464
// RequiredDimensions: The names of the dimensions which the dimension
465
// or metric this reporting metadata entry describes requires to also be
466
// present in order for the report to be valid. Omitting these will not
467
// cause an error or warning, but may result in data which cannot be
468
// correctly interpreted.
469
RequiredDimensions []string `json:"requiredDimensions,omitempty"`
471
// RequiredMetrics: The names of the metrics which the dimension or
472
// metric this reporting metadata entry describes requires to also be
473
// present in order for the report to be valid. Omitting these will not
474
// cause an error or warning, but may result in data which cannot be
475
// correctly interpreted.
476
RequiredMetrics []string `json:"requiredMetrics,omitempty"`
478
// SupportedProducts: The codes of the projects supported by the
479
// dimension or metric this reporting metadata entry describes.
480
SupportedProducts []string `json:"supportedProducts,omitempty"`
483
type SavedReport struct {
484
// Id: Unique identifier of this saved report.
485
Id string `json:"id,omitempty"`
487
// Kind: Kind of resource this is, in this case
488
// adexchangeseller#savedReport.
489
Kind string `json:"kind,omitempty"`
491
// Name: This saved report's name.
492
Name string `json:"name,omitempty"`
495
type SavedReports struct {
496
// Etag: ETag of this response for caching purposes.
497
Etag string `json:"etag,omitempty"`
499
// Items: The saved reports returned in this list response.
500
Items []*SavedReport `json:"items,omitempty"`
502
// Kind: Kind of list this is, in this case
503
// adexchangeseller#savedReports.
504
Kind string `json:"kind,omitempty"`
506
// NextPageToken: Continuation token used to page through saved reports.
507
// To retrieve the next page of results, set the next request's
508
// "pageToken" value to this.
509
NextPageToken string `json:"nextPageToken,omitempty"`
512
type UrlChannel struct {
513
// Id: Unique identifier of this URL channel. This should be considered
514
// an opaque identifier; it is not safe to rely on it being in any
515
// particular format.
516
Id string `json:"id,omitempty"`
518
// Kind: Kind of resource this is, in this case
519
// adexchangeseller#urlChannel.
520
Kind string `json:"kind,omitempty"`
522
// UrlPattern: URL Pattern of this URL channel. Does not include
523
// "http://" or "https://". Example: www.example.com/home
524
UrlPattern string `json:"urlPattern,omitempty"`
527
type UrlChannels struct {
528
// Etag: ETag of this response for caching purposes.
529
Etag string `json:"etag,omitempty"`
531
// Items: The URL channels returned in this list response.
532
Items []*UrlChannel `json:"items,omitempty"`
534
// Kind: Kind of list this is, in this case
535
// adexchangeseller#urlChannels.
536
Kind string `json:"kind,omitempty"`
538
// NextPageToken: Continuation token used to page through URL channels.
539
// To retrieve the next page of results, set the next request's
540
// "pageToken" value to this.
541
NextPageToken string `json:"nextPageToken,omitempty"`
544
// method id "adexchangeseller.accounts.get":
546
type AccountsGetCall struct {
549
opt_ map[string]interface{}
552
// Get: Get information about the selected Ad Exchange account.
553
func (r *AccountsService) Get(accountId string) *AccountsGetCall {
554
c := &AccountsGetCall{s: r.s, opt_: make(map[string]interface{})}
555
c.accountId = accountId
559
// Fields allows partial responses to be retrieved.
560
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
561
// for more information.
562
func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
563
c.opt_["fields"] = googleapi.CombineFields(s)
567
func (c *AccountsGetCall) Do() (*Account, error) {
568
var body io.Reader = nil
569
params := make(url.Values)
570
params.Set("alt", "json")
571
if v, ok := c.opt_["fields"]; ok {
572
params.Set("fields", fmt.Sprintf("%v", v))
574
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}")
575
urls += "?" + params.Encode()
576
req, _ := http.NewRequest("GET", urls, body)
577
googleapi.Expand(req.URL, map[string]string{
578
"accountId": c.accountId,
580
req.Header.Set("User-Agent", "google-api-go-client/0.5")
581
res, err := c.s.client.Do(req)
585
defer googleapi.CloseBody(res)
586
if err := googleapi.CheckResponse(res); err != nil {
590
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
595
// "description": "Get information about the selected Ad Exchange account.",
596
// "httpMethod": "GET",
597
// "id": "adexchangeseller.accounts.get",
598
// "parameterOrder": [
603
// "description": "Account to get information about. Tip: 'myaccount' is a valid ID.",
604
// "location": "path",
609
// "path": "accounts/{accountId}",
614
// "https://www.googleapis.com/auth/adexchange.seller",
615
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
621
// method id "adexchangeseller.accounts.list":
623
type AccountsListCall struct {
625
opt_ map[string]interface{}
628
// List: List all accounts available to this Ad Exchange account.
629
func (r *AccountsService) List() *AccountsListCall {
630
c := &AccountsListCall{s: r.s, opt_: make(map[string]interface{})}
634
// MaxResults sets the optional parameter "maxResults": The maximum
635
// number of accounts to include in the response, used for paging.
636
func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
637
c.opt_["maxResults"] = maxResults
641
// PageToken sets the optional parameter "pageToken": A continuation
642
// token, used to page through accounts. To retrieve the next page, set
643
// this parameter to the value of "nextPageToken" from the previous
645
func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
646
c.opt_["pageToken"] = pageToken
650
// Fields allows partial responses to be retrieved.
651
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
652
// for more information.
653
func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
654
c.opt_["fields"] = googleapi.CombineFields(s)
658
func (c *AccountsListCall) Do() (*Accounts, error) {
659
var body io.Reader = nil
660
params := make(url.Values)
661
params.Set("alt", "json")
662
if v, ok := c.opt_["maxResults"]; ok {
663
params.Set("maxResults", fmt.Sprintf("%v", v))
665
if v, ok := c.opt_["pageToken"]; ok {
666
params.Set("pageToken", fmt.Sprintf("%v", v))
668
if v, ok := c.opt_["fields"]; ok {
669
params.Set("fields", fmt.Sprintf("%v", v))
671
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts")
672
urls += "?" + params.Encode()
673
req, _ := http.NewRequest("GET", urls, body)
674
googleapi.SetOpaque(req.URL)
675
req.Header.Set("User-Agent", "google-api-go-client/0.5")
676
res, err := c.s.client.Do(req)
680
defer googleapi.CloseBody(res)
681
if err := googleapi.CheckResponse(res); err != nil {
685
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
690
// "description": "List all accounts available to this Ad Exchange account.",
691
// "httpMethod": "GET",
692
// "id": "adexchangeseller.accounts.list",
695
// "description": "The maximum number of accounts to include in the response, used for paging.",
696
// "format": "int32",
697
// "location": "query",
698
// "maximum": "10000",
703
// "description": "A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
704
// "location": "query",
708
// "path": "accounts",
710
// "$ref": "Accounts"
713
// "https://www.googleapis.com/auth/adexchange.seller",
714
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
720
// method id "adexchangeseller.accounts.adclients.list":
722
type AccountsAdclientsListCall struct {
725
opt_ map[string]interface{}
728
// List: List all ad clients in this Ad Exchange account.
729
func (r *AccountsAdclientsService) List(accountId string) *AccountsAdclientsListCall {
730
c := &AccountsAdclientsListCall{s: r.s, opt_: make(map[string]interface{})}
731
c.accountId = accountId
735
// MaxResults sets the optional parameter "maxResults": The maximum
736
// number of ad clients to include in the response, used for paging.
737
func (c *AccountsAdclientsListCall) MaxResults(maxResults int64) *AccountsAdclientsListCall {
738
c.opt_["maxResults"] = maxResults
742
// PageToken sets the optional parameter "pageToken": A continuation
743
// token, used to page through ad clients. To retrieve the next page,
744
// set this parameter to the value of "nextPageToken" from the previous
746
func (c *AccountsAdclientsListCall) PageToken(pageToken string) *AccountsAdclientsListCall {
747
c.opt_["pageToken"] = pageToken
751
// Fields allows partial responses to be retrieved.
752
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
753
// for more information.
754
func (c *AccountsAdclientsListCall) Fields(s ...googleapi.Field) *AccountsAdclientsListCall {
755
c.opt_["fields"] = googleapi.CombineFields(s)
759
func (c *AccountsAdclientsListCall) Do() (*AdClients, error) {
760
var body io.Reader = nil
761
params := make(url.Values)
762
params.Set("alt", "json")
763
if v, ok := c.opt_["maxResults"]; ok {
764
params.Set("maxResults", fmt.Sprintf("%v", v))
766
if v, ok := c.opt_["pageToken"]; ok {
767
params.Set("pageToken", fmt.Sprintf("%v", v))
769
if v, ok := c.opt_["fields"]; ok {
770
params.Set("fields", fmt.Sprintf("%v", v))
772
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients")
773
urls += "?" + params.Encode()
774
req, _ := http.NewRequest("GET", urls, body)
775
googleapi.Expand(req.URL, map[string]string{
776
"accountId": c.accountId,
778
req.Header.Set("User-Agent", "google-api-go-client/0.5")
779
res, err := c.s.client.Do(req)
783
defer googleapi.CloseBody(res)
784
if err := googleapi.CheckResponse(res); err != nil {
788
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
793
// "description": "List all ad clients in this Ad Exchange account.",
794
// "httpMethod": "GET",
795
// "id": "adexchangeseller.accounts.adclients.list",
796
// "parameterOrder": [
801
// "description": "Account to which the ad client belongs.",
802
// "location": "path",
807
// "description": "The maximum number of ad clients to include in the response, used for paging.",
808
// "format": "uint32",
809
// "location": "query",
810
// "maximum": "10000",
815
// "description": "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.",
816
// "location": "query",
820
// "path": "accounts/{accountId}/adclients",
822
// "$ref": "AdClients"
825
// "https://www.googleapis.com/auth/adexchange.seller",
826
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
832
// method id "adexchangeseller.accounts.alerts.list":
834
type AccountsAlertsListCall struct {
837
opt_ map[string]interface{}
840
// List: List the alerts for this Ad Exchange account.
841
func (r *AccountsAlertsService) List(accountId string) *AccountsAlertsListCall {
842
c := &AccountsAlertsListCall{s: r.s, opt_: make(map[string]interface{})}
843
c.accountId = accountId
847
// Locale sets the optional parameter "locale": The locale to use for
848
// translating alert messages. The account locale will be used if this
849
// is not supplied. The AdSense default (English) will be used if the
850
// supplied locale is invalid or unsupported.
851
func (c *AccountsAlertsListCall) Locale(locale string) *AccountsAlertsListCall {
852
c.opt_["locale"] = locale
856
// Fields allows partial responses to be retrieved.
857
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
858
// for more information.
859
func (c *AccountsAlertsListCall) Fields(s ...googleapi.Field) *AccountsAlertsListCall {
860
c.opt_["fields"] = googleapi.CombineFields(s)
864
func (c *AccountsAlertsListCall) Do() (*Alerts, error) {
865
var body io.Reader = nil
866
params := make(url.Values)
867
params.Set("alt", "json")
868
if v, ok := c.opt_["locale"]; ok {
869
params.Set("locale", fmt.Sprintf("%v", v))
871
if v, ok := c.opt_["fields"]; ok {
872
params.Set("fields", fmt.Sprintf("%v", v))
874
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/alerts")
875
urls += "?" + params.Encode()
876
req, _ := http.NewRequest("GET", urls, body)
877
googleapi.Expand(req.URL, map[string]string{
878
"accountId": c.accountId,
880
req.Header.Set("User-Agent", "google-api-go-client/0.5")
881
res, err := c.s.client.Do(req)
885
defer googleapi.CloseBody(res)
886
if err := googleapi.CheckResponse(res); err != nil {
890
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
895
// "description": "List the alerts for this Ad Exchange account.",
896
// "httpMethod": "GET",
897
// "id": "adexchangeseller.accounts.alerts.list",
898
// "parameterOrder": [
903
// "description": "Account owning the alerts.",
904
// "location": "path",
909
// "description": "The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported.",
910
// "location": "query",
914
// "path": "accounts/{accountId}/alerts",
919
// "https://www.googleapis.com/auth/adexchange.seller",
920
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
926
// method id "adexchangeseller.accounts.customchannels.get":
928
type AccountsCustomchannelsGetCall struct {
932
customChannelId string
933
opt_ map[string]interface{}
936
// Get: Get the specified custom channel from the specified ad client.
937
func (r *AccountsCustomchannelsService) Get(accountId string, adClientId string, customChannelId string) *AccountsCustomchannelsGetCall {
938
c := &AccountsCustomchannelsGetCall{s: r.s, opt_: make(map[string]interface{})}
939
c.accountId = accountId
940
c.adClientId = adClientId
941
c.customChannelId = customChannelId
945
// Fields allows partial responses to be retrieved.
946
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
947
// for more information.
948
func (c *AccountsCustomchannelsGetCall) Fields(s ...googleapi.Field) *AccountsCustomchannelsGetCall {
949
c.opt_["fields"] = googleapi.CombineFields(s)
953
func (c *AccountsCustomchannelsGetCall) Do() (*CustomChannel, error) {
954
var body io.Reader = nil
955
params := make(url.Values)
956
params.Set("alt", "json")
957
if v, ok := c.opt_["fields"]; ok {
958
params.Set("fields", fmt.Sprintf("%v", v))
960
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}")
961
urls += "?" + params.Encode()
962
req, _ := http.NewRequest("GET", urls, body)
963
googleapi.Expand(req.URL, map[string]string{
964
"accountId": c.accountId,
965
"adClientId": c.adClientId,
966
"customChannelId": c.customChannelId,
968
req.Header.Set("User-Agent", "google-api-go-client/0.5")
969
res, err := c.s.client.Do(req)
973
defer googleapi.CloseBody(res)
974
if err := googleapi.CheckResponse(res); err != nil {
977
var ret *CustomChannel
978
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
983
// "description": "Get the specified custom channel from the specified ad client.",
984
// "httpMethod": "GET",
985
// "id": "adexchangeseller.accounts.customchannels.get",
986
// "parameterOrder": [
993
// "description": "Account to which the ad client belongs.",
994
// "location": "path",
999
// "description": "Ad client which contains the custom channel.",
1000
// "location": "path",
1001
// "required": true,
1004
// "customChannelId": {
1005
// "description": "Custom channel to retrieve.",
1006
// "location": "path",
1007
// "required": true,
1011
// "path": "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}",
1013
// "$ref": "CustomChannel"
1016
// "https://www.googleapis.com/auth/adexchange.seller",
1017
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1023
// method id "adexchangeseller.accounts.customchannels.list":
1025
type AccountsCustomchannelsListCall struct {
1029
opt_ map[string]interface{}
1032
// List: List all custom channels in the specified ad client for this Ad
1033
// Exchange account.
1034
func (r *AccountsCustomchannelsService) List(accountId string, adClientId string) *AccountsCustomchannelsListCall {
1035
c := &AccountsCustomchannelsListCall{s: r.s, opt_: make(map[string]interface{})}
1036
c.accountId = accountId
1037
c.adClientId = adClientId
1041
// MaxResults sets the optional parameter "maxResults": The maximum
1042
// number of custom channels to include in the response, used for
1044
func (c *AccountsCustomchannelsListCall) MaxResults(maxResults int64) *AccountsCustomchannelsListCall {
1045
c.opt_["maxResults"] = maxResults
1049
// PageToken sets the optional parameter "pageToken": A continuation
1050
// token, used to page through custom channels. To retrieve the next
1051
// page, set this parameter to the value of "nextPageToken" from the
1052
// previous response.
1053
func (c *AccountsCustomchannelsListCall) PageToken(pageToken string) *AccountsCustomchannelsListCall {
1054
c.opt_["pageToken"] = pageToken
1058
// Fields allows partial responses to be retrieved.
1059
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1060
// for more information.
1061
func (c *AccountsCustomchannelsListCall) Fields(s ...googleapi.Field) *AccountsCustomchannelsListCall {
1062
c.opt_["fields"] = googleapi.CombineFields(s)
1066
func (c *AccountsCustomchannelsListCall) Do() (*CustomChannels, error) {
1067
var body io.Reader = nil
1068
params := make(url.Values)
1069
params.Set("alt", "json")
1070
if v, ok := c.opt_["maxResults"]; ok {
1071
params.Set("maxResults", fmt.Sprintf("%v", v))
1073
if v, ok := c.opt_["pageToken"]; ok {
1074
params.Set("pageToken", fmt.Sprintf("%v", v))
1076
if v, ok := c.opt_["fields"]; ok {
1077
params.Set("fields", fmt.Sprintf("%v", v))
1079
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/customchannels")
1080
urls += "?" + params.Encode()
1081
req, _ := http.NewRequest("GET", urls, body)
1082
googleapi.Expand(req.URL, map[string]string{
1083
"accountId": c.accountId,
1084
"adClientId": c.adClientId,
1086
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1087
res, err := c.s.client.Do(req)
1091
defer googleapi.CloseBody(res)
1092
if err := googleapi.CheckResponse(res); err != nil {
1095
var ret *CustomChannels
1096
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1101
// "description": "List all custom channels in the specified ad client for this Ad Exchange account.",
1102
// "httpMethod": "GET",
1103
// "id": "adexchangeseller.accounts.customchannels.list",
1104
// "parameterOrder": [
1110
// "description": "Account to which the ad client belongs.",
1111
// "location": "path",
1112
// "required": true,
1116
// "description": "Ad client for which to list custom channels.",
1117
// "location": "path",
1118
// "required": true,
1122
// "description": "The maximum number of custom channels to include in the response, used for paging.",
1123
// "format": "uint32",
1124
// "location": "query",
1125
// "maximum": "10000",
1127
// "type": "integer"
1130
// "description": "A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
1131
// "location": "query",
1135
// "path": "accounts/{accountId}/adclients/{adClientId}/customchannels",
1137
// "$ref": "CustomChannels"
1140
// "https://www.googleapis.com/auth/adexchange.seller",
1141
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1147
// method id "adexchangeseller.accounts.metadata.dimensions.list":
1149
type AccountsMetadataDimensionsListCall struct {
1152
opt_ map[string]interface{}
1155
// List: List the metadata for the dimensions available to this
1156
// AdExchange account.
1157
func (r *AccountsMetadataDimensionsService) List(accountId string) *AccountsMetadataDimensionsListCall {
1158
c := &AccountsMetadataDimensionsListCall{s: r.s, opt_: make(map[string]interface{})}
1159
c.accountId = accountId
1163
// Fields allows partial responses to be retrieved.
1164
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1165
// for more information.
1166
func (c *AccountsMetadataDimensionsListCall) Fields(s ...googleapi.Field) *AccountsMetadataDimensionsListCall {
1167
c.opt_["fields"] = googleapi.CombineFields(s)
1171
func (c *AccountsMetadataDimensionsListCall) Do() (*Metadata, error) {
1172
var body io.Reader = nil
1173
params := make(url.Values)
1174
params.Set("alt", "json")
1175
if v, ok := c.opt_["fields"]; ok {
1176
params.Set("fields", fmt.Sprintf("%v", v))
1178
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/metadata/dimensions")
1179
urls += "?" + params.Encode()
1180
req, _ := http.NewRequest("GET", urls, body)
1181
googleapi.Expand(req.URL, map[string]string{
1182
"accountId": c.accountId,
1184
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1185
res, err := c.s.client.Do(req)
1189
defer googleapi.CloseBody(res)
1190
if err := googleapi.CheckResponse(res); err != nil {
1194
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1199
// "description": "List the metadata for the dimensions available to this AdExchange account.",
1200
// "httpMethod": "GET",
1201
// "id": "adexchangeseller.accounts.metadata.dimensions.list",
1202
// "parameterOrder": [
1207
// "description": "Account with visibility to the dimensions.",
1208
// "location": "path",
1209
// "required": true,
1213
// "path": "accounts/{accountId}/metadata/dimensions",
1215
// "$ref": "Metadata"
1218
// "https://www.googleapis.com/auth/adexchange.seller",
1219
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1225
// method id "adexchangeseller.accounts.metadata.metrics.list":
1227
type AccountsMetadataMetricsListCall struct {
1230
opt_ map[string]interface{}
1233
// List: List the metadata for the metrics available to this AdExchange
1235
func (r *AccountsMetadataMetricsService) List(accountId string) *AccountsMetadataMetricsListCall {
1236
c := &AccountsMetadataMetricsListCall{s: r.s, opt_: make(map[string]interface{})}
1237
c.accountId = accountId
1241
// Fields allows partial responses to be retrieved.
1242
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1243
// for more information.
1244
func (c *AccountsMetadataMetricsListCall) Fields(s ...googleapi.Field) *AccountsMetadataMetricsListCall {
1245
c.opt_["fields"] = googleapi.CombineFields(s)
1249
func (c *AccountsMetadataMetricsListCall) Do() (*Metadata, error) {
1250
var body io.Reader = nil
1251
params := make(url.Values)
1252
params.Set("alt", "json")
1253
if v, ok := c.opt_["fields"]; ok {
1254
params.Set("fields", fmt.Sprintf("%v", v))
1256
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/metadata/metrics")
1257
urls += "?" + params.Encode()
1258
req, _ := http.NewRequest("GET", urls, body)
1259
googleapi.Expand(req.URL, map[string]string{
1260
"accountId": c.accountId,
1262
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1263
res, err := c.s.client.Do(req)
1267
defer googleapi.CloseBody(res)
1268
if err := googleapi.CheckResponse(res); err != nil {
1272
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1277
// "description": "List the metadata for the metrics available to this AdExchange account.",
1278
// "httpMethod": "GET",
1279
// "id": "adexchangeseller.accounts.metadata.metrics.list",
1280
// "parameterOrder": [
1285
// "description": "Account with visibility to the metrics.",
1286
// "location": "path",
1287
// "required": true,
1291
// "path": "accounts/{accountId}/metadata/metrics",
1293
// "$ref": "Metadata"
1296
// "https://www.googleapis.com/auth/adexchange.seller",
1297
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1303
// method id "adexchangeseller.accounts.preferreddeals.get":
1305
type AccountsPreferreddealsGetCall struct {
1309
opt_ map[string]interface{}
1312
// Get: Get information about the selected Ad Exchange Preferred Deal.
1313
func (r *AccountsPreferreddealsService) Get(accountId string, dealId string) *AccountsPreferreddealsGetCall {
1314
c := &AccountsPreferreddealsGetCall{s: r.s, opt_: make(map[string]interface{})}
1315
c.accountId = accountId
1320
// Fields allows partial responses to be retrieved.
1321
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1322
// for more information.
1323
func (c *AccountsPreferreddealsGetCall) Fields(s ...googleapi.Field) *AccountsPreferreddealsGetCall {
1324
c.opt_["fields"] = googleapi.CombineFields(s)
1328
func (c *AccountsPreferreddealsGetCall) Do() (*PreferredDeal, error) {
1329
var body io.Reader = nil
1330
params := make(url.Values)
1331
params.Set("alt", "json")
1332
if v, ok := c.opt_["fields"]; ok {
1333
params.Set("fields", fmt.Sprintf("%v", v))
1335
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/preferreddeals/{dealId}")
1336
urls += "?" + params.Encode()
1337
req, _ := http.NewRequest("GET", urls, body)
1338
googleapi.Expand(req.URL, map[string]string{
1339
"accountId": c.accountId,
1342
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1343
res, err := c.s.client.Do(req)
1347
defer googleapi.CloseBody(res)
1348
if err := googleapi.CheckResponse(res); err != nil {
1351
var ret *PreferredDeal
1352
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1357
// "description": "Get information about the selected Ad Exchange Preferred Deal.",
1358
// "httpMethod": "GET",
1359
// "id": "adexchangeseller.accounts.preferreddeals.get",
1360
// "parameterOrder": [
1366
// "description": "Account owning the deal.",
1367
// "location": "path",
1368
// "required": true,
1372
// "description": "Preferred deal to get information about.",
1373
// "location": "path",
1374
// "required": true,
1378
// "path": "accounts/{accountId}/preferreddeals/{dealId}",
1380
// "$ref": "PreferredDeal"
1383
// "https://www.googleapis.com/auth/adexchange.seller",
1384
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1390
// method id "adexchangeseller.accounts.preferreddeals.list":
1392
type AccountsPreferreddealsListCall struct {
1395
opt_ map[string]interface{}
1398
// List: List the preferred deals for this Ad Exchange account.
1399
func (r *AccountsPreferreddealsService) List(accountId string) *AccountsPreferreddealsListCall {
1400
c := &AccountsPreferreddealsListCall{s: r.s, opt_: make(map[string]interface{})}
1401
c.accountId = accountId
1405
// Fields allows partial responses to be retrieved.
1406
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1407
// for more information.
1408
func (c *AccountsPreferreddealsListCall) Fields(s ...googleapi.Field) *AccountsPreferreddealsListCall {
1409
c.opt_["fields"] = googleapi.CombineFields(s)
1413
func (c *AccountsPreferreddealsListCall) Do() (*PreferredDeals, error) {
1414
var body io.Reader = nil
1415
params := make(url.Values)
1416
params.Set("alt", "json")
1417
if v, ok := c.opt_["fields"]; ok {
1418
params.Set("fields", fmt.Sprintf("%v", v))
1420
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/preferreddeals")
1421
urls += "?" + params.Encode()
1422
req, _ := http.NewRequest("GET", urls, body)
1423
googleapi.Expand(req.URL, map[string]string{
1424
"accountId": c.accountId,
1426
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1427
res, err := c.s.client.Do(req)
1431
defer googleapi.CloseBody(res)
1432
if err := googleapi.CheckResponse(res); err != nil {
1435
var ret *PreferredDeals
1436
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1441
// "description": "List the preferred deals for this Ad Exchange account.",
1442
// "httpMethod": "GET",
1443
// "id": "adexchangeseller.accounts.preferreddeals.list",
1444
// "parameterOrder": [
1449
// "description": "Account owning the deals.",
1450
// "location": "path",
1451
// "required": true,
1455
// "path": "accounts/{accountId}/preferreddeals",
1457
// "$ref": "PreferredDeals"
1460
// "https://www.googleapis.com/auth/adexchange.seller",
1461
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1467
// method id "adexchangeseller.accounts.reports.generate":
1469
type AccountsReportsGenerateCall struct {
1474
opt_ map[string]interface{}
1477
// Generate: Generate an Ad Exchange report based on the report request
1478
// sent in the query parameters. Returns the result as JSON; to retrieve
1479
// output in CSV format specify "alt=csv" as a query parameter.
1480
func (r *AccountsReportsService) Generate(accountId string, startDate string, endDate string) *AccountsReportsGenerateCall {
1481
c := &AccountsReportsGenerateCall{s: r.s, opt_: make(map[string]interface{})}
1482
c.accountId = accountId
1483
c.startDate = startDate
1488
// Dimension sets the optional parameter "dimension": Dimensions to base
1490
func (c *AccountsReportsGenerateCall) Dimension(dimension string) *AccountsReportsGenerateCall {
1491
c.opt_["dimension"] = dimension
1495
// Filter sets the optional parameter "filter": Filters to be run on the
1497
func (c *AccountsReportsGenerateCall) Filter(filter string) *AccountsReportsGenerateCall {
1498
c.opt_["filter"] = filter
1502
// Locale sets the optional parameter "locale": Optional locale to use
1503
// for translating report output to a local language. Defaults to
1504
// "en_US" if not specified.
1505
func (c *AccountsReportsGenerateCall) Locale(locale string) *AccountsReportsGenerateCall {
1506
c.opt_["locale"] = locale
1510
// MaxResults sets the optional parameter "maxResults": The maximum
1511
// number of rows of report data to return.
1512
func (c *AccountsReportsGenerateCall) MaxResults(maxResults int64) *AccountsReportsGenerateCall {
1513
c.opt_["maxResults"] = maxResults
1517
// Metric sets the optional parameter "metric": Numeric columns to
1518
// include in the report.
1519
func (c *AccountsReportsGenerateCall) Metric(metric string) *AccountsReportsGenerateCall {
1520
c.opt_["metric"] = metric
1524
// Sort sets the optional parameter "sort": The name of a dimension or
1525
// metric to sort the resulting report on, optionally prefixed with "+"
1526
// to sort ascending or "-" to sort descending. If no prefix is
1527
// specified, the column is sorted ascending.
1528
func (c *AccountsReportsGenerateCall) Sort(sort string) *AccountsReportsGenerateCall {
1529
c.opt_["sort"] = sort
1533
// StartIndex sets the optional parameter "startIndex": Index of the
1534
// first row of report data to return.
1535
func (c *AccountsReportsGenerateCall) StartIndex(startIndex int64) *AccountsReportsGenerateCall {
1536
c.opt_["startIndex"] = startIndex
1540
// Fields allows partial responses to be retrieved.
1541
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1542
// for more information.
1543
func (c *AccountsReportsGenerateCall) Fields(s ...googleapi.Field) *AccountsReportsGenerateCall {
1544
c.opt_["fields"] = googleapi.CombineFields(s)
1548
func (c *AccountsReportsGenerateCall) Do() (*Report, error) {
1549
var body io.Reader = nil
1550
params := make(url.Values)
1551
params.Set("alt", "json")
1552
params.Set("endDate", fmt.Sprintf("%v", c.endDate))
1553
params.Set("startDate", fmt.Sprintf("%v", c.startDate))
1554
if v, ok := c.opt_["dimension"]; ok {
1555
params.Set("dimension", fmt.Sprintf("%v", v))
1557
if v, ok := c.opt_["filter"]; ok {
1558
params.Set("filter", fmt.Sprintf("%v", v))
1560
if v, ok := c.opt_["locale"]; ok {
1561
params.Set("locale", fmt.Sprintf("%v", v))
1563
if v, ok := c.opt_["maxResults"]; ok {
1564
params.Set("maxResults", fmt.Sprintf("%v", v))
1566
if v, ok := c.opt_["metric"]; ok {
1567
params.Set("metric", fmt.Sprintf("%v", v))
1569
if v, ok := c.opt_["sort"]; ok {
1570
params.Set("sort", fmt.Sprintf("%v", v))
1572
if v, ok := c.opt_["startIndex"]; ok {
1573
params.Set("startIndex", fmt.Sprintf("%v", v))
1575
if v, ok := c.opt_["fields"]; ok {
1576
params.Set("fields", fmt.Sprintf("%v", v))
1578
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports")
1579
urls += "?" + params.Encode()
1580
req, _ := http.NewRequest("GET", urls, body)
1581
googleapi.Expand(req.URL, map[string]string{
1582
"accountId": c.accountId,
1584
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1585
res, err := c.s.client.Do(req)
1589
defer googleapi.CloseBody(res)
1590
if err := googleapi.CheckResponse(res); err != nil {
1594
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1599
// "description": "Generate an Ad Exchange report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify \"alt=csv\" as a query parameter.",
1600
// "httpMethod": "GET",
1601
// "id": "adexchangeseller.accounts.reports.generate",
1602
// "parameterOrder": [
1609
// "description": "Account which owns the generated report.",
1610
// "location": "path",
1611
// "required": true,
1615
// "description": "Dimensions to base the report on.",
1616
// "location": "query",
1617
// "pattern": "[a-zA-Z_]+",
1618
// "repeated": true,
1622
// "description": "End of the date range to report on in \"YYYY-MM-DD\" format, inclusive.",
1623
// "location": "query",
1624
// "pattern": "\\d{4}-\\d{2}-\\d{2}|(today|startOfMonth|startOfYear)(([\\-\\+]\\d+[dwmy]){0,3}?)",
1625
// "required": true,
1629
// "description": "Filters to be run on the report.",
1630
// "location": "query",
1631
// "pattern": "[a-zA-Z_]+(==|=@).+",
1632
// "repeated": true,
1636
// "description": "Optional locale to use for translating report output to a local language. Defaults to \"en_US\" if not specified.",
1637
// "location": "query",
1638
// "pattern": "[a-zA-Z_]+",
1642
// "description": "The maximum number of rows of report data to return.",
1643
// "format": "uint32",
1644
// "location": "query",
1645
// "maximum": "50000",
1647
// "type": "integer"
1650
// "description": "Numeric columns to include in the report.",
1651
// "location": "query",
1652
// "pattern": "[a-zA-Z_]+",
1653
// "repeated": true,
1657
// "description": "The name of a dimension or metric to sort the resulting report on, optionally prefixed with \"+\" to sort ascending or \"-\" to sort descending. If no prefix is specified, the column is sorted ascending.",
1658
// "location": "query",
1659
// "pattern": "(\\+|-)?[a-zA-Z_]+",
1660
// "repeated": true,
1664
// "description": "Start of the date range to report on in \"YYYY-MM-DD\" format, inclusive.",
1665
// "location": "query",
1666
// "pattern": "\\d{4}-\\d{2}-\\d{2}|(today|startOfMonth|startOfYear)(([\\-\\+]\\d+[dwmy]){0,3}?)",
1667
// "required": true,
1671
// "description": "Index of the first row of report data to return.",
1672
// "format": "uint32",
1673
// "location": "query",
1674
// "maximum": "5000",
1676
// "type": "integer"
1679
// "path": "accounts/{accountId}/reports",
1684
// "https://www.googleapis.com/auth/adexchange.seller",
1685
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1687
// "supportsMediaDownload": true
1692
// method id "adexchangeseller.accounts.reports.saved.generate":
1694
type AccountsReportsSavedGenerateCall struct {
1697
savedReportId string
1698
opt_ map[string]interface{}
1701
// Generate: Generate an Ad Exchange report based on the saved report ID
1702
// sent in the query parameters.
1703
func (r *AccountsReportsSavedService) Generate(accountId string, savedReportId string) *AccountsReportsSavedGenerateCall {
1704
c := &AccountsReportsSavedGenerateCall{s: r.s, opt_: make(map[string]interface{})}
1705
c.accountId = accountId
1706
c.savedReportId = savedReportId
1710
// Locale sets the optional parameter "locale": Optional locale to use
1711
// for translating report output to a local language. Defaults to
1712
// "en_US" if not specified.
1713
func (c *AccountsReportsSavedGenerateCall) Locale(locale string) *AccountsReportsSavedGenerateCall {
1714
c.opt_["locale"] = locale
1718
// MaxResults sets the optional parameter "maxResults": The maximum
1719
// number of rows of report data to return.
1720
func (c *AccountsReportsSavedGenerateCall) MaxResults(maxResults int64) *AccountsReportsSavedGenerateCall {
1721
c.opt_["maxResults"] = maxResults
1725
// StartIndex sets the optional parameter "startIndex": Index of the
1726
// first row of report data to return.
1727
func (c *AccountsReportsSavedGenerateCall) StartIndex(startIndex int64) *AccountsReportsSavedGenerateCall {
1728
c.opt_["startIndex"] = startIndex
1732
// Fields allows partial responses to be retrieved.
1733
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1734
// for more information.
1735
func (c *AccountsReportsSavedGenerateCall) Fields(s ...googleapi.Field) *AccountsReportsSavedGenerateCall {
1736
c.opt_["fields"] = googleapi.CombineFields(s)
1740
func (c *AccountsReportsSavedGenerateCall) Do() (*Report, error) {
1741
var body io.Reader = nil
1742
params := make(url.Values)
1743
params.Set("alt", "json")
1744
if v, ok := c.opt_["locale"]; ok {
1745
params.Set("locale", fmt.Sprintf("%v", v))
1747
if v, ok := c.opt_["maxResults"]; ok {
1748
params.Set("maxResults", fmt.Sprintf("%v", v))
1750
if v, ok := c.opt_["startIndex"]; ok {
1751
params.Set("startIndex", fmt.Sprintf("%v", v))
1753
if v, ok := c.opt_["fields"]; ok {
1754
params.Set("fields", fmt.Sprintf("%v", v))
1756
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports/{savedReportId}")
1757
urls += "?" + params.Encode()
1758
req, _ := http.NewRequest("GET", urls, body)
1759
googleapi.Expand(req.URL, map[string]string{
1760
"accountId": c.accountId,
1761
"savedReportId": c.savedReportId,
1763
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1764
res, err := c.s.client.Do(req)
1768
defer googleapi.CloseBody(res)
1769
if err := googleapi.CheckResponse(res); err != nil {
1773
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1778
// "description": "Generate an Ad Exchange report based on the saved report ID sent in the query parameters.",
1779
// "httpMethod": "GET",
1780
// "id": "adexchangeseller.accounts.reports.saved.generate",
1781
// "parameterOrder": [
1787
// "description": "Account owning the saved report.",
1788
// "location": "path",
1789
// "required": true,
1793
// "description": "Optional locale to use for translating report output to a local language. Defaults to \"en_US\" if not specified.",
1794
// "location": "query",
1795
// "pattern": "[a-zA-Z_]+",
1799
// "description": "The maximum number of rows of report data to return.",
1800
// "format": "int32",
1801
// "location": "query",
1802
// "maximum": "50000",
1804
// "type": "integer"
1806
// "savedReportId": {
1807
// "description": "The saved report to retrieve.",
1808
// "location": "path",
1809
// "required": true,
1813
// "description": "Index of the first row of report data to return.",
1814
// "format": "int32",
1815
// "location": "query",
1816
// "maximum": "5000",
1818
// "type": "integer"
1821
// "path": "accounts/{accountId}/reports/{savedReportId}",
1826
// "https://www.googleapis.com/auth/adexchange.seller",
1827
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1833
// method id "adexchangeseller.accounts.reports.saved.list":
1835
type AccountsReportsSavedListCall struct {
1838
opt_ map[string]interface{}
1841
// List: List all saved reports in this Ad Exchange account.
1842
func (r *AccountsReportsSavedService) List(accountId string) *AccountsReportsSavedListCall {
1843
c := &AccountsReportsSavedListCall{s: r.s, opt_: make(map[string]interface{})}
1844
c.accountId = accountId
1848
// MaxResults sets the optional parameter "maxResults": The maximum
1849
// number of saved reports to include in the response, used for paging.
1850
func (c *AccountsReportsSavedListCall) MaxResults(maxResults int64) *AccountsReportsSavedListCall {
1851
c.opt_["maxResults"] = maxResults
1855
// PageToken sets the optional parameter "pageToken": A continuation
1856
// token, used to page through saved reports. To retrieve the next page,
1857
// set this parameter to the value of "nextPageToken" from the previous
1859
func (c *AccountsReportsSavedListCall) PageToken(pageToken string) *AccountsReportsSavedListCall {
1860
c.opt_["pageToken"] = pageToken
1864
// Fields allows partial responses to be retrieved.
1865
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1866
// for more information.
1867
func (c *AccountsReportsSavedListCall) Fields(s ...googleapi.Field) *AccountsReportsSavedListCall {
1868
c.opt_["fields"] = googleapi.CombineFields(s)
1872
func (c *AccountsReportsSavedListCall) Do() (*SavedReports, error) {
1873
var body io.Reader = nil
1874
params := make(url.Values)
1875
params.Set("alt", "json")
1876
if v, ok := c.opt_["maxResults"]; ok {
1877
params.Set("maxResults", fmt.Sprintf("%v", v))
1879
if v, ok := c.opt_["pageToken"]; ok {
1880
params.Set("pageToken", fmt.Sprintf("%v", v))
1882
if v, ok := c.opt_["fields"]; ok {
1883
params.Set("fields", fmt.Sprintf("%v", v))
1885
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports/saved")
1886
urls += "?" + params.Encode()
1887
req, _ := http.NewRequest("GET", urls, body)
1888
googleapi.Expand(req.URL, map[string]string{
1889
"accountId": c.accountId,
1891
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1892
res, err := c.s.client.Do(req)
1896
defer googleapi.CloseBody(res)
1897
if err := googleapi.CheckResponse(res); err != nil {
1900
var ret *SavedReports
1901
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1906
// "description": "List all saved reports in this Ad Exchange account.",
1907
// "httpMethod": "GET",
1908
// "id": "adexchangeseller.accounts.reports.saved.list",
1909
// "parameterOrder": [
1914
// "description": "Account owning the saved reports.",
1915
// "location": "path",
1916
// "required": true,
1920
// "description": "The maximum number of saved reports to include in the response, used for paging.",
1921
// "format": "int32",
1922
// "location": "query",
1923
// "maximum": "100",
1925
// "type": "integer"
1928
// "description": "A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
1929
// "location": "query",
1933
// "path": "accounts/{accountId}/reports/saved",
1935
// "$ref": "SavedReports"
1938
// "https://www.googleapis.com/auth/adexchange.seller",
1939
// "https://www.googleapis.com/auth/adexchange.seller.readonly"
1945
// method id "adexchangeseller.accounts.urlchannels.list":
1947
type AccountsUrlchannelsListCall struct {
1951
opt_ map[string]interface{}
1954
// List: List all URL channels in the specified ad client for this Ad
1955
// Exchange account.
1956
func (r *AccountsUrlchannelsService) List(accountId string, adClientId string) *AccountsUrlchannelsListCall {
1957
c := &AccountsUrlchannelsListCall{s: r.s, opt_: make(map[string]interface{})}
1958
c.accountId = accountId
1959
c.adClientId = adClientId
1963
// MaxResults sets the optional parameter "maxResults": The maximum
1964
// number of URL channels to include in the response, used for paging.
1965
func (c *AccountsUrlchannelsListCall) MaxResults(maxResults int64) *AccountsUrlchannelsListCall {
1966
c.opt_["maxResults"] = maxResults
1970
// PageToken sets the optional parameter "pageToken": A continuation
1971
// token, used to page through URL channels. To retrieve the next page,
1972
// set this parameter to the value of "nextPageToken" from the previous
1974
func (c *AccountsUrlchannelsListCall) PageToken(pageToken string) *AccountsUrlchannelsListCall {
1975
c.opt_["pageToken"] = pageToken
1979
// Fields allows partial responses to be retrieved.
1980
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1981
// for more information.
1982
func (c *AccountsUrlchannelsListCall) Fields(s ...googleapi.Field) *AccountsUrlchannelsListCall {
1983
c.opt_["fields"] = googleapi.CombineFields(s)
1987
func (c *AccountsUrlchannelsListCall) Do() (*UrlChannels, error) {
1988
var body io.Reader = nil
1989
params := make(url.Values)
1990
params.Set("alt", "json")
1991
if v, ok := c.opt_["maxResults"]; ok {
1992
params.Set("maxResults", fmt.Sprintf("%v", v))
1994
if v, ok := c.opt_["pageToken"]; ok {
1995
params.Set("pageToken", fmt.Sprintf("%v", v))
1997
if v, ok := c.opt_["fields"]; ok {
1998
params.Set("fields", fmt.Sprintf("%v", v))
2000
urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/urlchannels")
2001
urls += "?" + params.Encode()
2002
req, _ := http.NewRequest("GET", urls, body)
2003
googleapi.Expand(req.URL, map[string]string{
2004
"accountId": c.accountId,
2005
"adClientId": c.adClientId,
2007
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2008
res, err := c.s.client.Do(req)
2012
defer googleapi.CloseBody(res)
2013
if err := googleapi.CheckResponse(res); err != nil {
2016
var ret *UrlChannels
2017
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2022
// "description": "List all URL channels in the specified ad client for this Ad Exchange account.",
2023
// "httpMethod": "GET",
2024
// "id": "adexchangeseller.accounts.urlchannels.list",
2025
// "parameterOrder": [
2031
// "description": "Account to which the ad client belongs.",
2032
// "location": "path",
2033
// "required": true,
2037
// "description": "Ad client for which to list URL channels.",
2038
// "location": "path",
2039
// "required": true,
2043
// "description": "The maximum number of URL channels to include in the response, used for paging.",
2044
// "format": "uint32",
2045
// "location": "query",
2046
// "maximum": "10000",
2048
// "type": "integer"
2051
// "description": "A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
2052
// "location": "query",
2056
// "path": "accounts/{accountId}/adclients/{adClientId}/urlchannels",
2058
// "$ref": "UrlChannels"
2061
// "https://www.googleapis.com/auth/adexchange.seller",
2062
// "https://www.googleapis.com/auth/adexchange.seller.readonly"