Do executes the "webmasters.urlcrawlerrorscounts.query" call. Exactly one of *UrlCrawlErrorsCountsQueryResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UrlCrawlErrorsCountsQueryResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

Do is referenced in 0 repositories


			HTTPStatusCode: res.StatusCode,
	target := &ret
	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
		return nil, err
	return ret, nil
	// {
	//   "description": "Lists the user's Search Console sites.",
	//   "httpMethod": "GET",
	//   "id": "webmasters.sites.list",
	//   "path": "sites",
	//   "response": {
	//     "$ref": "SitesListResponse"
	//   },
	//   "scopes": [
	//     "",
	//     ""
	//   ]
	// }


// method id "webmasters.urlcrawlerrorscounts.query":

type UrlcrawlerrorscountsQueryCall struct {
	s            *Service
	siteUrl      string
	urlParams_   gensupport.URLParams
	ifNoneMatch_ string
	ctx_         context.Context

// Query: Retrieves a time series of the number of URL crawl errors per
// error category and platform.
func (r *UrlcrawlerrorscountsService) Query(siteUrl string) *UrlcrawlerrorscountsQueryCall {
	c := &UrlcrawlerrorscountsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.siteUrl = siteUrl
	return c

// Category sets the optional parameter "category": The crawl error
// category. For example: serverError. If not specified, returns results
// for all categories.
// Possible values:
//   "authPermissions"
//   "flashContent"
//   "manyToOneRedirect"
//   "notFollowed"
//   "notFound"
//   "other"
//   "roboted"
//   "serverError"
//   "soft404"
func (c *UrlcrawlerrorscountsQueryCall) Category(category string) *UrlcrawlerrorscountsQueryCall {
	c.urlParams_.Set("category", category)
	return c

// LatestCountsOnly sets the optional parameter "latestCountsOnly": If
// true, returns only the latest crawl error counts.
func (c *UrlcrawlerrorscountsQueryCall) LatestCountsOnly(latestCountsOnly bool) *UrlcrawlerrorscountsQueryCall {
	c.urlParams_.Set("latestCountsOnly", fmt.Sprint(latestCountsOnly))
	return c

// Platform sets the optional parameter "platform": The user agent type
// (platform) that made the request. For example: web. If not specified,
// returns results for all platforms.
// Possible values:
//   "mobile"
//   "smartphoneOnly"
//   "web"
func (c *UrlcrawlerrorscountsQueryCall) Platform(platform string) *UrlcrawlerrorscountsQueryCall {
	c.urlParams_.Set("platform", platform)
	return c

// Fields allows partial responses to be retrieved. See
// for more information.
func (c *UrlcrawlerrorscountsQueryCall) Fields(s ...googleapi.Field) *UrlcrawlerrorscountsQueryCall {
	c.urlParams_.Set("fields", googleapi.CombineFields(s))
	return c

// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *UrlcrawlerrorscountsQueryCall) IfNoneMatch(entityTag string) *UrlcrawlerrorscountsQueryCall {
	c.ifNoneMatch_ = entityTag
	return c

// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *UrlcrawlerrorscountsQueryCall) Context(ctx context.Context) *UrlcrawlerrorscountsQueryCall {
	c.ctx_ = ctx