func (c *CreativesListCall) Do() (*CreativesList, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["maxResults"]; ok { params.Set("maxResults", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "creatives") 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 *CreativesList if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieves a list of the authenticated user's active creatives.", // "httpMethod": "GET", // "id": "adexchangebuyer.creatives.list", // "parameters": { // "maxResults": { // "description": "Maximum number of entries returned on one result page. If not set, the default is 100. Optional.", // "format": "uint32", // "location": "query", // "maximum": "1000", // "minimum": "1", // "type": "integer" // }, // "pageToken": { // "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. Optional.", // "location": "query", // "type": "string" // } // }, // "path": "creatives", // "response": { // "$ref": "CreativesList" // }, // "scopes": [ // "https://www.googleapis.com/auth/adexchange.buyer" // ] // } }
func (c *QueriesListqueriesCall) Do() (*ListQueriesResponse, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "queries") 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 } ret := new(ListQueriesResponse) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieves stored queries.", // "httpMethod": "GET", // "id": "doubleclickbidmanager.queries.listqueries", // "path": "queries", // "response": { // "$ref": "ListQueriesResponse" // } // } }
func (c *RelyingpartyGetPublicKeysCall) Do() (map[string]string, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "publicKeys") 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 map[string]string if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Get token signing public key.", // "httpMethod": "GET", // "id": "identitytoolkit.relyingparty.getPublicKeys", // "path": "publicKeys", // "response": { // "$ref": "IdentitytoolkitRelyingpartyGetPublicKeysResponse" // } // } }
func (c *CurrentLocationDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative("https://www.googleapis.com/latitude/v1/", "currentLocation") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", 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 err } defer res.Body.Close() if err := googleapi.CheckResponse(res); err != nil { return err } return nil // { // "description": "Deletes the authenticated user's current location.", // "httpMethod": "DELETE", // "id": "latitude.currentLocation.delete", // "path": "currentLocation", // "scopes": [ // "https://www.googleapis.com/auth/latitude.all.best", // "https://www.googleapis.com/auth/latitude.all.city", // "https://www.googleapis.com/auth/latitude.current.best", // "https://www.googleapis.com/auth/latitude.current.city" // ] // } }
func (c *BatchReportsListCall) Do() (*BatchReportList, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") params.Set("batchReportDefinitionId", fmt.Sprintf("%v", c.batchReportDefinitionId)) params.Set("onBehalfOfContentOwner", fmt.Sprintf("%v", c.onBehalfOfContentOwner)) if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "batchReports") 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 *BatchReportList if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieves a list of processed batch reports.", // "httpMethod": "GET", // "id": "youtubeAnalytics.batchReports.list", // "parameterOrder": [ // "batchReportDefinitionId", // "onBehalfOfContentOwner" // ], // "parameters": { // "batchReportDefinitionId": { // "description": "The batchReportDefinitionId parameter specifies the ID of the batch reportort definition for which you are retrieving reports.", // "location": "query", // "required": true, // "type": "string" // }, // "onBehalfOfContentOwner": { // "description": "The onBehalfOfContentOwner parameter identifies the content owner that the user is acting on behalf of.", // "location": "query", // "required": true, // "type": "string" // } // }, // "path": "batchReports", // "response": { // "$ref": "BatchReportList" // }, // "scopes": [ // "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", // "https://www.googleapis.com/auth/yt-analytics.readonly" // ] // } }
func (c *WebfontsListCall) Do() (*WebfontList, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["sort"]; ok { params.Set("sort", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "webfonts") 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 *WebfontList if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieves the list of fonts currently served by the Google Fonts Developer API", // "httpMethod": "GET", // "id": "webfonts.webfonts.list", // "parameters": { // "sort": { // "description": "Enables sorting of the list", // "enum": [ // "alpha", // "date", // "popularity", // "style", // "trending" // ], // "enumDescriptions": [ // "Sort alphabetically", // "Sort by date added", // "Sort by popularity", // "Sort by number of styles", // "Sort by trending" // ], // "location": "query", // "type": "string" // } // }, // "path": "webfonts", // "response": { // "$ref": "WebfontList" // } // } }
func (c *ElectionsElectionQueryCall) Do() (*ElectionsQueryResponse, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "elections") 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 } ret := new(ElectionsQueryResponse) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "List of available elections to query.", // "httpMethod": "GET", // "id": "civicinfo.elections.electionQuery", // "path": "elections", // "response": { // "$ref": "ElectionsQueryResponse" // } // } }
func (c *TrainedmodelsInsertCall) Do() (*Insert2, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.insert) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/trainedmodels") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{project}", url.QueryEscape(c.project), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 *Insert2 if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Train a Prediction API model.", // "httpMethod": "POST", // "id": "prediction.trainedmodels.insert", // "parameterOrder": [ // "project" // ], // "parameters": { // "project": { // "description": "The project associated with the model.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{project}/trainedmodels", // "request": { // "$ref": "Insert" // }, // "response": { // "$ref": "Insert2" // }, // "scopes": [ // "https://www.googleapis.com/auth/devstorage.full_control", // "https://www.googleapis.com/auth/devstorage.read_only", // "https://www.googleapis.com/auth/devstorage.read_write", // "https://www.googleapis.com/auth/prediction" // ] // } }
func (c *RoomsResetCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "rooms/reset") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", 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 err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { return err } return nil // { // "description": "Reset all rooms for the currently authenticated player for your application. This method is only accessible to whitelisted tester accounts for your application.", // "httpMethod": "POST", // "id": "gamesManagement.rooms.reset", // "path": "rooms/reset", // "scopes": [ // "https://www.googleapis.com/auth/games", // "https://www.googleapis.com/auth/plus.login" // ] // } }
func (c *TasklistsListCall) Do() (*TaskLists, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["maxResults"]; ok { params.Set("maxResults", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "users/@me/lists") 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 *TaskLists if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Returns all the authenticated user's task lists.", // "httpMethod": "GET", // "id": "tasks.tasklists.list", // "parameters": { // "maxResults": { // "description": "Maximum number of task lists returned on one page. Optional. The default is 100.", // "format": "int64", // "location": "query", // "type": "string" // }, // "pageToken": { // "description": "Token specifying the result page to return. Optional.", // "location": "query", // "type": "string" // } // }, // "path": "users/@me/lists", // "response": { // "$ref": "TaskLists" // }, // "scopes": [ // "https://www.googleapis.com/auth/tasks", // "https://www.googleapis.com/auth/tasks.readonly" // ] // } }
func (c *TrainedmodelsListCall) Do() (*List, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["maxResults"]; ok { params.Set("maxResults", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "trainedmodels/list") 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 *List if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "List available models.", // "httpMethod": "GET", // "id": "prediction.trainedmodels.list", // "parameters": { // "maxResults": { // "description": "Maximum number of results to return", // "format": "uint32", // "location": "query", // "minimum": "0", // "type": "integer" // }, // "pageToken": { // "description": "Pagination token", // "location": "query", // "type": "string" // } // }, // "path": "trainedmodels/list", // "response": { // "$ref": "List" // }, // "scopes": [ // "https://www.googleapis.com/auth/prediction" // ] // } }
func (c *StatesClearCall) Do() (*WriteResult, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["currentDataVersion"]; ok { params.Set("currentDataVersion", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "states/{stateKey}/clear") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{stateKey}", strconv.FormatInt(c.stateKey, 10), 1) 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 *WriteResult if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version. This method results in a conflict error on version mismatch.", // "httpMethod": "POST", // "id": "appstate.states.clear", // "parameterOrder": [ // "stateKey" // ], // "parameters": { // "currentDataVersion": { // "description": "The version of the data to be cleared. Version strings are returned by the server.", // "location": "query", // "type": "string" // }, // "stateKey": { // "description": "The key for the data to be retrieved.", // "format": "int32", // "location": "path", // "maximum": "3", // "minimum": "0", // "required": true, // "type": "integer" // } // }, // "path": "states/{stateKey}/clear", // "response": { // "$ref": "WriteResult" // }, // "scopes": [ // "https://www.googleapis.com/auth/appstate" // ] // } }
func (c *ReportsGetCall) Do() (*Report, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{profileId}", strconv.FormatInt(c.profileId, 10), 1) req.URL.Path = strings.Replace(req.URL.Path, "{reportId}", strconv.FormatInt(c.reportId, 10), 1) 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 *Report if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieves a report by its id.", // "httpMethod": "GET", // "id": "dfareporting.reports.get", // "parameterOrder": [ // "profileId", // "reportId" // ], // "parameters": { // "profileId": { // "description": "The DFA user profile id.", // "format": "int64", // "location": "path", // "required": true, // "type": "string" // }, // "reportId": { // "description": "The id of the report.", // "format": "int64", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "userprofiles/{profileId}/reports/{reportId}", // "response": { // "$ref": "Report" // }, // "scopes": [ // "https://www.googleapis.com/auth/dfareporting" // ] // } }
func (c *CurrentLocationGetCall) Do() (*LatitudeCurrentlocationResourceJson, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["granularity"]; ok { params.Set("granularity", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative("https://www.googleapis.com/latitude/v1/", "currentLocation") 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 res.Body.Close() if err := googleapi.CheckResponse(res); err != nil { return nil, err } ret := new(LatitudeCurrentlocationResourceJson) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Returns the authenticated user's current location.", // "httpMethod": "GET", // "id": "latitude.currentLocation.get", // "parameters": { // "granularity": { // "default": "city", // "description": "Granularity of the requested location.", // "enum": [ // "best", // "city" // ], // "enumDescriptions": [ // "Request best available granularity.", // "Request city-level granularty." // ], // "location": "query", // "type": "string" // } // }, // "path": "currentLocation", // "response": { // "$ref": "LatitudeCurrentlocationResourceJson" // }, // "scopes": [ // "https://www.googleapis.com/auth/latitude.all.best", // "https://www.googleapis.com/auth/latitude.all.city", // "https://www.googleapis.com/auth/latitude.current.best", // "https://www.googleapis.com/auth/latitude.current.city" // ] // } }
func (c *CustomersInsertCall) Do() (*Customer, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["customerAuthToken"]; ok { params.Set("customerAuthToken", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["fields"]; ok { params.Set("fields", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "customers") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 *Customer if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Creates a customer resource if one does not already exist.", // "httpMethod": "POST", // "id": "reseller.customers.insert", // "parameters": { // "customerAuthToken": { // "description": "An auth token needed for inserting a customer for which domain already exists. Can be generated at https://www.google.com/a/cpanel//TransferToken. Optional.", // "location": "query", // "type": "string" // } // }, // "path": "customers", // "request": { // "$ref": "Customer" // }, // "response": { // "$ref": "Customer" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.order" // ] // } }
func (c *ZoneViewsDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{projectName}/zones/{zone}/resourceViews/{resourceViewName}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{projectName}", url.QueryEscape(c.projectName), 1) req.URL.Path = strings.Replace(req.URL.Path, "{zone}", url.QueryEscape(c.zone), 1) req.URL.Path = strings.Replace(req.URL.Path, "{resourceViewName}", url.QueryEscape(c.resourceViewName), 1) 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 err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { return err } return nil // { // "description": "Delete a resource view.", // "httpMethod": "DELETE", // "id": "resourceviews.zoneViews.delete", // "parameterOrder": [ // "projectName", // "zone", // "resourceViewName" // ], // "parameters": { // "projectName": { // "description": "The project name of the resource view.", // "location": "path", // "required": true, // "type": "string" // }, // "resourceViewName": { // "description": "The name of the resource view.", // "location": "path", // "required": true, // "type": "string" // }, // "zone": { // "description": "The zone name of the resource view.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{projectName}/zones/{zone}/resourceViews/{resourceViewName}", // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/ndev.cloudman" // ] // } }
func (c *ReportsInsertCall) Do() (*Report, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.report) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{profileId}", strconv.FormatInt(c.profileId, 10), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(Report) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Creates a report.", // "httpMethod": "POST", // "id": "dfareporting.reports.insert", // "parameterOrder": [ // "profileId" // ], // "parameters": { // "profileId": { // "description": "The DFA user profile id.", // "format": "int64", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "userprofiles/{profileId}/reports", // "request": { // "$ref": "Report" // }, // "response": { // "$ref": "Report" // }, // "scopes": [ // "https://www.googleapis.com/auth/dfareporting" // ] // } }
func (c *ManagedZonesCreateCall) Do() (*ManagedZone, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{project}", url.QueryEscape(c.project), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 *ManagedZone if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Create a new ManagedZone.", // "httpMethod": "POST", // "id": "dns.managedZones.create", // "parameterOrder": [ // "project" // ], // "parameters": { // "project": { // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{project}/managedZones", // "request": { // "$ref": "ManagedZone" // }, // "response": { // "$ref": "ManagedZone" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" // ] // } }
func (c *SavedColumnsListCall) Do() (*SavedColumnList, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "agency/{agencyId}/advertiser/{advertiserId}/savedcolumns") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{agencyId}", strconv.FormatInt(c.agencyId, 10), 1) req.URL.Path = strings.Replace(req.URL.Path, "{advertiserId}", strconv.FormatInt(c.advertiserId, 10), 1) 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 *SavedColumnList if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Retrieve the list of saved columns for a specified advertiser.", // "httpMethod": "GET", // "id": "doubleclicksearch.savedColumns.list", // "parameterOrder": [ // "agencyId", // "advertiserId" // ], // "parameters": { // "advertiserId": { // "description": "DS ID of the advertiser.", // "format": "int64", // "location": "path", // "required": true, // "type": "string" // }, // "agencyId": { // "description": "DS ID of the agency.", // "format": "int64", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "agency/{agencyId}/advertiser/{advertiserId}/savedcolumns", // "response": { // "$ref": "SavedColumnList" // }, // "scopes": [ // "https://www.googleapis.com/auth/doubleclicksearch" // ] // } }
func (c *TasksDeleteCall) Do() error { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/taskqueues/{taskqueue}/tasks/{task}") urls += "?" + params.Encode() req, _ := http.NewRequest("DELETE", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{project}", url.QueryEscape(c.project), 1) req.URL.Path = strings.Replace(req.URL.Path, "{taskqueue}", url.QueryEscape(c.taskqueue), 1) req.URL.Path = strings.Replace(req.URL.Path, "{task}", url.QueryEscape(c.task), 1) 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 err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { return err } return nil // { // "description": "Delete a task from a TaskQueue.", // "httpMethod": "DELETE", // "id": "taskqueue.tasks.delete", // "parameterOrder": [ // "project", // "taskqueue", // "task" // ], // "parameters": { // "project": { // "description": "The project under which the queue lies.", // "location": "path", // "required": true, // "type": "string" // }, // "task": { // "description": "The id of the task to delete.", // "location": "path", // "required": true, // "type": "string" // }, // "taskqueue": { // "description": "The taskqueue to delete a task from.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{project}/taskqueues/{taskqueue}/tasks/{task}", // "scopes": [ // "https://www.googleapis.com/auth/taskqueue", // "https://www.googleapis.com/auth/taskqueue.consumer" // ] // } }
func (c *WebResourceInsertCall) Do() (*SiteVerificationWebResourceResource, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") params.Set("verificationMethod", fmt.Sprintf("%v", c.verificationMethod)) urls := googleapi.ResolveRelative(c.s.BasePath, "webResource") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(SiteVerificationWebResourceResource) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Attempt verification of a website or domain.", // "httpMethod": "POST", // "id": "siteVerification.webResource.insert", // "parameterOrder": [ // "verificationMethod" // ], // "parameters": { // "verificationMethod": { // "description": "The method to use for verifying a site or domain.", // "location": "query", // "required": true, // "type": "string" // } // }, // "path": "webResource", // "request": { // "$ref": "SiteVerificationWebResourceResource" // }, // "response": { // "$ref": "SiteVerificationWebResourceResource" // }, // "scopes": [ // "https://www.googleapis.com/auth/siteverification", // "https://www.googleapis.com/auth/siteverification.verify_only" // ] // } }
func (c *ManagedZonesGetCall) Do() (*ManagedZone, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/managedZones/{managedZone}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{project}", url.QueryEscape(c.project), 1) req.URL.Path = strings.Replace(req.URL.Path, "{managedZone}", url.QueryEscape(c.managedZone), 1) 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 *ManagedZone if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Fetch the representation of an existing ManagedZone.", // "httpMethod": "GET", // "id": "dns.managedZones.get", // "parameterOrder": [ // "project", // "managedZone" // ], // "parameters": { // "managedZone": { // "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or id.", // "location": "path", // "required": true, // "type": "string" // }, // "project": { // "description": "Identifies the project addressed by this request.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{project}/managedZones/{managedZone}", // "response": { // "$ref": "ManagedZone" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", // "https://www.googleapis.com/auth/ndev.clouddns.readonly", // "https://www.googleapis.com/auth/ndev.clouddns.readwrite" // ] // } }
func (c *DatasetsRunQueryCall) Do() (*RunQueryResponse, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{datasetId}/runQuery") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{datasetId}", url.QueryEscape(c.datasetId), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 *RunQueryResponse if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Query for entities.", // "httpMethod": "POST", // "id": "datastore.datasets.runQuery", // "parameterOrder": [ // "datasetId" // ], // "parameters": { // "datasetId": { // "description": "Identifies the dataset.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{datasetId}/runQuery", // "request": { // "$ref": "RunQueryRequest" // }, // "response": { // "$ref": "RunQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/datastore", // "https://www.googleapis.com/auth/userinfo.email" // ] // } }
func (c *AccountsUpdateCall) Do() (*Account, 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") urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{id}", strconv.FormatInt(c.id, 10), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(Account) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Updates an existing account.", // "httpMethod": "PUT", // "id": "adexchangebuyer.accounts.update", // "parameterOrder": [ // "id" // ], // "parameters": { // "id": { // "description": "The account id", // "format": "int32", // "location": "path", // "required": true, // "type": "integer" // } // }, // "path": "accounts/{id}", // "request": { // "$ref": "Account" // }, // "response": { // "$ref": "Account" // }, // "scopes": [ // "https://www.googleapis.com/auth/adexchange.buyer" // ] // } }
func (c *AdclientsListCall) Do() (*AdClients, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["maxResults"]; ok { params.Set("maxResults", fmt.Sprintf("%v", v)) } if v, ok := c.opt_["pageToken"]; ok { params.Set("pageToken", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative("https://www.googleapis.com/adsense/v1/", "adclients") 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 res.Body.Close() if err := googleapi.CheckResponse(res); err != nil { return nil, err } ret := new(AdClients) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "List all ad clients in this AdSense account.", // "httpMethod": "GET", // "id": "adsense.adclients.list", // "parameters": { // "maxResults": { // "description": "The maximum number of ad clients to include in the response, used for paging.", // "format": "int32", // "location": "query", // "maximum": "10000", // "minimum": "0", // "type": "integer" // }, // "pageToken": { // "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.", // "location": "query", // "type": "string" // } // }, // "path": "adclients", // "response": { // "$ref": "AdClients" // }, // "scopes": [ // "https://www.googleapis.com/auth/adsense", // "https://www.googleapis.com/auth/adsense.readonly" // ] // } }
func (c *TrainingInsertCall) Do() (*Training, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.training) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") if v, ok := c.opt_["data"]; ok { params.Set("data", fmt.Sprintf("%v", v)) } urls := googleapi.ResolveRelative(c.s.BasePath, "training") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(Training) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Begin training your model", // "httpMethod": "POST", // "id": "prediction.training.insert", // "parameters": { // "data": { // "description": "mybucket/mydata resource in Google Storage", // "location": "query", // "type": "string" // } // }, // "path": "training", // "request": { // "$ref": "Training" // }, // "response": { // "$ref": "Training" // }, // "scopes": [ // "https://www.googleapis.com/auth/devstorage.full_control", // "https://www.googleapis.com/auth/devstorage.read_only", // "https://www.googleapis.com/auth/devstorage.read_write", // "https://www.googleapis.com/auth/prediction" // ] // } }
func (c *GroupsUpdateCall) Do() (*Groups, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.groups) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "{groupUniqueId}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{groupUniqueId}", url.QueryEscape(c.groupUniqueId), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 *Groups if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { return nil, err } return ret, nil // { // "description": "Updates an existing resource.", // "httpMethod": "PUT", // "id": "groupsSettings.groups.update", // "parameterOrder": [ // "groupUniqueId" // ], // "parameters": { // "groupUniqueId": { // "description": "The resource ID", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "{groupUniqueId}", // "request": { // "$ref": "Groups" // }, // "response": { // "$ref": "Groups" // }, // "scopes": [ // "https://www.googleapis.com/auth/apps.groups.settings" // ] // } }
func (c *CreativesGetCall) Do() (*Creative, error) { var body io.Reader = nil params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}") urls += "?" + params.Encode() req, _ := http.NewRequest("GET", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{accountId}", strconv.FormatInt(c.accountId, 10), 1) req.URL.Path = strings.Replace(req.URL.Path, "{buyerCreativeId}", url.QueryEscape(c.buyerCreativeId), 1) 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 } ret := new(Creative) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Gets the status for a single creative. A creative will be available 30-40 minutes after submission.", // "httpMethod": "GET", // "id": "adexchangebuyer.creatives.get", // "parameterOrder": [ // "accountId", // "buyerCreativeId" // ], // "parameters": { // "accountId": { // "description": "The id for the account that will serve this creative.", // "format": "int32", // "location": "path", // "required": true, // "type": "integer" // }, // "buyerCreativeId": { // "description": "The buyer-specific id for this creative.", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "creatives/{accountId}/{buyerCreativeId}", // "response": { // "$ref": "Creative" // }, // "scopes": [ // "https://www.googleapis.com/auth/adexchange.buyer" // ] // } }
func (c *TrainingUpdateCall) Do() (*Training, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.update) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "training/{data}") urls += "?" + params.Encode() req, _ := http.NewRequest("PUT", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{data}", url.QueryEscape(c.data), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(Training) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Add new data to a trained model", // "httpMethod": "PUT", // "id": "prediction.training.update", // "parameterOrder": [ // "data" // ], // "parameters": { // "data": { // "description": "mybucket/mydata resource in Google Storage", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "training/{data}", // "request": { // "$ref": "Update" // }, // "response": { // "$ref": "Training" // }, // "scopes": [ // "https://www.googleapis.com/auth/prediction" // ] // } }
func (c *HostedmodelsPredictCall) Do() (*Output, error) { var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.input) if err != nil { return nil, err } ctype := "application/json" params := make(url.Values) params.Set("alt", "json") urls := googleapi.ResolveRelative(c.s.BasePath, "hostedmodels/{hostedModelName}/predict") urls += "?" + params.Encode() req, _ := http.NewRequest("POST", urls, body) req.URL.Path = strings.Replace(req.URL.Path, "{hostedModelName}", url.QueryEscape(c.hostedModelName), 1) googleapi.SetOpaque(req.URL) req.Header.Set("Content-Type", ctype) 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 } ret := new(Output) if err := json.NewDecoder(res.Body).Decode(ret); err != nil { return nil, err } return ret, nil // { // "description": "Submit input and request an output against a hosted model", // "httpMethod": "POST", // "id": "prediction.hostedmodels.predict", // "parameterOrder": [ // "hostedModelName" // ], // "parameters": { // "hostedModelName": { // "description": "The name of a hosted model", // "location": "path", // "required": true, // "type": "string" // } // }, // "path": "hostedmodels/{hostedModelName}/predict", // "request": { // "$ref": "Input" // }, // "response": { // "$ref": "Output" // }, // "scopes": [ // "https://www.googleapis.com/auth/prediction" // ] // } }