landscape/desk/ted/reel/set-ship.hoon

19 lines
491 B
Plaintext
Raw Normal View History

2023-03-21 20:44:21 +03:00
/- spider
/+ *strandio
=, strand=strand:spider
=, strand-fail=strand-fail:libstrand:spider
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
^- form:m
=+ !<(vic=cord arg)
;< our=@p bind:m get-our
2023-05-25 20:04:32 +03:00
=/ url
?: =(vic 'https://tlon.network/lure/')
"https://tlon.network/v1/lure/bait/who"
"{(trip vic)}/bait/who"
;< =json bind:m (fetch-json url)
2023-03-21 20:44:21 +03:00
=/ =ship (slav %p (so:dejs:format json))
;< ~ bind:m (poke [our %reel] reel-command+!>([%set-ship ship]))
(pure:m !>(~))