Youtube API-如何设置游戏标题
本文关键字:设置 游戏 标题 API- 何设置 Youtube | 更新日期: 2023-09-27 18:11:53
我正在用C#编写一个项目,目的是自动化我的流媒体准备工作。
我已经成功地创建了流和广播,但在为广播分配视频游戏标题时我失败了。
我收到状态200,但它仍然不会改变。
liveBroadcast = new LiveBroadcast();
liveBroadcast.Status = new LiveBroadcastStatus();
liveBroadcast.Status.PrivacyStatus = "private";
liveBroadcast.Snippet = new LiveBroadcastSnippet();
liveBroadcast.Snippet.Title = title;
liveBroadcast.Snippet.Description = description;
liveBroadcast.Snippet.ScheduledStartTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 19, 0, 0, 0);
liveBroadcast.Snippet.ScheduledEndTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 21, 0, 0, 0);
liveBroadcast.TopicDetails = new LiveBroadcastTopicDetails();
liveBroadcast.TopicDetails.Topics = new List<LiveBroadcastTopic>();
var liveBroadcastTopic = new LiveBroadcastTopic();
liveBroadcastTopic.Type = "videoGame";
liveBroadcastTopic.Unmatched = false;
liveBroadcastTopic.Snippet = new LiveBroadcastTopicSnippet();
liveBroadcastTopic.Snippet.Name = "ARMA 3";
liveBroadcastTopic.Snippet.ReleaseDate = "2013";
liveBroadcast.TopicDetails.Topics.Add(liveBroadcastTopic);
liveBroadcast = await youtubeService.LiveBroadcasts.Insert(liveBroadcast, "status,snippet,topicDetails").ExecuteAsync();
有什么想法吗?
Youtube尚未实现通过其API设置流的游戏标题的方法。
因此,我的解决方案是创建一个浏览器类,从安装的浏览器中导入cookie,并在youtubes视频编辑页面上定期发布到表单。
不是最干净或最好的方法,但它有效。
当他们在API中实现此方法时,此方法将被弃用和编辑。(在未知的时刻(