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 "quotaUser": { | |
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.", | |
36 "location": "query", | |
37 "type": "string" | |
38 }, | |
39 "pp": { | |
40 "default": "true", | |
41 "description": "Pretty-print response.", | |
42 "location": "query", | |
43 "type": "boolean" | |
44 }, | |
45 "bearer_token": { | 34 "bearer_token": { |
46 "description": "OAuth bearer token.", | 35 "description": "OAuth bearer token.", |
47 "location": "query", | 36 "location": "query", |
48 "type": "string" | 37 "type": "string" |
49 }, | 38 }, |
50 "oauth_token": { | 39 "oauth_token": { |
51 "description": "OAuth 2.0 token for the current user.", | 40 "description": "OAuth 2.0 token for the current user.", |
52 "location": "query", | 41 "location": "query", |
53 "type": "string" | 42 "type": "string" |
54 }, | 43 }, |
55 "upload_protocol": { | 44 "upload_protocol": { |
56 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 45 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
57 "location": "query", | 46 "location": "query", |
58 "type": "string" | 47 "type": "string" |
59 }, | 48 }, |
60 "prettyPrint": { | 49 "prettyPrint": { |
61 "default": "true", | 50 "default": "true", |
62 "description": "Returns response with indentations and line breaks."
, | 51 "description": "Returns response with indentations and line breaks."
, |
63 "location": "query", | 52 "location": "query", |
64 "type": "boolean" | 53 "type": "boolean" |
65 }, | 54 }, |
| 55 "fields": { |
| 56 "description": "Selector specifying which fields to include in a par
tial response.", |
| 57 "location": "query", |
| 58 "type": "string" |
| 59 }, |
66 "uploadType": { | 60 "uploadType": { |
67 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | 61 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
68 "location": "query", | 62 "location": "query", |
69 "type": "string" | 63 "type": "string" |
70 }, | 64 }, |
71 "fields": { | |
72 "description": "Selector specifying which fields to include in a par
tial response.", | |
73 "location": "query", | |
74 "type": "string" | |
75 }, | |
76 "callback": { | 65 "callback": { |
77 "description": "JSONP", | 66 "description": "JSONP", |
78 "location": "query", | 67 "location": "query", |
79 "type": "string" | 68 "type": "string" |
80 }, | 69 }, |
81 "$.xgafv": { | 70 "$.xgafv": { |
82 "description": "V1 error format.", | 71 "description": "V1 error format.", |
83 "enum": [ | 72 "enum": [ |
84 "1", | 73 "1", |
85 "2" | 74 "2" |
(...skipping 23 matching lines...) Expand all Loading... |
109 }, | 98 }, |
110 "access_token": { | 99 "access_token": { |
111 "description": "OAuth access token.", | 100 "description": "OAuth access token.", |
112 "location": "query", | 101 "location": "query", |
113 "type": "string" | 102 "type": "string" |
114 }, | 103 }, |
115 "key": { | 104 "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.", | 105 "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", | 106 "location": "query", |
118 "type": "string" | 107 "type": "string" |
| 108 }, |
| 109 "quotaUser": { |
| 110 "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.", |
| 111 "location": "query", |
| 112 "type": "string" |
| 113 }, |
| 114 "pp": { |
| 115 "default": "true", |
| 116 "description": "Pretty-print response.", |
| 117 "location": "query", |
| 118 "type": "boolean" |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 }, |
201 "list": { | 219 "list": { |
202 "description": "Translates input text, returning translated
text.", | 220 "description": "Translates input text, returning translated
text.", |
203 "httpMethod": "GET", | 221 "httpMethod": "GET", |
204 "id": "language.translations.list", | 222 "id": "language.translations.list", |
205 "parameterOrder": [ | 223 "parameterOrder": [ |
206 "q", | 224 "q", |
207 "target" | 225 "target" |
208 ], | 226 ], |
209 "parameters": { | 227 "parameters": { |
210 "q": { | 228 "q": { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 269 } |
252 }, | 270 }, |
253 "path": "v2", | 271 "path": "v2", |
254 "response": { | 272 "response": { |
255 "$ref": "TranslationsListResponse" | 273 "$ref": "TranslationsListResponse" |
256 }, | 274 }, |
257 "scopes": [ | 275 "scopes": [ |
258 "https://www.googleapis.com/auth/cloud-translation", | 276 "https://www.googleapis.com/auth/cloud-translation", |
259 "https://www.googleapis.com/auth/cloud-platform" | 277 "https://www.googleapis.com/auth/cloud-platform" |
260 ] | 278 ] |
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 "DetectLanguageRequest": { |
| 287 "description": "The request message for language detection.", |
| 288 "id": "DetectLanguageRequest", |
| 289 "properties": { |
| 290 "q": { |
| 291 "description": "The input text upon which to perform languag
e detection. Repeat this\nparameter to perform language detection on multiple te
xt inputs.", |
| 292 "items": { |
| 293 "type": "string" |
| 294 }, |
| 295 "type": "array" |
| 296 } |
| 297 }, |
| 298 "type": "object" |
| 299 }, |
| 300 "LanguagesResource": { |
| 301 "id": "LanguagesResource", |
| 302 "properties": { |
| 303 "name": { |
| 304 "description": "Human readable name of the language localize
d to the target language.", |
| 305 "type": "string" |
| 306 }, |
| 307 "language": { |
| 308 "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
')", |
| 309 "type": "string" |
| 310 } |
| 311 }, |
| 312 "type": "object" |
| 313 }, |
286 "DetectionsListResponse": { | 314 "DetectionsListResponse": { |
287 "id": "DetectionsListResponse", | 315 "id": "DetectionsListResponse", |
288 "properties": { | 316 "properties": { |
289 "detections": { | 317 "detections": { |
290 "description": "A detections contains detection results of s
everal text", | 318 "description": "A detections contains detection results of s
everal text", |
291 "items": { | 319 "items": { |
292 "$ref": "DetectionsResource" | 320 "$ref": "DetectionsResource" |
293 }, | 321 }, |
294 "type": "array" | 322 "type": "array" |
295 } | 323 } |
(...skipping 20 matching lines...) Expand all Loading... |
316 "$ref": "LanguagesResource" | 344 "$ref": "LanguagesResource" |
317 }, | 345 }, |
318 "type": "array" | 346 "type": "array" |
319 } | 347 } |
320 }, | 348 }, |
321 "type": "object" | 349 "type": "object" |
322 }, | 350 }, |
323 "TranslationsResource": { | 351 "TranslationsResource": { |
324 "id": "TranslationsResource", | 352 "id": "TranslationsResource", |
325 "properties": { | 353 "properties": { |
326 "translatedText": { | |
327 "description": "Text translated into the target language.", | |
328 "type": "string" | |
329 }, | |
330 "detectedSourceLanguage": { | 354 "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.", | 355 "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" | 356 "type": "string" |
333 }, | 357 }, |
334 "model": { | 358 "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.", | 359 "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" | 360 "type": "string" |
| 361 }, |
| 362 "translatedText": { |
| 363 "description": "Text translated into the target language.", |
| 364 "type": "string" |
337 } | 365 } |
338 }, | 366 }, |
339 "type": "object" | 367 "type": "object" |
340 }, | 368 }, |
341 "DetectionsResource": { | 369 "DetectionsResource": { |
342 "description": "An array of languages which we detect for the given
text The most likely language list first.", | 370 "description": "An array of languages which we detect for the given
text The most likely language list first.", |
343 "id": "DetectionsResource", | 371 "id": "DetectionsResource", |
344 "items": { | 372 "items": { |
345 "properties": { | 373 "properties": { |
346 "confidence": { | |
347 "description": "The confidence of the detection result o
f this language.", | |
348 "format": "float", | |
349 "type": "number" | |
350 }, | |
351 "language": { | 374 "language": { |
352 "description": "The language we detected.", | 375 "description": "The language we detected.", |
353 "type": "string" | 376 "type": "string" |
354 }, | 377 }, |
355 "isReliable": { | 378 "isReliable": { |
356 "description": "A boolean to indicate is the language de
tection result reliable.", | 379 "description": "A boolean to indicate is the language de
tection result reliable.", |
357 "type": "boolean" | 380 "type": "boolean" |
| 381 }, |
| 382 "confidence": { |
| 383 "description": "The confidence of the detection result o
f this language.", |
| 384 "format": "float", |
| 385 "type": "number" |
358 } | 386 } |
359 }, | 387 }, |
360 "type": "object" | 388 "type": "object" |
361 }, | 389 }, |
362 "type": "array" | 390 "type": "array" |
363 }, | 391 }, |
364 "TranslationsListResponse": { | 392 "TranslationsListResponse": { |
365 "description": "The main language translation response message.", | 393 "description": "The main language translation response message.", |
366 "id": "TranslationsListResponse", | 394 "id": "TranslationsListResponse", |
367 "properties": { | 395 "properties": { |
(...skipping 29 matching lines...) Expand all Loading... |
397 "source": { | 425 "source": { |
398 "description": "The language of the source text, set to one
of the language codes listed in\nLanguage Support. If the source language is not
specified, the API will\nattempt to identify the source language automatically
and return it within\nthe response.", | 426 "description": "The language of the source text, set to one
of the language codes listed in\nLanguage Support. If the source language is not
specified, the API will\nattempt to identify the source language automatically
and return it within\nthe response.", |
399 "type": "string" | 427 "type": "string" |
400 }, | 428 }, |
401 "model": { | 429 "model": { |
402 "description": "The `model` type requested for this translat
ion. Valid values are\nlisted in public documentation.", | 430 "description": "The `model` type requested for this translat
ion. Valid values are\nlisted in public documentation.", |
403 "type": "string" | 431 "type": "string" |
404 } | 432 } |
405 }, | 433 }, |
406 "type": "object" | 434 "type": "object" |
407 }, | |
408 "DetectLanguageRequest": { | |
409 "description": "The request message for language detection.", | |
410 "id": "DetectLanguageRequest", | |
411 "properties": { | |
412 "q": { | |
413 "description": "The input text upon which to perform languag
e detection. Repeat this\nparameter to perform language detection on multiple te
xt inputs.", | |
414 "items": { | |
415 "type": "string" | |
416 }, | |
417 "type": "array" | |
418 } | |
419 }, | |
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 |