Class: Google::Apis::WebmastersV3::WebmastersService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/webmasters_v3/service.rb

Overview

Search Console API

View Google Search Console data for your verified sites.

Examples:

require 'google/apis/webmasters_v3'

Webmasters = Google::Apis::WebmastersV3 # Alias the module
service = Webmasters::WebmastersService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeWebmastersService

Returns a new instance of WebmastersService



51
52
53
54
# File 'generated/google/apis/webmasters_v3/service.rb', line 51

def initialize
  super('https://www.googleapis.com/', 'webmasters/v3/')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/webmasters_v3/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



44
45
46
# File 'generated/google/apis/webmasters_v3/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



49
50
51
# File 'generated/google/apis/webmasters_v3/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

#add_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Adds a site to the set of the user's sites in Search Console.

Parameters:

  • site_url (String)

    The URL of the site to add.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



274
275
276
277
278
279
280
281
# File 'generated/google/apis/webmasters_v3/service.rb', line 274

def add_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'sites/{siteUrl}', options)
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Removes a site from the set of the user's Search Console sites.

Parameters:

  • site_url (String)

    The URI of the property as defined in Search Console. Examples: http://www. example.com/ or android-app://com.example/

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



308
309
310
311
312
313
314
315
# File 'generated/google/apis/webmasters_v3/service.rb', line 308

def delete_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'sites/{siteUrl}', options)
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a sitemap from this site.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • feedpath (String)

    The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



126
127
128
129
130
131
132
133
134
# File 'generated/google/apis/webmasters_v3/service.rb', line 126

