Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 522.9k

How to convert below code in RestSharp

Feb 2 2023 5:21 AM

Hi

  I want below code using RestSharp

var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
    ApiKey = "APIKey",
    ApplicationName = this.GetType().ToString()
});

var searchListRequest = youtubeService.Search.List("snippet");
searchListRequest.PublishedAfter = DateTime.Today;
searchListRequest.PublishedBefore = DateTime.Today.AddDays(1);
searchListRequest.Order = Google.Apis.YouTube.v3.SearchResource.ListRequest.OrderEnum.ViewCount;
var searchListResponse = searchListRequest.Execute();

Thanks


Answers (1)