google-cloud-translate-v2 0.4.0 → 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 -26
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/translate/v2/service.rb +2 -2
- data/lib/google/cloud/translate/v2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa162454371617ef8b8581f85cfa718a1faaedf7977490d08bceb202fcce065
|
4
|
+
data.tar.gz: 6529c870d999fea3ee06b01c392fe87cf5e5b903eaf36b0c4f45f27708ce2172
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d6c851b4c919a06ae5bdd28112cfec17ea848caf07837571c5c90caba1ae91710d0dad8a5414fa98e9f201e4eb0919d47d9c5da91f59ea1c2f886868b9696e3
|
7
|
+
data.tar.gz: db8b5d2a8c25ebc19c564a5d5bd42a9089e14b5cc61deab58a02244b0b4bc6596d0e237d63abab77b562c4f3f4296357fc8b75cdd399a91f0316526942da0197
|
data/AUTHENTICATION.md
CHANGED
@@ -113,15 +113,6 @@ To configure your system for this, simply:
|
|
113
113
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
114
114
|
*should* only be used during development.
|
115
115
|
|
116
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
117
|
-
[dev-console]: https://console.cloud.google.com/project
|
118
|
-
|
119
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
120
|
-
|
121
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
122
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
123
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
124
|
-
|
125
116
|
## Creating a Service Account
|
126
117
|
|
127
118
|
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
@@ -131,31 +122,22 @@ connect to most services with google-cloud-translate.
|
|
131
122
|
If you are not running this client on Google Compute Engine, you need a Google
|
132
123
|
Developers service account.
|
133
124
|
|
134
|
-
1. Visit the [Google
|
125
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
135
126
|
1. Create a new project or click on an existing project.
|
136
|
-
1. Activate the
|
127
|
+
1. Activate the menu in the upper left and select **APIs & Services**. From
|
137
128
|
here, you will enable the APIs that your application requires.
|
138
129
|
|
139
|
-
![Enable the APIs that your application requires][enable-apis]
|
140
|
-
|
141
130
|
*Note: You may need to enable billing in order to use these services.*
|
142
131
|
|
143
132
|
1. Select **Credentials** from the side navigation.
|
144
133
|
|
145
|
-
|
146
|
-
|
147
|
-
![Create a new service account][create-new-service-account]
|
148
|
-
|
149
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
150
|
-
|
151
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
152
|
-
guided through downloading a new JSON key file.
|
153
|
-
|
154
|
-
If you want to re-use an existing service account, you can easily generate a
|
155
|
-
new key file. Just select the account you wish to re-use, and click "Generate
|
156
|
-
new JSON key":
|
134
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
135
|
+
"Service account" to be guided through downloading a new JSON key file.
|
157
136
|
|
158
|
-
|
137
|
+
If you want to re-use an existing service account, you can easily generate
|
138
|
+
a new key file. Just select the account you wish to re-use click the pencil
|
139
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
140
|
+
and then select **Add Key**.
|
159
141
|
|
160
142
|
The key file you download will be used by this library to authenticate API
|
161
143
|
requests and should be stored in a secure location.
|
data/CHANGELOG.md
CHANGED
@@ -50,7 +50,7 @@ module Google
|
|
50
50
|
body = {
|
51
51
|
q: Array(text), target: to, source: from, format: format,
|
52
52
|
model: model, cid: cid
|
53
|
-
}.
|
53
|
+
}.compact.to_json
|
54
54
|
|
55
55
|
post "/language/translate/v2", body
|
56
56
|
end
|
@@ -104,7 +104,7 @@ module Google
|
|
104
104
|
def http
|
105
105
|
@http ||= Faraday.new url: @url, request: {
|
106
106
|
open_timeout: @timeout, timeout: @timeout
|
107
|
-
}.
|
107
|
+
}.compact
|
108
108
|
end
|
109
109
|
|
110
110
|
##
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-translate-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
271
|
- !ruby/object:Gem::Version
|
272
272
|
version: '0'
|
273
273
|
requirements: []
|
274
|
-
rubygems_version: 3.
|
274
|
+
rubygems_version: 3.4.2
|
275
275
|
signing_key:
|
276
276
|
specification_version: 4
|
277
277
|
summary: API Client library for Cloud Translation V2 API
|