ROWS 没有在 Youtube Analytics API 中返回? [英] ROWS not returning in Youtube Analytics API?

查看:19
本文介绍了ROWS 没有在 Youtube Analytics API 中返回?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已向此网址发出请求:https://www.googleapis.com/youtube/analytics/v1/reports 使用指标:喜欢和不喜欢.

I have made a request to this url: https://www.googleapis.com/youtube/analytics/v1/reports with the metrics: likes and dislikes.

回应的回应:

{
 "kind": "youtubeAnalytics#resultTable",
 "columnHeaders": [
  {
   "name": "likes",
   "columnType": "METRIC",
   "dataType": "INTEGER"
  },
  {
   "name": "dislikes",
   "columnType": "METRIC",
   "dataType": "INTEGER"
  }
 ]
}

我请求的行和实际数据在哪里?在文档中,这是当我从 youtube 请求数据时应该返回的内容:

Where are the rows and the actual data that i requested? In the documentation this is what is supposed to return when i request data from youtube:

{
  "kind": "youtubeAnalytics#resultTable",
  "columnHeaders": [
    {
      "name": string,
      "dataType": string,
      "columnType": string
    },
    ... more headers ...
  ],
  "rows": [
    [
      {value}, {value}, ...
    ]
  ]
}

但我没有得到行":[] 数据.是我的帐户没有任何分析还是我做错了什么?

But i get no "rows": [] data. Does my account just not have any analytics or did i do something wrong?

如果我将 alt=json 更改为 alt=csv,我会返回 null.

If i cange the alt=json to alt=csv i get null returned.

推荐答案

来自 docs: '如果没有数据可用于给定的查询,则行元素将从响应中省略.'

From the docs: 'If no data is available for the given query, the rows element will be omitted from the response.'

这篇关于ROWS 没有在 Youtube Analytics API 中返回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