google-cloud-retail 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30890ba4c3f4d7fa18cdc84b2a53586cb6bf868aef97b3b1977b24cf69d9c152
4
- data.tar.gz: effcf5e042292cb18b0fbd39c73464e8a87b2c5ff626be7e509693ec0bf0ba4b
3
+ metadata.gz: 51962e7d091e9cf35f169ddbd3a456ce5abfafa57e620a0e02cdc3efb296d464
4
+ data.tar.gz: 7fec15c75c5727b5d6d171424e2fc7788d59a86e485361d30cb0e7c1f8b04feb
5
5
  SHA512:
6
- metadata.gz: 696524f20fedb3e46d15172d07f3565f60e38d80ff88a213843897dacbcf5fd75281297235b74c0036ea462eb0ecb0233ce27f533a54b388153e954bfa088f21
7
- data.tar.gz: 17832af450375876b02485701e678adf0c6b50eae2b539edda1ca99da18a507894c0af7304463567df3cc1e9e577dddf70a9a8b87e03f60f938c50f3e2cfa846
6
+ metadata.gz: 422334059133c7e15f35fd7302c68e14f7b226723ce6bb73cb195226501fa4eca8da83d30693dbdfe50676b3943b8b23b3d114565af2682cbab8e9ad4b6b49aa
7
+ data.tar.gz: 94fadee832a96debe9440d0af33bd147b4af3d65a541a8ba806c9dfd4fa312bc6f13afc7bfe949aa491dd1fb28634953100aab6a4917c0fc1adc7d8936089c51
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-retail
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  `::Google::Cloud::Retail::V2::CatalogService::Credentials`):
68
68
 
69
- 1. `RETAIL_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `RETAIL_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `RETAIL_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `RETAIL_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/retail"
@@ -82,8 +82,8 @@ client = Google::Cloud::Retail.catalog_service
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/retail"
@@ -93,7 +93,7 @@ client = Google::Cloud::Retail.catalog_service do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/retail"
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Retail
23
- VERSION = "1.0.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
26
26
  end
@@ -74,6 +74,40 @@ module Google
74
74
  package_module.const_get(:CatalogService).const_get(:Client).new(&block)
75
75
  end
76
76
 
77
+ ##
78
+ # Create a new client object for CompletionService.
79
+ #
80
+ # By default, this returns an instance of
81
+ # [Google::Cloud::Retail::V2::CompletionService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/CompletionService/Client.html)
82
+ # for version V2 of the API.
83
+ # However, you can specify specify a different API version by passing it in the
84
+ # `version` parameter. If the CompletionService service is
85
+ # supported by that API version, and the corresponding gem is available, the
86
+ # appropriate versioned client will be returned.
87
+ #
88
+ # ## About CompletionService
89
+ #
90
+ # Auto-completion service for retail.
91
+ #
92
+ # This feature is only available for users who have Retail Search enabled.
93
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
94
+ # cloud sales if you are interested in using Retail Search.
95
+ #
96
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
97
+ # Defaults to `:v2`.
98
+ # @return [CompletionService::Client] A client object for the specified version.
99
+ #
100
+ def self.completion_service version: :v2, &block
101
+ require "google/cloud/retail/#{version.to_s.downcase}"
102
+
103
+ package_name = Google::Cloud::Retail
104
+ .constants
105
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
106
+ .first
107
+ package_module = Google::Cloud::Retail.const_get package_name
108
+ package_module.const_get(:CompletionService).const_get(:Client).new(&block)
109
+ end
110
+
77
111
  ##
78
112
  # Create a new client object for PredictionService.
79
113
  #
@@ -135,6 +169,40 @@ module Google
135
169
  package_module.const_get(:ProductService).const_get(:Client).new(&block)
136
170
  end
137
171
 
172
+ ##
173
+ # Create a new client object for SearchService.
174
+ #
175
+ # By default, this returns an instance of
176
+ # [Google::Cloud::Retail::V2::SearchService::Client](https://googleapis.dev/ruby/google-cloud-retail-v2/latest/Google/Cloud/Retail/V2/SearchService/Client.html)
177
+ # for version V2 of the API.
178
+ # However, you can specify specify a different API version by passing it in the
179
+ # `version` parameter. If the SearchService service is
180
+ # supported by that API version, and the corresponding gem is available, the
181
+ # appropriate versioned client will be returned.
182
+ #
183
+ # ## About SearchService
184
+ #
185
+ # Service for search.
186
+ #
187
+ # This feature is only available for users who have Retail Search enabled.
188
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
189
+ # cloud sales if you are interested in using Retail Search.
190
+ #
191
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
192
+ # Defaults to `:v2`.
193
+ # @return [SearchService::Client] A client object for the specified version.
194
+ #
195
+ def self.search_service version: :v2, &block
196
+ require "google/cloud/retail/#{version.to_s.downcase}"
197
+
198
+ package_name = Google::Cloud::Retail
199
+ .constants
200
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
201
+ .first
202
+ package_module = Google::Cloud::Retail.const_get package_name
203
+ package_module.const_get(:SearchService).const_get(:Client).new(&block)
204
+ end
205
+
138
206
  ##
139
207
  # Create a new client object for UserEventService.
140
208
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-31 00:00:00.000000000 Z
11
+ date: 2021-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -16,28 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: '1.6'
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: '1.5'
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-retail-v2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.4'
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: '0.3'
36
+ version: 2.a
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0.4'
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: '0.3'
46
+ version: 2.a
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: google-style
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -184,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
190
  - !ruby/object:Gem::Version
185
191
  version: '0'
186
192
  requirements: []
187
- rubygems_version: 3.2.13
193
+ rubygems_version: 3.2.17
188
194
  signing_key:
189
195
  specification_version: 4
190
196
  summary: API Client library for the Retail API