-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
29 lines (23 loc) · 889 Bytes
/
example.js
File metadata and controls
29 lines (23 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { createRoxy } from '@roxyapi/sdk';
const roxy = createRoxy(process.env.ROXY_API_KEY);
/**
* Life Path number from a birth date using Pythagorean numerology.
* Detects Master Numbers and Karmic Debt during the reduction.
*/
async function main() {
const { data, error } = await roxy.numerology.calculateLifePath({
body: { year: 1990, month: 7, day: 15 },
});
if (error) throw new Error(error.error);
console.log('Life Path number:', data.number);
console.log('Type:', data.type);
console.log('Archetype:', data.meaning.title);
console.log('Keywords:', data.meaning.keywords.join(', '));
console.log('');
console.log('Has Karmic Debt:', data.hasKarmicDebt);
if (data.karmicDebtNumber) {
console.log('Karmic Debt number:', data.karmicDebtNumber);
console.log(' Theme:', data.karmicDebtMeaning.description);
}
}
main().catch(console.error);