Youtube v3 api使用code.google.com/p/google-api-go-client/youtube/v3
问题描述:
试图从我的频道获取上传列表,但出现错误“ChannelContentDetails没有字段或方法上传”Youtube v3 api使用code.google.com/p/google-api-go-client/youtube/v3
apiCall := youtube.Channels.List("contentDetails").Mine(true)
response, err := apiCall.Do()
if err != nil {
log.Fatalf("Error making API call: %v", err.Error())
}
fmt.Println(response.Items[0].ContentDetails.uploads)
答
response.Items[0].ContentDetails.RelatedPlaylists.Uploads
应该工作。