Bump google.golang.org/api
This commit is contained in:
152
vendor/google.golang.org/api/webmasters/v3/webmasters-gen.go
generated
vendored
152
vendor/google.golang.org/api/webmasters/v3/webmasters-gen.go
generated
vendored
@@ -1,28 +1,62 @@
|
||||
// Copyright 2019 Google LLC.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Code generated file. DO NOT EDIT.
|
||||
|
||||
// Package webmasters provides access to the Search Console API.
|
||||
//
|
||||
// See https://developers.google.com/webmaster-tools/
|
||||
// For product documentation, see: https://developers.google.com/webmaster-tools/
|
||||
//
|
||||
// Creating a client
|
||||
//
|
||||
// Usage example:
|
||||
//
|
||||
// import "google.golang.org/api/webmasters/v3"
|
||||
// ...
|
||||
// webmastersService, err := webmasters.New(oauthHttpClient)
|
||||
// ctx := context.Background()
|
||||
// webmastersService, err := webmasters.NewService(ctx)
|
||||
//
|
||||
// In this example, Google Application Default Credentials are used for authentication.
|
||||
//
|
||||
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
|
||||
//
|
||||
// Other authentication options
|
||||
//
|
||||
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
|
||||
//
|
||||
// webmastersService, err := webmasters.NewService(ctx, option.WithScopes(webmasters.WebmastersReadonlyScope))
|
||||
//
|
||||
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
|
||||
//
|
||||
// webmastersService, err := webmasters.NewService(ctx, option.WithAPIKey("AIza..."))
|
||||
//
|
||||
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
|
||||
//
|
||||
// config := &oauth2.Config{...}
|
||||
// // ...
|
||||
// token, err := config.Exchange(ctx, ...)
|
||||
// webmastersService, err := webmasters.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
|
||||
//
|
||||
// See https://godoc.org/google.golang.org/api/option/ for details on options.
|
||||
package webmasters // import "google.golang.org/api/webmasters/v3"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
context "golang.org/x/net/context"
|
||||
ctxhttp "golang.org/x/net/context/ctxhttp"
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
gensupport "google.golang.org/api/gensupport"
|
||||
googleapi "google.golang.org/api/googleapi"
|
||||
option "google.golang.org/api/option"
|
||||
htransport "google.golang.org/api/transport/http"
|
||||
)
|
||||
|
||||
// Always reference these packages, just in case the auto-generated code
|
||||
@@ -38,7 +72,6 @@ var _ = googleapi.Version
|
||||
var _ = errors.New
|
||||
var _ = strings.Replace
|
||||
var _ = context.Canceled
|
||||
var _ = ctxhttp.Do
|
||||
|
||||
const apiId = "webmasters:v3"
|
||||
const apiName = "webmasters"
|
||||
@@ -54,6 +87,33 @@ const (
|
||||
WebmastersReadonlyScope = "https://www.googleapis.com/auth/webmasters.readonly"
|
||||
)
|
||||
|
||||
// NewService creates a new Service.
|
||||
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
|
||||
scopesOption := option.WithScopes(
|
||||
"https://www.googleapis.com/auth/webmasters",
|
||||
"https://www.googleapis.com/auth/webmasters.readonly",
|
||||
)
|
||||
// NOTE: prepend, so we don't override user-specified scopes.
|
||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
s, err := New(client)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if endpoint != "" {
|
||||
s.BasePath = endpoint
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// New creates a new Service. It uses the provided http.Client for requests.
|
||||
//
|
||||
// Deprecated: please use NewService instead.
|
||||
// To provide a custom HTTP client, use option.WithHTTPClient.
|
||||
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
|
||||
func New(client *http.Client) (*Service, error) {
|
||||
if client == nil {
|
||||
return nil, errors.New("client is nil")
|
||||
@@ -848,9 +908,13 @@ func (c *SearchanalyticsQueryCall) doRequest(alt string) (*http.Response, error)
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/searchAnalytics/query")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("POST", urls, body)
|
||||
req, err := http.NewRequest("POST", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -977,9 +1041,13 @@ func (c *SitemapsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("DELETE", urls, body)
|
||||
req, err := http.NewRequest("DELETE", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1096,9 +1164,13 @@ func (c *SitemapsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1252,9 +1324,13 @@ func (c *SitemapsListCall) doRequest(alt string) (*http.Response, error) {
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1383,9 +1459,13 @@ func (c *SitemapsSubmitCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/sitemaps/{feedpath}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("PUT", urls, body)
|
||||
req, err := http.NewRequest("PUT", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1486,9 +1566,13 @@ func (c *SitesAddCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("PUT", urls, body)
|
||||
req, err := http.NewRequest("PUT", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1582,9 +1666,13 @@ func (c *SitesDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("DELETE", urls, body)
|
||||
req, err := http.NewRequest("DELETE", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1691,9 +1779,13 @@ func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -1827,9 +1919,13 @@ func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
@@ -1991,9 +2087,13 @@ func (c *UrlcrawlerrorscountsQueryCall) doRequest(alt string) (*http.Response, e
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsCounts/query")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -2182,9 +2282,13 @@ func (c *UrlcrawlerrorssamplesGetCall) doRequest(alt string) (*http.Response, er
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples/{url}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -2377,9 +2481,13 @@ func (c *UrlcrawlerrorssamplesListCall) doRequest(alt string) (*http.Response, e
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("GET", urls, body)
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
@@ -2553,9 +2661,13 @@ func (c *UrlcrawlerrorssamplesMarkAsFixedCall) doRequest(alt string) (*http.Resp
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "sites/{siteUrl}/urlCrawlErrorsSamples/{url}")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, _ := http.NewRequest("DELETE", urls, body)
|
||||
req, err := http.NewRequest("DELETE", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"siteUrl": c.siteUrl,
|
||||
|
Reference in New Issue
Block a user