【发布时间】:2014-02-19 14:19:51
【问题描述】:
我有一个 Youtube 视频的 ID,并希望使用 google-api-client (Ruby) 添加缩略图。我的请求是这样的
result = client.execute(:api_method => youtube.thumbnails.set, :parameters => { :videoId => my_video_id, :media_body => file })
result.data 返回的是这个
<Google::APIClient::Schema::Youtube::V3::ThumbnailSetResponse:0x86435518 DATA:{"error"=>{"code"=>500, "message"=>nil}}>
我想不通,这里有什么问题。我尝试使用本地计算机上文件的路径以及 URL。即使是空字符串作为文件位置或省略 media_body 也会导致 500 错误。
你们有谁知道,这里发生了什么以及为什么我没有得到明确的错误响应?
编辑:这似乎不是 google-api-client 的错,因为在 Google APIs Explorer 中测试相同的请求会产生相同的结果:
Response
500 Internal Server Error
cache-control: private, max-age=0
content-encoding: gzip
content-length: 66
content-type: application/json; charset=UTF-8
date: Wed, 19 Feb 2014 14:24:23 GMT
expires: Wed, 19 Feb 2014 14:24:23 GMT
server: GSE
{
"error": {
"code": 500,
"message": null
}
}
【问题讨论】:
标签: youtube-api google-api-client