OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/cloud-platform": { | 5 "https://www.googleapis.com/auth/cloud-platform": { |
6 "description": "View and manage your data across Google Clou
d Platform services" | 6 "description": "View and manage your data across Google Clou
d Platform services" |
7 }, | 7 }, |
8 "https://www.googleapis.com/auth/cloud-translation": { | 8 "https://www.googleapis.com/auth/cloud-translation": { |
9 "description": "Translate text from one language to another
using Google Translate" | 9 "description": "Translate text from one language to another
using Google Translate" |
10 } | 10 } |
(...skipping 13 matching lines...) Expand all Loading... |
24 "icons": { | 24 "icons": { |
25 "x16": "https://www.google.com/images/icons/product/translate-16.png", | 25 "x16": "https://www.google.com/images/icons/product/translate-16.png", |
26 "x32": "https://www.google.com/images/icons/product/translate-32.png" | 26 "x32": "https://www.google.com/images/icons/product/translate-32.png" |
27 }, | 27 }, |
28 "id": "translate:v2", | 28 "id": "translate:v2", |
29 "kind": "discovery#restDescription", | 29 "kind": "discovery#restDescription", |
30 "name": "translate", | 30 "name": "translate", |
31 "ownerDomain": "google.com", | 31 "ownerDomain": "google.com", |
32 "ownerName": "Google", | 32 "ownerName": "Google", |
33 "parameters": { | 33 "parameters": { |
34 "access_token": { | |
35 "description": "OAuth access token.", | |
36 "location": "query", | |
37 "type": "string" | |
38 }, | |
39 "key": { | |
40 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", | |
41 "location": "query", | |
42 "type": "string" | |
43 }, | |
44 "quotaUser": { | 34 "quotaUser": { |
45 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters. Overrides userIp if both are provided.", | 35 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters. Overrides userIp if both are provided.", |
46 "location": "query", | 36 "location": "query", |
47 "type": "string" | 37 "type": "string" |
48 }, | 38 }, |
49 "pp": { | 39 "pp": { |
50 "default": "true", | 40 "default": "true", |
51 "description": "Pretty-print response.", | 41 "description": "Pretty-print response.", |
52 "location": "query", | 42 "location": "query", |
53 "type": "boolean" | 43 "type": "boolean" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 "media", | 99 "media", |
110 "proto" | 100 "proto" |
111 ], | 101 ], |
112 "enumDescriptions": [ | 102 "enumDescriptions": [ |
113 "Responses with Content-Type of application/json", | 103 "Responses with Content-Type of application/json", |
114 "Media download with context-dependent Content-Type", | 104 "Media download with context-dependent Content-Type", |
115 "Responses with Content-Type of application/x-protobuf" | 105 "Responses with Content-Type of application/x-protobuf" |
116 ], | 106 ], |
117 "location": "query", | 107 "location": "query", |
118 "type": "string" | 108 "type": "string" |
| 109 }, |
| 110 "access_token": { |
| 111 "description": "OAuth access token.", |
| 112 "location": "query", |
| 113 "type": "string" |
| 114 }, |
| 115 "key": { |
| 116 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
| 117 "location": "query", |
| 118 "type": "string" |
119 } | 119 } |
120 }, | 120 }, |
121 "protocol": "rest", | 121 "protocol": "rest", |
122 "resources": { | 122 "resources": { |
123 "detections": { | 123 "detections": { |
124 "methods": { | 124 "methods": { |
125 "detect": { | 125 "detect": { |
126 "description": "Detects the language of text within a reques
t.", | 126 "description": "Detects the language of text within a reques
t.", |
127 "httpMethod": "POST", | 127 "httpMethod": "POST", |
128 "id": "language.detections.detect", | 128 "id": "language.detections.detect", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 } | 168 } |
169 }, | 169 }, |
170 "languages": { | 170 "languages": { |
171 "methods": { | 171 "methods": { |
172 "list": { | 172 "list": { |
173 "description": "Returns a list of supported languages for tr
anslation.", | 173 "description": "Returns a list of supported languages for tr
anslation.", |
174 "httpMethod": "GET", | 174 "httpMethod": "GET", |
175 "id": "language.languages.list", | 175 "id": "language.languages.list", |
176 "parameters": { | 176 "parameters": { |
| 177 "target": { |
| 178 "description": "The language to use to return locali
zed, human readable names of supported\nlanguages.", |
| 179 "location": "query", |
| 180 "type": "string" |
| 181 }, |
177 "model": { | 182 "model": { |
178 "description": "The model type for which supported l
anguages should be returned.", | 183 "description": "The model type for which supported l
anguages should be returned.", |
179 "location": "query", | 184 "location": "query", |
180 "type": "string" | 185 "type": "string" |
181 }, | |
182 "target": { | |
183 "description": "The language to use to return locali
zed, human readable names of supported\nlanguages.", | |
184 "location": "query", | |
185 "type": "string" | |
186 } | 186 } |
187 }, | 187 }, |
188 "path": "v2/languages", | 188 "path": "v2/languages", |
189 "response": { | 189 "response": { |
190 "$ref": "LanguagesListResponse" | 190 "$ref": "LanguagesListResponse" |
191 }, | 191 }, |
192 "scopes": [ | 192 "scopes": [ |
193 "https://www.googleapis.com/auth/cloud-translation", | 193 "https://www.googleapis.com/auth/cloud-translation", |
194 "https://www.googleapis.com/auth/cloud-platform" | 194 "https://www.googleapis.com/auth/cloud-platform" |
195 ] | 195 ] |
196 } | 196 } |
197 } | 197 } |
198 }, | 198 }, |
199 "translations": { | 199 "translations": { |
200 "methods": { | 200 "methods": { |
201 "translate": { | |
202 "description": "Translates input text, returning translated
text.", | |
203 "httpMethod": "POST", | |
204 "id": "language.translations.translate", | |
205 "parameterOrder": [], | |
206 "parameters": {}, | |
207 "path": "v2", | |
208 "request": { | |
209 "$ref": "TranslateTextRequest" | |
210 }, | |
211 "response": { | |
212 "$ref": "TranslationsListResponse" | |
213 }, | |
214 "scopes": [ | |
215 "https://www.googleapis.com/auth/cloud-translation", | |
216 "https://www.googleapis.com/auth/cloud-platform" | |
217 ] | |
218 }, | |
219 "list": { | 201 "list": { |
220 "description": "Translates input text, returning translated
text.", | 202 "description": "Translates input text, returning translated
text.", |
221 "httpMethod": "GET", | 203 "httpMethod": "GET", |
222 "id": "language.translations.list", | 204 "id": "language.translations.list", |
223 "parameterOrder": [ | 205 "parameterOrder": [ |
224 "q", | 206 "q", |
225 "target" | 207 "target" |
226 ], | 208 ], |
227 "parameters": { | 209 "parameters": { |
228 "model": { | |
229 "description": "The `model` type requested for this
translation. Valid values are\nlisted in public documentation.", | |
230 "location": "query", | |
231 "type": "string" | |
232 }, | |
233 "q": { | 210 "q": { |
234 "description": "The input text to translate. Repeat
this parameter to perform translation\noperations on multiple text inputs.", | 211 "description": "The input text to translate. Repeat
this parameter to perform translation\noperations on multiple text inputs.", |
235 "location": "query", | 212 "location": "query", |
236 "repeated": true, | 213 "repeated": true, |
237 "required": true, | 214 "required": true, |
238 "type": "string" | 215 "type": "string" |
239 }, | 216 }, |
240 "source": { | 217 "source": { |
241 "description": "The language of the source text, set
to one of the language codes listed in\nLanguage Support. If the source languag
e is not specified, the API will\nattempt to identify the source language automa
tically and return it within\nthe response.", | 218 "description": "The language of the source text, set
to one of the language codes listed in\nLanguage Support. If the source languag
e is not specified, the API will\nattempt to identify the source language automa
tically and return it within\nthe response.", |
242 "location": "query", | 219 "location": "query", |
(...skipping 16 matching lines...) Expand all Loading... |
259 "enum": [ | 236 "enum": [ |
260 "html", | 237 "html", |
261 "text" | 238 "text" |
262 ], | 239 ], |
263 "enumDescriptions": [ | 240 "enumDescriptions": [ |
264 "Specifies the input is in HTML", | 241 "Specifies the input is in HTML", |
265 "Specifies the input is in plain textual format" | 242 "Specifies the input is in plain textual format" |
266 ], | 243 ], |
267 "location": "query", | 244 "location": "query", |
268 "type": "string" | 245 "type": "string" |
| 246 }, |
| 247 "model": { |
| 248 "description": "The `model` type requested for this
translation. Valid values are\nlisted in public documentation.", |
| 249 "location": "query", |
| 250 "type": "string" |
269 } | 251 } |
270 }, | 252 }, |
271 "path": "v2", | 253 "path": "v2", |
272 "response": { | 254 "response": { |
273 "$ref": "TranslationsListResponse" | 255 "$ref": "TranslationsListResponse" |
274 }, | 256 }, |
275 "scopes": [ | 257 "scopes": [ |
276 "https://www.googleapis.com/auth/cloud-translation", | 258 "https://www.googleapis.com/auth/cloud-translation", |
277 "https://www.googleapis.com/auth/cloud-platform" | 259 "https://www.googleapis.com/auth/cloud-platform" |
278 ] | 260 ] |
| 261 }, |
| 262 "translate": { |
| 263 "description": "Translates input text, returning translated
text.", |
| 264 "httpMethod": "POST", |
| 265 "id": "language.translations.translate", |
| 266 "parameterOrder": [], |
| 267 "parameters": {}, |
| 268 "path": "v2", |
| 269 "request": { |
| 270 "$ref": "TranslateTextRequest" |
| 271 }, |
| 272 "response": { |
| 273 "$ref": "TranslationsListResponse" |
| 274 }, |
| 275 "scopes": [ |
| 276 "https://www.googleapis.com/auth/cloud-translation", |
| 277 "https://www.googleapis.com/auth/cloud-platform" |
| 278 ] |
279 } | 279 } |
280 } | 280 } |
281 } | 281 } |
282 }, | 282 }, |
283 "revision": "20170525", | 283 "revision": "20170525", |
284 "rootUrl": "https://translation.googleapis.com/", | 284 "rootUrl": "https://translation.googleapis.com/", |
285 "schemas": { | 285 "schemas": { |
286 "LanguagesResource": { | |
287 "id": "LanguagesResource", | |
288 "properties": { | |
289 "name": { | |
290 "description": "Human readable name of the language localize
d to the target language.", | |
291 "type": "string" | |
292 }, | |
293 "language": { | |
294 "description": "Supported language code, generally consistin
g of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 code
s including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH
')", | |
295 "type": "string" | |
296 } | |
297 }, | |
298 "type": "object" | |
299 }, | |
300 "DetectionsListResponse": { | 286 "DetectionsListResponse": { |
301 "id": "DetectionsListResponse", | 287 "id": "DetectionsListResponse", |
302 "properties": { | 288 "properties": { |
303 "detections": { | 289 "detections": { |
304 "description": "A detections contains detection results of s
everal text", | 290 "description": "A detections contains detection results of s
everal text", |
305 "items": { | 291 "items": { |
306 "$ref": "DetectionsResource" | 292 "$ref": "DetectionsResource" |
307 }, | 293 }, |
308 "type": "array" | 294 "type": "array" |
309 } | 295 } |
(...skipping 17 matching lines...) Expand all Loading... |
327 "languages": { | 313 "languages": { |
328 "description": "List of source/target languages supported by
the translation API. If target parameter is unspecified, the list is sorted by
the ASCII code point order of the language code. If target parameter is specifie
d, the list is sorted by the collation order of the language name in the target
language.", | 314 "description": "List of source/target languages supported by
the translation API. If target parameter is unspecified, the list is sorted by
the ASCII code point order of the language code. If target parameter is specifie
d, the list is sorted by the collation order of the language name in the target
language.", |
329 "items": { | 315 "items": { |
330 "$ref": "LanguagesResource" | 316 "$ref": "LanguagesResource" |
331 }, | 317 }, |
332 "type": "array" | 318 "type": "array" |
333 } | 319 } |
334 }, | 320 }, |
335 "type": "object" | 321 "type": "object" |
336 }, | 322 }, |
| 323 "TranslationsResource": { |
| 324 "id": "TranslationsResource", |
| 325 "properties": { |
| 326 "translatedText": { |
| 327 "description": "Text translated into the target language.", |
| 328 "type": "string" |
| 329 }, |
| 330 "detectedSourceLanguage": { |
| 331 "description": "The source language of the initial request,
detected automatically, if\nno source language was passed within the initial req
uest. If the\nsource language was passed, auto-detection of the language will no
t\noccur and this field will be empty.", |
| 332 "type": "string" |
| 333 }, |
| 334 "model": { |
| 335 "description": "The `model` type used for this translation.
Valid values are\nlisted in public documentation. Can be different from requeste
d `model`.\nPresent only if specific model type was explicitly requested.", |
| 336 "type": "string" |
| 337 } |
| 338 }, |
| 339 "type": "object" |
| 340 }, |
337 "DetectionsResource": { | 341 "DetectionsResource": { |
338 "description": "An array of languages which we detect for the given
text The most likely language list first.", | 342 "description": "An array of languages which we detect for the given
text The most likely language list first.", |
339 "id": "DetectionsResource", | 343 "id": "DetectionsResource", |
340 "items": { | 344 "items": { |
341 "properties": { | 345 "properties": { |
342 "confidence": { | 346 "confidence": { |
343 "description": "The confidence of the detection result o
f this language.", | 347 "description": "The confidence of the detection result o
f this language.", |
344 "format": "float", | 348 "format": "float", |
345 "type": "number" | 349 "type": "number" |
346 }, | 350 }, |
347 "language": { | 351 "language": { |
348 "description": "The language we detected.", | 352 "description": "The language we detected.", |
349 "type": "string" | 353 "type": "string" |
350 }, | 354 }, |
351 "isReliable": { | 355 "isReliable": { |
352 "description": "A boolean to indicate is the language de
tection result reliable.", | 356 "description": "A boolean to indicate is the language de
tection result reliable.", |
353 "type": "boolean" | 357 "type": "boolean" |
354 } | 358 } |
355 }, | 359 }, |
356 "type": "object" | 360 "type": "object" |
357 }, | 361 }, |
358 "type": "array" | 362 "type": "array" |
359 }, | 363 }, |
360 "TranslationsResource": { | |
361 "id": "TranslationsResource", | |
362 "properties": { | |
363 "model": { | |
364 "description": "The `model` type used for this translation.
Valid values are\nlisted in public documentation. Can be different from requeste
d `model`.\nPresent only if specific model type was explicitly requested.", | |
365 "type": "string" | |
366 }, | |
367 "translatedText": { | |
368 "description": "Text translated into the target language.", | |
369 "type": "string" | |
370 }, | |
371 "detectedSourceLanguage": { | |
372 "description": "The source language of the initial request,
detected automatically, if\nno source language was passed within the initial req
uest. If the\nsource language was passed, auto-detection of the language will no
t\noccur and this field will be empty.", | |
373 "type": "string" | |
374 } | |
375 }, | |
376 "type": "object" | |
377 }, | |
378 "TranslationsListResponse": { | 364 "TranslationsListResponse": { |
379 "description": "The main language translation response message.", | 365 "description": "The main language translation response message.", |
380 "id": "TranslationsListResponse", | 366 "id": "TranslationsListResponse", |
381 "properties": { | 367 "properties": { |
382 "translations": { | 368 "translations": { |
383 "description": "Translations contains list of translation re
sults of given text", | 369 "description": "Translations contains list of translation re
sults of given text", |
384 "items": { | 370 "items": { |
385 "$ref": "TranslationsResource" | 371 "$ref": "TranslationsResource" |
386 }, | 372 }, |
387 "type": "array" | 373 "type": "array" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 "properties": { | 411 "properties": { |
426 "q": { | 412 "q": { |
427 "description": "The input text upon which to perform languag
e detection. Repeat this\nparameter to perform language detection on multiple te
xt inputs.", | 413 "description": "The input text upon which to perform languag
e detection. Repeat this\nparameter to perform language detection on multiple te
xt inputs.", |
428 "items": { | 414 "items": { |
429 "type": "string" | 415 "type": "string" |
430 }, | 416 }, |
431 "type": "array" | 417 "type": "array" |
432 } | 418 } |
433 }, | 419 }, |
434 "type": "object" | 420 "type": "object" |
| 421 }, |
| 422 "LanguagesResource": { |
| 423 "id": "LanguagesResource", |
| 424 "properties": { |
| 425 "name": { |
| 426 "description": "Human readable name of the language localize
d to the target language.", |
| 427 "type": "string" |
| 428 }, |
| 429 "language": { |
| 430 "description": "Supported language code, generally consistin
g of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 code
s including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH
')", |
| 431 "type": "string" |
| 432 } |
| 433 }, |
| 434 "type": "object" |
435 } | 435 } |
436 }, | 436 }, |
437 "servicePath": "language/translate/", | 437 "servicePath": "language/translate/", |
438 "title": "Google Cloud Translation API", | 438 "title": "Google Cloud Translation API", |
439 "version": "v2" | 439 "version": "v2" |
440 } | 440 } |
OLD | NEW |