问题
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.
回答1:
From the docs: 'If no data is available for the given query, the rows element will be omitted from the response.'
来源:https://stackoverflow.com/questions/22884183/rows-not-returning-in-youtube-analytics-api