How to use the google-play-scraper.reviews function in google-play-scraper

To help you get started, we’ve selected a few google-play-scraper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github novoda / spikes / slacker / server / reviews.js View on Github external
function reviews() {
  var app = APPS[currentIndex];
  incrementIndex(APPS.length);

  var request = gplay.reviews({
    appId: app.package,
    page: 0,
    sort: gplay.sort.NEWEST
  });
  return request.then(toRuleResult(app));
}
github facundoolano / google-play-api / lib / index.js View on Github external
const subpath = '/apps/' + req.params.appId + '/reviews/';
    if (page > 0) {
      req.query.page = page - 1;
      apps.prev = buildUrl(req, subpath) + '?' + qs.stringify(req.query);
    }

    if (apps.results.length) {
      req.query.page = page + 1;
      apps.next = buildUrl(req, subpath) + '?' + qs.stringify(req.query);
    }

    return apps;
  }

  const opts = Object.assign({appId: req.params.appId}, req.query);
  gplay.reviews(opts)
    .then(toList)
    .then(paginate)
    .then(res.json.bind(res))
    .catch(next);
});