google-cloud-retail 1.0.2 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86f3b7ebbef1f6113d06456d7016d71a836c0cba128f24006f397d2feb58a646
4
- data.tar.gz: d7ae39488c704ba405ecc64356dbf2464b2d8f6fa10d34a1df0c8d9728942d2e
3
+ metadata.gz: 1196cb92f561986cfb3df2dd69f1746fc6f9454b9fc0e896d957bd57a3c4dea9
4
+ data.tar.gz: eea570b24f3a396ba110294168dcff6ff34c67f5c676edd1b7396b84aeda6afa
5
5
  SHA512:
6
- metadata.gz: 9cb81ee8aa4cdd2179217461a1a261884de6372c5e7260fe00a4782526918aeb9ded255d5416ab10edba33ce016ab11507530eb8583efa55acce423119671e30
7
- data.tar.gz: 5b58b581e2cd69fb7b1d5732d6bc1907aab894d1a8646ae1c772971daf72ed05d39cd88e0b0b3762e0e8023ab1ace5b3e7b2e28c5f7870f02f26281766e3f149
6
+ metadata.gz: c245f549bc5eb8cbe9d09c9d600abca7fa6de463f5c4451877ac59d13ceb830a414f2046847dd8f336ea2416fabb1d696b655fcc3a445efaf4cfebfe1de45a28
7
+ data.tar.gz: 31092fac6a9879a7992532ba42dc854b427434a33a31366328fa5928092f2e2791bd26f5ebbac27c4a4d786fd6cae8174bf9363b16f88a835e34e6ad6f75fea2
@@ -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
+ # Contact Retail Support (retail-search-support@google.com) if you are
94
+ # 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
+ # Contact Retail Support (retail-search-support@google.com) if you are
189
+ # 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
  #
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Retail
23
- VERSION = "1.0.2"
23
+ VERSION = "1.1.0"
24
24
  end
25
25
  end
26
26
  end
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.2
4
+ version: 1.1.0
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-07-12 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.3'
33
+ version: '0.4'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.3'
43
+ version: '0.4'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a