Query Channel Page Decoration
Updated: 2023-11-01 14:37:59
API Description
1、查询频道的页面装修设置
2、接口支持https协议
API URL
http://api.polyv.net/live/v4/channel/decorate/get
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Account appId See details for obtaining secret key |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid within 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See signature generation rules |
| channelId | true | String | Channel ID |
Example
http://api.polyv.net/live/v4/channel/decorate/get?appId=frlr1zacn3&sign=0F412B15C2DC032517E1D29BD4452C43&channelId=2523307×tamp=1630996829815
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code, 200 for success, non-200 for failure |
| status | String | Response result, determined by business logic: success returns "success", failure returns "error" |
| success | Boolean | Response result, determined by business logic: success returns true, failure returns false |
| data | Object | Channel details returned on successful response See data field description |
| error | Object | Error information when status code is non-200 See Error field description |
| requestId | String | Request ID, a unique UUID generated for each request, used only for troubleshooting and debugging, should not be tied to business logic |
Error Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Error code, used to determine the specific error cause |
| desc | String | Error description, corresponding to error.code |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| skin | String | Skin: black (fashion black), red (festive red), blue (tech blue), white (classic white), green (mint green), golden (luxury gold) |
| aloneWatchLayout | String | Standard live streaming viewing page layout configuration (normal: normal, portrait: portrait) |
| chat | Object | Chat object in decoration See TemplateDecorateChatBO field description |
| desc | Object | Chinese live streaming introduction page object in decoration See TemplateDecorateDescBO field description |
| menus | Array | Chinese menu list object See TemplateDecorateMenuBO field description |
| player | Object | Player object in decoration See TemplateDecoratePlayerBO field description |
| pptMobileWatchLayout | String | Three-screen mobile viewing layout: normal (standard live streaming), portrait (live commerce) |
| splash | Object | Splash page object in decoration See TemplateDecorateSplashBO field description |
| splashEnabled | String | Splash page toggle: Y (enabled), N (disabled) |
| englishSettingEnabled | String | Bilingual live room toggle: Y (enabled), N (disabled) |
| enMenus | Array | English menu list object See TemplateDecorateMenuBO field description |
| descEn | Object | Template - English live streaming introduction page object in decoration See TemplateDecorateDescEnBO field description |
TemplateDecorateChatBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| baseLikes | Integer | Cumulative like count (like base) |
| chatOnlineNumberEnable | String | Online user count toggle: Y (enabled), N (disabled) |
| emotionEnabled | String | Emotion live room toggle: Emotion toggle and like toggle cannot both be enabled simultaneously. Y (enabled), N (disabled) |
| redPackEnabled | String | Red packet toggle: Y (enabled), N (disabled) |
| sendFlowersEnabled | String | Like toggle: Y (enabled), N (disabled) |
| viewerSendImgEnabled | String | Send image toggle: Y (enabled), N (disabled) |
| welcomeEnabled | String | Welcome message toggle: Y (enabled), N (disabled) |
| withdrawEnabled | String | Withdrawal toggle: Y (enabled), N (disabled) |
| portraitChatBgImg | String | Portrait chat room background image |
| portraitChatBgImgOpacity | String | Portrait chat room background image blur level, 0~50, higher value means more blur |
TemplateDecorateDescBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| coverImageUrl | String | Warm-up image -> Cover image |
| iconUrl | String | Icon URL |
| publisher | String | Host name, max length 50 |
| title | String | Title -> Live stream name, max length 100 |
TemplateDecorateDescEnBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| publisher | String | Host English name, max length 50 |
| title | String | Live stream English name, max length 100 |
TemplateDecorateMenuBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| content | String | Menu content |
| menuId | String | Menu ID |
| name | String | Menu name |
| type | String | Menu type desc: Live stream introduction chat: Interactive chat quiz: Q&A qa: Q&A invite: Invitation poster text: Text and image menu iframe: Promotional external link tuwen: Text and image live streaming previous: Previous sessions buy: Shop while watching members: Member list seat: Seat multiMeeting: Multi-session |
TemplateDecoratePlayerBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| actualPV | Integer | Actual cumulative view count (real count) |
| backgroundUrl | String | PC background image |
| basePV | Integer | Base view count |
| coverJumpUrl | String | Cover (warm-up) jump link |
| iconLink | String | Watermark link |
| iconPosition | String | Icon position (watermark position) |
| iconUrl | String | Watermark image URL |
| logoOpacity | Float | Watermark opacity, 0: fully transparent, 1: fully opaque |
| warmUpEnabled | String | Warm-up toggle: Y (enabled), N (disabled) |
| warmUpImageUrl | String | Warm-up image URL (live stream cover image) |
| watermarkEnabled | String | Watermark toggle: Y (enabled), N (disabled) |
TemplateDecorateSplashBO Parameter Description
| Parameter | Type | Description |
|---|---|---|
| splashImageUrl | String | Splash page image |
Java Request Example
For quick integration of basic code, please download the relevant dependency source code. Click here to download source code. After downloading, add it to your own source code project. The test cases include HttpUtil.java and LiveSignUtil.java, both included in the download file.
It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.
private static final Logger log = LoggerFactory.getLogger(ChannelDecorateTest.class);
@Test
public void getChannelDecorate() 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/decorate/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);
}
Response Example
Success Example
{
"code": 200,
"status": "success",
"requestId": "dc7ae621ef8e4f4a8e4976833f1dbbd4.66.16309975070362179",
"data": {
"skin": "red",
"aloneWatchLayout": "normal",
"pptMobileWatchLayout": "normal",
"englishSettingEnabled": "Y",
"player": {
"watermarkEnabled": null,
"iconUrl": "//liveimages.videocc.net/uploaded/images/2021/09/g24vjlhywx.png",
"iconPosition": "br",
"logoOpacity": 1,
"iconLink": "",
"basePV": 6,
"actualPV": 21,
"warmUpEnabled": "Y",
"warmUpImageUrl": "http://liveimages.videocc.net/uploadimage/20210312/chat_img_1b448be323_16155164629438.jpeg",
"coverJumpUrl": "",
"backgroundUrl": ""
},
"desc": {
"coverImageUrl": "http://liveimages.videocc.net/uploadimage/20210312/chat_img_1b448be323_16155164629438.jpeg",
"iconUrl": "http://liveimages.videocc.net/assets/wimages/pc_images/logo.png",
"title": "polyv宣讲会",
"publisher": "polyv专用主持人"
},
"descEn": null,
"chat": {
"sendFlowersEnabled": "N",
"baseLikes": 800,
"withdrawEnabled": "N",
"redPackEnabled": "N",
"chatOnlineNumberEnable": "N",
"viewerSendImgEnabled": "N",
"welcomeEnabled": "N",
"emotionEnabled": "N"
},
"menus": [
{
"menuId": "1435122684833112066",
"name": "直播间描述",
"type": "desc",
"content": null
},
{
"menuId": "1435122684837306369",
"name": "聊天",
"type": "chat",
"content": null
}
],
"enMenus": [
{
"menuId": "1435080554799091714",
"name": "desc",
"type": "desc",
"content": null
},
{
"menuId": "1435132950782222337",
"name": "talk",
"type": "chat",
"content": null
}
],
"splash": {
"splashImageUrl": ""
},
"splashEnabled": "Y"
},
"success": true
}
Error Example
{
"code": 400,
"status": "error",
"requestId": "d310b70bc329403f87f77f9203d50f89.128.16360828899123425",
"error": {
"code": 30004,
"desc": "找不到频道"
},
"success": false
}
