[关闭]
@sewise-dev 2016-11-30T07:14:59.000000Z 字数 3434 阅读 550

微电影内容商-平台接口

微电影


用户验证以及授权(所有请求都需带上)

请求参数
参数 必选 类型 说明
RequestBody
org_id string 机构id
time string 时间戳
org_code string 使用MD5(op.time.accesID)生成的长字符串

1.增加节目接口

接口地址

/index.php?mod=CMSAPI&do=Program

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string addProgram
courseTitle string 节目标题
coursePhotos string 节目海报
livePoster string 节目海报(横版)
description string 简介
TryLesson string 预告片sourseid
expect_time string 预计时间
voddata string 视频信息(数组)

voddata的结构如下:

参数 必选 类型 说明
title string 标题
sourceid string sourceid
fileinfo string 资源信息,由播放时长,文件大小等组成的json
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
cid int 新增完成的节目id
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=Program
Response
{"code":1,"cid":1
}

2.编辑节目接口

接口地址

/index.php?mod=CMSAPI&do=Program

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string editProgram
cid string 节目id
courseTitle string 节目标题
coursePhotos string 节目海报
livePoster string 节目海报(横版)
description string 简介
TryLesson string 预告片sourseid
expect_time string 预计时间
voddata string 视频信息(数组)

voddata的结构如下:

参数 必选 类型 说明
title string 标题
sourceid string sourceid
fileinfo string 资源信息,由播放时长,文件大小等组成的json
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=Course
Response
{"code":1
}

3.删除节目接口

接口地址

/index.php?mod=CMSAPI&do=Program

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string delProgram
cid string 节目id
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=Program
Response
{"code":1
}

4.删除资源接口

接口地址

/index.php?mod=CMSAPI&do=Program

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string delvod
cid string 节目id
sourceid string sourceid
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=Program
Response
{"code":1
}

5.获取销售统计接口

接口地址

/index.php?mod=CMSAPI&do=SaleRecord

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string getSaleCount
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
AllUser int 总用户数
AllIncome int 总销售额
ThisMonthIncome int 本月销售额
ThisMonthCount int 本月销售量
MonthUser int 本月包月用户
PublishCourse int 发布中影片数
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=SaleRecord
Response
{"code":1,"AllUser":4,"AllIncome":4,"ThisMonthIncome":4,"ThisMonthUser":1,"MonthUser":3}

6.获取销售列表接口

接口地址

/index.php?mod=CMSAPI&do=SaleRecord

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string getSaleCount
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
title string 商品名称
id int 订单 ID
amout int 单价(分)
username string 用户
create_time int 日期
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=listSaleRecord
Response
{"record":[{
"id":"12",
"order_no":"69511611087967398173",
"openid":"oGSvRvwOKY6aUe8E1zoPDE",
"amout":"100",
"pay_state":"1",
"create_time":"1478587967",
"courseid":"333",
"username":null,
"title":"222222"}],
"total_page":1,
"page":1,
"pagesize":30,
"total_record":"1"
}

7.内容商注册接口

接口地址

/index.php?mod=CMSAPI&do=SaleRecord

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
op string register
mobile string 手机号
email string 邮箱
contact string 联系人
company string 公司名称
qq string qq
HTTP 响应状态

200

返回字段 字段类型 说明
code int 返回状态码(1:成功, 0:失败)
接口示例

Request
curl -X POST -H "Content-Type:application/json" -d http://wxvod.sewisecom/index.php?mod=CMSAPI&do=SaleRecord
Response
{"code":1
}

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注