google-cloud-essential_contacts-v1 0.2.0 → 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: 16375aa5538eeb3fe26b20e4a705295caf4c78539f61b6d87706fdd5808d5c13
4
- data.tar.gz: 6b6207395ac85a7008f4224817bcfce455e2ed31b5c3f2b8284435ebc08e365a
3
+ metadata.gz: 731dcda8218add231df4bd6cba3900500e528429a14ac206c220b682777188ea
4
+ data.tar.gz: 35ab8548f8f332699f1a2a405f836ed5f106876c042e55b46c809907fbc98701
5
5
  SHA512:
6
- metadata.gz: 52df46cea6b0fb02c11581984b42b8350a2341711e19fe76dac9926d624898ab2de90b7ee1a4097ccb291802363fd84103159d5366342d5cf68a380e8f2f58bd
7
- data.tar.gz: b832cc7fe700e46f43e901e06103cf0096d1844eda023990832ece03cf0965a92b4ee0dc11c1012d08ef23aa94b02c93e553df770099386621f2e37680a6a62f
6
+ metadata.gz: c47ea560ca299f4303f72b903deb39828665434200f9a43bd151fc770cb774002de9a400a979bd1352e77eb9000aba29c94c47c875bc2d1f36715123e13762eb
7
+ data.tar.gz: a5ce37b8989f9572aa8fa79326bdfa4fd0f963c4473fa19653924bfa1d2066dbbe5beb13161150b2a6208dd012d693e9cd75b4c0d4d960891986da8c2ec25fe7
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
@@ -46,8 +46,8 @@ 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,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
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
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/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.
53
53
 
@@ -143,7 +143,7 @@ module Google
143
143
  credentials = @config.credentials
144
144
  # Use self-signed JWT if the endpoint is unchanged from default,
145
145
  # but only if the default endpoint does not have a region prefix.
146
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
146
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
147
147
  !@config.endpoint.split(".").first.include?("-")
148
148
  credentials ||= Credentials.default scope: @config.scope,
149
149
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -398,13 +398,11 @@ module Google
398
398
  # # Call the list_contacts method.
399
399
  # result = client.list_contacts request
400
400
  #
401
- # # The returned object is of type Gapic::PagedEnumerable. You can
402
- # # iterate over all elements by calling #each, and the enumerable
403
- # # will lazily make API calls to fetch subsequent pages. Other
404
- # # methods are also available for managing paging directly.
405
- # result.each do |response|
401
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
402
+ # # over elements, and API calls will be issued to fetch pages as needed.
403
+ # result.each do |item|
406
404
  # # Each element is of type ::Google::Cloud::EssentialContacts::V1::Contact.
407
- # p response
405
+ # p item
408
406
  # end
409
407
  #
410
408
  def list_contacts request, options = nil
@@ -684,13 +682,11 @@ module Google
684
682
  # # Call the compute_contacts method.
685
683
  # result = client.compute_contacts request
686
684
  #
687
- # # The returned object is of type Gapic::PagedEnumerable. You can
688
- # # iterate over all elements by calling #each, and the enumerable
689
- # # will lazily make API calls to fetch subsequent pages. Other
690
- # # methods are also available for managing paging directly.
691
- # result.each do |response|
685
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
686
+ # # over elements, and API calls will be issued to fetch pages as needed.
687
+ # result.each do |item|
692
688
  # # Each element is of type ::Google::Cloud::EssentialContacts::V1::Contact.
693
- # p response
689
+ # p item
694
690
  # end
695
691
  #
696
692
  def compute_contacts request, options = nil
@@ -871,9 +867,9 @@ module Google
871
867
  # * (`String`) The path to a service account key file in JSON format
872
868
  # * (`Hash`) A service account key as a Hash
873
869
  # * (`Google::Auth::Credentials`) A googleauth credentials object
874
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
870
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
875
871
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
876
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
872
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
877
873
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
878
874
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
879
875
  # * (`nil`) indicating no credentials
@@ -915,7 +911,9 @@ module Google
915
911
  class Configuration
916
912
  extend ::Gapic::Config
917
913
 
918
- config_attr :endpoint, "essentialcontacts.googleapis.com", ::String
914
+ DEFAULT_ENDPOINT = "essentialcontacts.googleapis.com"
915
+
916
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
919
917
  config_attr :credentials, nil do |value|
920
918
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
921
919
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC