public class WxMaLiveServiceImpl extends Object implements WxMaLiveService
Created by yjwang on 2020/4/5.
ADD_GOODS, CREATE_ROOM, GET_LIVE_INFO| 构造器和说明 |
|---|
WxMaLiveServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
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)
获取直播房间回放数据信息.
|
public Integer createRoom(WxMaLiveInfo.RoomInfo roomInfo) throws WxErrorException
WxMaLiveService调用此接口创建直播间,创建成功后将在直播间列表展示,调用额度: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
createRoom 在接口中 WxMaLiveServiceroomInfo - 直播间信息WxErrorException - .public WxMaLiveResult getLiveInfo(Integer start, Integer limit) throws WxErrorException
WxMaLiveServicegetLiveInfo 在接口中 WxMaLiveServicestart - 起始拉取房间,start = 0 表示从第 1 个房间开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .public List<WxMaLiveResult.RoomInfo> getLiveInfos() throws WxErrorException
WxMaLiveServicegetLiveInfos 在接口中 WxMaLiveServiceWxErrorException - .public WxMaLiveResult getLiveReplay(String action, Integer roomId, Integer start, Integer limit) throws WxErrorException
WxMaLiveServicegetLiveReplay 在接口中 WxMaLiveServiceaction - 获取回放roomId - 直播间 idstart - 起始拉取视频,start = 0 表示从第 1 个视频片段开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .public WxMaLiveResult getLiveReplay(Integer roomId, Integer start, Integer limit) throws WxErrorException
WxMaLiveService获取回放 (默认:get_replay)
getLiveReplay 在接口中 WxMaLiveServiceroomId - 直播间 idstart - 起始拉取视频,start = 0 表示从第 1 个视频片段开始拉取limit - 每次拉取的个数上限,不要设置过大,建议 100 以内WxErrorException - .public boolean addGoodsToRoom(Integer roomId, List<Integer> goodsIds) throws WxErrorException
WxMaLiveService调用接口往指定直播间导入已入库的商品 调用频率 调用额度:10000次/一天
http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/addgoods?access_token=ACCESS_TOKEN
addGoodsToRoom 在接口中 WxMaLiveServiceroomId - 房间IDgoodsIds - 数组列表,可传入多个,里面填写 商品 IDWxErrorException - .Copyright © 2020. All rights reserved.