1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 "retaining wall 40 ft long, 3 ft high, standard blocks, loam soil",
13 "50' x 2' garden block wall with caps",
14 "4 ft wall 60 ft long with large blocks in clay, driveway above",
15 "30 ft long 5 ft tall wall, large blocks, 2:1 slope behind, $6.50 per block, caps $4 each",
16 "12x4x7 block 22 lb, 25 ft long, 18 inches high, sandy soil, no caps",
17 "retaining wall 12 m long 1 m high, jumbo blocks, gravel",
18 {
19 "length": 80,
20 "height": 3.5,
21 "block": "large",
22 "soil": "sand",
23 "prices": {
24 "block": 6.25
25 }
26 }
27 ]
28};
29
30
31const run = await client.actor("jumblemog/retaining-wall-calculator").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41