1

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

The echoed response:

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

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?

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

4

1 回答 1

2

来自文档:“如果没有可用于给定查询的数据,则将从响应中省略 rows 元素。”

于 2014-04-05T19:54:35.040 回答