@@ -204,3 +204,102 @@ type UploadTaskResponse struct {
204
204
205
205
File Files `json:"file"`
206
206
}
207
+
208
+ // 添加离线下载响应
209
+ type OfflineDownloadResp struct {
210
+ File * string `json:"file"`
211
+ Task OfflineTask `json:"task"`
212
+ UploadType string `json:"upload_type"`
213
+ URL struct {
214
+ Kind string `json:"kind"`
215
+ } `json:"url"`
216
+ }
217
+
218
+ // 离线下载列表
219
+ type OfflineListResp struct {
220
+ ExpiresIn int64 `json:"expires_in"`
221
+ NextPageToken string `json:"next_page_token"`
222
+ Tasks []OfflineTask `json:"tasks"`
223
+ }
224
+
225
+ // offlineTask
226
+ type OfflineTask struct {
227
+ Callback string `json:"callback"`
228
+ CreatedTime string `json:"created_time"`
229
+ FileID string `json:"file_id"`
230
+ FileName string `json:"file_name"`
231
+ FileSize string `json:"file_size"`
232
+ IconLink string `json:"icon_link"`
233
+ ID string `json:"id"`
234
+ Kind string `json:"kind"`
235
+ Message string `json:"message"`
236
+ Name string `json:"name"`
237
+ Params Params `json:"params"`
238
+ Phase string `json:"phase"` // PHASE_TYPE_RUNNING, PHASE_TYPE_ERROR, PHASE_TYPE_COMPLETE, PHASE_TYPE_PENDING
239
+ Progress int64 `json:"progress"`
240
+ ReferenceResource ReferenceResource `json:"reference_resource"`
241
+ Space string `json:"space"`
242
+ StatusSize int64 `json:"status_size"`
243
+ Statuses []string `json:"statuses"`
244
+ ThirdTaskID string `json:"third_task_id"`
245
+ Type string `json:"type"`
246
+ UpdatedTime string `json:"updated_time"`
247
+ UserID string `json:"user_id"`
248
+ }
249
+
250
+ type Params struct {
251
+ Age string `json:"age"`
252
+ MIMEType * string `json:"mime_type,omitempty"`
253
+ PredictType string `json:"predict_type"`
254
+ URL string `json:"url"`
255
+ }
256
+
257
+ type ReferenceResource struct {
258
+ Type string `json:"@type"`
259
+ Audit interface {} `json:"audit"`
260
+ Hash string `json:"hash"`
261
+ IconLink string `json:"icon_link"`
262
+ ID string `json:"id"`
263
+ Kind string `json:"kind"`
264
+ Medias []Media `json:"medias"`
265
+ MIMEType string `json:"mime_type"`
266
+ Name string `json:"name"`
267
+ Params map [string ]interface {} `json:"params"`
268
+ ParentID string `json:"parent_id"`
269
+ Phase string `json:"phase"`
270
+ Size string `json:"size"`
271
+ Space string `json:"space"`
272
+ Starred bool `json:"starred"`
273
+ Tags []string `json:"tags"`
274
+ ThumbnailLink string `json:"thumbnail_link"`
275
+ }
276
+
277
+ type Media struct {
278
+ MediaId string `json:"media_id"`
279
+ MediaName string `json:"media_name"`
280
+ Video struct {
281
+ Height int `json:"height"`
282
+ Width int `json:"width"`
283
+ Duration int `json:"duration"`
284
+ BitRate int `json:"bit_rate"`
285
+ FrameRate int `json:"frame_rate"`
286
+ VideoCodec string `json:"video_codec"`
287
+ AudioCodec string `json:"audio_codec"`
288
+ VideoType string `json:"video_type"`
289
+ } `json:"video"`
290
+ Link struct {
291
+ Url string `json:"url"`
292
+ Token string `json:"token"`
293
+ Expire time.Time `json:"expire"`
294
+ } `json:"link"`
295
+ NeedMoreQuota bool `json:"need_more_quota"`
296
+ VipTypes []interface {} `json:"vip_types"`
297
+ RedirectLink string `json:"redirect_link"`
298
+ IconLink string `json:"icon_link"`
299
+ IsDefault bool `json:"is_default"`
300
+ Priority int `json:"priority"`
301
+ IsOrigin bool `json:"is_origin"`
302
+ ResolutionName string `json:"resolution_name"`
303
+ IsVisible bool `json:"is_visible"`
304
+ Category string `json:"category"`
305
+ }
0 commit comments