Question

I'd like to get a Response referring to a single Video on Youtube. Let's say that I know its ID and like to see if it is still on Youtube. How does the request have to look like?

I am using the google-api-client with client_id and client_secret and like to do something like this:

client.execute( :api_method => youtube.search.list, :parameters => {:id => my_video_id, :part => 'id,snippet' })

It just returns me a Set of default Video Data. It is unlikely, that this is a matter of authentication, because uploading and deleting videos works fine. But for this purpose I can't find the right way. What am I doing wrong?

Was it helpful?

Solution

You should do a videos->list call with the videoId instead.

client.execute( :api_method => youtube.videos.list, :parameters => {:id => my_video_id, :part => 'id,snippet' })
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top