def delete_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'sites/{siteUrl}/sitemaps/{feedpath}', options)
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.params['feedpath'] = feedpath unless feedpath.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_errors_sample(site_url, url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::UrlCrawlErrorsSample

Retrieves details about crawl errors for a site's sample URL.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • url (String)

    The relative path (without the site) of the sample URL. It must be one of the URLs returned by list(). For example, for the URL https://www.example.com/ pagename on the site https://www.example.com/, the url value is pagename

  • category (String)

    The crawl error category. For example: authPermissions

  • platform (String)

    The user agent type (platform) that made the request. For example: web

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'generated/google/apis/webmasters_v3/service.rb', line 464

def get_errors_sample(site_url, url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}', options)
  command.response_representation = Google::Apis::WebmastersV3::UrlCrawlErrorsSample::Representation
  command.response_class = Google::Apis::WebmastersV3::UrlCrawlErrorsSample
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.params['url'] = url unless url.nil?
  command.query['category'] = category unless category.nil?
  command.query['platform'] = platform unless platform.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::WmxSite

Retrieves information about specific site.

Parameters:

  • site_url (String)

    The URI of the property as defined in Search Console. Examples: http://www. example.com/ or android-app://com.example/

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



342
343
344
345
346
347
348
349
350
351
# File 'generated/google/apis/webmasters_v3/service.rb', line 342

def get_site(site_url, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}', options)
  command.response_representation = Google::Apis::WebmastersV3::WmxSite::Representation
  command.response_class = Google::Apis::WebmastersV3::WmxSite
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::WmxSitemap

Retrieves information about a specific sitemap.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • feedpath (String)

    The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



162
163
164
165
166
167
168
169
170
171
172
# File 'generated/google/apis/webmasters_v3/service.rb', line 162

def get_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}/sitemaps/{feedpath}', options)
  command.response_representation = Google::Apis::WebmastersV3::WmxSitemap::Representation
  command.response_class = Google::Apis::WebmastersV3::WmxSitemap
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.params['feedpath'] = feedpath unless feedpath.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_errors_samples(site_url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse

Lists a site's sample URLs for the specified crawl error category and platform.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • category (String)

    The crawl error category. For example: authPermissions

  • platform (String)

    The user agent type (platform) that made the request. For example: web

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



506
507
508
509
510
511
512
513
514
515
516
517
# File 'generated/google/apis/webmasters_v3/service.rb', line 506

def list_errors_samples(site_url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}/urlCrawlErrorsSamples', options)
  command.response_representation = Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse::Representation
  command.response_class = Google::Apis::WebmastersV3::ListUrlCrawlErrorsSamplesResponse
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['category'] = category unless category.nil?
  command.query['platform'] = platform unless platform.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_sitemaps(site_url, sitemap_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::ListSitemapsResponse

Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • sitemap_index (String)

    A URL of a site's sitemap index. For example: http://www.example.com/ sitemapindex.xml

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



202
203
204
205
206
207
208
209
210
211
212
# File 'generated/google/apis/webmasters_v3/service.rb', line 202

def list_sitemaps(site_url, sitemap_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}/sitemaps', options)
  command.response_representation = Google::Apis::WebmastersV3::ListSitemapsResponse::Representation
  command.response_class = Google::Apis::WebmastersV3::ListSitemapsResponse
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['sitemapIndex'] = sitemap_index unless sitemap_index.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_sites(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::ListSitesResponse

Lists the user's Search Console sites.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



375
376
377
378
379
380
381
382
383
# File 'generated/google/apis/webmasters_v3/service.rb', line 375

def list_sites(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites', options)
  command.response_representation = Google::Apis::WebmastersV3::ListSitesResponse::Representation
  command.response_class = Google::Apis::WebmastersV3::ListSitesResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#mark_as_fixed(site_url, url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Marks the provided site's sample URL as fixed, and removes it from the samples list.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • url (String)

    The relative path (without the site) of the sample URL. It must be one of the URLs returned by list(). For example, for the URL https://www.example.com/ pagename on the site https://www.example.com/, the url value is pagename

  • category (String)

    The crawl error category. For example: authPermissions

  • platform (String)

    The user agent type (platform) that made the request. For example: web

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



552
553
554
555
556
557
558
559
560
561
562
# File 'generated/google/apis/webmasters_v3/service.rb', line 552

def mark_as_fixed(site_url, url, category, platform, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'sites/{siteUrl}/urlCrawlErrorsSamples/{url}', options)
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.params['url'] = url unless url.nil?
  command.query['category'] = category unless category.nil?
  command.query['platform'] = platform unless platform.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#query_errors_count(site_url, category: nil, latest_counts_only: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse

Retrieves a time series of the number of URL crawl errors per error category and platform.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • category (String)

    The crawl error category. For example: serverError. If not specified, returns results for all categories.

  • latest_counts_only (Boolean)

    If true, returns only the latest crawl error counts.

  • platform (String)

    The user agent type (platform) that made the request. For example: web. If not specified, returns results for all platforms.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'generated/google/apis/webmasters_v3/service.rb', line 418

def query_errors_count(site_url, category: nil, latest_counts_only: nil, platform: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'sites/{siteUrl}/urlCrawlErrorsCounts/query', options)
  command.response_representation = Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse::Representation
  command.response_class = Google::Apis::WebmastersV3::QueryUrlCrawlErrorsCountsResponse
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['category'] = category unless category.nil?
  command.query['latestCountsOnly'] = latest_counts_only unless latest_counts_only.nil?
  command.query['platform'] = platform unless platform.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#query_search_analytics(site_url, search_analytics_query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebmastersV3::SearchAnalyticsQueryResponse

Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • search_analytics_query_request_object (Google::Apis::WebmastersV3::SearchAnalyticsQueryRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



87
88
89
90
91
92
93
94
95
96
97
98
# File 'generated/google/apis/webmasters_v3/service.rb', line 87

def query_search_analytics(site_url, search_analytics_query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'sites/{siteUrl}/searchAnalytics/query', options)
  command.request_representation = Google::Apis::WebmastersV3::SearchAnalyticsQueryRequest::Representation
  command.request_object = search_analytics_query_request_object
  command.response_representation = Google::Apis::WebmastersV3::SearchAnalyticsQueryResponse::Representation
  command.response_class = Google::Apis::WebmastersV3::SearchAnalyticsQueryResponse
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#submit_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Submits a sitemap for a site.

Parameters:

  • site_url (String)

    The site's URL, including protocol. For example: http://www.example.com/

  • feedpath (String)

    The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



240
241
242
243
244
245
246
247
248
# File 'generated/google/apis/webmasters_v3/service.rb', line 240

def submit_sitemap(site_url, feedpath, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'sites/{siteUrl}/sitemaps/{feedpath}', options)
  command.params['siteUrl'] = site_url unless site_url.nil?
  command.params['feedpath'] = feedpath unless feedpath.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end