mirror of
https://github.com/urbit/shrub.git
synced 2024-12-15 12:43:31 +03:00
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
/- *radio
|
|
!:
|
|
::::
|
|
::
|
|
|_ [hide ~]
|
|
++ peek
|
|
|= [@ pax=path]
|
|
:: ?: |
|
|
:: radio-report/(report grams/[7 "foo" ~])
|
|
=+ :+ dat=(trip '{ping: {party:"rom", presence:"talk"}}')
|
|
=- dat2=(trip -)
|
|
'''
|
|
{ publish:
|
|
[{ serial:
|
|
"0vs.tteei.qlhhr.v09gs.s3iml.7him6.2injj.uiiu6.hg990.fha70.cqdtm",
|
|
statement:
|
|
{ now: Date.now(),
|
|
speech:
|
|
{ say: "Hello world"
|
|
}
|
|
},
|
|
audience:
|
|
{ "~zod/rume": "received",
|
|
"twitter/_urbit": "pending"
|
|
}
|
|
}]
|
|
}
|
|
'''
|
|
^= js
|
|
%- trip
|
|
'''
|
|
function come(a){
|
|
urb.send({
|
|
appl: 'radio-test',
|
|
mark: 'radio-command',
|
|
data: a
|
|
})
|
|
}
|
|
'''
|
|
:- %hymn
|
|
^- manx
|
|
;html
|
|
;head
|
|
;script(src "/gen/main/lib/urb.js");
|
|
;script: {js}
|
|
;script: dat = {dat2}
|
|
==
|
|
;body:button(onclick "come(dat)"):"Ping"
|
|
==
|
|
++ poke-radio-command
|
|
|= [ost=bone ship com=command]
|
|
~& got/com
|
|
[[ost %give /nice]~ +>]
|
|
--
|