Ramco Ramco

Ramco Ramco

  • 435
  • 3.4k
  • 546.6k

Views by Descending Order

Feb 5 2023 6:43 AM

Hi

  I have below code & i want to display Videos by Views in Descending Order . Maximum Views first

var client = new RestClient("googleapis.com/youtube/v3");

var request = new RestRequest("search", Method.GET);
request.AddParameter("part", "snippet");

request.AddParameter("q", "short videos category");
request.AddParameter("type", "video");
request.AddParameter("maxResults", 25);
request.AddParameter("order", "viewCount");
request.AddParameter("key", "ApiKey");

Thanks


Answers (7)