Google API AndroidPublisher不会返回评论

时间:2016-09-07 11:57:38

标签: c# google-api google-api-dotnet-client

我正在使用Googles官方.NET库来访问我的应用程序的评论(https://developers.google.com/android-publisher/api-ref/reviews/list是相应的API)

"Google.Apis.AndroidPublisher.v2": "1.16.0.594"

这是(大致)我的代码:

var credential = new ServiceAccountCredential(new ServiceAccountCredential.Initializer("client_email_from_service_account_json"
    {
        Scopes = new[] { AndroidPublisherService.Scope.Androidpublisher }
    }.FromPrivateKey("private_key_from_service_account_json"));

var service = new AndroidPublisherService(new BaseClientService.Initializer
{
    HttpClientInitializer = credential,
    ApplicationName = "some_name",
});

var request = service.Reviews.List("my_app_id");

using (var reader = new StreamReader(request.ExecuteAsStream()))
{
    var json = reader.ReadToEnd();
    // json is only "{}\n"
}

var requestResult = await request.ExecuteAsync();
// requestResult.Reviews is null

当我从access_token credential手动接听HTTP GET时,我得到相同(空)的结果。

没有错误,因此访问应该正常工作 - 但我只获得一个空的JSON对象。

当我尝试通过其ID访问特定评论时,它可以正常工作(同样,不指向访问问题)。

1 个答案:

答案 0 :(得分:0)

根据https://github.com/google/google-api-nodejs-client/issues/589,评论API仅返回过去7天内发布的评论。