google-analytics-admin 0.1.4 → 0.3.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: 76415d2c5c00688a3129dc9a239357c39fdb36aa153bb22561f7e88fd0503122
4
- data.tar.gz: d588010ea5c7c1491e26450af9fa1e158f7a99e85802327b220b384e991bea26
3
+ metadata.gz: d2acc0e86b1655a875bc5fe9db27282c7407a8c1138260c57629b4846c6c9e1b
4
+ data.tar.gz: dc91deb1b7f30d8cf4ceb82ce3c8c20d182c7dab709f196b712f9cd8d2f2d93a
5
5
  SHA512:
6
- metadata.gz: 879cc1759bf2a9de0311135ef5812bc227208c2ab9ef69f36993cc65bb0dec0e88ccef30d88fa9cd93683b9b0f0626787bd9aa46559779822783ff8514a1c28d
7
- data.tar.gz: 97e524fa900784ceaea3026bff348803db7503e7eb469b25d3f07ebc908ae9ac0fae05dd4bd4700497953715acf0be66cebeb04a8eda461d4d8f6a39c21c775b
6
+ metadata.gz: 86b232d70039c61c8a6598d90f2785d107c09548049e303be74719bfa0b185f0e7a601d3541e77a61f32ba646eb85ac7b95c152ee87e2db243cf958c63045db1
7
+ data.tar.gz: 3d47bc3b13f4e82a72512a5c153fc46b581ca5687919d44714bd62004aef2a3e98148f64291b0c25ca4e88cd91c7186cc11d74b0fbfb41f76de182f2573f8922
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
@@ -31,42 +31,16 @@ In order to use this library, you first need to go through the following steps:
31
31
  1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticsadmin.googleapis.com)
32
32
  1. {file:AUTHENTICATION.md Set up authentication.}
33
33
 
34
- ## Enabling Logging
35
-
36
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
37
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
38
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
39
- 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)
40
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
41
-
42
- Configuring a Ruby stdlib logger:
43
-
44
- ```ruby
45
- require "logger"
46
-
47
- module MyLogger
48
- LOGGER = Logger.new $stderr, level: Logger::WARN
49
- def logger
50
- LOGGER
51
- end
52
- end
53
-
54
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
55
- module GRPC
56
- extend MyLogger
57
- end
58
- ```
59
-
60
34
  ## Supported Ruby Versions
61
35
 
62
- This library is supported on Ruby 2.5+.
36
+ This library is supported on Ruby 2.6+.
63
37
 
64
38
  Google provides official support for Ruby versions that are actively supported
65
39
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
66
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
67
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
68
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
69
- about the Ruby support schedule.
40
+ in security maintenance, and not end of life. Older versions of Ruby _may_
41
+ still work, but are unsupported and not recommended. See
42
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
43
+ support schedule.
70
44
 
71
45
  ## Which client should I use?
72
46
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Analytics
22
22
  module Admin
23
- VERSION = "0.1.4"
23
+ VERSION = "0.3.0"
24
24
  end
25
25
  end
26
26
  end
@@ -32,11 +32,13 @@ module Google
32
32
  #
33
33
  # By default, this returns an instance of
34
34
  # [Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client](https://googleapis.dev/ruby/google-analytics-admin-v1alpha/latest/Google/Analytics/Admin/V1alpha/AnalyticsAdminService/Client.html)
35
- # for version V1alpha of the API.
36
- # However, you can specify specify a different API version by passing it in the
35
+ # for a gRPC client for version V1alpha of the API.
36
+ # However, you can specify a different API version by passing it in the
37
37
  # `version` parameter. If the AnalyticsAdminService service is
38
38
  # supported by that API version, and the corresponding gem is available, the
39
39
  # appropriate versioned client will be returned.
40
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
41
+ # the `transport` parameter.
40
42
  #
41
43
  # ## About AnalyticsAdminService
42
44
  #
@@ -44,17 +46,19 @@ module Google
44
46
  #
45
47
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
46
48
  # Defaults to `:v1alpha`.
47
- # @return [AnalyticsAdminService::Client] A client object for the specified version.
49
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
50
+ # @return [::Object] A client object for the specified version.
48
51
  #
49
- def self.analytics_admin_service version: :v1alpha, &block
52
+ def self.analytics_admin_service version: :v1alpha, transport: :grpc, &block
50
53
  require "google/analytics/admin/#{version.to_s.downcase}"
51
54
 
52
55
  package_name = Google::Analytics::Admin
53
56
  .constants
54
57
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
55
58
  .first
56
- package_module = Google::Analytics::Admin.const_get package_name
57
- package_module.const_get(:AnalyticsAdminService).const_get(:Client).new(&block)
59
+ service_module = Google::Analytics::Admin.const_get(package_name).const_get(:AnalyticsAdminService)
60
+ service_module = service_module.const_get(:Rest) if transport == :rest
61
+ service_module.const_get(:Client).new(&block)
58
62
  end
59
63
  end
60
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-analytics-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.3.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: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-analytics-admin-v1alpha
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0.16'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.0'
29
+ version: '0.16'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -183,14 +183,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- version: '2.5'
186
+ version: '2.6'
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.3.4
193
+ rubygems_version: 3.4.2
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: API Client library for the Google Analytics Admin API