public interface WxMaLiveService
直播相关操作接口. Created by yjwang on 2020/4/5.
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ADD_GOODS |
static String |
CREATE_ROOM |
static String |
GET_LIVE_INFO |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addGoodsToRoom(Integer roomId,
List<Integer> goodsIds)
直播间导入商品
调用接口往指定直播间导入已入库的商品
调用频率
调用额度:10000次/一天
http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/addgoods?
|
Integer |
createRoom(WxMaLiveInfo.RoomInfo roomInfo)
创建直播间
调用此接口创建直播间,创建成功后将在直播间列表展示,调用额度:10000次/一天
文档地址:https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#1
http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/create?
|
WxMaLiveResult |
getLiveInfo(Integer start,
Integer limit)
获取直播房间列表.
|
List<WxMaLiveResult.RoomInfo> |
getLiveInfos()
获取所有直播间信息(没有分页直接获取全部)
|
WxMaLiveResult |
getLiveReplay(Integer roomId,
Integer start,
Integer limit)
获取直播房间回放数据信息.
|
WxMaLiveResult |
getLiveReplay(String action,
Integer roomId,
Integer start,
Integer limit)
获取直播房间回放数据信息.
|
Integer createRoom(WxMaLiveInfo.RoomInfo roomInfo) throws WxErrorException
调用此接口创建直播间,创建成功后将在直播间列表展示,调用额度:10000次/一天 文档地址:https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#1 http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token=ACCESS_TOKEN
roomInfo - 直播间信息WxErrorException - .WxMaLiveResult getLiveInfo(Integer start, Integer limit) throws WxErrorException
start - 起始拉取房间,start = 0 表示从第 1 个房间开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .List<WxMaLiveResult.RoomInfo> getLiveInfos() throws WxErrorException
WxErrorException - .WxMaLiveResult getLiveReplay(String action, Integer roomId, Integer start, Integer limit) throws WxErrorException
action - 获取回放roomId - 直播间 idstart - 起始拉取视频,start = 0 表示从第 1 个视频片段开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .WxMaLiveResult getLiveReplay(Integer roomId, Integer start, Integer limit) throws WxErrorException
获取回放 (默认:get_replay)
roomId - 直播间 idstart - 起始拉取视频,start = 0 表示从第 1 个视频片段开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .boolean addGoodsToRoom(Integer roomId, List<Integer> goodsIds) throws WxErrorException
调用接口往指定直播间导入已入库的商品 调用频率 调用额度:10000次/一天
http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/addgoods?access_token=ACCESS_TOKEN
roomId - 房间IDgoodsIds - 数组列表,可传入多个,里面填写 商品 IDWxErrorException - .Copyright © 2020. All rights reserved.