Documentation
¶
Index ¶
- Constants
- type LiveReplayPostListObject
- type ReqLiveHistoryList
- type ReqLivePlayInfo
- type ReqLiveReplayList
- type ReqLiveReplayPostList
- type ReqLiveReplayPostUpdateVisible
- type ReqLiveSetReplay
- type ReqPage
- type ReqTimeFilter
- type RespLiveCommon
- type RespLiveHistoryItem
- type RespLiveHistoryList
- type RespLiveObject
- type RespLiveObjectMedia
- type RespLiveObjectStat
- type RespLivePlayInfo
- type RespLiveReplayList
- type RespLiveReplayPostList
- type WxChannelLiveAdmin
- func (r *WxChannelLiveAdmin) GetLiveHistory(req ReqLiveHistoryList) (res []RespLiveHistoryItem, allCount int32, err error)
- func (r *WxChannelLiveAdmin) GetLiveReplayInfo(req ReqLivePlayInfo) (info RespLivePlayInfo, err error)
- func (r *WxChannelLiveAdmin) GetLiveReplayList(req ReqLiveReplayList) (livePlays []RespLiveObject, allCount int32, err error)
- func (r *WxChannelLiveAdmin) GetLiveReplayPostList(req ReqLiveReplayPostList) (livePlays []LiveReplayPostListObject, allCount int32, err error)
- func (b *WxChannelLiveAdmin) GetReqClient(_headers map[string]string) *req.Client
- func (b *WxChannelLiveAdmin) GetUADefault() string
- func (r *WxChannelLiveAdmin) GetWxChannelAccount() WxLiveAccount
- func (r *WxChannelLiveAdmin) LiveCreateReplay(req ReqLiveSetReplay) (err error)
- func (r *WxChannelLiveAdmin) LiveUpdateVisible(req ReqLiveReplayPostUpdateVisible) (err error)
- func (r *WxChannelLiveAdmin) LoginAccount(cs []*http.Cookie) (err error)
- func (b *WxChannelLiveAdmin) SetAdminCookie(cs []*http.Cookie) (err error)
- func (b *WxChannelLiveAdmin) SetUa(ua string)
- type WxLiveAccount
Constants ¶
View Source
const ( WX_VIDEO_ADMIN_HOST = `https://channels.weixin.qq.com` WX_VIDEO_ADMIN_URI_REPLAY_LIST = `/micro/live/cgi-bin/mmfinderassistant-bin/live/get_live_replay_list_v2` //直播记录 WX_VIDEO_ADMIN_URI_REPLAY_FRAGMENT = `/micro/live/cgi-bin/mmfinderassistant-bin/live/get_live_replay_wonderful_fragment` //直播回放详情,用于获取视频下载地址 WX_VIDEO_ADMIN_URI_REPLAY_CREATE = `/micro/live/cgi-bin/mmfinderassistant-bin/live/set_live_mod_replay` // 创建回放 WX_VIDEO_ADMIN_URI_LIVE_HISTORY = `/micro/statistic/cgi-bin/mmfinderassistant-bin/live/get_live_history` //获取直播单场数据 WX_VIDEO_ADMIN_URI_POST_UPDATE_VISIBLE = `/micro/live/cgi-bin/mmfinderassistant-bin/post/post_update_visible` // 更新视频号回放可见范围 WX_VIDEO_ADMIN_URI_REPLAY_POST_LIST = `/micro/live/cgi-bin/mmfinderassistant-bin/post/post_list` //获取直播回放视频 WX_VIDEO_ADMIN_REPLAY_CREATE_SUCCESS = 3 //回访创建成功 WX_ADMIN_SCENE_DEFAULT = 7 WX_ADMIN_REPLAY_INFO_FRAGMENT_DOWN = 0 //所有视频分片都已处理成功 )
View Source
const (
UA_MAC_FIREFOX = `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReqLiveHistoryList ¶
type ReqLiveHistoryList struct {
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
ReqType int32 `json:"reqType"` //默认2
UxTimesStart int64 `json:"filterStartTime"`
UxTimesEnd int64 `json:"filterEndTime"`
PageIndex int32 `json:"currentPage"` //从1开始
PageSize int32 `json:"pageSize"`
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveHistoryList ¶
func NewReqLiveHistoryList(pageIndex, pageSize int32) ReqLiveHistoryList
type ReqLivePlayInfo ¶
type ReqLivePlayInfo struct {
ObjectId string `json:"objectId"`
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveReplayInfo ¶
func NewReqLiveReplayInfo(id string) ReqLivePlayInfo
type ReqLiveReplayList ¶
type ReqLiveReplayList struct {
TimeFilter ReqTimeFilter `json:"reqFilter"` //默认是0
PageFilter ReqPage `json:"reqPage"`
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveReplayList ¶
func NewReqLiveReplayList(pageIndex, pageSize int32) ReqLiveReplayList
type ReqLiveReplayPostList ¶
type ReqLiveReplayPostList struct {
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
UserpageType int32 `json:"userpageType"` //默认5
PageIndex int32 `json:"currentPage"` //当前页面
PageSize int32 `json:"pageSize"` //每页数量
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveReplayPostList ¶
func NewReqLiveReplayPostList(pageIndex, pageSize int32) ReqLiveReplayPostList
type ReqLiveReplayPostUpdateVisible ¶
type ReqLiveReplayPostUpdateVisible struct {
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
ObjectId string `json:"objectId"` //导出任务ID
VisibleType int64 `json:"visibleType"` //可见类型, 3: 仅自己可见
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveReplayPostUpdateVisible ¶
func NewReqLiveReplayPostUpdateVisible(objectId string) ReqLiveReplayPostUpdateVisible
type ReqLiveSetReplay ¶
type ReqLiveSetReplay struct {
EnableDumpDanmu int64 `json:"enableDumpDanmu"` //是否导出弹幕 1:是,0:否
EnableReplay int64 `json:"enableReplay"` //是否生成回放 1:是,0:否
LiveId string `json:"liveId"`
ObjectId string `json:"objectId"`
ReqScene int32 `json:"reqScene"` // reqScene、scene 默认都是7
Scene int32 `json:"scene"`
TimestampUixMilli string `json:"timestamp"`
// contains filtered or unexported fields
}
func NewReqLiveSetReplay ¶
func NewReqLiveSetReplay(liveId, objectId string) ReqLiveSetReplay
type ReqTimeFilter ¶
type RespLiveCommon ¶
type RespLiveCommon struct {
PluginSessionId *string `json:"pluginSessionId"`
RawKeyBuff *string `json:"rawKeyBuff"`
Code int32 `json:"errCode"`
Msg string `json:"errMsg"`
Data interface{} `json:"data"`
}
func (RespLiveCommon) UnMarshalData ¶
func (d RespLiveCommon) UnMarshalData(out any) (err error)
type RespLiveHistoryItem ¶
type RespLiveHistoryItem struct {
LiveObjectId string `json:"liveObjectId"`
LiveData RespLiveObjectStat `json:"liveStats"`
Description string `json:"description"` //直播标题
UxCreateTime int64 `json:"createTime"`
MaxOnlineCount int64 `json:"maxOnlineCount"` //最大在线人数
AuthorReplayStatus int64 `json:"authorReplayStatus"` //直播回放状态: 20:已生成, 0: 未生成状态
}
type RespLiveHistoryList ¶
type RespLiveHistoryList struct {
TotalCount *int32 `json:"totalLiveCount"`
Items []RespLiveHistoryItem `json:"liveObjectList"`
}
type RespLiveObject ¶
type RespLiveObject struct {
LiveId string `json:"liveId"`
ChargeType int32 `json:"chargeType"` //收费类型
DurationSecs int64 `json:"duration"`
ObjectId string `json:"objectId"`
Media RespLiveObjectMedia `json:"media"`
ReplayCreateTime string `json:"replayCreateTime"` //回放创建时间
ReplayStatus int32 `json:"replayStatus"` //回放状态 1: 可以生成 2:生成中 3: 已生成
StartTime string `json:"startTime"` //开播时间
}
type RespLiveObjectMedia ¶
type RespLiveObjectStat ¶
type RespLivePlayInfo ¶
type RespLivePlayInfo struct {
CreatetimeUnix int64 `json:"createtime"`
Description string `json:"description"`
DurationSeconds int64 `json:"duration"`
Height int64 `json:"height"`
Width int64 `json:"width"`
HlsUri string `json:"hlsUrl"`
ReplayUri string `json:"replayUrl"`
ThumbUri string `json:"thumbUrl"` //封面
FragmentStatus int64 `json:"wonderfulFragmentStatus"`
EnableReplayInUserpage *int64 `json:"enableReplayInUserpage"` // 1: 允许在用户主页展示。如何是已设置仅在用户中心展示,默认不会有该字段
}
func (RespLivePlayInfo) GetQa ¶
func (d RespLivePlayInfo) GetQa() (qa string, err error)
func (RespLivePlayInfo) IsReadyForDownload ¶
func (d RespLivePlayInfo) IsReadyForDownload() bool
是否已准备好
type RespLiveReplayList ¶
type RespLiveReplayList struct {
TotalCount *int32 `json:"totalCount"`
LivePlays []RespLiveObject `json:"replayObjects"`
}
type RespLiveReplayPostList ¶
type RespLiveReplayPostList struct {
TotalCount *int32 `json:"totalCount"`
Posts []LiveReplayPostListObject `json:"list"`
}
type WxChannelLiveAdmin ¶
type WxChannelLiveAdmin struct {
// contains filtered or unexported fields
}
腾讯视频号助手管理端相关接口
func NewWxChannelLiveAdmin ¶
func NewWxChannelLiveAdmin(logger log.Logger) *WxChannelLiveAdmin
func (*WxChannelLiveAdmin) GetLiveHistory ¶
func (r *WxChannelLiveAdmin) GetLiveHistory(req ReqLiveHistoryList) (res []RespLiveHistoryItem, allCount int32, err error)
func (*WxChannelLiveAdmin) GetLiveReplayInfo ¶
func (r *WxChannelLiveAdmin) GetLiveReplayInfo(req ReqLivePlayInfo) (info RespLivePlayInfo, err error)
获取回放下载地址
func (*WxChannelLiveAdmin) GetLiveReplayList ¶
func (r *WxChannelLiveAdmin) GetLiveReplayList(req ReqLiveReplayList) (livePlays []RespLiveObject, allCount int32, err error)
获取直播回放列表,注意返回结果中会从全部结果中过滤部分造成返回数据与总的数据量对不上
func (*WxChannelLiveAdmin) GetLiveReplayPostList ¶
func (r *WxChannelLiveAdmin) GetLiveReplayPostList(req ReqLiveReplayPostList) (livePlays []LiveReplayPostListObject, allCount int32, err error)
直播回放视频
func (*WxChannelLiveAdmin) GetReqClient ¶
func (*WxChannelLiveAdmin) GetUADefault ¶
func (b *WxChannelLiveAdmin) GetUADefault() string
func (*WxChannelLiveAdmin) GetWxChannelAccount ¶
func (r *WxChannelLiveAdmin) GetWxChannelAccount() WxLiveAccount
func (*WxChannelLiveAdmin) LiveCreateReplay ¶
func (r *WxChannelLiveAdmin) LiveCreateReplay(req ReqLiveSetReplay) (err error)
func (*WxChannelLiveAdmin) LiveUpdateVisible ¶
func (r *WxChannelLiveAdmin) LiveUpdateVisible(req ReqLiveReplayPostUpdateVisible) (err error)
func (*WxChannelLiveAdmin) LoginAccount ¶
func (r *WxChannelLiveAdmin) LoginAccount(cs []*http.Cookie) (err error)
func (*WxChannelLiveAdmin) SetAdminCookie ¶
type WxLiveAccount ¶
type WxLiveAccount struct {
Uid string // finderUsername,长字符串
Nickname string
Avatar string
XAuthHeaderUin string //登录人微信账号ID
UniqId string //视频号ID,后台可见
FansCount int64 //粉丝数
AuthCompanyName string //认证公司名
}
支持函数: LoginAccount, GetLiveReplayList ,GetLiveReplayInfo ,GetLiveReplayPostList
func (WxLiveAccount) GetHeaderWechatUin ¶
func (d WxLiveAccount) GetHeaderWechatUin() string
Click to show internal directories.
Click to hide internal directories.