1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "r1",
14 "title": "battery drain",
15 "reviewCount": 4200,
16 "rating": 2.4,
17 "complaintRate": 74,
18 "featureRequestRate": 58,
19 "bugRate": 62,
20 "velocityPct": 81
21 },
22 {
23 "id": "r2",
24 "title": "dark mode request",
25 "reviewCount": 1100,
26 "rating": 3.8,
27 "complaintRate": 28,
28 "featureRequestRate": 71,
29 "bugRate": 12,
30 "velocityPct": 34
31 }
32 ],
33 "previousItems": [
34 {
35 "id": "r1",
36 "title": "battery drain",
37 "reviewCount": 2600,
38 "rating": 3.1,
39 "complaintRate": 55,
40 "featureRequestRate": 41,
41 "bugRate": 43,
42 "velocityPct": 52
43 }
44 ]
45};
46
47
48const run = await client.actor("quanmatrix/cross-app-review-feature-demand-intelligence").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58