How to use the google-play-scraper.memoized 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 facundoolano / aso / lib / stores / gplay.js View on Github external
'use strict';

// FIXME don't force memoization
const gplay = require('google-play-scraper').memoized();
const R = require('ramda');
const calc = require('../calc');
const debug = require('debug')('aso');

/*
* An object that holds all store-specific parts of the algorithms exposed by
* the library. This is not the most elegant solution ever, but beats introducing
* hierarchies and inheritance. If these objects grow too big it's probably better
* to break them into more cohessive components, maybe with defaults for the
* common stuff.
*/

const MAX_KEYWORD_LENGTH = 25;

const getCollection = (app) => app.free ? gplay.collection.TOP_FREE : gplay.collection.TOP_PAID;
const getGenre = (app) => app.genreId;