Documentation
¶
Index ¶
- Constants
- type ReqLiveHistoryList
- type ReqLivePlayInfo
- type ReqLiveReplayList
- type ReqPage
- type ReqTimeFilter
- type RespLiveCommon
- type RespLiveHistoryItem
- type RespLiveHistoryList
- type RespLiveObject
- type RespLiveObjectMedia
- type RespLiveObjectStat
- type RespLivePlayInfo
- type RespLiveReplayList
- 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 (b *WxChannelLiveAdmin) GetReqClient(_headers map[string]string) *req.Client
- func (b *WxChannelLiveAdmin) GetUADefault() string
- func (r *WxChannelLiveAdmin) GetWxChannelAccount() WxLiveAccount
- 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 = `/cgi-bin/mmfinderassistant-bin/live/get_live_replay_list_v2` WX_VIDEO_ADMIN_URI_REPLAY_FRAGMENT = `/cgi-bin/mmfinderassistant-bin/live/get_live_replay_wonderful_fragment` WX_VIDEO_ADMIN_URI_LIVE_HISTORY = `/cgi-bin/mmfinderassistant-bin/live/get_live_history` 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 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"` UxCreateTime int64 `json:"createTime"` MaxOnlineCount int64 `json:"maxOnlineCount"` //最大在线人数 }
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"` //回放状态 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"` }
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 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) GetReqClient ¶
func (*WxChannelLiveAdmin) GetUADefault ¶
func (b *WxChannelLiveAdmin) GetUADefault() string
func (*WxChannelLiveAdmin) GetWxChannelAccount ¶
func (r *WxChannelLiveAdmin) GetWxChannelAccount() WxLiveAccount
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 //认证公司名 }
func (WxLiveAccount) GetHeaderWechatUin ¶
func (d WxLiveAccount) GetHeaderWechatUin() string
Click to show internal directories.
Click to hide internal directories.