api

package
v0.9.180 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BVW_PREFIX     = bce.URI_PREFIX + "v1/"
	MATERIALIBRARY = "materialLibrary"
	MATLIB         = "matlib"
	PRESET         = "/preset/"
	CONFIG         = "/config"
	POLLINGVIDEO   = "videoEdit/pollingVideo/"
	CREATEVIDEO    = "videoEdit/createNewVideo"
)

Variables

This section is empty.

Functions

func CreateMatlibConfig

func CreateMatlibConfig(cli bce.Client, request *MatlibConfigBaseRequest) (*bce.BceResponse, error)

func DeleteMaterial

func DeleteMaterial(cli bce.Client, id string) error

func DeleteMaterialPreset

func DeleteMaterialPreset(cli bce.Client, id string) error

func UpdateDraft

func UpdateDraft(cli bce.Client, id int, request *MatlibTaskRequest) error

func UpdateMatlibConfig

func UpdateMatlibConfig(cli bce.Client, request *MatlibConfigUpdateRequest) error

Types

type CreateDraftRequest

type CreateDraftRequest struct {
	Titile   string `json:"title"`
	Ratio    string `json:"ratio"`
	Duration string `json:"duration"`
}

type Data

type Data struct {
	EditID     int    `json:"editId"`
	EditStatus string `json:"editStatus"`
	Bucket     string `json:"bucket"`
	Key        string `json:"key"`
	CreateTime string `json:"createTime"`
	UpdateTime string `json:"updateTime"`
}

type DraftListRequest

type DraftListRequest struct {
	Status    string `json:"status"`
	BeginTime string `json:"beginTime"`
	EndTime   string `json:"endTime"`
	PageNo    int    `json:"pageNo"`
	PageSize  int    `json:"pageSize"`
}

type GetDraftResponse

type GetDraftResponse struct {
	Otimeline      Otimeline             `json:"timeline"`
	ResourceList   []GetMaterialResponse `json:"resourceList,omitempty"`
	Title          string                `json:"title"`
	Ratio          string                `json:"ratio"`
	CoverBucket    string                `json:"coverBucket"`
	CoverKey       string                `json:"coverKey"`
	Endpoint       string                `json:"endpoint"`
	LastUpdateTime string                `json:"lastUpdateTime"`
}

func GetSingleDraft

func GetSingleDraft(cli bce.Client, id int) (*GetDraftResponse, error)

type GetMaterialResponse

type GetMaterialResponse struct {
	ID             string   `json:"id,omitempty"`
	UserID         string   `json:"userId,omitempty"`
	ActualUserID   string   `json:"actualUserId,omitempty"`
	SaasType       string   `json:"saasType,omitempty"`
	InfoType       string   `json:"infoType,omitempty"`
	MediaType      string   `json:"mediaType,omitempty"`
	SourceType     string   `json:"sourceType,omitempty"`
	Status         string   `json:"status,omitempty"`
	Title          string   `json:"title,omitempty"`
	SourceURL      string   `json:"sourceUrl,omitempty"`
	SourceURL360P  string   `json:"sourceUrl360p,omitempty"`
	AudioURL       string   `json:"audioUrl,omitempty"`
	ThumbnailList  []string `json:"thumbnailList,omitempty"`
	SubtitleUrls   []string `json:"subtitleUrls,omitempty"`
	CreateTime     string   `json:"createTime,omitempty"`
	UpdateTime     string   `json:"updateTime,omitempty"`
	Duration       float64  `json:"duration,omitempty"`
	Height         int      `json:"height,omitempty"`
	Width          int      `json:"width,omitempty"`
	FileSizeInByte int      `json:"fileSizeInByte,omitempty"`
	Bucket         string   `json:"bucket,omitempty"`
	Key            string   `json:"key,omitempty"`
	Key360P        string   `json:"key360p,omitempty"`
	Key720P        string   `json:"key720p,omitempty"`
	AudioKey       string   `json:"audioKey,omitempty"`
	ThumbnailKeys  []string `json:"thumbnailKeys,omitempty"`
	Subtitles      []string `json:"subtitles,omitempty"`
	Endpoint       string   `json:"endpoint,omitempty"`
}

type Itimeline

type Itimeline struct {
	Video    []MediaPair   `json:"video"`
	Audio    []MediaPair   `json:"audio"`
	Sticker  []MediaPair   `json:"sticker"`
	Subtitle []interface{} `json:"subtitle"`
}

type ListByPageResponse

type ListByPageResponse struct {
	Data       []MatlibTaskGetResponse `json:"data"`
	PageNo     int                     `json:"pageNo"`
	PageSize   int                     `json:"pageSize"`
	TotalCount int                     `json:"totalCount"`
}

func GetDraftList

func GetDraftList(cli bce.Client, request *DraftListRequest) (*ListByPageResponse, error)

type MaterialGetResponse

