Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: discovery/googleapis/translate__v2.json

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « discovery/googleapis/tracing__v2.json ('k') | discovery/googleapis/vision__v1.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 { 1 {
2 "auth": {
3 "oauth2": {
4 "scopes": {
5 "https://www.googleapis.com/auth/cloud-platform": {
6 "description": "View and manage your data across Google Clou d Platform services"
7 },
8 "https://www.googleapis.com/auth/cloud-translation": {
9 "description": "Translate text from one language to another using Google Translate"
10 }
11 }
12 }
13 },
2 "basePath": "/language/translate/", 14 "basePath": "/language/translate/",
3 "baseUrl": "https://www.googleapis.com/language/translate/", 15 "baseUrl": "https://translation.googleapis.com/language/translate/",
4 "batchPath": "batch", 16 "batchPath": "batch/translate",
5 "description": "Translates text from one language to another.", 17 "canonicalName": "Translate",
18 "description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.",
6 "discoveryVersion": "v1", 19 "discoveryVersion": "v1",
7 "documentationLink": "https://developers.google.com/translate/v2/using_rest" , 20 "documentationLink": "https://code.google.com/apis/language/translate/v2/get ting_started.html",
8 "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/6s__cFeA5l1i01rONlu3TmUQEHs\"",
9 "features": [ 21 "features": [
10 "dataWrapper" 22 "dataWrapper"
11 ], 23 ],
12 "icons": { 24 "icons": {
13 "x16": "https://www.google.com/images/icons/product/translate-16.png", 25 "x16": "https://www.google.com/images/icons/product/translate-16.png",
14 "x32": "https://www.google.com/images/icons/product/translate-32.png" 26 "x32": "https://www.google.com/images/icons/product/translate-32.png"
15 }, 27 },
16 "id": "translate:v2", 28 "id": "translate:v2",
17 "kind": "discovery#restDescription", 29 "kind": "discovery#restDescription",
18 "name": "translate", 30 "name": "translate",
19 "ownerDomain": "google.com", 31 "ownerDomain": "google.com",
20 "ownerName": "Google", 32 "ownerName": "Google",
21 "parameters": { 33 "parameters": {
22 "alt": { 34 "upload_protocol": {
23 "default": "json", 35 "description": "Upload protocol for media (e.g. \"raw\", \"multipart \").",
24 "description": "Data format for the response.", 36 "location": "query",
25 "enum": [ 37 "type": "string"
26 "json" 38 },
27 ], 39 "prettyPrint": {
28 "enumDescriptions": [ 40 "default": "true",
29 "Responses with Content-Type of application/json" 41 "description": "Returns response with indentations and line breaks." ,
30 ], 42 "location": "query",
43 "type": "boolean"
44 },
45 "uploadType": {
46 "description": "Legacy upload protocol for media (e.g. \"media\", \" multipart\").",
31 "location": "query", 47 "location": "query",
32 "type": "string" 48 "type": "string"
33 }, 49 },
34 "fields": { 50 "fields": {
35 "description": "Selector specifying which fields to include in a par tial response.", 51 "description": "Selector specifying which fields to include in a par tial response.",
36 "location": "query", 52 "location": "query",
37 "type": "string" 53 "type": "string"
38 }, 54 },
55 "callback": {
56 "description": "JSONP",
57 "location": "query",
58 "type": "string"
59 },
60 "$.xgafv": {
61 "description": "V1 error format.",
62 "enum": [
63 "1",
64 "2"
65 ],
66 "enumDescriptions": [
67 "v1 error format",
68 "v2 error format"
69 ],
70 "location": "query",
71 "type": "string"
72 },
73 "alt": {
74 "default": "json",
75 "description": "Data format for response.",
76 "enum": [
77 "json",
78 "media",
79 "proto"
80 ],
81 "enumDescriptions": [
82 "Responses with Content-Type of application/json",
83 "Media download with context-dependent Content-Type",
84 "Responses with Content-Type of application/x-protobuf"
85 ],
86 "location": "query",
87 "type": "string"
88 },
39 "key": { 89 "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.", 90 "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", 91 "location": "query",
42 "type": "string" 92 "type": "string"
43 }, 93 },
94 "access_token": {
95 "description": "OAuth access token.",
96 "location": "query",
97 "type": "string"
98 },
99 "quotaUser": {
100 "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.",
101 "location": "query",
102 "type": "string"
103 },
104 "pp": {
105 "default": "true",
106 "description": "Pretty-print response.",
107 "location": "query",
108 "type": "boolean"
109 },
110 "bearer_token": {
111 "description": "OAuth bearer token.",
112 "location": "query",
113 "type": "string"
114 },
44 "oauth_token": { 115 "oauth_token": {
45 "description": "OAuth 2.0 token for the current user.", 116 "description": "OAuth 2.0 token for the current user.",
46 "location": "query", 117 "location": "query",
47 "type": "string" 118 "type": "string"
48 },
49 "prettyPrint": {
50 "default": "true",
51 "description": "Returns response with indentations and line breaks." ,
52 "location": "query",
53 "type": "boolean"
54 },
55 "quotaUser": {
56 "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.",
57 "location": "query",
58 "type": "string"
59 },
60 "userIp": {
61 "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
62 "location": "query",
63 "type": "string"
64 } 119 }
65 }, 120 },
66 "protocol": "rest", 121 "protocol": "rest",
67 "resources": { 122 "resources": {
68 "detections": {
69 "methods": {
70 "list": {
71 "description": "Detect the language of text.",
72 "httpMethod": "GET",
73 "id": "language.detections.list",
74 "parameterOrder": [
75 "q"
76 ],
77 "parameters": {
78 "q": {
79 "description": "The text to detect",
80 "location": "query",
81 "repeated": true,
82 "required": true,
83 "type": "string"
84 }
85 },
86 "path": "v2/detect",
87 "response": {
88 "$ref": "DetectionsListResponse"
89 }
90 }
91 }
92 },
93 "languages": {
94 "methods": {
95 "list": {
96 "description": "List the source/target languages supported b y the API",
97 "httpMethod": "GET",
98 "id": "language.languages.list",
99 "parameters": {
100 "target": {
101 "description": "the language and collation in which the localized results should be returned",
102 "location": "query",
103 "type": "string"
104 }
105 },
106 "path": "v2/languages",
107 "response": {
108 "$ref": "LanguagesListResponse"
109 }
110 }
111 }
112 },
113 "translations": { 123 "translations": {
114 "methods": { 124 "methods": {
115 "list": { 125 "list": {
116 "description": "Returns text translations from one language to another.", 126 "description": "Translates input text, returning translated text.",
117 "httpMethod": "GET", 127 "httpMethod": "GET",
118 "id": "language.translations.list", 128 "id": "language.translations.list",
119 "parameterOrder": [ 129 "parameterOrder": [
120 "q", 130 "q",
121 "target" 131 "target"
122 ], 132 ],
123 "parameters": { 133 "parameters": {
134 "q": {
135 "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.",
136 "location": "query",
137 "repeated": true,
138 "required": true,
139 "type": "string"
140 },
141 "source": {
142 "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.",
143 "location": "query",
144 "type": "string"
145 },
124 "cid": { 146 "cid": {
125 "description": "The customization id for translate", 147 "description": "The customization id for translate",
126 "location": "query", 148 "location": "query",
127 "repeated": true, 149 "repeated": true,
128 "type": "string" 150 "type": "string"
129 }, 151 },
152 "target": {
153 "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support. ",
154 "location": "query",
155 "required": true,
156 "type": "string"
157 },
130 "format": { 158 "format": {
131 "description": "The format of the text", 159 "description": "The format of the source text, in ei ther HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a val ue of \"text\" indicates plain-text.",
132 "enum": [ 160 "enum": [
133 "html", 161 "html",
134 "text" 162 "text"
135 ], 163 ],
136 "enumDescriptions": [ 164 "enumDescriptions": [
137 "Specifies the input is in HTML", 165 "Specifies the input is in HTML",
138 "Specifies the input is in plain textual format" 166 "Specifies the input is in plain textual format"
139 ], 167 ],
140 "location": "query", 168 "location": "query",
141 "type": "string" 169 "type": "string"
142 }, 170 },
143 "q": { 171 "model": {
144 "description": "The text to translate", 172 "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.",
145 "location": "query", 173 "location": "query",
146 "repeated": true,
147 "required": true,
148 "type": "string"
149 },
150 "source": {
151 "description": "The source language of the text",
152 "location": "query",
153 "type": "string"
154 },
155 "target": {
156 "description": "The target language into which the t ext should be translated",
157 "location": "query",
158 "required": true,
159 "type": "string" 174 "type": "string"
160 } 175 }
161 }, 176 },
162 "path": "v2", 177 "path": "v2",
163 "response": { 178 "response": {
164 "$ref": "TranslationsListResponse" 179 "$ref": "TranslationsListResponse"
165 } 180 },
181 "scopes": [
182 "https://www.googleapis.com/auth/cloud-translation",
183 "https://www.googleapis.com/auth/cloud-platform"
184 ]
185 },
186 "translate": {
187 "description": "Translates input text, returning translated text.",
188 "httpMethod": "POST",
189 "id": "language.translations.translate",
190 "parameterOrder": [],
191 "parameters": {},
192 "path": "v2",
193 "request": {
194 "$ref": "TranslateTextRequest"
195 },
196 "response": {
197 "$ref": "TranslationsListResponse"
198 },
199 "scopes": [
200 "https://www.googleapis.com/auth/cloud-translation",
201 "https://www.googleapis.com/auth/cloud-platform"
202 ]
203 }
204 }
205 },
206 "detections": {
207 "methods": {
208 "list": {
209 "description": "Detects the language of text within a reques t.",
210 "httpMethod": "GET",
211 "id": "language.detections.list",
212 "parameterOrder": [
213 "q"
214 ],
215 "parameters": {
216 "q": {
217 "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on mul tiple text inputs.",
218 "location": "query",
219 "repeated": true,
220 "required": true,
221 "type": "string"
222 }
223 },
224 "path": "v2/detect",
225 "response": {
226 "$ref": "DetectionsListResponse"
227 },
228 "scopes": [
229 "https://www.googleapis.com/auth/cloud-translation",
230 "https://www.googleapis.com/auth/cloud-platform"
231 ]
232 },
233 "detect": {
234 "description": "Detects the language of text within a reques t.",
235 "httpMethod": "POST",
236 "id": "language.detections.detect",
237 "parameterOrder": [],
238 "parameters": {},
239 "path": "v2/detect",
240 "request": {
241 "$ref": "DetectLanguageRequest"
242 },
243 "response": {
244 "$ref": "DetectionsListResponse"
245 },
246 "scopes": [
247 "https://www.googleapis.com/auth/cloud-translation",
248 "https://www.googleapis.com/auth/cloud-platform"
249 ]
250 }
251 }
252 },
253 "languages": {
254 "methods": {
255 "list": {
256 "description": "Returns a list of supported languages for tr anslation.",
257 "httpMethod": "GET",
258 "id": "language.languages.list",
259 "parameters": {
260 "target": {
261 "description": "The language to use to return locali zed, human readable names of supported\nlanguages.",
262 "location": "query",
263 "type": "string"
264 },
265 "model": {
266 "description": "The model type for which supported l anguages should be returned.",
267 "location": "query",
268 "type": "string"
269 }
270 },
271 "path": "v2/languages",
272 "response": {
273 "$ref": "LanguagesListResponse"
274 },
275 "scopes": [
276 "https://www.googleapis.com/auth/cloud-translation",
277 "https://www.googleapis.com/auth/cloud-platform"
278 ]
166 } 279 }
167 } 280 }
168 } 281 }
169 }, 282 },
170 "revision": "20160627", 283 "revision": "20170525",
171 "rootUrl": "https://www.googleapis.com/", 284 "rootUrl": "https://translation.googleapis.com/",
172 "schemas": { 285 "schemas": {
286 "LanguagesResource": {
287 "id": "LanguagesResource",
288 "properties": {
289 "language": {
290 "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 ')",
291 "type": "string"
292 },
293 "name": {
294 "description": "Human readable name of the language localize d to the target language.",
295 "type": "string"
296 }
297 },
298 "type": "object"
299 },
173 "DetectionsListResponse": { 300 "DetectionsListResponse": {
174 "id": "DetectionsListResponse", 301 "id": "DetectionsListResponse",
175 "properties": { 302 "properties": {
176 "detections": { 303 "detections": {
177 "description": "A detections contains detection results of s everal text", 304 "description": "A detections contains detection results of s everal text",
178 "items": { 305 "items": {
179 "$ref": "DetectionsResource" 306 "$ref": "DetectionsResource"
180 }, 307 },
181 "type": "array" 308 "type": "array"
182 } 309 }
183 }, 310 },
184 "type": "object" 311 "type": "object"
185 }, 312 },
313 "GetSupportedLanguagesRequest": {
314 "description": "The request message for discovering supported langua ges.",
315 "id": "GetSupportedLanguagesRequest",
316 "properties": {
317 "target": {
318 "description": "The language to use to return localized, hum an readable names of supported\nlanguages.",
319 "type": "string"
320 }
321 },
322 "type": "object"
323 },
324 "LanguagesListResponse": {
325 "id": "LanguagesListResponse",
326 "properties": {
327 "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.",
329 "items": {
330 "$ref": "LanguagesResource"
331 },
332 "type": "array"
333 }
334 },
335 "type": "object"
336 },
337 "TranslationsResource": {
338 "id": "TranslationsResource",
339 "properties": {
340 "translatedText": {
341 "description": "Text translated into the target language.",
342 "type": "string"
343 },
344 "detectedSourceLanguage": {
345 "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.",
346 "type": "string"
347 },
348 "model": {
349 "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.",
350 "type": "string"
351 }
352 },
353 "type": "object"
354 },
186 "DetectionsResource": { 355 "DetectionsResource": {
187 "description": "An array of languages which we detect for the given text The most likely language list first.", 356 "description": "An array of languages which we detect for the given text The most likely language list first.",
188 "id": "DetectionsResource", 357 "id": "DetectionsResource",
189 "items": { 358 "items": {
190 "properties": { 359 "properties": {
191 "confidence": { 360 "confidence": {
192 "description": "The confidence of the detection resul of this language.", 361 "description": "The confidence of the detection result o f this language.",
193 "format": "float", 362 "format": "float",
194 "type": "number" 363 "type": "number"
195 }, 364 },
196 "isReliable": { 365 "isReliable": {
197 "description": "A boolean to indicate is the language de tection result reliable.", 366 "description": "A boolean to indicate is the language de tection result reliable.",
198 "type": "boolean" 367 "type": "boolean"
199 }, 368 },
200 "language": { 369 "language": {
201 "description": "The language we detect", 370 "description": "The language we detected.",
202 "type": "string" 371 "type": "string"
203 } 372 }
204 }, 373 },
205 "type": "object" 374 "type": "object"
206 }, 375 },
207 "type": "array" 376 "type": "array"
208 }, 377 },
209 "LanguagesListResponse": {
210 "id": "LanguagesListResponse",
211 "properties": {
212 "languages": {
213 "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.",
214 "items": {
215 "$ref": "LanguagesResource"
216 },
217 "type": "array"
218 }
219 },
220 "type": "object"
221 },
222 "LanguagesResource": {
223 "id": "LanguagesResource",
224 "properties": {
225 "language": {
226 "description": "The language code.",
227 "type": "string"
228 },
229 "name": {
230 "description": "The localized name of the language if target parameter is given.",
231 "type": "string"
232 }
233 },
234 "type": "object"
235 },
236 "TranslationsListResponse": { 378 "TranslationsListResponse": {
379 "description": "The main language translation response message.",
237 "id": "TranslationsListResponse", 380 "id": "TranslationsListResponse",
238 "properties": { 381 "properties": {
239 "translations": { 382 "translations": {
240 "description": "Translations contains list of translation re sults of given text", 383 "description": "Translations contains list of translation re sults of given text",
241 "items": { 384 "items": {
242 "$ref": "TranslationsResource" 385 "$ref": "TranslationsResource"
243 }, 386 },
244 "type": "array" 387 "type": "array"
245 } 388 }
246 }, 389 },
247 "type": "object" 390 "type": "object"
248 }, 391 },
249 "TranslationsResource": { 392 "TranslateTextRequest": {
250 "id": "TranslationsResource", 393 "description": "The main translation request message for the Cloud T ranslation API.",
394 "id": "TranslateTextRequest",
251 "properties": { 395 "properties": {
252 "detectedSourceLanguage": { 396 "target": {
253 "description": "Detected source language if source parameter is unspecified.", 397 "description": "The language to use for translation of the i nput text, set to one of the\nlanguage codes listed in Language Support.",
254 "type": "string" 398 "type": "string"
255 }, 399 },
256 "translatedText": { 400 "q": {
257 "description": "The translation.", 401 "description": "The input text to translate. Repeat this par ameter to perform translation\noperations on multiple text inputs.",
402 "items": {
403 "type": "string"
404 },
405 "type": "array"
406 },
407 "format": {
408 "description": "The format of the source text, in either HTM L (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \" text\" indicates plain-text.",
258 "type": "string" 409 "type": "string"
410 },
411 "source": {
412 "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.",
413 "type": "string"
414 },
415 "model": {
416 "description": "The `model` type requested for this translat ion. Valid values are\nlisted in public documentation.",
417 "type": "string"
418 }
419 },
420 "type": "object"
421 },
422 "DetectLanguageRequest": {
423 "description": "The request message for language detection.",
424 "id": "DetectLanguageRequest",
425 "properties": {
426 "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.",
428 "items": {
429 "type": "string"
430 },
431 "type": "array"
259 } 432 }
260 }, 433 },
261 "type": "object" 434 "type": "object"
262 } 435 }
263 }, 436 },
264 "servicePath": "language/translate/", 437 "servicePath": "language/translate/",
265 "title": "Translate API", 438 "title": "Google Cloud Translation API",
266 "version": "v2" 439 "version": "v2"
267 } 440 }
OLDNEW
« no previous file with comments | « discovery/googleapis/tracing__v2.json ('k') | discovery/googleapis/vision__v1.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698