使用YouTube .NET API上传并设置视频为不公开 [英] Using Youtube .net API to upload and set a video as unlisted

查看:1787
本文介绍了使用YouTube .NET API上传并设置视频为不公开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎为.NET中的Youtube API已经有一段时间没有更新了。因此没有接触到设置视频为不公开属性或方法。可能有人建议周围的作品,如果他们以前遇到过这个问题?

It seems the Youtube API for .net hasn't been updated in a while. As such there is no property or method exposed to set a video as unlisted. Could someone suggest a work around if they have come across this issue before?

推荐答案

我遇到了麻烦太搞清楚了这一点,所以想我会后我发现任何人寻找一个答案。

I was having trouble figuring this out too, so thought I would post my findings for anybody looking for an answer to this.

根据这个线程< /为YT一>,支持:在转加AccessControl的。 1118

As per this thread, support for yt:accessControl was added in rev. 1118.

在写这篇文章的时候,该修订不包括您从谷歌的API下载页面下载API中。你必须得到的最新版本的API 这里(SVN结帐)的。

At the time of this writing, that revision is not included in the API that you download from Google's API download page. You have to get the very latest version of the API here (SVN Checkout).

一旦你在的地方,你可以做这样的事情:

Once you have that in place, you can do something like this:

Video newVideo = new Video();
newVideo.YouTubeEntry.AccessControls.Add(new YtAccessControl("list", "denied"));



干杯!

Cheers!

这篇关于使用YouTube .NET API上传并设置视频为不公开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