获取先前上传和预定的 youtube 视频的预定发布 date/time

Obtain the scheduled publish date/time for a previously uploaded and scheduled youtube video

我正在使用 youtube v3 api 遍历上传的播放列表,并使用 videos/list({id}) 获取每个视频的详细信息。我正在请求片段和内容详细信息部分,但我发现 snippet.publishedAt 和 contentDetails.videoPublishedAt 字段始终反映上传日期,而不是计划日期(对于上传时计划的视频)。

我已经请求了所有记录的部分,但在任何地方都没有看到 'scheduledDate' 字段;想知道是否有另一种技术可以获取此信息?

根据文档,您可以随意使用以下 属性:

status.publishAt (datetime)

The date and time when the video is scheduled to publish. It can be set only if the privacy status of the video is private. The value is specified in ISO 8601 format. Note the following two additional points about this property's behavior:

  • If you set this property's value when calling the videos.update method, you must also set the status.privacyStatus property value to private even if the video is already private.
  • If your request schedules a video to be published at some time in the past, the video will be published right away. As such, the effect of setting the status.publishAt property to a past date and time is the same as of changing the video's privacyStatus from private to public.

为了从 Videos.list API endpoint, do not forget to pass to the parameter part 中得到这个 属性 的值 status 也是。