type MaterialGetResponse struct {
	ID            string   `json:"id"`
	UserID        string   `json:"userId"`
	InfoType      string   `json:"infoType,omitempty"`
	MediaType     string   `json:"mediaType,omitempty"`
	SourceType    string   `json:"sourceType"`
	Status        string   `json:"status"`
	Title         string   `json:"title"`
	SourceURL     string   `json:"sourceUrl"`
	SourceURL360P string   `json:"sourceUrl360p"`
	ThumbnailList []string `json:"thumbnailList"`
	SubtitleUrls  []string `json:"subtitleUrls"`
	CreateTime    string   `json:"createTime"`
	UpdateTime    string   `json:"updateTime"`
	Duration      float64  `json:"duration"`
	Height        int      `json:"height"`
	Width         int      `json:"width"`
	Bucket        string   `json:"bucket"`
	Key           string   `json:"key"`
	Key360P       string   `json:"key360p"`
	Key720P       string   `json:"key720p"`
	AudioKey      string   `json:"audioKey"`
	ThumbnailKeys []string `json:"thumbnailKeys"`
	Subtitles     []string `json:"subtitles"`
}

func GetMaterial

func GetMaterial(cli bce.Client, id string) (*MaterialGetResponse, error)

type MaterialPresetGetResponse

type MaterialPresetGetResponse struct {
	ID                 string                 `json:"id"`
	Status             string                 `json:"status"`
	UserID             string                 `json:"userId"`
	Title              string                 `json:"title"`
	Tag                string                 `json:"tag"`
	Type               string                 `json:"type"`
	SourceType         string                 `json:"sourceType"`
	PreviewMaterialIds map[string]interface{} `json:"previewMaterialIds"`
	PreviewBucket      map[string]interface{} `json:"previewBucket"`
	PreviewKeys        map[string]interface{} `json:"previewKeys"`
	PreviewUrls        map[string]interface{} `json:"previewUrls"`
	MaterialID         string                 `json:"materialId"`
	Bucket             string                 `json:"bucket"`
	Key                string                 `json:"key"`
	SourceURL          string                 `json:"sourceUrl"`
	Config             string                 `json:"config"`
	CreateTime         string                 `json:"createTime"`
	UpdateTime         string                 `json:"updateTime"`
}

func GetMaterialPreset

func GetMaterialPreset(cli bce.Client, id string) (*MaterialPresetGetResponse, error)

type MaterialPresetSearchRequest

type MaterialPresetSearchRequest struct {
	SourceType string `json:"sourceType"`
	Status     string `json:"status"`
	MediaType  string `json:"type"`
	PageNo     string `json:"pageNo"`
	PageSize   string `json:"pageSize"`
}

type MaterialPresetSearchResponse

type MaterialPresetSearchResponse struct {
	Result     []PresetResponseWrapper `json:"result"`
	PageNo     int                     `json:"pageNo"`
	PageSize   int                     `json:"pageSize"`
	TotalCount int                     `json:"totalCount"`
}

type MaterialPresetUploadResponse

type MaterialPresetUploadResponse struct {
	Id string `json:"id"`
}

func UploadMaterialPreset

func UploadMaterialPreset(cli bce.Client, fileType string, request *MatlibUploadRequest) (*MaterialPresetUploadResponse, error)

type MaterialSearchRequest

type MaterialSearchRequest struct {
	InfoType     string `json:"infoType"`
	MediaType    string `json:"mediaType"`
	SourceType   string `json:"sourceType"`
	Status       string `json:"status"`
	TitleKeyword string `json:"titleKeyword"`
	PageNo       int    `json:"pageNo"`
	Size         int    `json:"size"`
	Begin        string `json:"begin"`
	End          string `json:"end"`
}

type MaterialSearchResponse

type MaterialSearchResponse struct {
	Items []MaterialGetResponse `json:"items,omitempty"`
}

func SearchMaterial

func SearchMaterial(cli bce.Client, materialSearchRequest *MaterialSearchRequest) (*MaterialSearchResponse, error)

type MatlibConfigBaseRequest

type MatlibConfigBaseRequest struct {
	Bucket string `json:"bucket"`
}

type MatlibConfigGetResponse

type MatlibConfigGetResponse struct {
	Bucket string `json:"bucket"`
}

func GetMatlibConfig

func GetMatlibConfig(cli bce.Client) (*MatlibConfigGetResponse, error)

type MatlibConfigUpdateRequest

type MatlibConfigUpdateRequest struct {
	Bucket string `json:"bucket"`
}

type MatlibTaskGetResponse

type MatlibTaskGetResponse struct {
	ID             int    `json:"id"`
	ResMaterialID  string `json:"resMaterialId"`
	UserID         string `json:"userId"`
	Title          string `json:"title"`
	Status         string `json:"status"`
	ErrorMessage   string `json:"errorMessage"`
	CoverURL       string `json:"coverUrl"`
	LastUpdateTime string `json:"lastUpdateTime"`
}

type MatlibTaskRequest

type MatlibTaskRequest struct {
	Title          string                `json:"title"`
	Ratio          string                `json:"ratio"`
	Duration       string                `json:"duration"`
	Timeline       Otimeline             `json:"timeline"`
	ResourceList   []MaterialGetResponse `json:"resourceList"`
	CoverBucekt    string                `json:"coverBucket"`
	CoverKey       string                `json:"coverKey"`
	LastUpdateTime string                `json:"lastUpdateTime"`
}

