1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "circuits": [
12 "30 A continuous, 240 V single phase, 150 ft, copper THHN",
13 "20 hp motor, 480 V three phase, 300 ft, copper THWN",
14 "100 A, 480 V 3 phase, 500 ft, aluminum XHHW-2, 6 current-carrying conductors, 40 C ambient, check 4 AWG",
15 "11 kW, 400 V three phase, 80 m, XLPE, pf 0.85, 3 circuits grouped",
16 {
17 "title": "Panel feeder",
18 "current": "200 A",
19 "voltage": "208 V",
20 "phase": 3,
21 "length": "250 ft",
22 "material": "copper",
23 "insulation": "THHN",
24 "transformer": {
25 "kVA": 150,
26 "impedance": "4%"
27 }
28 }
29 ]
30};
31
32
33const run = await client.actor("jumblemog/wire-size-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