【发布时间】:2019-05-02 16:24:43
【问题描述】:
我正在尝试从 YouTubeAnalytics API 的 V1 迁移到 V2。但我无法弄清楚我应该以何种格式陈述查询。
我正在尝试运行的代码:
return analytics.reports().query()
.setIds(id)
.setMetrics("views")
.setDimensions("video")
.execute();
但我得到如下错误代码 400:
IOException: 400 Bad Request
com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
{
"code" : 400,
"errors" : [ {
"domain" : "global",
"message" : "Could not parse content (CNHFwpxMq_TDnbpX_3GdjueOg) of field ids.",
"reason" : "badRequest"
} ],
"message" : "Could not parse content (CNHFwpxMq_TDnbpX_3GdjueOg) of field ids."
}
有什么建议吗?
【问题讨论】:
标签: java youtube youtube-api youtube-analytics-api