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 "classroom 9 x 7 x 3 m, floor vinyl, ceiling acoustic tile, walls painted concrete block, 6 m² windows",
13 "85 dB + 82 dB + 80 dB",
14 "barrier 3 m high, source 0.5 m high 10 m from the barrier, receiver 1.5 m high 20 m behind it",
15 "6 mm glass STC",
16 "octave bands 63: 72, 125: 70, 250: 68, 500: 65, 1k: 62, 2k: 60, 4k: 58, 8k: 55",
17 {
18 "type": "room",
19 "length": "20 ft",
20 "width": "14 ft",
21 "height": "8 ft",
22 "target": 0.4,
23 "surfaces": [
24 {
25 "surface": "floor",
26 "material": "carpet on pad"
27 },
28 {
29 "surface": "ceiling",
30 "material": "gypsum board"
31 },
32 {
33 "surface": "walls",
34 "material": "gypsum board"
35 },
36 {
37 "material": "fabric panel 50 mm",
38 "area": "64 sq ft"
39 }
40 ]
41 }
42 ]
43};
44
45
46const run = await client.actor("jumblemog/acoustics-calculator").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56