FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tarot-api/example.js at main · RoxyAPI/tarot-api · GitHub
RoxyAPI
/
tarot-api
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
tarot-api
/
example.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (26 loc) · 939 Bytes
Breadcrumbs
tarot-api
/
example.js
Copy path
File metadata and controls
33 lines (26 loc) · 939 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
{
createRoxy
}
from
'@roxyapi/sdk'
;
const
roxy
=
createRoxy
(
process
.
env
.
ROXY_API_KEY
)
;
/**
* Three-card past, present, future tarot reading.
* Pass a stable seed for reproducible per-user readings, omit for random draws.
*/
async
function
main
(
)
{
const
{
data
,
error
}
=
await
roxy
.
tarot
.
castThreeCard
(
{
body
:
{
question
:
'What do I need to know about my career?'
,
seed
:
'sample-user-2026'
,
}
,
}
)
;
if
(
error
)
throw
new
Error
(
error
.
error
)
;
console
.
log
(
'Spread:'
,
data
.
spread
)
;
console
.
log
(
'Question:'
,
data
.
question
)
;
console
.
log
(
''
)
;
for
(
const
pos
of
data
.
positions
)
{
const
reversal
=
pos
.
card
.
reversed
?
' (reversed)'
:
''
;
console
.
log
(
`
${
pos
.
position
}
.
${
pos
.
name
}
:
${
pos
.
card
.
name
}
${
reversal
}
`
)
;
console
.
log
(
' Keywords:'
,
pos
.
card
.
keywords
.
join
(
', '
)
)
;
console
.
log
(
''
)
;
}
if
(
data
.
summary
)
console
.
log
(
'Summary:'
,
data
.
summary
)
;
}
main
(
)
.
catch
(
console
.
error
)
;
Back
|
FazBrowse Home
|
New Git URL