本篇文档提供了Go SDK视频直播转点播模块,查询直转点视频列表功能的API调用示例。
初始化客户端
使用前请先初始化客户端,请参见初始化。
查询直转点视频列表
调用ListLiveRecordVideo接口,完成查询直转点视频列表功能。
接口参数和返回字段请参见ListLiveRecordVideo。调用示例如下:
package main
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
"github.com/aliyun/alibaba-cloud-sdk-go/services/vod"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
"fmt"
)
func MyListLiveRecordVideo(client *vod.Client) (response *vod.ListLiveRecordVideoResponse, err error) {
request := vod.CreateListLiveRecordVideoRequest()
request.StartTime = "2018-12-01T06:00:00Z"
request.EndTime = "2018-12-25T06:00:00Z"
request.StreamName = "testStreamName"
request.AppName = "testAppName"
request.PageNo = "1"
request.PageSize = "10"
request.SortBy = "CreationTime:Desc"
request.AcceptFormat = "JSON"
return client.ListLiveRecordVideo(request)
}
func main() {
client, err := InitVodClient("<accessKeyId>", "<accessKeySecret>")
if err != nil {
panic(err)
}
response, err := MyListLiveRecordVideo(client)
if err != nil {
panic(err)
}
fmt.Println(response.GetHttpContentString())
fmt.Println(response.RequestId)
//videoList := response.LiveRecordVideoList
}
在文档使用中是否遇到以下问题
更多建议
匿名提交