Merge pull request #415 from joemfb/twit

some changes to get :twit working
This commit is contained in:
Ted Blackman 2018-02-16 12:56:30 -08:00 committed by GitHub
commit 8e75cbbf33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 15 deletions

View File

@ -195,11 +195,11 @@
|= {usr/(unit user:eyre) req/(unit user:eyre)}
?~(req & =(usr req))
::
:: .^(twit-feed %gx /=twit=/~/home/urbit_test)
:: .^(twit-stat %gx /=twit=/~./post/0vv0old.0post.hash0.0000)
++ peek
|= {ren/care:clay pax/path} ^- (unit (unit gilt))
?> ?=($x ren) :: others unsupported
:: /+ twitter
:: .^((list post:twitter) %gx /=twit=/home/urbit_test/twit-feed)
:: .^(post:twitter %gx /=twit=/post/0vv0old.0post.hash0.0000/twit-feed)
++ peek-x
|= pax/path ^- (unit (unit gilt))
=+ usr=`~. :: =^ usr pax (user-from-path pax)
?. ?=(twit-path pax)
~|([%missed-path pax] !!)
@ -213,7 +213,7 @@
++ peer-scry-x
|= pax/path ^+ done
:_ +>
=+ pek=(peek %x pax)
=+ pek=(peek-x pax)
?^ pek
?~ u.pek ~|(bad-scry+x+pax !!)
~[[ost %diff u.u.pek] [ost %quit ~]]

View File

@ -11,4 +11,4 @@
|= $: {now/@da eny/@uvJ bec/beak}
{{who/knot msg/cord $~} $~}
==
[%twit-do [who %post eny msg]]
[%twit-do [who %post `@uvI`(rsh 8 1 eny) msg]]

View File

@ -13,7 +13,7 @@
|= $: {now/@da eny/@uvJ bek/beak}
{{who/iden $~} typ/?($user $home)}
==
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]
=+ pax=/(scot %p p.bek)/twit/(scot %da now)/[typ]/[who]/twit-feed
:- %tang
%+ turn (flop .^((list post:twitter) %gx pax))
|= post:twitter ^- tank

View File

@ -55,7 +55,7 @@
|= {a/purl b/quay} ^- hiss
=. b (quay:hep-to-cab b)
=- [a %post - ?~(b ~ (some (as-octt +:(tail:en-purl:html b))))]
(my content-type+['application/x-www-form-en-urlt:htmlncoded']~ ~)
(my content-type+['application/x-www-form-urlencoded']~ ~)
::
::
++ mean-wall !.

View File

@ -20,7 +20,7 @@
|= {a/char b/(list @t)} ^- @t
%+ rap 3
?~ b ~
|-(?~(t.b b [i.b a $(b t.b)]))
|-(?~(t.b b [i.b a $(b t.b)]))
::
++ valve :: produce request
|= {med/?($get $post) pax/path quy/quay}
@ -87,9 +87,10 @@
:~ id+ni
user+(ot (fasp screen-name+(su user)) ~)
(fasp created-at+(cu year (ci stud so)))
text+(cu crip (su (star escp:de-xml))) :: parse html escapes
:: parse html escapes and newlines
text+(cu crip (su (star ;~(pose (just `@`10) escp:de-xml))))
==
++ usel
++ usel
=, ^?(dejs)
%+ ce (list who/@ta)
=- (ot users+(ar -) ~)
@ -119,12 +120,12 @@
(valve med (cowl pax +.a b))
::
++ lutt |=(@u `@t`(rsh 3 2 (scot %ui +<)))
++ llsc
++ llsc
:: => args:reqs
|= a/$@(scr (list scr)) ^- @t
?@(a `@t`a (join ',' a))
::
++ llst
++ llst
|= a/$@(@t (list @t)) ^- @t
?@(a `@t`a (join ',' a))
::
@ -135,7 +136,7 @@
?@(a (lutt a) (join ',' (turn `(list tid)`a lutt)))
::
++ cowl :: handle parameters
|= $: pax/path
|= $: pax/path
ban/(list param)
quy/quay
==