1、查询任务奖励活动分页列表
2、接口支持https协议
https://api.polyv.net/live/v4/channel/task-reward-activity/page
https://api.polyv.net/live/v4/channel/task-reward-activity/page?channelId=4854808&pageSize=10&pageNumber=1&appId=frlr1zazn3&sign=012332FBD8DBCFC068AFCB484A2ADECB×tamp=1670550787318
{
"code": 200,
"status": "success",
"requestId": "aa9f6d7d-b67b-45de-b5d6-4e0302e4c609",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"totalItems": 1,
"contents": [
{
"activityId": 1519,
"userId": "cc167950af",
"channelId": 4990862,
"activityName": "123",
"activityMode": 1,
"taskRule": 2,
"status": 0,
"startTime": 1720611960000,
"endTime": 1720623600000,
"tasks": [
{
"taskId": 4827,
"sort": 1,
"startTime": 1720611960000,
"endTime": 1720623600000,
"reachCondition": {
"type": "sign",
"amount": 1
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": 1,
"customReward": ""
}
}
]
}
]
},
"success": true
}
private final Logger log = LoggerFactory.getLogger(getClass());
/**
* 删除任务奖励活动
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void pageTaskRewardTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.appId;
String appSecret = super.appSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
Integer channelId = 4990862;
Integer pageSize = 10;
Integer pageNumber = 1;
//业务参数
String url = "https://api.polyv.net/live/v4/channel/task-reward-activity/page";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("channelId", channelId);
requestMap.put("pageSize", pageSize);
requestMap.put("pageNumber", pageNumber);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
log.info("测试任务奖励活动分页查询成功:{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"requestId": "aa9f6d7d-b67b-45de-b5d6-4e0302e4c609",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"totalItems": 3,
"contents": [
{
"activityId": 1519,
"userId": "cc167950af",
"channelId": 4990862,
"activityName": "123",
"activityMode": 1,
"taskRule": 2,
"status": 0,
"startTime": 1720611960000,
"endTime": 1720623600000,
"tasks": [
{
"taskId": 4827,
"sort": 1,
"startTime": 1720611960000,
"endTime": 1720623600000,
"reachCondition": {
"type": "sign",
"amount": 1
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": 1,
"customReward": ""
}
},
{
"taskId": 4828,
"sort": 2,
"startTime": 1720611960000,
"endTime": 1720623600000,
"reachCondition": {
"type": "online",
"amount": 5
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": -1,
"customReward": ""
}
}
]
},
{
"activityId": 1518,
"userId": "cc167950af",
"channelId": 4990862,
"activityName": "解锁任务",
"activityMode": 1,
"taskRule": 1,
"status": 0,
"startTime": 1720611300000,
"endTime": 1720611849000,
"tasks": [
{
"taskId": 4824,
"sort": 1,
"startTime": 1720611300000,
"endTime": 1720612800000,
"reachCondition": {
"type": "sign",
"amount": 1
},
"rewardSetting": {
"type": "nothing",
"amount": 0,
"limit": 0,
"customReward": ""
}
},
{
"taskId": 4825,
"sort": 2,
"startTime": 1720611300000,
"endTime": 1720612800000,
"reachCondition": {
"type": "online",
"amount": 1
},
"rewardSetting": {
"type": "custom",
"amount": 0,
"limit": -1,
"customReward": "自定义"
}
},
{
"taskId": 4826,
"sort": 3,
"startTime": 1720611300000,
"endTime": 1720612800000,
"reachCondition": {
"type": "online",
"amount": 2
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": 1,
"customReward": ""
}
}
]
},
{
"activityId": 1517,
"userId": "cc167950af",
"channelId": 4990862,
"activityName": "英文测试",
"activityMode": 1,
"taskRule": 1,
"status": 0,
"startTime": 1720608180000,
"endTime": 1720609200000,
"tasks": [
{
"taskId": 4818,
"sort": 1,
"startTime": 1720608180000,
"endTime": 1720609200000,
"reachCondition": {
"type": "sign",
"amount": 1
},
"rewardSetting": {
"type": "nothing",
"amount": 0,
"limit": 0,
"customReward": ""
}
},
{
"taskId": 4819,
"sort": 2,
"startTime": 1720608180000,
"endTime": 1720609200000,
"reachCondition": {
"type": "online",
"amount": 1
},
"rewardSetting": {
"type": "custom",
"amount": 0,
"limit": -1,
"customReward": "测试"
}
},
{
"taskId": 4820,
"sort": 3,
"startTime": 1720608180000,
"endTime": 1720609200000,
"reachCondition": {
"type": "online",
"amount": 2
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": -1,
"customReward": ""
}
},
{
"taskId": 4821,
"sort": 4,
"startTime": 1720608180000,
"endTime": 1720609200000,
"reachCondition": {
"type": "online",
"amount": 3
},
"rewardSetting": {
"type": "cash",
"amount": 30,
"limit": 1,
"customReward": ""
}
}
]
}
]
},
"success": true
}
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
"error": {
"code": 20001,
"desc": "application not found."
},
"success": false
}