Skip to content

Commit

Permalink
google-api-go-client: update all APIs.
Browse files Browse the repository at this point in the history
This fixes issue googleapis#94.

Change-Id: Ib9129331170389eb71881077cc32f25535039fdb
Reviewed-on: https://code-review.googlesource.com/3310
Reviewed-by: Michael McGreevy <[email protected]>
  • Loading branch information
gmlewis committed Aug 20, 2015
1 parent 0bacdc6 commit a5c3e2a
Show file tree
Hide file tree
Showing 165 changed files with 83,876 additions and 13,175 deletions.
70 changes: 49 additions & 21 deletions adexchangebuyer/v1.2/adexchangebuyer-gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
return c
}

func (c *AccountsGetCall) Do() (*Account, error) {
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -327,7 +327,11 @@ func (c *AccountsGetCall) Do() (*Account, error) {
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *AccountsGetCall) Do() (*Account, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -388,10 +392,10 @@ func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
return c
}

func (c *AccountsListCall) Do() (*AccountsList, error) {
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -400,7 +404,11 @@ func (c *AccountsListCall) Do() (*AccountsList, error) {
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *AccountsListCall) Do() (*AccountsList, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -454,15 +462,15 @@ func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
return c
}

func (c *AccountsPatchCall) Do() (*Account, error) {
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
if err != nil {
return nil, err
}
ctype := "application/json"
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -474,7 +482,11 @@ func (c *AccountsPatchCall) Do() (*Account, error) {
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *AccountsPatchCall) Do() (*Account, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -542,15 +554,15 @@ func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
return c
}

func (c *AccountsUpdateCall) Do() (*Account, error) {
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
if err != nil {
return nil, err
}
ctype := "application/json"
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -562,7 +574,11 @@ func (c *AccountsUpdateCall) Do() (*Account, error) {
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *AccountsUpdateCall) Do() (*Account, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -631,10 +647,10 @@ func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
return c
}

func (c *CreativesGetCall) Do() (*Creative, error) {
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -646,7 +662,11 @@ func (c *CreativesGetCall) Do() (*Creative, error) {
"buyerCreativeId": c.buyerCreativeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *CreativesGetCall) Do() (*Creative, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -716,15 +736,15 @@ func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall
return c
}

func (c *CreativesInsertCall) Do() (*Creative, error) {
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
if err != nil {
return nil, err
}
ctype := "application/json"
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["fields"]; ok {
params.Set("fields", fmt.Sprintf("%v", v))
}
Expand All @@ -734,7 +754,11 @@ func (c *CreativesInsertCall) Do() (*Creative, error) {
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *CreativesInsertCall) Do() (*Creative, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -816,10 +840,10 @@ func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
return c
}

func (c *CreativesListCall) Do() (*CreativesList, error) {
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
params.Set("alt", "json")
params.Set("alt", alt)
if v, ok := c.opt_["maxResults"]; ok {
params.Set("maxResults", fmt.Sprintf("%v", v))
}
Expand All @@ -837,7 +861,11 @@ func (c *CreativesListCall) Do() (*CreativesList, error) {
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
res, err := c.s.client.Do(req)
return c.s.client.Do(req)
}

func (c *CreativesListCall) Do() (*CreativesList, error) {
res, err := c.doRequest("json")
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit a5c3e2a

Please sign in to comment.