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


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

def initialize
  super('https://www.googleapis.com/', 'siteVerification/v1/')
  @batch_path = 'batch/siteVerification/v1'
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 An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.


43
44
45
# File 'generated/google/apis/site_verification_v1/service.rb', line 43

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.


47
48
49
# File 'generated/google/apis/site_verification_v1/service.rb', line 47

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

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


76
77
78
79
80
81
82
83
# File 'generated/google/apis/site_verification_v1/service.rb', line 76

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


107
108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/site_verification_v1/service.rb', line 107

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


139
140
141
142
143
144
145
146
147
148
149
# File 'generated/google/apis/site_verification_v1/service.rb', line 139

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


174
175
176
177
178
179
180
181
182
183
184
185
# File 'generated/google/apis/site_verification_v1/service.rb', line 174

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


207
208
209
210
211
212
213
214
215
# File 'generated/google/apis/site_verification_v1/service.rb', line 207

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


241
242
243
244
245
246
247
248
249
250
251
252
# File 'generated/google/apis/site_verification_v1/service.rb', line 241

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)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


277
278
279
280
281
282
283
284
285
286
287
288
# File 'generated/google/apis/site_verification_v1/service.rb', line 277

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