我有来自youtube的显示名称。我如何获得用户名?
我的代码如下: -
public static YouTubeVideoObject[] GetVideos(string User)
{
YouTubeRequestSettings settings =
new YouTubeRequestSettings(User, YOUTUBE_DEVELOPER_KEY);
YouTubeRequest request = new YouTubeRequest(settings);
User = User.Replace(" ", "%20");
string feedUrl = "http://gdata.youtube.com/feeds/api/videos?q=" + User + "&orderby=published";
Feed<Video> videoFeed = request.Get<Video>(new Uri(feedUrl));
return (from video in videoFeed.Entries
select new YouTubeVideoObject() { VideoId = video.VideoId, Title = video.Title, Description = video.Description }).ToArray();
}
提前感谢。