Hi
I have below code but how i can get Video Id , Video Title , Description , Search Key words , Likes,comments etc.
var client = new RestClient("googleapis.com/youtube/analytics/v1/reports");
var request = new RestRequest("query", Method.GET);
request.AddParameter("ids", "channel==UCgKHSHDGgG-m_nNoaVw");
request.AddParameter("metrics", "views");
request.AddParameter("dimensions", "insightTrafficSourceType,insightTrafficSourceDetail");
request.AddParameter("key", "AIzaAHKDGDYHDLDKS9G8");
//var response = client.Execute(request);
var response = client.Execute(request);
Thanks
Amit MohantyPosted Apr 15, 2024, 5:38 AM
The IsSuccessful property typically exists in IRestResponse , where T is the type of the expected response content. Since you're using client.Execute(request) without specifying the response type, you're getting an IRestResponse, which indeed doesn't have IsSuccessful. To check if the request was successful, you can check the StatusCode property of the response.
Ramco RamcoPosted Apr 14, 2024, 8:35 AM
Hi
I have below code. It is giving error - IRestResponse does not contain a definition for IsSuccessful.
Since TrafficSearch returns void a return keyword must not be followed by an Object Expression.
Thanks
Tahir AnsariPosted Apr 14, 2024, 7:14 AM
Hey Ramco please try the below code