All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aiwiown.face.request.OCRCardRequest Maven / Gradle / Ivy

There is a newer version: 3.0.9
Show newest version
package com.aiwiown.face.request;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.OCRCardResponse;

import java.util.Map;

/**
 * 描述
 * 检测和识别中华人民共和国第二代身份证的关键字段内容,并支持返回身份证正反面信息、身份证照片分类判断结果。
 * https://console.faceplusplus.com.cn/documents/5671702
 * @ClassName : OcridCardRequest
 * @Description :
 * @Author : dbin0123
 * @Date: 2020-03-15 19:18
 */
public class OCRCardRequest implements ApiRequest {

    private String apiVersion = "v1";
    private static String apiUrl = "/ocridcard";

    private String bizContent;
    private ApiObject bizModel = null;

    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.POST;
    }

    @Override
    public String getApiUrl() {
        return "/" + this.apiVersion + apiUrl;
    }

    @Override
    public Map getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public Class getResponseClass() {
        return OCRCardResponse.class;
    }

    @Override
    public String getApiVersion() {
        return this.apiVersion;
    }

    @Override
    public String getBizContent() {
        return this.bizContent;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy