com.aiwiown.face.request.BeautifyRequest Maven / Gradle / Ivy
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.BeautifyResponse;
import java.util.Map;
/**
* 描述
* 支持对图片中人像进行对美颜美型处理,以及对图像增加滤镜等。美颜包括:美白和磨皮;美型包括:大眼、瘦脸、小脸和去眉毛等处理。
* https://console.faceplusplus.com.cn/documents/134252584
* @ClassName : BeautifyRequest
* @Description :
* @Author : dbin0123
* @Date: 2020-03-15 15:44
*/
public class BeautifyRequest implements ApiRequest {
private String apiVersion = "v2";
private static String apiUrl = "/beautify";
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 BeautifyResponse.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 - 2025 Weber Informatics LLC | Privacy Policy