Tweet ids, subscription to listen on progress

This commit is contained in:
Anton Dyudin 2015-01-23 11:42:57 -08:00
parent ac1552ee69
commit 02df2b1c4c
4 changed files with 31 additions and 13 deletions

View File

@ -188,9 +188,9 @@
%mean
=+ ^= new
=- (turn - |=(a=tank rose/[~ "! " ~]^[a]~))
^- (list tank)
%- flop ^- tang
?~ p.sih ~
(welp q.u.p.sih leaf/(trip p.u.p.sih) ~)
[leaf/(trip p.u.p.sih) q.u.p.sih]
%_ +>.$
r.tel (welp new r.tel)
mow

View File

@ -1,8 +1,12 @@
/+ sh-utils
!:
|_ [hide ~]
++ poke--args
%- gate-bang :_ ,_`.
|=([a=cord ~] [%g %mess [our /twit] our %twit-do !>([%post eny a])])
++ peer ,_`.
++ poke--args
%+ add-subs [[our /twit] our /post/(scot %uv eny)]
%^ gate-mess . |=([a=cord ~] [/twit %twit-do !>([%post eny a])])
,_`.
++ posh-time
(args-into-gate . |=(a=@da tang/~[leaf/"Tweet recieved {<a>}"]))
++ pour |*([ost=@ * sih=[@ ^]] :_(+>.$ [ost %give +.sih]~))
--

View File

@ -66,10 +66,14 @@
[%twit-feed (need %.(jon (ar:jo stat:twir)))]
==
?(400 401 403 404)
=- [[ost %give `gift`-]~ +>.$]
=+ err=%.(q:(need r.p.sig) ;~(biff poja mean:twir))
:^ %mean ~ %bad-http
[leaf/"HTTP Code {<p.p.sig>}" (turn (need err) mean:twip)]
=+ ^- git=gift
=+ err=%.(q:(need r.p.sig) ;~(biff poja mean:twir))
:^ %mean ~ %bad-http
[leaf/"HTTP Code {<p.p.sig>}" (turn (need err) mean:twip)]
?+ pax [[ost %give git]~ +>.$]
[%post @ ~]
[(spam pax git) +>.$]
==
==
::
++ peer

View File

@ -10,7 +10,7 @@
::
++ hapt (pair ship path)
--
::
!:
::::
::
|%
@ -51,8 +51,8 @@
::
++ add-output :: send gift to /out
|* [con=[* [hide *] *] ote=[@ *] ref=_,[(list) ^]]
=> .(+<-.con `hid=hide`+<-.con)
=+ sus=(~(tap in `(set bone)`(~(get ju pus.hid.con) /out)))
=> .(+<- `[* [hid=hide *] *]`con)
=+ sus=(~(tap in `(set bone)`(~(get ju pus.hid) /out)))
=+ mof=(turn sus (append [%give ote]))
|= _+<.ref
=+ neu=(ref +<)
@ -72,11 +72,20 @@
|* [gat=_,[@ @ *] ref=_,[(list) ^]]
(gate-move |*(_+<.gat [%pass /bang (gat +<)]) ref)
::
++ gate-mess :: respond with local message
|* [con=[* [hide *] *] gat=_,[@ @ *] ref=_,[(list) ^]]
=> .(+<- `[* [hid=hide *] *]`con)
%- gate-move :_ ref
|* _+<.gat
=+ `[imp=path mez=cage]`(gat +<)
[%pass /poke %g %mess [our.hid imp] our.hid mez]
::
++ gate-move :: respond with computed move
|* [gat=_,(mold) ref=_,[(list) ^]]
|* [ost=bone * arg=_+<.gat]
((add-resp (gat arg) ref) +<)
::
::
++ gate-outs :: send computed gift to /out
|* [con=[* [hide *] *] gat=_,[@ *] ref=_,[(list) ^]]
|* [ost=bone * arg=_+<.gat]
@ -84,7 +93,8 @@
::
++ listen-in :: recieve standard input
|* [con=[* [hide *] *] ref=_,[(list) ^]]
(add-subs [[our +.imp] our /in/[-.imp]]:con ref)
=> .(+<- `[* [hid=hide *] *]`con)
(add-subs [[our +.imp] our /in/[-.imp]]:hid ref)
::
++ print
|* [con=[* [hide *] *] tap=tape]