google-cloud-service_directory-v1 0.3.4 → 0.4.0

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: 15550e986d3255ecde5eed88d342a569160763ef89c25dba5998c544740a3cec
4
- data.tar.gz: d2cfb3e8ce57084f6d49a7ca133c39a9a9891e585f370a3b1ad4b5f00bbe992c
3
+ metadata.gz: 31f176f369a7355cea4030eab88c2c7a2e805aed84faf91397cca4670adf7bfe
4
+ data.tar.gz: de63a9e0d4d168d4269a9daca59803ea8e8a710512dd3b2557f538f48163dc7e
5
5
  SHA512:
6
- metadata.gz: a447b96dde045f8c31d2d9606e8c3ec1551cbc9f8592a6092aefe882a4d9b319bdaa5052cae0e60c8894252f5527afaf336b3fba9b0b1fbe7b01fde429388b4c
7
- data.tar.gz: 7bcd76171c036dbbc12126683daf04df9851ce1e849a0822116a5c26944ef84cf91711b2661ab88f590fba0b8741ff3c008fa118ad87674614bba07fa3d00075
6
+ metadata.gz: 25cfc45288eb05017390b2a49b9b2d9bdaef3273141c0de917bf30419167ed7bb20e52cf52ce2e07072f8bd9b8f2997511d4995f490f3f4e01e1bc9bab8b6149
7
+ data.tar.gz: ec420e0700f7247a314488cb6dae1e670f47481f627caa2845230058044730e6b3d0e8e45e679cbe2e8d0c6aa9c36426e1405af279e71682c5c2e913b82fb90f
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Service Directory V1 API
2
+ --title="Service Directory V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -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.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::ServiceDirectory::V1::ResolveServiceRequest.new # (re
37
37
  response = client.resolve_service request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-service_directory-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-service_directory-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/service-directory)
@@ -203,6 +203,21 @@ module Google
203
203
  #
204
204
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
205
205
  #
206
+ # @example Basic example
207
+ # require "google/cloud/service_directory/v1"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::ServiceDirectory::V1::LookupService::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::ServiceDirectory::V1::ResolveServiceRequest.new
214
+ #
215
+ # # Call the resolve_service method.
216
+ # result = client.resolve_service request
217
+ #
218
+ # # The returned object is of type Google::Cloud::ServiceDirectory::V1::ResolveServiceResponse.
219
+ # p result
220
+ #
206
221
  def resolve_service request, options = nil
207
222
  raise ::ArgumentError, "request must be provided" if request.nil?
208
223
 
@@ -220,9 +235,11 @@ module Google
220
235
  gapic_version: ::Google::Cloud::ServiceDirectory::V1::VERSION
221
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
222
237
 
223
- header_params = {
224
- "name" => request.name
225
- }
238
+ header_params = {}
239
+ if request.name
240
+ header_params["name"] = request.name
241
+ end
242
+
226
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
227
244
  metadata[:"x-goog-request-params"] ||= request_params_header
228
245