OLD | NEW |
(Empty) | |
| 1 { |
| 2 "basePath": "/language/translate/", |
| 3 "baseUrl": "https://www.googleapis.com/language/translate/", |
| 4 "batchPath": "batch", |
| 5 "description": "Lets you translate text from one language to another", |
| 6 "discoveryVersion": "v1", |
| 7 "documentationLink": "https://developers.google.com/translate/v2/using_rest"
, |
| 8 "etag": "\"uUWyYHXmEn-ab7WLvo8qNz2S8ws/x8y0eeapVY09xfAj-RIWaraLUFU\"", |
| 9 "features": [ |
| 10 "dataWrapper" |
| 11 ], |
| 12 "icons": { |
| 13 "x16": "http://www.google.com/images/icons/product/translate-16.png", |
| 14 "x32": "http://www.google.com/images/icons/product/translate-32.png" |
| 15 }, |
| 16 "id": "translate:v2", |
| 17 "kind": "discovery#restDescription", |
| 18 "name": "translate", |
| 19 "ownerDomain": "google.com", |
| 20 "ownerName": "Google", |
| 21 "parameters": { |
| 22 "alt": { |
| 23 "default": "json", |
| 24 "description": "Data format for the response.", |
| 25 "enum": [ |
| 26 "json" |
| 27 ], |
| 28 "enumDescriptions": [ |
| 29 "Responses with Content-Type of application/json" |
| 30 ], |
| 31 "location": "query", |
| 32 "type": "string" |
| 33 }, |
| 34 "fields": { |
| 35 "description": "Selector specifying which fields to include in a par
tial response.", |
| 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 "oauth_token": { |
| 45 "description": "OAuth 2.0 token for the current user.", |
| 46 "location": "query", |
| 47 "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 } |
| 65 }, |
| 66 "protocol": "rest", |
| 67 "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": { |
| 114 "methods": { |
| 115 "list": { |
| 116 "description": "Returns text translations from one language
to another.", |
| 117 "httpMethod": "GET", |
| 118 "id": "language.translations.list", |
| 119 "parameterOrder": [ |
| 120 "q", |
| 121 "target" |
| 122 ], |
| 123 "parameters": { |
| 124 "cid": { |
| 125 "description": "The customization id for translate", |
| 126 "location": "query", |
| 127 "repeated": true, |
| 128 "type": "string" |
| 129 }, |
| 130 "format": { |
| 131 "description": "The format of the text", |
| 132 "enum": [ |
| 133 "html", |
| 134 "text" |
| 135 ], |
| 136 "enumDescriptions": [ |
| 137 "Specifies the input is in HTML", |
| 138 "Specifies the input is in plain textual format" |
| 139 ], |
| 140 "location": "query", |
| 141 "type": "string" |
| 142 }, |
| 143 "q": { |
| 144 "description": "The text to translate", |
| 145 "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" |
| 160 } |
| 161 }, |
| 162 "path": "v2", |
| 163 "response": { |
| 164 "$ref": "TranslationsListResponse" |
| 165 } |
| 166 } |
| 167 } |
| 168 } |
| 169 }, |
| 170 "revision": "20140417", |
| 171 "rootUrl": "https://www.googleapis.com/", |
| 172 "schemas": { |
| 173 "DetectionsListResponse": { |
| 174 "id": "DetectionsListResponse", |
| 175 "properties": { |
| 176 "detections": { |
| 177 "description": "A detections contains detection results of s
everal text", |
| 178 "items": { |
| 179 "$ref": "DetectionsResource" |
| 180 }, |
| 181 "type": "array" |
| 182 } |
| 183 }, |
| 184 "type": "object" |
| 185 }, |
| 186 "DetectionsResource": { |
| 187 "description": "An array of languages which we detect for the given
text The most likely language list first.", |
| 188 "id": "DetectionsResource", |
| 189 "items": { |
| 190 "properties": { |
| 191 "confidence": { |
| 192 "description": "The confidence of the detection resul of
this language.", |
| 193 "format": "float", |
| 194 "type": "number" |
| 195 }, |
| 196 "isReliable": { |
| 197 "description": "A boolean to indicate is the language de
tection result reliable.", |
| 198 "type": "boolean" |
| 199 }, |
| 200 "language": { |
| 201 "description": "The language we detect", |
| 202 "type": "string" |
| 203 } |
| 204 }, |
| 205 "type": "object" |
| 206 }, |
| 207 "type": "array" |
| 208 }, |
| 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": { |
| 237 "id": "TranslationsListResponse", |
| 238 "properties": { |
| 239 "translations": { |
| 240 "description": "Translations contains list of translation re
sults of given text", |
| 241 "items": { |
| 242 "$ref": "TranslationsResource" |
| 243 }, |
| 244 "type": "array" |
| 245 } |
| 246 }, |
| 247 "type": "object" |
| 248 }, |
| 249 "TranslationsResource": { |
| 250 "id": "TranslationsResource", |
| 251 "properties": { |
| 252 "detectedSourceLanguage": { |
| 253 "description": "Detected source language if source parameter
is unspecified.", |
| 254 "type": "string" |
| 255 }, |
| 256 "translatedText": { |
| 257 "description": "The translation.", |
| 258 "type": "string" |
| 259 } |
| 260 }, |
| 261 "type": "object" |
| 262 } |
| 263 }, |
| 264 "servicePath": "language/translate/", |
| 265 "title": "Translate API", |
| 266 "version": "v2" |
| 267 } |
OLD | NEW |