google-cloud-recaptcha_enterprise-v1beta1 0.1.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/client.rb +39 -34
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/credentials.rb +1 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/paths.rb +1 -1
- data/lib/google/cloud/recaptcha_enterprise/v1beta1/version.rb +1 -1
- metadata +35 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 733addc4868ab108478e1b78f1c5aed10e429746d219cc4a134a16d7d78851b5
|
4
|
+
data.tar.gz: 85d9bce47e601727ee8e44af881bb2669e95567612e127e32236ea53ea50fd65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f00632897bf4a75e47eed460974f0ef757d28390d64f810fb730038e89e2f3547aba0780bd7a8c2ccca666b16606fde6c2125d95b649fde661687a9ac44c7317
|
7
|
+
data.tar.gz: 32fbdee88c003143b1b4b50b2980a8d2457bf2bebda7604434dabcecb1503769feed244515fe3af5d193e733d936d0c02d104f7285d49a11fc470e79a5a517f3
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -33,6 +34,9 @@ response = client.create_assessment request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-recaptcha_enterprise-v1beta1/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
module V1beta1
|
26
26
|
module RecaptchaEnterpriseService
|
27
27
|
##
|
28
|
-
# Client for the
|
28
|
+
# Client for the RecaptchaEnterpriseService service.
|
29
29
|
#
|
30
30
|
# Service to determine the likelihood an event is legitimate.
|
31
31
|
#
|
@@ -33,17 +33,17 @@ module Google
|
|
33
33
|
include Paths
|
34
34
|
|
35
35
|
# @private
|
36
|
-
attr_reader :
|
36
|
+
attr_reader :recaptcha_enterprise_service_stub
|
37
37
|
|
38
38
|
##
|
39
|
-
# Configure the
|
39
|
+
# Configure the RecaptchaEnterpriseService Client class.
|
40
40
|
#
|
41
41
|
# See {::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
44
|
# ## Example
|
45
45
|
#
|
46
|
-
# To modify the configuration for all
|
46
|
+
# To modify the configuration for all RecaptchaEnterpriseService clients:
|
47
47
|
#
|
48
48
|
# ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.configure do |config|
|
49
49
|
# config.timeout = 10.0
|
@@ -86,7 +86,7 @@ module Google
|
|
86
86
|
end
|
87
87
|
|
88
88
|
##
|
89
|
-
# Configure the
|
89
|
+
# Configure the RecaptchaEnterpriseService Client instance.
|
90
90
|
#
|
91
91
|
# The configuration is set to the derived mode, meaning that values can be changed,
|
92
92
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
@@ -106,23 +106,23 @@ module Google
|
|
106
106
|
end
|
107
107
|
|
108
108
|
##
|
109
|
-
# Create a new
|
109
|
+
# Create a new RecaptchaEnterpriseService client object.
|
110
110
|
#
|
111
111
|
# ## Examples
|
112
112
|
#
|
113
|
-
# To create a new
|
113
|
+
# To create a new RecaptchaEnterpriseService client with the default
|
114
114
|
# configuration:
|
115
115
|
#
|
116
116
|
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new
|
117
117
|
#
|
118
|
-
# To create a new
|
118
|
+
# To create a new RecaptchaEnterpriseService client with a custom
|
119
119
|
# configuration:
|
120
120
|
#
|
121
121
|
# client = ::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client.new do |config|
|
122
122
|
# config.timeout = 10.0
|
123
123
|
# end
|
124
124
|
#
|
125
|
-
# @yield [config] Configure the
|
125
|
+
# @yield [config] Configure the RecaptchaEnterpriseService client.
|
126
126
|
# @yieldparam config [Client::Configuration]
|
127
127
|
#
|
128
128
|
def initialize
|
@@ -144,9 +144,10 @@ module Google
|
|
144
144
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
145
145
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
146
|
end
|
147
|
-
@quota_project_id =
|
147
|
+
@quota_project_id = @config.quota_project
|
148
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
148
149
|
|
149
|
-
@
|
150
|
+
@recaptcha_enterprise_service_stub = ::Gapic::ServiceStub.new(
|
150
151
|
::Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseServiceV1Beta1::Stub,
|
151
152
|
credentials: credentials,
|
152
153
|
endpoint: @config.endpoint,
|
@@ -218,7 +219,7 @@ module Google
|
|
218
219
|
options.apply_defaults metadata: @config.metadata,
|
219
220
|
retry_policy: @config.retry_policy
|
220
221
|
|
221
|
-
@
|
222
|
+
@recaptcha_enterprise_service_stub.call_rpc :create_assessment, request, options: options do |response, operation|
|
222
223
|
yield response, operation if block_given?
|
223
224
|
return response
|
224
225
|
end
|
@@ -288,7 +289,7 @@ module Google
|
|
288
289
|
options.apply_defaults metadata: @config.metadata,
|
289
290
|
retry_policy: @config.retry_policy
|
290
291
|
|
291
|
-
@
|
292
|
+
@recaptcha_enterprise_service_stub.call_rpc :annotate_assessment, request, options: options do |response, operation|
|
292
293
|
yield response, operation if block_given?
|
293
294
|
return response
|
294
295
|
end
|
@@ -357,7 +358,7 @@ module Google
|
|
357
358
|
options.apply_defaults metadata: @config.metadata,
|
358
359
|
retry_policy: @config.retry_policy
|
359
360
|
|
360
|
-
@
|
361
|
+
@recaptcha_enterprise_service_stub.call_rpc :create_key, request, options: options do |response, operation|
|
361
362
|
yield response, operation if block_given?
|
362
363
|
return response
|
363
364
|
end
|
@@ -430,8 +431,8 @@ module Google
|
|
430
431
|
options.apply_defaults metadata: @config.metadata,
|
431
432
|
retry_policy: @config.retry_policy
|
432
433
|
|
433
|
-
@
|
434
|
-
response = ::Gapic::PagedEnumerable.new @
|
434
|
+
@recaptcha_enterprise_service_stub.call_rpc :list_keys, request, options: options do |response, operation|
|
435
|
+
response = ::Gapic::PagedEnumerable.new @recaptcha_enterprise_service_stub, :list_keys, request, response, operation, options
|
435
436
|
yield response, operation if block_given?
|
436
437
|
return response
|
437
438
|
end
|
@@ -498,7 +499,7 @@ module Google
|
|
498
499
|
options.apply_defaults metadata: @config.metadata,
|
499
500
|
retry_policy: @config.retry_policy
|
500
501
|
|
501
|
-
@
|
502
|
+
@recaptcha_enterprise_service_stub.call_rpc :get_key, request, options: options do |response, operation|
|
502
503
|
yield response, operation if block_given?
|
503
504
|
return response
|
504
505
|
end
|
@@ -567,7 +568,7 @@ module Google
|
|
567
568
|
options.apply_defaults metadata: @config.metadata,
|
568
569
|
retry_policy: @config.retry_policy
|
569
570
|
|
570
|
-
@
|
571
|
+
@recaptcha_enterprise_service_stub.call_rpc :update_key, request, options: options do |response, operation|
|
571
572
|
yield response, operation if block_given?
|
572
573
|
return response
|
573
574
|
end
|
@@ -634,7 +635,7 @@ module Google
|
|
634
635
|
options.apply_defaults metadata: @config.metadata,
|
635
636
|
retry_policy: @config.retry_policy
|
636
637
|
|
637
|
-
@
|
638
|
+
@recaptcha_enterprise_service_stub.call_rpc :delete_key, request, options: options do |response, operation|
|
638
639
|
yield response, operation if block_given?
|
639
640
|
return response
|
640
641
|
end
|
@@ -643,9 +644,9 @@ module Google
|
|
643
644
|
end
|
644
645
|
|
645
646
|
##
|
646
|
-
# Configuration class for the
|
647
|
+
# Configuration class for the RecaptchaEnterpriseService API.
|
647
648
|
#
|
648
|
-
# This class represents the configuration for
|
649
|
+
# This class represents the configuration for RecaptchaEnterpriseService,
|
649
650
|
# providing control over timeouts, retry behavior, logging, transport
|
650
651
|
# parameters, and other low-level controls. Certain parameters can also be
|
651
652
|
# applied individually to specific RPCs. See
|
@@ -718,24 +719,28 @@ module Google
|
|
718
719
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
719
720
|
# trigger a retry.
|
720
721
|
# @return [::Hash]
|
722
|
+
# @!attribute [rw] quota_project
|
723
|
+
# A separate project against which to charge quota.
|
724
|
+
# @return [::String]
|
721
725
|
#
|
722
726
|
class Configuration
|
723
727
|
extend ::Gapic::Config
|
724
728
|
|
725
|
-
config_attr :endpoint,
|
726
|
-
config_attr :credentials,
|
727
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
729
|
+
config_attr :endpoint, "recaptchaenterprise.googleapis.com", ::String
|
730
|
+
config_attr :credentials, nil do |value|
|
731
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
728
732
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
729
733
|
allowed.any? { |klass| klass === value }
|
730
734
|
end
|
731
|
-
config_attr :scope,
|
732
|
-
config_attr :lib_name,
|
733
|
-
config_attr :lib_version,
|
734
|
-
config_attr(:channel_args,
|
735
|
-
config_attr :interceptors,
|
736
|
-
config_attr :timeout,
|
737
|
-
config_attr :metadata,
|
738
|
-
config_attr :retry_policy,
|
735
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
736
|
+
config_attr :lib_name, nil, ::String, nil
|
737
|
+
config_attr :lib_version, nil, ::String, nil
|
738
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
739
|
+
config_attr :interceptors, nil, ::Array, nil
|
740
|
+
config_attr :timeout, nil, ::Numeric, nil
|
741
|
+
config_attr :metadata, nil, ::Hash, nil
|
742
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
743
|
+
config_attr :quota_project, nil, ::String, nil
|
739
744
|
|
740
745
|
# @private
|
741
746
|
def initialize parent_config = nil
|
@@ -751,13 +756,13 @@ module Google
|
|
751
756
|
def rpcs
|
752
757
|
@rpcs ||= begin
|
753
758
|
parent_rpcs = nil
|
754
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
759
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
755
760
|
Rpcs.new parent_rpcs
|
756
761
|
end
|
757
762
|
end
|
758
763
|
|
759
764
|
##
|
760
|
-
# Configuration RPC class for the
|
765
|
+
# Configuration RPC class for the RecaptchaEnterpriseService API.
|
761
766
|
#
|
762
767
|
# Includes fields providing the configuration for each RPC in this service.
|
763
768
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
data/lib/google/cloud/recaptcha_enterprise/v1beta1/recaptcha_enterprise_service/credentials.rb
CHANGED
@@ -23,7 +23,7 @@ module Google
|
|
23
23
|
module RecaptchaEnterprise
|
24
24
|
module V1beta1
|
25
25
|
module RecaptchaEnterpriseService
|
26
|
-
# Credentials for the
|
26
|
+
# Credentials for the RecaptchaEnterpriseService API.
|
27
27
|
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
29
|
"https://www.googleapis.com/auth/cloud-platform"
|
@@ -22,7 +22,7 @@ module Google
|
|
22
22
|
module RecaptchaEnterprise
|
23
23
|
module V1beta1
|
24
24
|
module RecaptchaEnterpriseService
|
25
|
-
# Path helper methods for the
|
25
|
+
# Path helper methods for the RecaptchaEnterpriseService API.
|
26
26
|
module Paths
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Assessment resource string.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-recaptcha_enterprise-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-focus
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-rg
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.2'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
196
|
- !ruby/object:Gem::Version
|
169
197
|
version: '0'
|
170
198
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
199
|
+
rubygems_version: 3.1.3
|
172
200
|
signing_key:
|
173
201
|
specification_version: 4
|
174
202
|
summary: API Client library for the reCAPTCHA Enterprise V1beta1 API
|