通过Cloud Storage API查询Google Play评论

时间:2015-03-18 17:43:11

标签: api google-api google-play asp.net-web-api google-cloud-storage

因此,Google每月都会向Google Play用户评论提供CSV导出,并提供如下所示的网址:https://console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/reviews/(实际网址包含数字而不是X)

我可以看到云存储有一个Web API,想通过Google API资源管理器进行试用,所以我去了https://developers.google.com/apis-explorer/#p/storage/v1/storage.buckets.list,启用了OAuth并输入了pubsite_prod_rev_XXXXXXXXXX部分作为项目,但不幸的是,我得到的是400错误:

{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid argument."
}
],
"code": 400,
"message": "Invalid argument."
}
}

有没有办法通过Web API访问这些CSV文件?

1 个答案:

答案 0 :(得分:1)

尝试https://developers.google.com/apis-explorer/#p/storage/v1/storage.objects.list?bucket=pubsite_prod_rev_XXXXXXXXXX&prefix=reviews%252F列出CSV文件。也就是说,API资源管理器不了解媒体请求,因此要实际下载它们,您必须通过mediaLink URL单独执行此操作,如果您知道存储桶和存储空间,则可以进行计算。对象,例如https://www.googleapis.com/download/storage/v1/b/bucket/o/urlencodedobject?alt=media

有关详细信息,请参阅storage.objects.get文档。

如果您想转到UI而不是API Explorer,可以尝试https://console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/。如果您拥有该项目(此处并非如此; Google Play拥有该项目),那么您可以通过https://console.developers.google.com/project/_/storage/browser选择项目并查看所有相关的存储桶并导航到对象。