58 lines
1.6 KiB
Go
58 lines
1.6 KiB
Go
package mkt2
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
)
|
|
|
|
type MaterialTaskNotifyParam struct {
|
|
TaskType string `json:"task_type"`
|
|
TaskId int64 `json:"task_id"`
|
|
FileInfo FileInfo `json:"file_info"`
|
|
}
|
|
|
|
// MaterialTaskNotifyRequest 媒资任务通知请求
|
|
type MaterialTaskNotifyRequest struct {
|
|
*requests.JsonRequest
|
|
TaskType string `position:"Json" field:"task_type"`
|
|
TaskId int64 `position:"Json" field:"task_id"`
|
|
FileInfo FileInfo `position:"Json" field:"file_info"`
|
|
}
|
|
|
|
// FileInfo 文件信息
|
|
type FileInfo struct {
|
|
Md5 string `json:"md5"`
|
|
Duration float64 `json:"duration"`
|
|
Size int64 `json:"size"`
|
|
Width int64 `json:"width"`
|
|
Height int64 `json:"height"`
|
|
Bitrate int64 `json:"bitrate"`
|
|
Format string `json:"format"`
|
|
}
|
|
|
|
type MaterialTaskNotifyResponse struct {
|
|
*responses.BaseResponse
|
|
StatusCode int `json:"status_code"`
|
|
StatusMsg string `json:"status_msg"`
|
|
TraceId string `json:"trace_id"`
|
|
}
|
|
|
|
func CreateMaterialTaskNotifyRequest(param MaterialTaskNotifyParam) (req *MaterialTaskNotifyRequest) {
|
|
req = &MaterialTaskNotifyRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
TaskType: param.TaskType,
|
|
TaskId: param.TaskId,
|
|
FileInfo: param.FileInfo,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/api/cooperation/creativesMaterial/materialTaskNotify")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
|
|
func CreateMaterialTaskNotifyResponse() (response *MaterialTaskNotifyResponse) {
|
|
response = &MaterialTaskNotifyResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
return
|
|
}
|