1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "calculations": [
12 {
13 "type": "one-rep-max",
14 "label": "Bench 100kg x 5",
15 "weight": 100,
16 "reps": 5,
17 "unit": "kg"
18 },
19 {
20 "type": "rep-max-table",
21 "label": "Squat 1RM 140kg",
22 "oneRepMax": 140,
23 "unit": "kg",
24 "roundTo": 2.5
25 },
26 {
27 "type": "strength-standards",
28 "label": "Male deadlift standards",
29 "lift": "deadlift",
30 "sex": "male",
31 "bodyweight": 80,
32 "oneRepMax": 200,
33 "unit": "kg"
34 },
35 {
36 "type": "wilks-dots",
37 "label": "Male 600kg total",
38 "sex": "male",
39 "bodyweight": 90,
40 "total": 600,
41 "unit": "kg"
42 },
43 {
44 "type": "plate-loading",
45 "label": "Load 142.5kg",
46 "targetWeight": 142.5,
47 "unit": "kg"
48 },
49 {
50 "type": "warmup",
51 "label": "Warmup to 120kg",
52 "workingWeight": 120,
53 "workingReps": 5,
54 "unit": "kg",
55 "roundTo": 2.5
56 }
57 ]
58};
59
60
61const run = await client.actor("mangudai/my-actor").call(input);
62
63
64console.log('Results from dataset');
65console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
66const { items } = await client.dataset(run.defaultDatasetId).listItems();
67items.forEach((item) => {
68 console.dir(item);
69});
70
71