Account Service
描述
通过日期查询用户账号的空间及流量使用情况
接口地址(仅做说明使用):https://api.polyv.net/v2/user/%s/main调用约束
单元测试
@Test
public void testGetAccountSpaceFlow() throws Exception, NoSuchAlgorithmException {
VodAccountSpaceDataRequest vodAccountSpaceDataRequest = new VodAccountSpaceDataRequest();
VodAccountSpaceDataResponse vodAccountSpaceDataResponse;
try {
vodAccountSpaceDataRequest.setDate(super.getDate(2020, 10, 13));
vodAccountSpaceDataResponse = new VodAccountServiceImpl().getAccountSpaceFlow(vodAccountSpaceDataRequest);
Assert.assertNotNull(vodAccountSpaceDataResponse);
if (vodAccountSpaceDataResponse != null) {
log.debug("测试查询用户空间及流量情况成功,{}", JSON.toJSONString(vodAccountSpaceDataResponse));
}
} catch (PloyvSdkException e) {
//参数校验不合格 或者 请求服务器端500错误,错误信息见PloyvSdkException.getMessage()
log.error(e.getMessage(), e);
// 异常返回做B端异常的业务逻辑,记录log 或者 上报到ETL 或者回滚事务
throw e;
} catch (Exception e) {
log.error("SDK调用异常", e);
throw e;
}
}单元测试说明
请求入参描述
参数名
必选
类型
说明
返回对象描述
参数名
类型
说明
Last updated