change %api speech to use ++purf

This commit is contained in:
Anton Dyudin 2016-03-31 17:39:48 -07:00
parent 8844933178
commit 18d11d25ea
6 changed files with 13 additions and 13 deletions

View File

@ -2030,7 +2030,7 @@
[": " ~ ~]
:~ leaf+"[{(trip id.sep)} on {(trip service.sep)}]"
leaf+(trip body.sep)
leaf+(earn url.sep)
leaf+(earf url.sep)
==
==
::

View File

@ -48,9 +48,9 @@
[q.i.b $(a t.a, b t.b)]
::
++ interpolate-url :: XX friendlier url format #717
|= {a/tape b/(list (pair term knot))} ^- purl
=+ url=`purl`(scan a auri:epur)
url(q.q (interpolate-path q.q.url b))
|= {a/tape b/(list (pair term knot))} ^- purf
=+ url=`purf`(scan a aurf:epur)
url(q.q.p (interpolate-path q.q.p.url b))
::
++ valve :: produce request
|= {med/?($get $post) pax/path quy/quay}
@ -86,11 +86,11 @@
rose+[": " `~]^~[leaf+"Error {<num>}" leaf+(trip msg)]
::
++ user-url
|= a/scr ^- purl
|= a/scr ^- purf
(interpolate-url "https://twitter.com/:scr" scr+a ~)
::
++ post-url
|= {a/scr b/tid} ^- purl
|= {a/scr b/tid} ^- purf
%+ interpolate-url "https://twitter.com/:scr/status/:tid"
~[scr+a tid+(tid:print b)]
--

View File

@ -16,10 +16,10 @@
==
:* %api %github
login.sender.issue-comment
(need (epur url.sender.issue-comment))
(rash html-url.sender.issue-comment aurf:epur)
txt
txt
(need (epur url.comment.issue-comment))
(rash html-url.comment.issue-comment aurf:epur)
%- jobe :~
repository+s+name.repository.issue-comment
number+(jone number.issue.issue-comment)

View File

@ -95,10 +95,10 @@
%- jobe :~
service+s+service.a
id+s+id.a
id-url+s+(crip (earn id-url.a))
id-url+s+(crip (earf id-url.a))
summary+s+summary.a
body+s+body.a
url+s+(crip (earn url.a))
url+s+(crip (earf url.a))
meta+meta.a
==
:: %inv (jobe ship+(jope p.a) party+[%s q.a] ~)

View File

@ -13,7 +13,7 @@
|= jon/^json ^- {plan-acct ^json}
=+ usr=(need ((ot 'screen_name'^so ~):jo jon))
=+ url=(user-url:render:twitter usr)
[[usr (some [url ~])] jon]
[[usr (some url)] jon]
--
++ grow
|%

View File

@ -68,10 +68,10 @@
$: $api :: api message
service/@tas :: service name
id/@t :: id on the service
id-url/purl :: link to id
id-url/purf :: link to id
summary/@t :: summary of event
body/@t :: body of event
url/purl :: link to event
url/purf :: link to event
meta/json :: other data for web
== ::
== ::