google-cloud-retail 1.0.1 → 1.1.2

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: af87a0c6795e621937d2b38048b97f0bcbfc28f709cdc3fc9b0f094400be8d6f
4
- data.tar.gz: 223bb020cc76f2556ae7d2a0d0c7bcf32fa67a7f7e27f433e0ed802f0f49a7fb
3
+ metadata.gz: b1d608763e7661aadb9a8bcf3bc059512759549fef4b0e6101ecbb169503c531
4
+ data.tar.gz: d3449081a36b65525625adc6ffc21a71d9a2ee672ed19d52f4f0a852b7fcbdc2
5
5
  SHA512:
6
- metadata.gz: 3c1e1c00356eb50ae49f7cc3f4415dce7fef4f2709a5634500ea969c23fd5ca1d143530a73b488ae2ca9f0ca07b6c0c9c517ee614b76934acedf8a4f8237fd7b
7
- data.tar.gz: ff288a0b4d1d68bf7ae5e5d458c2cf08d10bc307c04132db8b91801fba05c0f4ef313e41065ea3eb9e1cf5023cfbb4415ddb5a917614210379cb35b11da5db47
6
+ metadata.gz: a93fe2e853564130d4e1a078d368791e5d4c74bb1bce444825eb4116085752d0d6242349a625c58f37c83d0b611c8acac0ad12eb3be0106f3f3fc10b70361364
7
+ data.tar.gz: ed9c53fe0da430686fe3e9aedbfd85d9966ad1145e5d412f1d15573a67fc845042920f03f3a81db514a65c8220548fc5ad6ef697d7201de2bbdd52ccb6c09952
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Retail API
2
+ --title="Retail API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -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"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Retail
23
- VERSION = "1.0.1"
23
+ VERSION = "1.1.2"
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.1
4
+ version: 1.1.2
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-06-30 00:00:00.000000000 Z
11
+ date: 2022-01-11 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
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.2.17
193
+ rubygems_version: 3.3.4
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API Client library for the Retail API