Various fixes and improvements.

This commit is contained in:
C. Guy Yarvin 2014-08-10 20:09:56 -07:00
parent 3d5d00d9a3
commit fe9c4c8a85
4 changed files with 16 additions and 10 deletions

View File

@ -584,6 +584,7 @@
++ doss :: host to ship
|= hot=host
^- (unit ship)
~& [%doss hot]
=+ gow=(~(get by dop) hot)
?^ gow gow
?. &(?=(& -.hot) ?=(^ p.hot)) ~
@ -683,6 +684,9 @@
:: ?~(gow [~ q.q.pul] [gow t.q.q.pul])
:: =+ oar=`(unit ship)`?^(wiq wiq (doss r.p.pul))
=+ oar=(fall (doss r.p.pul) (need hov))
~& [%oar oar]
~& [%hov hov]
~& [%home (home oar)]
?. (home oar)
(hork oar hyx)
(huff oar q.hyx pul moh)

View File

@ -629,7 +629,7 @@
|= a=(pair ship desk)
:- hun.mat
:^ %pass (away %w %drug (scot %p p.a) q.a ~) %c
[%warp [our p.a] q.a ~ %| [%da now] [%da (add now ~d1000)]]
[%warp [our p.a] q.a ~ %| [%da +(now)] [%da (add now ~d1000)]]
=+ ^= old ^- (list move)
%+ turn
%+ skip (~(tap in ped.sat) ~)

View File

@ -1,7 +1,7 @@
|%
++ keys :: twitter-key type
$: con=[tok=@t sec=@t]
acc=[tok=@t sec=@t]
$: con=[tok=@t sec=@t] :: user key pair
acc=[tok=@t sec=@t] :: app key pair
==
::
++ oauth :: OAuth 1.0 header
@ -44,8 +44,9 @@
"oauth_timestamp=" "\"" tim "\", "
"oauth_token=" "\"" (trip tok.acc.key) "\", "
"oauth_version=1.0"
==
++ valve
==
::
++ valve :: produce request
|= [med=meth [ur=tape pars=quay] key=keys est=time eny=@]
^- hiss
=+ url="https://api.twitter.com/1.1{ur}.json"
@ -99,7 +100,7 @@
%+ reel a
|= [p=@t q=@t]
:(catt '/' p q)
:: Twitter types
:: :: Twitter types
++ tid ,@u
++ lsc (list scr)
++ lst (list ,@t)
@ -154,11 +155,12 @@
++ llid |=((list tid) `@t`(roll +< |=([p=tid q=@t] (cat 3 (cat 3 q ',') (utt p)))))
++ clum ,$+(* *)
::
++ mold :: request constructor
++ mold :: construct request
|* [med=meth pax=path a=$+(* *)]
|= [args=a opts=quay]
(valve med (cowl pax args opts) key est eny)
++ cowl :: paramater handler
::
++ cowl :: parameter handler
|= [pax=path ban=(list ,[p=@t q=?(@ (list ,@))]) opts=quay]
^- [path quay]
?~ ban
@ -290,6 +292,5 @@
++ help-toss (mold %get /help/tos ,~)
++ appl-rate (mold %get /application/rate-limit-status ,~)
++ stat-look (mold %get /statuses/lookup ,[us ~])
--
--
--

View File

@ -29,6 +29,7 @@ window.urb.send = function(params,cb) {
}
window.urb.subscribe = function(params,cb) {
console.log("Someone is subscribing");
if(!cb)
throw new Error("You must supply a callback to urb.subscribe.")
if(!params)