-1
https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ我無法通過頻道在YouTube上獲得視頻。爲什麼?
public async System.Threading.Tasks.Task<List<ViewModel.YoutubeVideo>> GetYoutubeMusic()
{
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = "....",
ApplicationName = this.GetType().ToString()
});
var searchListRequest = youtubeService.Channels.List("snippet");
searchListRequest.Id= "UC-9-kyTW8ZkZNDHQJ6FgpwQ";
searchListRequest.MaxResults = 25;
//Call the search.list method to retrieve results...
var searchListResponse = await searchListRequest.ExecuteAsync();
List<ViewModel.YoutubeVideo> arrays = new List<ViewModel.YoutubeVideo>();
foreach (var searchResult in searchListResponse.Items)
{
product = new ViewModel.YoutubeVideo();
product.id = searchResult.Id;
product.Name = searchResult.Snippet.Title;
product.Thumb100Uri = searchResult.Snippet.Thumbnails.Default.Url;
product.Thumb200Uri = searchResult.Snippet.Thumbnails.Medium.Url;
arrays.Add(product);
}
return arrays;
}
只是得到這個渠道,但沒有視頻...... 我不明白,這方面的消息。請解決它。