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": "v2.4",
14 "title": "Version 2.4",
15 "rating": 2.9,
16 "ratingDropPct": 31,
17 "bugRate": 69,
18 "negativePct": 72,
19 "reviewVelocityPct": 88,
20 "crashMentionRate": 44
21 },
22 {
23 "id": "v2.3",
24 "title": "Version 2.3",
25 "rating": 4.3,
26 "ratingDropPct": 2,
27 "bugRate": 18,
28 "negativePct": 21,
29 "reviewVelocityPct": 34,
30 "crashMentionRate": 8
31 }
32 ],
33 "previousItems": [
34 {
35 "id": "v2.4",
36 "title": "Version 2.4 beta",
37 "rating": 4,
38 "ratingDropPct": 8,
39 "bugRate": 31,
40 "negativePct": 34,
41 "reviewVelocityPct": 41,
42 "crashMentionRate": 15
43 }
44 ]
45};
46
47
48const run = await client.actor("quanmatrix/app-release-regression-rating-drift-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