问题描述
我想获得一个涉及Youtube上单个视频的回复.假设我知道它的ID,并且想看看它是否仍在YouTube上.请求的外观如何?
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?
我正在将google-api-client与client_id和client_secret一起使用,并且喜欢这样做:
I am using the google-api-client with client_id and client_secret and like to do something like this:
它只是向我返回了一组默认视频数据.这不太可能是身份验证问题,因为上传和删除视频的效果很好.但是为此,我找不到正确的方法.我在做什么错了?
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?
推荐答案
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' })
这篇关于如何使用Youtube API v3按ID检索视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!