lib/v20181119/client.rb in tencentcloud-sdk-ocr-3.0.791 vs lib/v20181119/client.rb in tencentcloud-sdk-ocr-3.0.792

- old
+ new

@@ -2060,9 +2060,33 @@ raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end + # 支持将图片或PDF文件转换成Markdown格式文件,可解析包括表格、公式、图片、标题、段落、页眉、页脚等内容元素,并将内容智能转换成阅读顺序。 + + # @param request: Request instance for ReconstructDocument. + # @type request: :class:`Tencentcloud::ocr::V20181119::ReconstructDocumentRequest` + # @rtype: :class:`Tencentcloud::ocr::V20181119::ReconstructDocumentResponse` + def ReconstructDocument(request) + body = send_request('ReconstructDocument', request.serialize) + response = JSON.parse(body) + if response['Response'].key?('Error') == false + model = ReconstructDocumentResponse.new + model.deserialize(response['Response']) + model + else + code = response['Response']['Error']['Code'] + message = response['Response']['Error']['Message'] + reqid = response['Response']['RequestId'] + raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) + end + rescue TencentCloud::Common::TencentCloudSDKException => e + raise e + rescue StandardError => e + raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) + end + # 本接口支持居民户口簿户主页及成员页关键字段的识别,包括姓名、户别、地址、籍贯、身份证号码等。 # 默认接口请求频率限制:5次/秒。 # @param request: Request instance for ResidenceBookletOCR. \ No newline at end of file