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 "generator for a refrigerator, sump pump, furnace, 10 lights, tv, internet router and a well pump",
13 "whole house standby generator on natural gas: 4 ton central ac, electric water heater, electric range, refrigerator, freezer, well pump, 30 lights",
14 "what size generator to run a 3 ton central air with a soft start, fridge, furnace fan and 20 led lights, propane, 100 lb tank",
15 "rv ac, microwave, coffee maker, tv, inverter, 5 gallon tank",
16 "job site: table saw, air compressor, 2 circular saws, 4 drills",
17 "7500 watt generator for a 1 hp well pump, 2 fridges, space heater, microwave, 3 days",
18 {
19 "loads": [
20 "refrigerator",
21 {
22 "name": "medical equipment",
23 "runningW": 300
24 },
25 {
26 "name": "sump pump",
27 "hp": 0.5
28 }
29 ],
30 "fuel": "gasoline"
31 }
32 ]
33};
34
35
36const run = await client.actor("jumblemog/generator-size-calculator").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46