com.volcengine.service.gameProtect.impl.GameProtectServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of volc-sdk-java Show documentation
Show all versions of volc-sdk-java Show documentation
The VOLC Engine SDK for Java
package com.volcengine.service.gameProtect.impl;
import com.alibaba.fastjson.JSON;
import com.volcengine.error.SdkError;
import com.volcengine.helper.Const;
import com.volcengine.helper.Utils;
import com.volcengine.model.request.GameProtectRiskResultRequest;
import com.volcengine.model.response.GameProtectRiskReusltResponse;
import com.volcengine.model.response.RawResponse;
import com.volcengine.service.BaseServiceImpl;
import com.volcengine.service.gameProtect.GameProtectConfig;
import com.volcengine.service.gameProtect.GameProtectService;
public class GameProtectServiceImpl extends BaseServiceImpl implements GameProtectService {
private GameProtectServiceImpl() {super(GameProtectConfig.serviceInfo, GameProtectConfig.apiInfoList);}
public static GameProtectService getInstance() {return new GameProtectServiceImpl();}
@Override
public GameProtectRiskReusltResponse RiskResult(GameProtectRiskResultRequest gameProtectRiskResultRequest) throws Exception {
gameProtectRiskResultRequest.setService("anti_plugin");
RawResponse response = query(Const.GameProtect, Utils.mapToPairList(Utils.paramsToMap(gameProtectRiskResultRequest)));
if (response.getCode() != SdkError.SUCCESS.getNumber()) {
throw response.getException();
}
return JSON.parseObject(response.getData(), GameProtectRiskReusltResponse.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy