ROWS是否未在Youtube Analytics API中返回? [英] ROWS not returning in Youtube Analytics API?

查看:71
本文介绍了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.

推荐答案

来自文档:如果给定查询没有可用数据,则将在响应中省略rows元素."

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天全站免登陆