0

I'm using the Google.Apis.Youtube.v3 plugin in .NET MVC.

var service = _youTubeService.GetYouTubeService;
var searchReq = service.Search.List("snippet");
searchReq.ChannelId = "exampleIdGoesHere"; // search this channel
searchReq.Q = "acoustic"; // search term

var model = new YouTubeViewModel {
    Data = searchReq.Execute().Items
}

return View(model);

In my view, my goal is to embed the videos. But so far, the only relevant information I can get are the search result's title and description. The items, each being a SearchResult object, is not exactly a Video - which I'm looking for.

Two questions: - How do you retrieve videos that are from a specific user only (using the .NET plugin)? - How do you get the video information such as URL, for embedding purposes?

Marlo C
  • 587
  • 3
  • 14
  • 26
  • https://developers.google.com/youtube/2.0/developers_guide_protocol_api_query_parameters – L.B Nov 05 '14 at 17:59
  • @L.B Hi! yes I've been on the API site for quite some time, but I just haven't found a way for the plugin to work the way I wanted it to. It seems incomplete at this point – Marlo C Nov 05 '14 at 18:58

1 Answers1

0

To get all videos for a specific channel using v3 you'll need to to do the following steps.

  1. Get the channel uploads Playlist Id. You get get this using the Channels list call

  2. Then get a list of videos in the uploads playlist using the playlistItems call

From there you can create the video url using the "https://www.youtube.com/watch?v=" + video.Id

NullReference
  • 4,404
  • 12
  • 53
  • 90
  • Hi, thanks for the response but I was looking for videos of a particular user instead of channel. =) – Marlo C Dec 18 '14 at 14:20