-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.ts
More file actions
35 lines (28 loc) · 1.28 KB
/
example.ts
File metadata and controls
35 lines (28 loc) · 1.28 KB
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
30
31
32
33
34
35
import { createRoxy } from '@roxyapi/sdk';
const roxy = createRoxy(process.env.ROXY_API_KEY!);
/**
* Life Path number from a birth date, the most important number in Pythagorean numerology.
* Reduces month, day, and year independently, then detects Master Numbers (11, 22, 33) and
* Karmic Debt (13, 14, 16, 19). Part of the RoxyAPI numerology domain.
*/
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); // single digit 1-9, or Master 11, 22, 33
console.log('Type:', data.type); // single | master
console.log('Calculation:', data.calculation);
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 && data.karmicDebtMeaning) {
console.log('Karmic Debt number:', data.karmicDebtNumber);
console.log(' Theme:', data.karmicDebtMeaning.description);
console.log(' Resolution:', data.karmicDebtMeaning.resolution);
}
console.log('');
console.log('Career:', data.meaning.career.slice(0, 140) + '...');
}
main().catch(console.error);