package com.heyu.api.baidu.handle.doc;


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.doc.BDocClassifyRequest;
import com.heyu.api.baidu.response.doc.BDocClassifyResp;
import org.springframework.stereotype.Component;

/****
 * https://console.bce.baidu.com/support/?_=1740667714316&timestamp=1740671573520#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E6%96%87%E6%A1%A3%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86&api=rest%2F2.0%2Focr%2Fv1%2Fdoc_classify&method=post
 *
 * 文件检测分类
 */
@Component
public class BDocClassifyHandle extends BaiduBaseHandle<BDocClassifyRequest, BDocClassifyResp> {


    @Override
    public String getUri() {
        return "/rest/2.0/ocr/v1/doc_classify";
    }

    @Override
    public String check(BDocClassifyRequest bDocClassifyRequest) {
        return checkImageUri(bDocClassifyRequest);
    }

    @Override
    public String getContent(BDocClassifyRequest bDocClassifyRequest) {
        return getImageContent(bDocClassifyRequest).toString();
    }
}
