# iFLYOS 运营管理系统接口接入
开发者可直接使用 iFLYOS 标准 showcore,也可以在产品与标准 showcore 的内容推荐逻辑框架一致的情况下使用运营管理系统。
# 接口地址
https://api.iflyos.cn
# 请求头部
Content-Type: application/json
Authorization: Bearer token
# 桌面轮播图
# 获取桌面轮播图
请求方式:GET
接口地址:/showcore/api/v2/cms2/desktop/carousel
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
version | int | F | 版本 |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
resultBody | JsonArray | 返回信息 |
resultBody.id | Integer | 轮播图id |
resultBody.title | String | 轮播图标题 |
resultBody.guideSentence | String | 轮播图引导语料 |
resultBody.banner | String | 轮播图banner图地址 |
resultBody.redirectType | String | 轮播图重定向类型,包括 text_in 和 andriod_intent |
resultBody.directive | String | 轮播图指令 |
resultBody.clientId | String | 轮播图指定clientid |
resultBody.effectiveTime | Long | 轮播图生效时间戳 |
resultBody.expireTime | Long | 轮播图失效时间戳 |
resultBody.orderNum | Integer | 轮播图排序序号 |
返回示例
{
"status": 1,
"errorCode": "",
"errorMsg": "",
"resultBody": [
{
"id": 8,
"title": "请问请",
"guideSentence": "说到底是谁",
"banner": "https://www.iflyos.cn/platform_static/img/cbe2759.png",
"redirectType": "andriod_intent",
"directive": "撒大苏打",
"clientId": null,
"effectiveTime": 1587526718149,
"expireTime": 1594606493000,
"createTime": null,
"updateTime": null,
"orderNum": 1
}
]
}
# 桌面推荐板块
# 获取桌面推荐板块数据
请求方式:POST
接口地址:/showcore/api/v2/cms2/desktop/recommend
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
childModel | bool | t |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
resultBody | JsonArray | 返回信息 |
resultBody.id | Integer | 桌面推荐板块id |
resultBody.title | String | 桌面推荐板块名称 |
resultBody.subtitle | String | 板块副标题 |
resultBody.childModel | boolean | 是否为儿童模式 |
resultBody.linkType | String | 板块右上角“刷新”旁的跳转类型,android_intent/url |
resultBody.linkName | String | 板块右上角“刷新”旁的跳转名称 |
resultBody.link | String | 板块右上角“刷新”旁的跳转链接 |
resultBody.total | Integer | 条目总数 |
resultBody.limit | Integer | 该模板中的条目限制数量 |
resultBody.cmsRecommendTemplateId | Long | 模版id 1~8对应关系 (opens new window) |
resultBody.cmsRecommendColorId | Long | 配色方案id |
resultBody.color | JsonObject | 配色详情 |
resultBody.items | JsonArray | 桌面推荐板块中的items数据 |
cmsRecommendTemplateId=1、2、3、4、5、6;items参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
source | string | 是 | 来源 |
title | string | 是 | 专辑/单曲名 |
subtitle | string | 否 | 歌手 |
cover | string | 是 | 图片 |
cmsRecommendTemplateId=7;items参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
name | string | 是 | 应用名称 |
subtitle | string | 是 | 副标题 |
icon | string | 是 | 应用图标 |
cmsRecommendTemplateId=8,items参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
content | string | 是 | 语料 |
返回示例
{
"errorCode": "",
"errorMsg": "",
"resultBody": [
{
"childModel": false,
"cmsRecommendColorId": 4,
"cmsRecommendTemplateId": 2,
"color": {
"background": "https://iflyos-external.oss-cn-shanghai.aliyuncs.com/cms/color-schemes/theme_4_1.png",
"more": {
"textColor": "#ff262626"
},
"titleColor": "#ff262626"
},
"id": 88,
"items": [
{
"cover": "https://bookpic.lrts.me/jxib5w5elp9ff46iaimyjnllxi1ybiey_180x254.jpeg",
"id": 15490,
"metadata": {
"item_id": 15490
},
"source": "common",
"sourceName": "懒人听书",
"subtitle": "",
"title": "元:铁骑踏出的强悍帝国(图说天下中国历史系列)",
"titleColor": "#ffffffff",
"type": 2
},
...
]
}
],
"status": 1
}
说明
items[i].type | 操作 | metadata |
---|---|---|
1 | textin | 存放操作所需的参数 |
2 | 打开cms专辑 | 存放操作所需的参数 |
3 | 打开cms单曲 | 存放操作所需的参数 |
4 | template app | 存放操作所需的参数 |
5 | Android intent | 存放操作所需的参数 (opens new window) |
# 桌面刷新
请求方式:GET
接口地址:/showcore/api/v2/cms2/desktop/recommend/refresh
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
id | int | t | 推荐板块id |
返回示例
{
"errorCode": "",
"errorMsg": "",
"resultBody": [
{
"childModel": false,
"cmsRecommendColorId": 4,
"cmsRecommendTemplateId": 2,
"color": {
"background": "https://iflyos-external.oss-cn-shanghai.aliyuncs.com/cms/color-schemes/theme_4_1.png",
"more": {
"textColor": "#ff262626"
},
"titleColor": "#ff262626"
},
"id": 88,
"items": [
{
"cover": "https://bookpic.lrts.me/jxib5w5elp9ff46iaimyjnllxi1ybiey_180x254.jpeg",
"id": 15490,
"metadata": {
"item_id": 15490
},
"source": "common",
"sourceName": "懒人听书",
"subtitle": "",
"title": "元:铁骑踏出的强悍帝国(图说天下中国历史系列)",
"titleColor": "#ffffffff",
"type": 2
},
...
]
}
],
"status": 1
}
说明
items[i].type | 操作 | metadata |
---|---|---|
1 | textin | 存放操作所需的参数 |
2 | 打开cms专辑 | 存放操作所需的参数 |
3 | 打开cms单曲 | 存放操作所需的参数 |
4 | template app | 存放操作所需的参数 |
5 | Android intent | 存放操作所需的参数 (opens new window) |
# 应用
# 获取应用列表
请求方式:GET
接口地址:/showcore/api/v2/cms2/apptemplate
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
version | int | F | 版本 |
page | Integer | 是 | 页码 |
size | Integer | 是 | 每页数量 |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
page | Integer | 页码 |
size | Integer | 每页数量 |
total | Integer | 总数 |
resultBody | JsonArray | 返回信息 |
resultBody.id | Integer | 应用id |
resultBody.name | String | 应用名称 |
resultBody.icon | String | 应用图标 |
resultBody.type | boolean | 1-"模版应用" 2-"技能应用" 3-"H5 应用" |
resultBody.template | string | 模板类型,1. 普通模板,2. 分类卡片模板, 3. 播放器模板; |
resultBody.metadata | JsonObject |
metadata
参数 | 类型 | 说明 |
---|---|---|
isDark | bool | 主题 true 代表暗色 |
img | string | 背景图片 |
skillId | string | 技能 id,type=2,技能应用时返回 |
url | string | 关联链接,type=1/2,技能应用时返回 |
返回示例
{
"status": 1,
"errorCode": "",
"errorMsg": "",
"page": 1,
"size": 20,
"total": 22,
"resultBody": [
{
"metadata": {
"isDark": null,
"img": null,
"url": "https://4399.com"
},
"name": "4399小游戏",
"icon": "https://cdn9002.iflyos.cn/app/4399.png",
"id": 3,
"type": 3
}
]
}
# 获取应用明细
请求方式:GET
接口地址:/showcore/api/v2/cms2/apptemplate/detail
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
id | Integer | 是 | 应用id |
shownum | Integer | 是 | 首屏返回数据数量 |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
page | Integer | 页码 |
size | Integer | 每页数量 |
total | Integer | 总数 |
resultBody | JsonObject | 返回信息 |
resultBody.type = 1时,为模版应用,参数说明如下
参数 | 类型 | 说明 |
---|---|---|
id | Integer | 应用id |
name | string | 应用名称 |
type | string | 1-"模版应用" 2-"技能应用" 3-"H5 应用" |
template | string | 模板类型,1. 普通模板,2. 分类卡片模板, 3. 播放器模板; |
isDark | boolean | 主题 true代表暗色 |
img | string | 背景图 |
sortOrder | Integer | 排序方式,1. 随机,2. 时间倒序 |
sections | JsonArray | 分类列表 |
section-items | JsonObject | 分类关联的数据 |
sections
参数 | 类型 | 说明 |
---|---|---|
sectionId | Integer | 栏目id |
sectionName | string | 栏目名称 |
hasSection | boolean | 是否有下级栏目 |
sectionImage | string | 栏目图片 |
children | JsonArray | 下级栏目信息 |
**section-items **
参数 | 类型 | 说明 |
---|---|---|
total | Integer | 该栏目总共内容条数 |
items | JsonArray | 该栏目首屏内容 |
itemsType | Integer | 条目类型,1 专辑 2 单曲 |
itemsType=1 输出参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
id | string | 是 | 专辑id |
title | string | 是 | 专辑名 |
subtitle | string | 是 | 子标题,如:作者、演员 |
cover | string | 是 | 专辑封面 |
source | string | 是 | 来源 |
sourceName | int | 是 | 来源名称 |
itemsType=2 输出参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
id | string | 是 | 单曲id |
title | string | 是 | 单曲名 |
subtitle | string | 是 | 子标题,如:作者、演员 |
cover | string | 是 | 单曲封面 |
type | int | 是 | 音频/视频 |
source | string | 是 | 来源 |
sourceName | int | 是 | 来源名称 |
url | int | 是 | 单曲url |
返回示例
{
"status": 1,
"errorCode": "",
"errorMsg": "",
"resultBody": {
"template": 1,
"isDark": true,
"img": "https://iflyos-external.oss-cn-shanghai.aliyuncs.com/public/weather_05.png",
"sortOrder": 1,
"name": "aaaa",
"id": 50,
"section-items": {
"442": {
"total": 462,
"itemType": 1,
"items": [
{
"cover": "http://bookpic.lrts.me/k2ez539nkjcb1g3219eqrmh1ybjsrkz6_180x180.jpeg",
"subtitle": "",
"sourceName": null,
"id": null,
"source": "lrts",
"title": null
}
]
}
},
"type": 1,
"sections": [
{
"sectionName": "一级分类1",
"children": [
{
"sectionName": "2级分类2",
"hasSection": false,
"sectionId": 444
},
{
"sectionName": "2级分类1",
"hasSection": false,
"sectionId": 442
}
],
"hasSection": true,
"sectionId": 440
},
{
"sectionName": "一级分类2",
"hasSection": false,
"sectionId": 438
}
]
}
}
resultBody.type = 2时,为技能应用,参数说明如下
参数 | 类型 | 说明 |
---|---|---|
id | Integer | 应用id |
name | string | 应用名称 |
type | string | 1-"模版应用" 2-"技能应用" 3-"H5 应用" |
icon | string | 应用图标 |
skillId | boolean | 技能id |
url | string | 技能链接 |
resultBody.type = 3时,为H5应用,参数说明如下
参数 | 类型 | 说明 |
---|---|---|
id | Integer | 应用id |
name | string | 应用名称 |
type | string | 1-"模版应用" 2-"技能应用" 3-"H5 应用" |
icon | string | 应用图标 |
url | string | 应用链接 |
# 获取应用栏目明细
请求方式:GET
接口地址:/showcore/api/v2/cms2/apptemplate/section/items
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
sectionId | Integer | 是 | 栏目id |
page | Integer | 是 | 页码 |
size | Integer | 是 | 每页数量 |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
page | Integer | 页码 |
size | Integer | 每页数量 |
total | Integer | 总数 |
resultBody | JsonObject | 返回信息 |
resultBody.itemsType | Integer | 条目类型,1 专辑 2 单曲 |
resultBody.items | JsonArray | 条目明细 |
itemsType=1 输出参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
id | string | 是 | 专辑id |
title | string | 是 | 专辑名 |
subtitle | string | 是 | 子标题,如:作者、演员 |
cover | string | 是 | 专辑封面 |
source | string | 是 | 来源 |
sourceName | int | 是 | 来源名称 |
itemsType=2 输出参数说明
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
id | string | 是 | 单曲id |
title | string | 是 | 单曲名 |
subtitle | string | 是 | 子标题,如:作者、演员 |
cover | string | 是 | 单曲封面 |
type | int | 是 | 音频/视频 |
source | string | 是 | 来源 |
sourceName | int | 是 | 来源名称 |
url | int | 是 | 单曲url |
返回示例
{
"status": 1,
"errorCode": "",
"errorMsg": "",
"page": 0,
"size": 10,
"total": 11,
"resultBody": {
"itemsType": 2,
"items": [
{
"id": "5266152187524840939",
"cover": "http://obj.auto-learning.com/6708804e-2002-41a2-9cd9-45f87d686836",
"title": "那是一片狂风呼啸过的原野",
"sourceName": null,
"url": "http://obj.auto-learning.com/7a5b83fe-c615-436a-ae91-96090d0d98f7",
"type": "1",
"source": "lsds",
"subtitle": "艾米莉·勃朗特"
}
]
}
}
# 获取应用专辑明细
请求方式:GET
接口地址:/showcore/api/v2/cms2/apptemplate/album/items
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
albumId | Integer | 是 | 专辑id |
page | Integer | 是 | 页码 |
size | Integer | 是 | 每页数量 |
返回参数
参数名称 | 参数类型 | 说明 |
---|---|---|
status | Integer | 状态,1为成功 |
errorCode | String | 错误码 |
errorMsg | String | 错误提示 |
page | Integer | 页码 |
size | Integer | 每页数量 |
total | Integer | 总数 |
resultBody | JsonArray | 返回信息 |
resultBody输出参数说明
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
id | string | 是 | 单曲 id |
title | string | 是 | 标题 |
subtitle | string | 是 | 子标题 |
cover | string | 是 | 图片 |
source | string | 是 | 信源 |
description | string | 是 | 描述 |
mediaType | int | 是 | audio/video |
url | string | 是 | 播放链接 |
返回示例
{
"status": 1,
"errorCode": "",
"errorMsg": "",
"page": 1,
"size": 10,
"total": 6,
"resultBody": [
{
"cover": null,
"subtitle": null,
"description": null,
"mediaType": "audio",
"id": "5747939B92B5FCEAFF37E4E1FBE1A20B",
"source": "kugou",
"title": "Two Steps From Hell - Victory",
"url": null
}
]
}
# 播放
请求方式:POST
接口地址:/showcore/api/v2/cms2/play
请求参数
参数名称 | 参数类型 | 是否必需 | 说明 |
---|---|---|---|
mediaId | string | 否 | 单曲id,播放器模板播放不传 |
itemsType | Integer | 是 | 1专辑,2单曲,3播放器模板播放 |
albumId | Integer | 否 | 播放专辑内容时需要该参数 |
sectionId | Integer | 否 | 播放单曲内容时需要该参数 |
appId | Integer | 否 | 播放单曲内容时需要该参数 |
即:
- itemsType,mediaId,albumId(专辑播放)
- itemsType,mediaId,sectionId(单曲播放)
- itemsType,appId(播放器模板播放)