cn.woodwhales.common.webhook.executor.FeiShuWebhookExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of woodwhales-common Show documentation
Show all versions of woodwhales-common Show documentation
https://github.com/woodwhales
package cn.woodwhales.common.webhook.executor;
import cn.woodwhales.common.webhook.enums.WebhookProductEnum;
import cn.woodwhales.common.webhook.model.request.BaseWebhookRequestBody;
import cn.woodwhales.common.webhook.model.request.FeiShuRequestBody;
import cn.woodwhales.common.webhook.model.response.FeiShuResponse;
import cn.woodwhales.common.webhook.model.response.ExecuteResponse;
import java.util.Objects;
/**
* 飞书webhook请求执行器
* @author woodwhales on 2021-07-19 10:36
*
* {
* "code": 19024,
* "msg": "Key Words Not Found"
* }
*/
public class FeiShuWebhookExecutor extends BaseWebhookExecutor {
private static final int ERR_CODE_SUCCESS = 0;
public static FeiShuWebhookExecutor newInstance() {
return new FeiShuWebhookExecutor();
}
@Override
protected boolean checkResponseObjectHandler(ExecuteResponse executeResponse) {
FeiShuResponse feiShuResponse = executeResponse.parsedResponseObject;
return Objects.equals(ERR_CODE_SUCCESS, feiShuResponse.getStatusCode());
}
@Override
protected WebhookProductEnum webhookProductEnum() {
return WebhookProductEnum.FEI_SHU;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy