Copy http://api.polyv.net/live/v4/channel/donate/get?appId=frlr1zazn3&sign=16DC042339E27BAD00452D004C1FA9CA&channelId=2523307×tamp=1631064094801
Copy private static final Logger log = LoggerFactory . getLogger ( ChannelDonateTest . class );
@ Test
public void testGetDonate() throws IOException , NoSuchAlgorithmException {
String appId = super . appId ;
String appSecret = super . appSecret ;
String timestamp = String . valueOf ( System . currentTimeMillis ());
//业务参数
String url = "http://api.polyv.net/live/v4/channel/donate/get" ;
//http 调用逻辑
Map < String , String > requestMap = new HashMap <>();
requestMap . put ( "appId" , appId);
requestMap . put ( "timestamp" , timestamp);
requestMap . put ( "channelId" , "2523307" );
requestMap . put ( "sign" , LiveSignUtil . getSign (requestMap , appSecret));
String response = HttpUtil . get (url , requestMap);
log . info ( "测试查询频道打赏设置,返回值:{}" , response);
}
Copy {
"code" : 200 ,
"status" : "success" ,
"requestId" : "5d413aa5dc6b4cc1b79d4374aa5ac974.67.16310640996487509" ,
"data" : {
"donateCashEnabled" : "N" ,
"donateGiftEnabled" : "N" ,
"cashDonate" : {
"cashs" : [
0.88 ,
6.66 ,
8.88 ,
18.88 ,
66.6 ,
88.8
] ,
"cashMin" : 0.01
} ,
"giftDonate" : {
"payWay" : null ,
"cashUnit" : "元" ,
"pointUnit" : "点" ,
"cashPays" : [
{
"name" : "666" ,
"img" : "//s1.videocc.net/default-img/donate/666.png" ,
"price" : 6.66 ,
"sequence" : 0 ,
"enabled" : "Y"
} ,
{
"name" : "掌声" ,
"img" : "//s1.videocc.net/default-img/donate/handclap.png" ,
"price" : 88.99 ,
"sequence" : 0 ,
"enabled" : "Y"
} ,
{
"name" : "点赞" ,
"img" : "//s1.videocc.net/default-img/donate/like.png" ,
"price" : 1.99 ,
"sequence" : 0 ,
"enabled" : "Y"
} ,
{
"name" : "小星星" ,
"img" : "//s1.videocc.net/default-img/donate/star.png" ,
"price" : 9.99 ,
"sequence" : 0 ,
"enabled" : "N"
} ,
{
"name" : "钻石" ,
"img" : "//s1.videocc.net/default-img/donate/diamond.png" ,
"price" : 19.99 ,
"sequence" : 0 ,
"enabled" : "N"
} ,
{
"name" : "跑车" ,
"img" : "//s1.videocc.net/default-img/donate/car.png" ,
"price" : 29.99 ,
"sequence" : 0 ,
"enabled" : "N"
} ,
{
"name" : "火箭" ,
"img" : "//s1.videocc.net/default-img/donate/rocket.png" ,
"price" : 66.66 ,
"sequence" : 0 ,
"enabled" : "N"
}
] ,
"pointPays" : [
{
"name" : "咖啡" ,
"img" : "//s1.videocc.net/default-img/donate/coffee.png" ,
"price" : 5 ,
"sequence" : 1 ,
"enabled" : "Y"
} ,
{
"name" : "鲜花" ,
"img" : "//s1.videocc.net/default-img/donate/flower.png" ,
"price" : 0 ,
"sequence" : 2 ,
"enabled" : "Y"
} ,
{
"name" : "点赞" ,
"img" : "//s1.videocc.net/default-img/donate/like.png" ,
"price" : 10 ,
"sequence" : 3 ,
"enabled" : "Y"
} ,
{
"name" : "掌声" ,
"img" : "//s1.videocc.net/default-img/donate/handclap.png" ,
"price" : 15 ,
"sequence" : 4 ,
"enabled" : "Y"
} ,
{
"name" : "666" ,
"img" : "//s1.videocc.net/default-img/donate/666.png" ,
"price" : 20 ,
"sequence" : 5 ,
"enabled" : "Y"
} ,
{
"name" : "小星星" ,
"img" : "//s1.videocc.net/default-img/donate/star.png" ,
"price" : 25 ,
"sequence" : 6 ,
"enabled" : "Y"
} ,
{
"name" : "钻石" ,
"img" : "//s1.videocc.net/default-img/donate/diamond.png" ,
"price" : 30 ,
"sequence" : 7 ,
"enabled" : "Y"
} ,
{
"name" : "烟火" ,
"img" : "//s1.videocc.net/default-img/donate/fireworks.png" ,
"price" : 35 ,
"sequence" : 8 ,
"enabled" : "Y"
} ,
{
"name" : "金蛋" ,
"img" : "//s1.videocc.net/default-img/donate/golden-egg.png" ,
"price" : 40 ,
"sequence" : 9 ,
"enabled" : "Y"
} ,
{
"name" : "奖杯" ,
"img" : "//s1.videocc.net/default-img/donate/cup.png" ,
"price" : 45 ,
"sequence" : 10 ,
"enabled" : "Y"
} ,
{
"name" : "跑车" ,
"img" : "//s1.videocc.net/default-img/donate/car.png" ,
"price" : 50 ,
"sequence" : 11 ,
"enabled" : "Y"
} ,
{
"name" : "皇冠" ,
"img" : "//s1.videocc.net/default-img/donate/crown.png" ,
"price" : 60 ,
"sequence" : 12 ,
"enabled" : "Y"
} ,
{
"name" : "别墅" ,
"img" : "//s1.videocc.net/default-img/donate/house.png" ,
"price" : 65 ,
"sequence" : 13 ,
"enabled" : "Y"
} ,
{
"name" : "游艇" ,
"img" : "//s1.videocc.net/default-img/donate/yacht.png" ,
"price" : 70 ,
"sequence" : 14 ,
"enabled" : "Y"
} ,
{
"name" : "飞机" ,
"img" : "//s1.videocc.net/default-img/donate/plane.png" ,
"price" : 88 ,
"sequence" : 15 ,
"enabled" : "Y"
} ,
{
"name" : "火箭" ,
"img" : "//s1.videocc.net/default-img/donate/rocket.png" ,
"price" : 100 ,
"sequence" : 16 ,
"enabled" : "Y"
}
]
}
} ,
"success" : true
}
Copy {
"code" : 400 ,
"status" : "error" ,
"requestId" : "4081dbac03e6441e8bdd301d8feee5a2.124.16360828110501391" ,
"error" : {
"code" : 20001 ,
"desc" : "application not found."
} ,
"success" : false
}