Class: Google::Apis::SiteVerificationV1::SiteVerificationService

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

Overview

Google Site Verification API

Verifies ownership of websites or domains with Google.

Examples:

require 'google/apis/site_verification_v1'

SiteVerification = Google::Apis::SiteVerificationV1 # Alias the module
service = SiteVerification::SiteVerificationService.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

#initializeSiteVerificationService

Returns a new instance of SiteVerificationService



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

def initialize
  super('https://www.googleapis.com/', 'siteVerification/v1/')
  @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/site_verification_v1/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/site_verification_v1/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/site_verification_v1/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

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

This method returns an undefined value.

Relinquish ownership of a website or domain.

Parameters:

  • id (String)

    The id of a verified site or domain.

  • 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:



80
81
82
83
84
85
86
87
# File 'generated/google/apis/site_verification_v1/service.rb', line 80

def delete_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'webResource/{id}', options)
  command.params['id'] = id unless id.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_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource

Get the most current data for a website or domain.

Parameters:

  • id (String)

    The id of a verified site or domain.

  • 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:



113
114
115
116
117
118
119
120
121
122
# File 'generated/google/apis/site_verification_v1/service.rb', line 113

def get_web_resource(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'webResource/{id}', options)
  command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource
  command.params['id'] = id unless id.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_web_resource_token(get_web_resource_token_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse

Get a verification token for placing on a website or domain.

Parameters:

  • get_web_resource_token_request_object (Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest) (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:



147
148
149
150
151
152
153
154
155
156
157
# File 'generated/google/apis/site_verification_v1/service.rb', line 147

def get_web_resource_token(get_web_resource_token_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'token', options)
  command.request_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenRequest::Representation
  command.request_object = get_web_resource_token_request_object
  command.response_representation = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse::Representation
  command.response_class = Google::Apis::SiteVerificationV1::GetWebResourceTokenResponse
  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

#insert_web_resource(verification_method, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource

Attempt verification of a website or domain.

Parameters:

  • verification_method (String)

    The method to use for verifying a site or domain.

  • site_verification_web_resource_resource_object (Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource) (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:



184
185
186
187
188
189
190
191
192
193
194
195
# File 'generated/google/apis/site_verification_v1/service.rb', line 184

def insert_web_resource(verification_method, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'webResource', options)
  command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.request_object = site_verification_web_resource_resource_object
  command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource
  command.query['verificationMethod'] = verification_method unless verification_method.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_web_resources(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::ListWebResourceResponse

Get the list of your verified websites and domains.

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:



219
220
221
222
223
224
225
226
227
# File 'generated/google/apis/site_verification_v1/service.rb', line 219

def list_web_resources(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'webResource', options)
  command.response_representation = Google::Apis::SiteVerificationV1::ListWebResourceResponse::Representation
  command.response_class = Google::Apis::SiteVerificationV1::ListWebResourceResponse
  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

#patch_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource

Modify the list of owners for your website or domain. This method supports patch semantics.

Parameters:

  • id (String)

    The id of a verified site or domain.

  • site_verification_web_resource_resource_object (Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource) (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:



255
256
257
258
259
260
261
262
263
264
265
266
# File 'generated/google/apis/site_verification_v1/service.rb', line 255

def patch_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'webResource/{id}', options)
  command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.request_object = site_verification_web_resource_resource_object
  command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource
  command.params['id'] = id unless id.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

#update_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource

Modify the list of owners for your website or domain.

Parameters:

  • id (String)

    The id of a verified site or domain.

  • site_verification_web_resource_resource_object (Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource) (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:



293
294
295
296
297
298
299
300
301
302
303
304
# File 'generated/google/apis/site_verification_v1/service.rb', line 293

def update_web_resource(id, site_verification_web_resource_resource_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'webResource/{id}', options)
  command.request_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.request_object = site_verification_web_resource_resource_object
  command.response_representation = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource::Representation
  command.response_class = Google::Apis::SiteVerificationV1::SiteVerificationWebResourceResource
  command.params['id'] = id unless id.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