简体   繁体   English

通过Cloud Storage API查询Google Play评论

[英]Query Google Play reviews via Cloud Storage API

So Google offers monthly CSV exports of Google Play user reviews and provides a URL that looks like this: https://console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/reviews/ (the actual URL contains numbers instead of X) 因此,Google每月提供Google Play用户评论的CSV导出,并提供如下所示的URL: https : //console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/reviews/ (实际URL包含数字而不是X)

I can see that Cloud Storage has a Web API and wanted to try it out via the Google APIs Explorer, so I went to https://developers.google.com/apis-explorer/#p/storage/v1/storage.buckets.list , enabled OAuth and entered the the pubsite_prod_rev_XXXXXXXXXX part as project, but unfortunately all I got was a 400 error: 我可以看到Cloud Storage有一个Web API,并想通过Google APIs Explorer进行尝试,所以我去了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."
}
}

Is there a way to access those CSV files via Web API? 是否可以通过Web API访问那些CSV文件?

Try https://developers.google.com/apis-explorer/#p/storage/v1/storage.objects.list?bucket=pubsite_prod_rev_XXXXXXXXXX&prefix=reviews%252F to list the CSV files. 尝试https://developers.google.com/apis-explorer/#p/storage/v1/storage.objects.list?bucket=pubsite_prod_rev_XXXXXXXXXX&prefix=reviews%252F列出CSV文件。 That said, the API explorer does not understand media requests, so to actually download them, you would have to do it separately via the mediaLink URL, which you can calculate if you know the bucket & object, eg, https://www.googleapis.com/download/storage/v1/b/ bucket /o/ urlencodedobject ?alt=media . 就是说,API资源管理器无法理解媒体请求,因此要实际下载它们,您必须通过mediaLink URL单独进行mediaLink ,如果您知道存储桶和对象(例如https:// www) ,则可以计算该链接。 googleapis.com/download/storage/v1/b/ bucket / o / urlencodedobject ?alt = media

See storage.objects.get documentation for more info. 有关更多信息,请参见storage.objects.get文档。

If you want to go to the UI rather than the API Explorer, you can try https://console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/ . 如果要转到UI而不是API Explorer,可以尝试https://console.developers.google.com/storage/browser/pubsite_prod_rev_XXXXXXXXXX/ If you owned the project (which isn't the case here; Google Play owns it), then you could select the project via https://console.developers.google.com/project/_/storage/browser and view all associated buckets and navigate to objects. 如果您拥有该项目(这里不是这种情况; Google Play拥有该项目),那么您可以通过https://console.developers.google.com/project/_/storage/browser选择该项目并查看所有关联的项目存储桶并导航到对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM