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


import com.heyu.api.baidu.BaiduBaseHandle;
import com.heyu.api.baidu.request.traffic.BVinCodeRequest;
import com.heyu.api.baidu.response.traffic.BVinCodeResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * https://console.bce.baidu.com/support/?_=1740411162437&timestamp=1740411253251#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E4%BA%A4%E9%80%9A%E5%9C%BA%E6%99%AFOCR&api=rest%2F2.0%2Focr%2Fv1%2Fvin_code&method=post
 * VIN码识别
 */
@Component
@Slf4j
public class BVinCodeHandle extends BaiduBaseHandle<BVinCodeRequest, BVinCodeResp> {


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

    @Override
    public String check(BVinCodeRequest bVinCodeRequest) {
        return checkImageUri(bVinCodeRequest);
    }

    @Override
    public String getContent(BVinCodeRequest bVinCodeRequest) {
        return getImageContent(bVinCodeRequest).toString();
    }
}
