Get Marquee Settings API
Updated: 2022-09-02 18:08:07
API URL
http://api.polyv.net/live/v3/channel/marquee/get
API Description
1、接口用于获取频道或全局的跑马灯设置信息
2、接口支持https
3、不提交channelId 表示获取全局设置
4、提交channelId 且getActual="N" 表示获取频道本身的设置,不提交getActual 或者提交getActual = "Y" 表示获取频道实际生效的跑马灯设置
Supported Format
JSON
Request Method
GET
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | Yes | string | Admin's appId |
| timestamp | Yes | long | 13-digit current timestamp |
| sign | Yes | String | Signature, a 32-character uppercase MD5 value. The appSecret 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 to obtain response data. See Signature Generation Rules |
| userId | Yes | string | User ID |
| channelId | No | int | Channel ID. Do not pass this value when querying global settings. |
| getActual | No | string (values: Y/N) | Only effective when querying channel marquee settings. Y: Get the actual effective marquee settings for the channel. N: Get the marquee settings for the channel. |
Successful Response JSON Example:
{
"code": 200,
"status": "success",
"message": "",
"data": {
"globalSettingEnabled": null,
"marqueeRestrict": "N",
"marqueeType": "nickname",
"marquee": "",
"marqueeOpacity": 100,
"marqueeFontSize": 30,
"marqueeFontColor": "#000000",
"marqueeAutoZoomEnabled": "N"
}
}
Failed Response JSON Examples:
No appId provided
{
"code": 400,
"status": "error",
"message": "appId is required.",
"data": ""
}
Incorrect appId
{
"code": 400,
"status": "error",
"message": "application not found.",
"data": ""
}
Timestamp error
{
"code": 400,
"status": "error",
"message": "invalid timestamp.",
"data": ""
}
User ID error
{
"code": 400,
"status": "error",
"message": "userId error.",
"data": ""
}
Signature error
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
Field Description
| Parameter | Description |
|---|---|
| code | Response code. 200 for success, 400 for failure, 403 for signature error, 500 for server error. |
| status | success for success, error for failure. |
| message | Error message when an error occurs. |
| data.globalSettingEnabled | Global setting toggle for channel marquee. This field is null when querying global settings. |
| data.marqueeRestrict | Marquee toggle. Values: Y (on), N (off). |
| data.marqueeType | Marquee type. Values: fixed (fixed value), nickname (viewer name), diyurl (custom URL). |
| data.marquee | When marqueeType=fixed, this field contains the marquee content. When marqueeType=nickname, it is empty. When marqueeType=diyurl, it contains the user's URL. |
| data.marqueeOpacity | Marquee opacity. Range: 0 ~ 100. |
| data.marqueeFontSize | Marquee font size. |
| data.marqueeFontColor | Marquee font color, e.g., #ffffff. |
| data.marqueeAutoZoomEnabled | Whether to enable adaptive marquee scaling. Values: Y or N. |
