32 lines
814 B
Go
32 lines
814 B
Go
package main
|
|
|
|
// EPData 视频信息
|
|
type EPData struct {
|
|
Cid int64 `json:"cid"`
|
|
Dimension struct {
|
|
Height int64 `json:"height"`
|
|
Rotate int64 `json:"rotate"`
|
|
Width int64 `json:"width"`
|
|
} `json:"dimension"`
|
|
Duration int64 `json:"duration"`
|
|
From string `json:"from"`
|
|
Page int64 `json:"page"`
|
|
Part string `json:"part"`
|
|
Vid string `json:"vid"`
|
|
Weblink string `json:"weblink"`
|
|
}
|
|
|
|
// EPResponse 视频信息请求接口返回数据
|
|
type EPResponse struct {
|
|
Code int64 `json:"code"`
|
|
Data []EPData `json:"data"`
|
|
Message string `json:"message"`
|
|
TTL int64 `json:"ttl"`
|
|
}
|
|
|
|
// EPDataProvider 定义数据来源接口
|
|
type EPDataProvider interface {
|
|
// GetEPData 根据视频号获取视频的集数据
|
|
GetEPData(videoNo string) (epdatas []EPData, err error)
|
|
}
|