google-cloud-functions-v1 0.8.0 → 0.9.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: 13db09e57aa8aeb741f71beeb73d4c79e77900221993f87989abd3d3246223a6
4
- data.tar.gz: 5e50d002ece3a483ea6d6e4130b830f59e3cbb92db112d8528574500b2a24ac2
3
+ metadata.gz: 97f52801b9579f6006085e6e0a3d7bb71894afe24ad60b7871906163023d0dc6
4
+ data.tar.gz: 990ef0eb79f444d14dc939ed2c22178551aa25178f95dccc8bdfc34ac95a3b5c
5
5
  SHA512:
6
- metadata.gz: 50b5650eb8b17b94364f44c217d26b483d5311be43fcc6fc80a6f2346724ebff5bd82df8d98914148de53a783590e5bbc82fca58b29a1f300fe3d14516ec9b8f
7
- data.tar.gz: 28b02abdfbb9c3a621e65f4ac474e625ca517177b9e3a8dc1e8d47e4f177279d6de10e50502712d5dc147f1b8f9797289496b53abb4135af5ced96df9fc3386d
6
+ metadata.gz: 21f515d95665e92e8d72d636a7169e55b7fc349144da9704e2f1743bf13ceb9b248daeb28c4764b7f5fcb01e69dfc5e367736e050eb3fc303d5682ae966cdc49
7
+ data.tar.gz: '03163831ba992f741d9d6eb25983e7faee2284ae048ff50ece0c2fed3470c55e317d1c2e4d47e03b52d2ff07d7553cb9a70544dcfaf5ae415384b1e1b48f9bf6'
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Functions V1 API
2
2
 
3
- API Client library for the Cloud Functions V1 API
3
+ Manages lightweight user-provided functions executed in response to events.
4
4
 
5
5
  The Cloud Functions API manages lightweight user-provided functions executed in response to events.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -234,13 +234,11 @@ module Google
234
234
  # # Call the list_functions method.
235
235
  # result = client.list_functions request
236
236
  #
237
- # # The returned object is of type Gapic::PagedEnumerable. You can
238
- # # iterate over all elements by calling #each, and the enumerable
239
- # # will lazily make API calls to fetch subsequent pages. Other
240
- # # methods are also available for managing paging directly.
241
- # result.each do |response|
237
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
238
+ # # over elements, and API calls will be issued to fetch pages as needed.
239
+ # result.each do |item|
242
240
  # # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction.
243
- # p response
241
+ # p item
244
242
  # end
245
243
  #
246
244
  def list_functions request, options = nil
@@ -416,14 +414,14 @@ module Google
416
414
  # # Call the create_function method.
417
415
  # result = client.create_function request
418
416
  #
419
- # # The returned object is of type Gapic::Operation. You can use this
420
- # # object to check the status of an operation, cancel it, or wait
421
- # # for results. Here is how to block until completion:
417
+ # # The returned object is of type Gapic::Operation. You can use it to
418
+ # # check the status of an operation, cancel it, or wait for results.
419
+ # # Here is how to wait for a response.
422
420
  # result.wait_until_done! timeout: 60
423
421
  # if result.response?
424
422
  # p result.response
425
423
  # else
426
- # puts "Error!"
424
+ # puts "No response received."
427
425
  # end
428
426
  #
429
427
  def create_function request, options = nil
@@ -511,14 +509,14 @@ module Google
511
509
  # # Call the update_function method.
512
510
  # result = client.update_function request
513
511
  #
514
- # # The returned object is of type Gapic::Operation. You can use this
515
- # # object to check the status of an operation, cancel it, or wait
516
- # # for results. Here is how to block until completion:
512
+ # # The returned object is of type Gapic::Operation. You can use it to
513
+ # # check the status of an operation, cancel it, or wait for results.
514
+ # # Here is how to wait for a response.
517
515
  # result.wait_until_done! timeout: 60
518
516
  # if result.response?
519
517
  # p result.response
520
518
  # else
521
- # puts "Error!"
519
+ # puts "No response received."
522
520
  # end
523
521
  #
524
522
  def update_function request, options = nil
@@ -606,14 +604,14 @@ module Google
606
604
  # # Call the delete_function method.
607
605
  # result = client.delete_function request
608
606
  #
609
- # # The returned object is of type Gapic::Operation. You can use this
610
- # # object to check the status of an operation, cancel it, or wait
611
- # # for results. Here is how to block until completion:
607
+ # # The returned object is of type Gapic::Operation. You can use it to
608
+ # # check the status of an operation, cancel it, or wait for results.
609
+ # # Here is how to wait for a response.
612
610
  # result.wait_until_done! timeout: 60
613
611
  # if result.response?
614
612
  # p result.response
615
613
  # else
616
- # puts "Error!"
614
+ # puts "No response received."
617
615
  # end
618
616
  #
619
617
  def delete_function request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -184,14 +182,6 @@ module Google
184
182
  gapic_version: ::Google::Cloud::Functions::V1::VERSION
185
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
186
184
 
187
- header_params = {}
188
- if request.name
189
- header_params["name"] = request.name
190
- end
191
-
192
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
193
- metadata[:"x-goog-request-params"] ||= request_params_header
194
-
195
185
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
196
186
  metadata: metadata,
197
187
  retry_policy: @config.rpcs.list_operations.retry_policy
@@ -253,14 +243,14 @@ module Google
253
243
  # # Call the get_operation method.
254
244
  # result = client.get_operation request
255
245
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
246
+ # # The returned object is of type Gapic::Operation. You can use it to
247
+ # # check the status of an operation, cancel it, or wait for results.
248
+ # # Here is how to wait for a response.
259
249
  # result.wait_until_done! timeout: 60
260
250
  # if result.response?
261
251
  # p result.response
262
252
  # else
263
- # puts "Error!"
253
+ # puts "No response received."
264
254
  # end
265
255
  #
266
256
  def get_operation request, options = nil
@@ -540,14 +530,14 @@ module Google
540
530
  # # Call the wait_operation method.
541
531
  # result = client.wait_operation request
542
532
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
533
+ # # The returned object is of type Gapic::Operation. You can use it to
534
+ # # check the status of an operation, cancel it, or wait for results.
535
+ # # Here is how to wait for a response.
546
536
  # result.wait_until_done! timeout: 60
547
537
  # if result.response?
548
538
  # p result.response
549
539
  # else
550
- # puts "Error!"
540
+ # puts "No response received."
551
541
  # end
552
542
  #
553
543
  def wait_operation request, options = nil