def from_buffer(string, serverEndpoint=ServerEndpoint, xmlContent=False): if not xmlContent: status, response = callServer('put', serverEndpoint, '/rmeta/text', string, {'Accept': 'application/json'}, False) else: status, response = callServer('put', serverEndpoint, '/rmeta/xml', string, {'Accept': 'application/json'}, False) return _parse((status,response))
def from_buffer(string, serverEndpoint=ServerEndpoint, xmlContent=False): if not xmlContent: status, response = callServer('put', serverEndpoint, '/rmeta/text', string, {'Accept': 'application/json'}, False) else: status, response = callServer('put', serverEndpoint, '/rmeta/xml', string, {'Accept': 'application/json'}, False) return _parse((status, response))
def from_buffer(string, srcLang, destLang, serverEndpoint=ServerEndpoint): status, response = callServer( "put", ServerEndpoint, "/translate/all/" + Translator + "/" + srcLang + "/" + destLang, string, {"Accept": "text/plain"}, False, ) return response
def from_buffer(string, serverEndpoint=ServerEndpoint): status, response = callServer('put', serverEndpoint, '/rmeta', string, {'Accept': 'application/json'}, False) return _parse((status, response))
def from_buffer(string): status, response = callServer('put', ServerEndpoint, '/detect/stream', string, {'Accept': 'text/plain'}, False) return response
def from_buffer(string, serverEndpoint=ServerEndpoint): status, response = callServer('put', serverEndpoint, '/rmeta', string, {'Accept': 'application/json'}, False) return _parse((status,response))
def auto_from_buffer(string, destLang, serverEndpoint=ServerEndpoint): status, response = callServer( 'put', ServerEndpoint, '/translate/all/' + Translator + '/' + destLang, string, {'Accept': 'text/plain'}, False) return response