youtube数据api无法与videorecordingdetails配合使用-显示错误400意外部分

时间:2019-01-21 10:08:38

标签: youtube-api youtube-data-api

当我通过youtube数据API插入视频时包含VideoRecordingDetails时,它显示以下错误:-

com.google.api.client.googleapis.json.GoogleJsonResponseException:400错误的请求

{
  "code" : 400,
  "errors" : [ {
    "domain" : "youtube.part",
    "location" : "part",
    "locationType" : "parameter",
    "message" : "{0}",
    "reason" : "unexpectedPart"
  } ],
  "message" : "{0}"
}

但是在评论以下内容后,它的工作正常。

ytvideo.setRecordingDetails(recordingDetails);

请帮助我如何设置视频的录制日期。这是我的代码不起作用:-

VideoRecordingDetails recordingDetails = new VideoRecordingDetails();
DateTime dt = new DateTime(vdata.getYtRecordDate());
recordingDetails.setRecordingDate(dt);

ytvideo.setRecordingDetails(recordingDetails);

0 个答案:

没有答案