google-cloud-channel 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/lib/google/cloud/channel/version.rb +1 -1
- data/lib/google/cloud/channel.rb +33 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd6d2c47463996bfaa6867fe6957d4bfca94860ec493f66c9a0c326bd882ae5e
|
4
|
+
data.tar.gz: 1c2b9b7fe67402712546075a738062686ffaca588f7cb52f73b17929c0ace823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a0d435bc2985885bdbeadb7eb47d25e1e82a448878d08cde1f89083d11ffd118f8c351b8da5bf41e247bdead0e56edaa9ab9b80468fb911cba2282e8210f679
|
7
|
+
data.tar.gz: 3820cffff9b0a3779fad7dd0417c48edf7ff23e788e83e2d7d96b03e4f0c33d8b01f2b942e32b95f6be225253873445f0e61ea6a37888155ba4942c7122b8a2c
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export CHANNEL_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/channel"
|
29
29
|
|
30
|
-
client = Google::Cloud::Channel.
|
30
|
+
client = Google::Cloud::Channel.cloud_channel_reports_service
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-channel
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
`::Google::Cloud::Channel::V1::
|
67
|
+
`::Google::Cloud::Channel::V1::CloudChannelReportsService::Credentials`):
|
68
68
|
|
69
69
|
* `CHANNEL_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
* `CHANNEL_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/channel"
|
|
77
77
|
|
78
78
|
ENV["CHANNEL_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::Channel.
|
80
|
+
client = Google::Cloud::Channel.cloud_channel_reports_service
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ it in an environment variable. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/channel"
|
90
90
|
|
91
|
-
client = Google::Cloud::Channel.
|
91
|
+
client = Google::Cloud::Channel.cloud_channel_reports_service do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -102,7 +102,7 @@ Google::Cloud::Channel.configure do |config|
|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::Channel.
|
105
|
+
client = Google::Cloud::Channel.cloud_channel_reports_service
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
@@ -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/lib/google/cloud/channel.rb
CHANGED
@@ -44,6 +44,39 @@ end
|
|
44
44
|
module Google
|
45
45
|
module Cloud
|
46
46
|
module Channel
|
47
|
+
##
|
48
|
+
# Create a new client object for CloudChannelReportsService.
|
49
|
+
#
|
50
|
+
# By default, this returns an instance of
|
51
|
+
# [Google::Cloud::Channel::V1::CloudChannelReportsService::Client](https://googleapis.dev/ruby/google-cloud-channel-v1/latest/Google/Cloud/Channel/V1/CloudChannelReportsService/Client.html)
|
52
|
+
# for version V1 of the API.
|
53
|
+
# However, you can specify specify a different API version by passing it in the
|
54
|
+
# `version` parameter. If the CloudChannelReportsService service is
|
55
|
+
# supported by that API version, and the corresponding gem is available, the
|
56
|
+
# appropriate versioned client will be returned.
|
57
|
+
#
|
58
|
+
# ## About CloudChannelReportsService
|
59
|
+
#
|
60
|
+
# CloudChannelReportsService lets Google Cloud resellers and
|
61
|
+
# distributors retrieve and combine a variety of data in Cloud Channel for
|
62
|
+
# multiple products (Google Cloud Platform (GCP), Google Voice, and
|
63
|
+
# Google Workspace.)
|
64
|
+
#
|
65
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
66
|
+
# Defaults to `:v1`.
|
67
|
+
# @return [CloudChannelReportsService::Client] A client object for the specified version.
|
68
|
+
#
|
69
|
+
def self.cloud_channel_reports_service version: :v1, &block
|
70
|
+
require "google/cloud/channel/#{version.to_s.downcase}"
|
71
|
+
|
72
|
+
package_name = Google::Cloud::Channel
|
73
|
+
.constants
|
74
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
75
|
+
.first
|
76
|
+
package_module = Google::Cloud::Channel.const_get package_name
|
77
|
+
package_module.const_get(:CloudChannelReportsService).const_get(:Client).new(&block)
|
78
|
+
end
|
79
|
+
|
47
80
|
##
|
48
81
|
# Create a new client object for CloudChannelService.
|
49
82
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-channel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.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-
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-channel-v1
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.13'
|
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.
|
29
|
+
version: '0.13'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|