1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "births": [
12 {
13 "id": "A-1990",
14 "date": "1990-06-15",
15 "time": "13:10",
16 "sex": "male"
17 },
18 {
19 "id": "B-1955",
20 "date": "1955-07-10",
21 "time": "23:40",
22 "sex": "male"
23 },
24 {
25 "id": "C-1961",
26 "date": "1961-08-10",
27 "time": "00:15",
28 "sex": "female"
29 }
30 ],
31 "hourPillarConvention": "clock_midnight",
32 "tenGodsBranchBasis": "jeonggi",
33 "daeunCount": 10,
34 "defaultTimezone": "Asia/Seoul",
35 "defaultLongitude": 126.978,
36 "nonexistentTimePolicy": "flag",
37 "ambiguousTimePolicy": "flag",
38 "boundaryFlagMinutes": 10
39};
40
41
42const run = await client.actor("kdatafactory/saju-engine").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52