Reputation: 5150
I'm trying to connect to Reply to Reviews API and get my app reviews, I do get them, but it only return results from the last 7 days. According to Google docs it needs to return:
{
"pageInfo": {},
"reviews": [],
"tokenPagination": {}
}
But it only return the reviews inside the array and there is no tokenPagination
or pageInfo
.
The last time I tried to get the results (few months ago) everything was perfect and I do got the tokenPagination.
api.js:
const { google, androidpublisher_v3 } = require('googleapis');
const SERVICE_ACCOUNT_EMAIL = '[email protected]';
const SERVICE_ACCOUNT_KEY_FILE = require('../KEY_FILE.json');
var auth;
var authClient;
var client;
class API {
// When loading the singleton, authorize to googleapis
constructor() {
this.connect();
}
// Authorize to GoogleAPI
async connect() {
auth = new google.auth.GoogleAuth({
keyFile: './KEY_FILE.json',
scopes: ['https://www.googleapis.com/auth/androidpublisher']
});
authClient = await auth.getClient();
client = await google.androidpublisher({
version: 'v3',
auth: authClient
});
}
async reviews(bundleId) {
// Fetch reviews by bundle identifier
const createResponse = await client.reviews.list({
packageName: bundleId,
});
var jsonResponse = JSON.stringify(createResponse);
return createResponse;
}
}
class Singleton {
constructor() {
if (!Singleton.instance) {
Singleton.instance = new API();
}
}
getInstance() {
return Singleton.instance;
}
}
module.exports = Singleton;
Anyone knows what may be the problem?
Upvotes: 0
Views: 21