video

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateInfo

type CreateInfo struct {
	util.CommonError

	ItemID string `json:"item_id"`
}

CreateInfo .

type CreateVideoReq

type CreateVideoReq struct {
	VideoID           string   `json:"video_id"`
	CoverTsp          float64  `json:"cover_tsp"`
	GameID            string   `json:"string"`
	PoiID             string   `json:"poi_id"`
	PoiName           string   `json:"poi_name"`
	Text              string   `json:"text"`
	MicroAppURL       string   `json:"micro_app_url"`
	MicroAppID        string   `json:"micro_app_id"`
	MicroAppTitle     string   `json:"micro_app_title"`
	AtUsers           []string `json:"at_users"`
	GameContent       string   `json:"game_content"`
	TimelinessKeyword string   `json:"timeliness_keyword"`
	TimelinessLabel   string   `json:"timeliness_label"`
	ArticleID         string   `json:"article_id"`
	ArticleTitle      string   `json:"article_title"`
}

CreateVideoReq .

type DataInfo

type DataInfo struct {
	util.CommonError

	List []struct {
		Statistics struct {
			CommentCount  int32 `json:"comment_count"`
			DiggCount     int32 `json:"digg_count"`
			DownloadCount int32 `json:"download_count"`
			ForwardCount  int32 `json:"forward_count"`
			PlayCount     int32 `json:"play_count"`
			ShareCount    int32 `json:"share_count"`
		} `json:"statistics"`
		Title      string `json:"title"`
		Cover      string `json:"cover"`
		CreateTime int64  `json:"create_time"`
		IsReviewed bool   `json:"is_reviewed"`
		IsTop      bool   `json:"is_top"`
		ItemID     string `json:"item_id"`
		ShareURL   string `json:"share_url"`
	} `json:"list"`
}

DataInfo video data info.

type DataReq

type DataReq struct {
	ItemIDS []string `json:"item_ids"`
}

DataReq .

type Info

type Info struct {
	util.CommonError

	Video struct {
		VideoID string `json:"video_id"`
		Height  int64  `json:"height"`
		Width   int64  `json:"width"`
	} `json:"video"`
}

Info 视频信息.

type ListInfo

type ListInfo struct {
	util.CommonError

	Total   int64 `json:"total"`
	Cursor  int64 `json:"cursor"`
	HasMore bool  `json:"has_more"`
	List    []struct {
		Statistics struct {
			CommentCount  int32 `json:"comment_count"`
			DiggCount     int32 `json:"digg_count"`
			DownloadCount int32 `json:"download_count"`
			ForwardCount  int32 `json:"forward_count"`
			PlayCount     int32 `json:"play_count"`
			ShareCount    int32 `json:"share_count"`
		} `json:"statistics"`
		Title      string `json:"title"`
		Cover      string `json:"cover"`
		CreateTime int64  `json:"create_time"`
		IsReviewed bool   `json:"is_reviewed"`
		IsTop      bool   `json:"is_top"`
		ItemID     string `json:"item_id"`
		ShareURL   string `json:"share_url"`
	} `json:"list"`
}

ListInfo video list info.

type PartInfo

type PartInfo struct {
	util.CommonError

	UploadID string `json:"upload_id"`
}

PartInfo .

type Video

type Video struct {
	*context.Context
}

Video 视频

func NewVideo added in v1.0.2

func NewVideo(context *context.Context) *Video

NewVideo .

func (*Video) Create

func (video *Video) Create(openid string, videoInfo *CreateVideoReq) (info CreateInfo, err error)

Create 视频创建. refer: https://open.douyin.com/platform/doc/6848798087398328323

func (*Video) Data

func (video *Video) Data(openid string, itemIDS []string) (info *DataInfo, err error)

Data .

func (*Video) Delete

func (video *Video) Delete(openid, itemid string) (err error)

Delete 视频删除 refer: https://open.douyin.com/platform/doc/6848806536383383560#url

func (*Video) List

func (video *Video) List(openid string, cursor, count int64) (info *ListInfo, err error)

List .

func (*Video) PartComplete

func (video *Video) PartComplete(openid, uploadid string) (videoInfo Info, err error)

PartComplete 视频分片完成上传. refer: https://open.douyin.com/platform/doc/6848798087398361091

func (*Video) PartInit

func (video *Video) PartInit(openid string) (partInfo PartInfo, err error)

PartInit 初始化分片上传. refer: https://open.douyin.com/platform/doc/6848798087398393859

func (*Video) PartUpload

func (video *Video) PartUpload(openid, uploadid string, partNumber int64, filename string) (err error)

PartUpload 视频分片上传. refer: https://open.douyin.com/platform/doc/6848798087226460172

func (*Video) Upload

func (video *Video) Upload(openid, filename string) (videoInfo Info, err error)

Upload 视频上传. refer: https://open.douyin.com/platform/doc/6848798087398295555

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL