Hi
Ihave below code for own Videos. I want to display Views , Like Comments & category name also.
using (var yt = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = "ApiKey",
}))
{
StringBuilder htmlTable = new StringBuilder();
var request = yt.Search.List("snippet");
request.ChannelId = "ChannelId";
request.Type = "video";
var response = request.Execute();
var objResult = response.Items.ToList();
}
Thanks
Naimish MakwanaPosted Feb 21, 2023, 2:28 PM
Hello Ramco,
You need to add your channel id in parameter
Thanks
Naimish Makwana
Ramco RamcoPosted Feb 21, 2023, 1:09 PM
Hi Naimish
I want to view my own channel videos. What code i need to add
Thanks
Naimish MakwanaPosted Feb 21, 2023, 10:12 AM
If you wan for all videos. Then use below code.
Change the parametes as per your requirement. Ex you can remove publishedAfter param if you don't want it.
Thanks
Naimish
Ramco RamcoPosted Feb 21, 2023, 10:10 AM
Hi Naimish
In Api Url i have deliberately written. It does not allow me to post.
Secondly i want to display all my Videos list
Thanks
Naimish MakwanaPosted Feb 21, 2023, 10:04 AM
Hello Ramco,
There are two issues with your code.
2. You need to pass Video id in request as you are using Video api.
Thanks
Naimish Makwana
Ramco RamcoPosted Feb 21, 2023, 9:56 AM
Hi Naimish
Below is the code
foreach (var item in tagResponse.Data.items)
Thanks
Naimish MakwanaPosted Feb 21, 2023, 9:36 AM
Hello Ramco,
Please provide full code. and highlight the line where you get the error. It will help to get more understanding on error.
Thanks
Naimish
Ramco RamcoPosted Feb 21, 2023, 9:30 AM
Hi Naimish
It is giving error - Object reference not set to an instance of the object. I want list of all my Videos.
Thanks
Naimish MakwanaPosted Feb 21, 2023, 8:21 AM
Hello Ramco,
Use below code
Thanks
Naimish