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 "16 x 32 ft pool, 3 to 8 ft deep, pH 7.9, FC 1, TA 60, CYA 30, calcium 200",
13 "24 ft round above ground pool, 52 in wall, sand filter",
14 "kidney pool 15 x 30 ft, 4 ft average depth, heat to 84 F from 65 F in 2 days, air 60 F, with a cover",
15 "20,000 gallon pool, salt 2400, ph 7.2, ta 140, cya 90",
16 "hot tub 7 x 7 ft, 3 ft deep, heat to 102 F",
17 "8 x 4 m pool, 1.5 m deep, cartridge filter, 6 hour turnover",
18 {
19 "shape": "oval",
20 "length": 30,
21 "width": 15,
22 "shallow": 3.5,
23 "deep": 6,
24 "heater": "heat pump",
25 "airTemp": 70,
26 "targetTemp": 84,
27 "fc": 0.5
28 }
29 ]
30};
31
32
33const run = await client.actor("jumblemog/swimming-pool-calculator").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43