列出所有私人视频

列出所有私人视频

本文介绍了使用 YouTube API v3 列出所有私人视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在构建一个网站,该网站将使用少量用户上传的视频.这些视频被上传到服务器,然后通过 API v3 移动到 YouTube.设置私有标签,所有视频都上传到一个中央帐户.

Currently I'm building a site that will use a small number of user uploaded videos. These videos are uploaded to the server, then moved on to YouTube via the API v3. The private tag is set, and all videos are uploaded into one central account.

我的问题是;如何通过 API 访问和列出所有这些私人视频以在我的网站上显示?我不确定这是否可能.任何反馈将不胜感激.

My problem is; how can I access and list all these private videos via the API to display on my site? I'm not sure if this is possible. Any feed back would be much appreciated.

仔细研究之后我发现 这个.在查看文档后,我找不到有关如何执行此操作的 PHP 特定示例:getuserUploads.

After looking into it more I found this. After looking through the docs I couldn't find a PHP specific example of how I could do this: getuserUploads.

推荐答案

我相信您可以使用 YouTube Data v3 以这种方式做到这一点:

I believe that you can do that, using the YouTube Data v3, in this way:

通过这种方式获取上传的视频(它是一个Java示例):

Get the uploaded videos in this way (it is a Java example):

https://developers.google.com/youtube/v3/docs/playlistItems/list#examples

然后您可以使用以下方法检索这些播放列表项的视频资源:

And then you can retrieve the videos resources for these playlistitems using:

https://developers.google.com/youtube/v3/docs/视频/列表

然后您可以验证每个视频资源中的 status.privacyStatus(如果您上传的视频具有不同的 status.privacyStatus .. )

And then you can verify the status.privacyStatus in each video resource (if you upload videos with a different status.privacyStatus .. )

这篇关于使用 YouTube API v3 列出所有私人视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 10:48