google-cloud-translate-v3 0.3.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/translate/v3/translation_service/client.rb +580 -94
- data/lib/google/cloud/translate/v3/translation_service/operations.rb +149 -37
- data/lib/google/cloud/translate/v3/translation_service_pb.rb +101 -2
- data/lib/google/cloud/translate/v3/translation_service_services_pb.rb +11 -2
- data/lib/google/cloud/translate/v3/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/translate/v3/translation_service.rb +559 -25
- 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: 51835934ad0cc7de98c1f047cecb93f2a99d953a66e4dc570543e7cd10ae6860
|
4
|
+
data.tar.gz: bdb8e9989bb1c7a1d85be2404a0e4860cf52db78e40a8a4fae64c74dc644471d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939eec2c00e62e7a3342f291c0c33f437a48cc08e94ad6416a4206a4d48168fa664060dbefa8b8ad59facb7fc0770c89647a456acf1897cc1e1886efd21d1d31
|
7
|
+
data.tar.gz: e79c2b3c69fcfa26e8ef2bf0b0c0b8f3600c1978daf8507da880dbb8e925fa43a09872886964b61e3c56e9ba7edf1af3b30e11935560c191bbe8d1bdc2e58a7b
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-translate-v3
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Translate::V3::TranslationService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `TRANSLATE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `TRANSLATE_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/translate/v3"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Translate::V3::TranslationService::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/translate/v3"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |conf
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/translate/v3"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/translate/v3"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Translate::V3::TranslationService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Translate::V3::TranslateTextRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.translate_text request
|
38
38
|
```
|
39
39
|
|