1、获取账号通用设置的积分打赏设置,如果提交channelId,接口同时返回频道的积分打赏开关设置
2、频道的积分打赏开关生效的前提为通用设置的积分打赏也同时为开
3、支持https
{
"code": 200,
"status": "success",
"message": "",
"data": {
"userId": "edvf2fpec9",
"donatePointEnabled": "N",
"channelDonatePointEnabled": null,
"queryPointUrl": null,
"updatePointUrl": null,
"requestFailTips": "积分异常,请稍后重试",
"pointNotEnoughTips": "积分不足,无法打赏",
"pointUnit": "点",
"goods": [
{
"goodName": "鲜花",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/01-flower.png",
"goodPrice": 0.00,
"goodEnabled": "Y"
},
{
"goodName": "咖啡",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/02-coffee.png",
"goodPrice": 5.00,
"goodEnabled": "Y"
},
{
"goodName": "点赞",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/03-good.png",
"goodPrice": 10.00,
"goodEnabled": "Y"
},
{
"goodName": "掌声",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/04-applaud.png",
"goodPrice": 15.00,
"goodEnabled": "Y"
},
{
"goodName": "666",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/05-666.png",
"goodPrice": 20.00,
"goodEnabled": "Y"
},
{
"goodName": "小星星",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/06-star.png",
"goodPrice": 25.00,
"goodEnabled": "Y"
},
{
"goodName": "钻石",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/07-diamond.png",
"goodPrice": 30.00,
"goodEnabled": "Y"
},
{
"goodName": "跑车",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/08-car.png",
"goodPrice": 50.00,
"goodEnabled": "Y"
},
{
"goodName": "火箭",
"goodImg": "//livestatic.videocc.net/uploaded/images/webapp/channel/donate/09-rocket.png",
"goodPrice": 100.00,
"goodEnabled": "Y"
}
]
}
}
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
<?php
//引用config.php
include 'config.php';
$params = array(
'appId' => $appId,
'timestamp' => $timestamp
);
//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;
//接口请求url
$url = "`https://api.polyv.net/live/v3/channel/donate/get-point-setting?appId=".$appId."&sign=".$sign."×tamp=".$timestamp;
//输出接口请求结果
echo file_get_contents($url);
?>