# (简化)创建单窗口类型节目
该接口在 2.6.6-20240611 版本之后支持
说明
以下接口创建单类型窗口节目,默认窗口铺满屏幕。
# 新建网页节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/web
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| url | 是 | String | 网页链接 | "https://www.baidu.com/" |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"url": "https://www.baidu.com/"
}
Response:
{
"programId": 16989
}
# 新建文件节目或同步节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/document
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| mediaId | 是 | Integer | 素材id | 16110 |
| syncProgram | 是 | Integer | 是否同步节目。0: 普通文件节目,1:同步节目 | 1 |
| constrainedProportion | 是 | Integer | 是否保持约束比例,0:不保持宽高比,1:约束比例 | 1 |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"mediaId": 16110,
"syncProgram": 1,
"constrainedProportion": 1
}
Response:
{
"programId": 16989
}
# 新建单行文本或多行文本节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/lineText
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| fontSize | 是 | Integer | 字体大小 | 16 |
| lineText | 是 | String | 文本内容 | "文本" |
| lineTextType | 是 | Integer | 文本类型,0:单行文本, 1:多行文本 | 1 |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"lineText": "文本",
"lineTextType": 1
}
Response:
{
"programId": 16989
}
# 新建时钟节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/clock
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| fontSize | 是 | Integer | 字体大小 | 16 |
| clockType | 是 | Integer | 时钟类型,0: 数字时钟,1:模拟时钟 | 1 |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"clockType": 1
}
Response:
{
"programId": 16989
}
# 新建天气节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/weather
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| fontSize | 是 | Integer | 字体大小 | 16 |
| regionName | 是 | String | 天气区域名 | "北京" |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"regionName": "北京"
}
Response:
{
"programId": 16989
}
# 新建倒计时节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/countDown
Method: POST
Request:
| 字段名 | 必选 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| programName | 是 | String | 节目名 | "programName" |
| screenWidth | 是 | Integer | 屏幕宽 | 580 |
| screenHeight | 是 | Integer | 屏幕高 | 256 |
| durationMillis | 是 | Integer | 播放时长 | 8000 |
| fontSize | 是 | Integer | 字体大小 | 16 |
| endDateTime | 是 | String | 倒计时终点日期和时间,格式为:("2024-01-19 20:43:54") | "2025-01-19 20:43:54" |
{
"programName": "programName",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"endDateTime": "2025-01-19 20:43:54"
}
Response:
{
"programId": 16989
}
# 新建环境节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/environment
Method: POST
Request:
| 字段名 | 说明 | 示例 |
|---|---|---|
| programName | 节目名 | "programName" |
| screenWidth | 屏幕宽 | 580 |
| screenHeight | 屏幕高 | 56 |
| durationMillis | 播放时长,单位 ms | 9000 |
| fontSize | 字体大小,单位像素 | 18 |
| prefix | 固定文本前缀。当 type 为 28(烟雾)时,为大于临界值时显示的固定文本。烟雾值 + 前缀 | "当前温度: " |
| suffix | 固定文本后缀。当 type 为 28(烟雾)时,为小于临界值时显示的固定文本。烟雾值 + 后缀 | "°C" |
| environmentType | 环境窗口类型。21:湿度、22:温度、23:噪声、24:空气指数、28:烟雾 | 22 |
| temperatureShowAsFahrenheit | 温度是否显示为华氏度(°F)。0:否(°C),1:是(°F),仅 type 为 22(温度)时适用 | 0 |
| temperatureOffset | 温度偏移量,仅 typ` 为 22(温度)时适用 | 2 |
| smokeStandard | 烟雾临界值(ppm),仅 type 为 28(烟雾)时适用 | 200 |
新建环境温度节目示例:
{
"programName": "programEnvironment",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"prefix": "当前温度: ",
"suffix": "°C",
"environmentType": 22,
"temperatureShowAsFahrenheit": 0,
"temperatureOffset": 5
}
新建环境烟雾节目示例:
{
"programName": "programEnvironment",
"screenWidth": 580,
"screenHeight": 256,
"durationMillis": 8000,
"fontSize": 16,
"prefix": "smoke",
"suffix": "smoke",
"environmentType": 28,
"smokeStandard": 100
}
Response:
{
"programId": 16989
}
# 新建新闻节目
# URL: /wp-json/wp/v2/programs/simplifyCreate/rss
Method: POST
Request:
| 字段名 | 说明 | 示例 |
|---|---|---|
| programName | 节目名 | "programName" |
| screenWidth | 屏幕宽 | 580 |
| screenHeight | 屏幕高 | 256 |
| durationMillis | 播放时长,单位 ms | 9000 |
| fontSize | 字体大小,单位像素 | 18 |
| rssUrl | 新闻聚合路径 | "https://www.yahoo.com/news/rss" |
| refreshIntervalMs | 刷新间隔时间,单位毫秒 | 600000 |
| scrollSpeed | 滚动速度,单位(px/s) | 60 |
{
"programName": "programRss",
"screenWidth": 580,
"screenHeight": 512,
"durationMillis": 9000,
"fontSize": 18,
"rssUrl": "https://www.yahoo.com/news/rss",
"refreshIntervalMs": 5000,
"scrollSpeed": 600
}
Response:
{
"programId": 16989
}