Hi
I have below code & i want Video Title appears as link . When user clicks it should opne video.
I also want to dsiplay ViewCount
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
Naimish MakwanaPosted Feb 5, 2023, 6:11 AM
Hello Ramco,
To display a viewcount you need to get data by each video id. You can use below code for that.
VideoListResponse class is following:
Thanks
Naimish
Ramco RamcoPosted Feb 5, 2023, 5:58 AM
Hi Naimish
Secondly how i can display ViewCount value of video
Thanks
Naimish MakwanaPosted Feb 5, 2023, 5:32 AM
Hello Ramoc,
You can write link below:
Thanks
Naimish
Ramco RamcoPosted Feb 5, 2023, 4:43 AM
Hi Nimish
How to write in below line - htmlTable.Append("
Thanks
Naimish MakwanaPosted Feb 4, 2023, 4:45 PM
Hello Ramco,
You can create a video link with title as below.
The YoutubeSearchListResponse class is already given in previous answer.
Thanks
Naimish