How to call a function in V8() R Package with arguments

I tried to "browserify" this package [Google-Play-Scraper] (google-play-scraper - npm) so I can use it in R. However, I cannot seem to know how I can call a function.

rCode.R:

ct <- v8()
ct$source("scraper/googleplayscraperbundle.js")
test_app <- "{\"appId\":\"com.mojang.minecraftpe\",\"page\":0}"
pretty_test <- ct$call("scraper.reviews", test_app)

This is the output of pretty_test

This is the snippet of how to use the reviews function. (google-play-scraper - npm)

gplay.reviews({
  appId: 'com.mojang.minecraftpe',
  sort: gplay.sort.RATING
}).then(console.log, console.log);

Would you know how to call a function like this in v8$call?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.