type MatlibTaskResponse

type MatlibTaskResponse struct {
	Id int `json:"id"`
}

func CreateDraft

func CreateDraft(cli bce.Client, request *CreateDraftRequest) (*MatlibTaskResponse, error)

type MatlibUploadRequest

type MatlibUploadRequest struct {
	MediaType    string `json:"mediaType"`
	Title        string `json:"title"`
	Bucket       string `json:"bucket"`
	Key          string `json:"key"`
	Notification string `json:"notification"`
}

type MatlibUploadResponse

type MatlibUploadResponse struct {
	Id string `json:"materialId"`
}

func UploadMaterial

func UploadMaterial(client bce.Client, matlibUploadRequest *MatlibUploadRequest) (*MatlibUploadResponse, error)

type MediaInfo

type MediaInfo struct {
	FileType        string   `json:"fileType,omitempty"`
	SourceType      string   `json:"sourceType,omitempty"`
	SourceURL       string   `json:"sourceUrl,omitempty"`
	AudioURL        string   `json:"audioUrl,omitempty"`
	Bucket          string   `json:"bucket,omitempty"`
	Key             string   `json:"key,omitempty"`
	AudioKey        string   `json:"audioKey,omitempty"`
	InstanceID      string   `json:"instanceId,omitempty"`
	CoverImage      string   `json:"coverImage,omitempty"`
	Duration        float64  `json:"duration,omitempty"`
	Width           int      `json:"width,omitempty"`
	Height          int      `json:"height,omitempty"`
	Errmsg          string   `json:"errmsg,omitempty"`
	Status          string   `json:"status,omitempty"`
	Progress        string   `json:"progress,omitempty"`
	Action          string   `json:"action,omitempty"`
	Size            int      `json:"size,omitempty"`
	Name            string   `json:"name,omitempty"`
	ThumbnailPrefix string   `json:"thumbnailPrefix,omitempty"`
	ThumbnailKeys   []string `json:"thumbnailKeys,omitempty"`
	ThumbnailList   []string `json:"thumbnailList,omitempty"`
	SubtitleKeys    []string `json:"subtitleKeys,omitempty"`
	MediaID         string   `json:"mediaId,omitempty"`
	Offstandard     bool     `json:"offstandard,omitempty"`
}

type MediaPair

type MediaPair struct {
	Key      string             `json:"key"`
	List     []TimelineMaterial `json:"list"`
	IsMaster bool               `json:"isMaster"`
}

type Otimeline

type Otimeline struct {
	Itimeline Itimeline   `json:"timeline"`
	Meta      interface{} `json:"meta"`
}

type PresetResponseWrapper

type PresetResponseWrapper struct {
	MaterialType string                      `json:"type"`
	Addons       []MaterialPresetGetResponse `json:"addons"`
}

type Ret

type Ret struct {
	EditID int    `json:"editId"`
	BosKey string `json:"bosKey"`
}

type TimelineMaterial

type TimelineMaterial struct {
	Start     float64     `json:"start"`
	End       float64     `json:"end"`
	ShowStart float64     `json:"showStart"`
	ShowEnd   float64     `json:"showEnd"`
	Duration  float64     `json:"duration"`
	Xpos      float64     `json:"xpos"`
	Ypos      float64     `json:"ypos"`
	Width     float64     `json:"width"`
	Height    float64     `json:"height"`
	MediaInfo MediaInfo   `json:"mediaInfo"`
	Type      string      `json:"type"`
	UID       string      `json:"uid"`
	Name      string      `json:"name"`
	ExtInfo   interface{} `json:"extInfo"`
}

type VideoEditCreateRequest

type VideoEditCreateRequest struct {
	Title        string      `json:"title"`
	Bucket       string      `json:"bucket"`
	KeyPath      string      `json:"keyPath"`
	TaskId       string      `json:"taskId"`
	Notification string      `json:"notification"`
	ExtInfo      interface{} `json:"extInfo"`
	Cmd          interface{} `json:"cmd"`
	Endpoint     string      `json:"endpoint"`
}

type VideoEditCreateResponse

type VideoEditCreateResponse struct {
	Errorno int    `json:"errorno"`
	Errmsg  string `json:"errmsg"`
	Data    string `json:"data"`
	Ret     Ret    `json:"ret"`
	Ie      string `json:"ie"`
}

func CreateVideoEdit

func CreateVideoEdit(cli bce.Client, request *VideoEditCreateRequest) (*VideoEditCreateResponse, error)

type VideoEditPollingResponse

type VideoEditPollingResponse struct {
	Errorno int    `json:"errorno"`
	Errmsg  string `json:"errmsg"`
	Data    Data   `json:"data"`
}

func PollingVideoEdit

func PollingVideoEdit(cli bce.Client, id int) (*VideoEditPollingResponse, error)

Jump to

Keyboard shortcuts

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