1
Answer

List of own Youtube Videos.

Ramco Ramco

Ramco Ramco

Aug 22
322
1

 I am trying like below but in all Items it is showing count = 0. I have deliberately written htps since it does not allow me to Post.


StringBuilder htmlTable = new StringBuilder();

var client = new RestClient("googleapis.com/youtube/v3");
var request = new RestRequest("search", Method.GET);
request.AddParameter("part", "snippet");

request.AddParameter("type", "video");
request.AddParameter("channelId", "UCg3Zp-m_nNVw");
request.AddParameter("key", "AIzaSu9f5blG8");

List<YoutubeSearchItem> allItems = new List<YoutubeSearchItem>();

// Make initial request for youtube endpoint
IRestResponse<YoutubeSearchListResponse> response = client.Execute<YoutubeSearchListResponse>(request);


htmlTable.Append("<table class='table table-bordered table-hover datatable-highlight' id='tbldata'>");
htmlTable.Append("<thead><tr><th>Video Id</th><th>Video Title</th><th>Description</th><th>Views</th><th>Like</th><th>Comment</th><th>Published</th></tr></thead>");
htmlTable.Append("<tbody>");

foreach (var data in allItems.OrderBy(x => x.snippet.publishedAt))
Thanks

 

Answers (1)