Skip to content

Commit

Permalink
all: new and updated APIs
Browse files Browse the repository at this point in the history
LGTM=gmlewis
R=gmlewis
CC=golang-codereviews
https://codereview.appspot.com/131890043
  • Loading branch information
bradfitz committed Aug 18, 2014
1 parent a8169d4 commit 84a9c9e
Show file tree
Hide file tree
Showing 104 changed files with 21,548 additions and 1,558 deletions.
5 changes: 3 additions & 2 deletions adexchangebuyer/v1.1/adexchangebuyer-api.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"kind": "discovery#restDescription",
"etag": "\"kEk3sFj6Ef5_yR1-H3bAO6qw9mI/sSrTRK5rT30gpj08DDODwXhxRak\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/_YnjZ9K0Y0VUDpIcxTyXmrce57E\"",
"discoveryVersion": "v1",
"id": "adexchangebuyer:v1.1",
"name": "adexchangebuyer",
"canonicalName": "Ad Exchange Buyer",
"version": "v1.1",
"revision": "20140812",
"title": "Ad Exchange Buyer API",
"description": "Lets you manage your Ad Exchange Buyer account.",
"description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
Expand Down
5 changes: 3 additions & 2 deletions adexchangebuyer/v1.2/adexchangebuyer-api.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"kind": "discovery#restDescription",
"etag": "\"C11OM5Qtr9122-scy_WeqND9D3o/LoRIMAKoKzC_3pYWoD_xTQpbqyo\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/AJO4ezPUJU7DJlps27fkVxvYLcI\"",
"discoveryVersion": "v1",
"id": "adexchangebuyer:v1.2",
"name": "adexchangebuyer",
"canonicalName": "Ad Exchange Buyer",
"version": "v1.2",
"revision": "20140812",
"title": "Ad Exchange Buyer API",
"description": "Lets you manage your Ad Exchange Buyer account.",
"description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
Expand Down
92 changes: 90 additions & 2 deletions adexchangebuyer/v1.3/adexchangebuyer-api.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"kind": "discovery#restDescription",
"etag": "\"C11OM5Qtr9122-scy_WeqND9D3o/IppDfK0CjXD9AYpQUEOpRxnDZzg\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/RGPcvGO92y6YyF8hUUCx0o8WiC0\"",
"discoveryVersion": "v1",
"id": "adexchangebuyer:v1.3",
"name": "adexchangebuyer",
"canonicalName": "Ad Exchange Buyer",
"version": "v1.3",
"revision": "20140812",
"title": "Ad Exchange Buyer API",
"description": "Lets you manage your Ad Exchange Buyer account.",
"description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
Expand Down Expand Up @@ -147,6 +148,53 @@
}
}
},
"BillingInfo": {
"id": "BillingInfo",
"type": "object",
"description": "The configuration data for an Ad Exchange billing info.",
"properties": {
"accountId": {
"type": "integer",
"description": "Account id.",
"format": "int32"
},
"accountName": {
"type": "string",
"description": "Account name."
},
"billingId": {
"type": "array",
"description": "Billing info id.",
"items": {
"type": "string"
}
},
"kind": {
"type": "string",
"description": "Resource type.",
"default": "adexchangebuyer#billingInfo"
}
}
},
"BillingInfoList": {
"id": "BillingInfoList",
"type": "object",
"description": "A billing info feed lists Billing Info the Ad Exchange buyer account has access to. Each entry in the feed corresponds to a single billing info.",
"properties": {
"items": {
"type": "array",
"description": "A list of billing info relevant for your account.",
"items": {
"$ref": "BillingInfo"
}
},
"kind": {
"type": "string",
"description": "Resource type.",
"default": "adexchangebuyer#billingInfoList"
}
}
},
"Creative": {
"id": "Creative",
"type": "object",
Expand Down Expand Up @@ -874,6 +922,46 @@
}
}
},
"billingInfo": {
"methods": {
"get": {
"id": "adexchangebuyer.billingInfo.get",
"path": "billinginfo/{accountId}",
"httpMethod": "GET",
"description": "Returns the billing information for one account specified by account ID.",
"parameters": {
"accountId": {
"type": "integer",
"description": "The account id.",
"required": true,
"format": "int32",
"location": "path"
}
},
"parameterOrder": [
"accountId"
],
"response": {
"$ref": "BillingInfo"
},
"scopes": [
"https://www.googleapis.com/auth/adexchange.buyer"
]
},
"list": {
"id": "adexchangebuyer.billingInfo.list",
"path": "billinginfo",
"httpMethod": "GET",
"description": "Retrieves a list of billing information for all accounts of the authenticated user.",
"response": {
"$ref": "BillingInfoList"
},
"scopes": [
"https://www.googleapis.com/auth/adexchange.buyer"
]
}
}
},
"creatives": {
"methods": {
"get": {
Expand Down
152 changes: 152 additions & 0 deletions adexchangebuyer/v1.3/adexchangebuyer-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func New(client *http.Client) (*Service, error) {
}
s := &Service{client: client, BasePath: basePath}
s.Accounts = NewAccountsService(s)
s.BillingInfo = NewBillingInfoService(s)
s.Creatives = NewCreativesService(s)
s.DirectDeals = NewDirectDealsService(s)
s.PerformanceReport = NewPerformanceReportService(s)
Expand All @@ -64,6 +65,8 @@ type Service struct {

Accounts *AccountsService

BillingInfo *BillingInfoService

Creatives *CreativesService

DirectDeals *DirectDealsService
Expand All @@ -82,6 +85,15 @@ type AccountsService struct {
s *Service
}

func NewBillingInfoService(s *Service) *BillingInfoService {
rs := &BillingInfoService{s: s}
return rs
}

type BillingInfoService struct {
s *Service
}

func NewCreativesService(s *Service) *CreativesService {
rs := &CreativesService{s: s}
return rs
Expand Down Expand Up @@ -168,6 +180,28 @@ type AccountsList struct {
Kind string `json:"kind,omitempty"`
}

type BillingInfo struct {
// AccountId: Account id.
AccountId int64 `json:"accountId,omitempty"`

// AccountName: Account name.
AccountName string `json:"accountName,omitempty"`

// BillingId: Billing info id.
BillingId []string `json:"billingId,omitempty"`

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

type BillingInfoList struct {
// Items: A list of billing info relevant for your account.
Items []*BillingInfo `json:"items,omitempty"`

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

type Creative struct {
// HTMLSnippet: The HTML snippet that displays the ad when inserted in
// the web page. If set, videoURL should not be set.
Expand Down Expand Up @@ -824,6 +858,124 @@ func (c *AccountsUpdateCall) Do() (*Account, error) {

}

// method id "adexchangebuyer.billingInfo.get":

type BillingInfoGetCall struct {
s *Service
accountId int64
opt_ map[string]interface{}
}

// Get: Returns the billing information for one account specified by
// account ID.
func (r *BillingInfoService) Get(accountId int64) *BillingInfoGetCall {
c := &BillingInfoGetCall{s: r.s, opt_: make(map[string]interface{})}
c.accountId = accountId
return c
}

func (c *BillingInfoGetCall) Do() (*BillingInfo, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}")
urls += "?" + params.Encode()
req, _ := http.NewRequest("GET", urls, body)
googleapi.Expand(req.URL, map[string]string{
"accountId": strconv.FormatInt(c.accountId, 10),
})
req.Header.Set("User-Agent", "google-api-go-client/0.5")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
var ret *BillingInfo
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Returns the billing information for one account specified by account ID.",
// "httpMethod": "GET",
// "id": "adexchangebuyer.billingInfo.get",
// "parameterOrder": [
// "accountId"
// ],
// "parameters": {
// "accountId": {
// "description": "The account id.",
// "format": "int32",
// "location": "path",
// "required": true,
// "type": "integer"
// }
// },
// "path": "billinginfo/{accountId}",
// "response": {
// "$ref": "BillingInfo"
// },
// "scopes": [
// "https://www.googleapis.com/auth/adexchange.buyer"
// ]
// }

}

// method id "adexchangebuyer.billingInfo.list":

type BillingInfoListCall struct {
s *Service
opt_ map[string]interface{}
}

// List: Retrieves a list of billing information for all accounts of the
// authenticated user.
func (r *BillingInfoService) List() *BillingInfoListCall {
c := &BillingInfoListCall{s: r.s, opt_: make(map[string]interface{})}
return c
}

func (c *BillingInfoListCall) Do() (*BillingInfoList, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo")
urls += "?" + params.Encode()
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", "google-api-go-client/0.5")
res, err := c.s.client.Do(req)
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
var ret *BillingInfoList
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Retrieves a list of billing information for all accounts of the authenticated user.",
// "httpMethod": "GET",
// "id": "adexchangebuyer.billingInfo.list",
// "path": "billinginfo",
// "response": {
// "$ref": "BillingInfoList"
// },
// "scopes": [
// "https://www.googleapis.com/auth/adexchange.buyer"
// ]
// }

}

// method id "adexchangebuyer.creatives.get":

type CreativesGetCall struct {
Expand Down
5 changes: 3 additions & 2 deletions adexchangebuyer/v1/adexchangebuyer-api.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"kind": "discovery#restDescription",
"etag": "\"kEk3sFj6Ef5_yR1-H3bAO6qw9mI/uBdBsKoCx2blJHBc5UBukt70JEU\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/i3M0e8Ed8AaqZfjhj-Y7kpaqBfc\"",
"discoveryVersion": "v1",
"id": "adexchangebuyer:v1",
"name": "adexchangebuyer",
"canonicalName": "Ad Exchange Buyer",
"version": "v1",
"revision": "20140812",
"title": "Ad Exchange Buyer API",
"description": "Lets you manage your Ad Exchange Buyer account.",
"description": "Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
Expand Down
3 changes: 2 additions & 1 deletion adexchangeseller/v1.1/adexchangeseller-api.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"kind": "discovery#restDescription",
"etag": "\"kEk3sFj6Ef5_yR1-H3bAO6qw9mI/o4lGc4skdE8M5fsjyXciyvLhoWk\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/izkNl2UwXYl431d7iNVN_c0mTdc\"",
"discoveryVersion": "v1",
"id": "adexchangeseller:v1.1",
"name": "adexchangeseller",
"canonicalName": "Ad Exchange Seller",
"version": "v1.1",
"revision": "20140818",
"title": "Ad Exchange Seller API",
"description": "Gives Ad Exchange seller users access to their inventory and the ability to generate reports",
"ownerDomain": "google.com",
Expand Down
3 changes: 2 additions & 1 deletion adexchangeseller/v1/adexchangeseller-api.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"kind": "discovery#restDescription",
"etag": "\"kEk3sFj6Ef5_yR1-H3bAO6qw9mI/k4EGd11ZUVmhrZoqHDxlI_JyIAo\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/3o5nbWgZ2ebmwb-6dwEZn6lTRRM\"",
"discoveryVersion": "v1",
"id": "adexchangeseller:v1",
"name": "adexchangeseller",
"canonicalName": "Ad Exchange Seller",
"version": "v1",
"revision": "20140818",
"title": "Ad Exchange Seller API",
"description": "Gives Ad Exchange seller users access to their inventory and the ability to generate reports",
"ownerDomain": "google.com",
Expand Down
3 changes: 2 additions & 1 deletion admin/email_migration_v2/admin-api.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"kind": "discovery#restDescription",
"etag": "\"kEk3sFj6Ef5_yR1-H3bAO6qw9mI/5IR4qYAEytuHObETjxcLeQt8rDQ\"",
"etag": "\"FrPV2U6xXFUq8eRv_PO3IoAURkc/sAW4O9TJFjBOU_nyFti74xIcDhI\"",
"discoveryVersion": "v1",
"id": "admin:email_migration_v2",
"name": "admin",
"version": "email_migration_v2",
"revision": "20140130",
"title": "Email Migration API v2",
"description": "Email Migration API lets you migrate emails of users to Google backends.",
"ownerDomain": "google.com",
Expand Down
Loading

0 comments on commit 84a9c9e

Please sign in to comment.