AUTHENTICATION.md in google-cloud-channel-v1-0.12.0 vs AUTHENTICATION.md in google-cloud-channel-v1-0.13.0
- old
+ new
@@ -25,11 +25,11 @@
3. Initialize the client.
```ruby
require "google/cloud/channel/v1"
-client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new
+client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new
```
## Credential Lookup
The google-cloud-channel-v1 library aims to make authentication
@@ -62,11 +62,11 @@
**Credentials JSON** itself can be stored for environments such as Docker
containers where writing files is difficult or not encouraged.
The environment variables that google-cloud-channel-v1
checks for credentials are configured on the service Credentials class (such as
-{::Google::Cloud::Channel::V1::CloudChannelService::Credentials}):
+{::Google::Cloud::Channel::V1::CloudChannelReportsService::Credentials}):
* `CHANNEL_CREDENTIALS` - Path to JSON file, or JSON contents
* `CHANNEL_KEYFILE` - Path to JSON file, or JSON contents
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
@@ -75,36 +75,36 @@
```ruby
require "google/cloud/channel/v1"
ENV["CHANNEL_CREDENTIALS"] = "path/to/keyfile.json"
-client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new
+client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new
```
### Configuration
The path to the **Credentials JSON** file can be configured instead of storing
it in an environment variable. Either on an individual client initialization:
```ruby
require "google/cloud/channel/v1"
-client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new do |config|
+client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new do |config|
config.credentials = "path/to/keyfile.json"
end
```
Or globally for all clients:
```ruby
require "google/cloud/channel/v1"
-::Google::Cloud::Channel::V1::CloudChannelService::Client.configure do |config|
+::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.configure do |config|
config.credentials = "path/to/keyfile.json"
end
-client = ::Google::Cloud::Channel::V1::CloudChannelService::Client.new
+client = ::Google::Cloud::Channel::V1::CloudChannelReportsService::Client.new
```
### Cloud SDK
This option allows for an easy way to authenticate during development. If
@@ -112,10 +112,10 @@
credentials are discovered.
To configure your system for this, simply:
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
-2. Authenticate using OAuth 2.0 `$ gcloud auth login`
+2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
3. Write code as if already authenticated.
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
*should* only be used during development.