rename twit-stat to twit-post

This commit is contained in:
Anton Dyudin 2016-03-21 13:35:29 -07:00
parent 05376baa58
commit d248f431b9
6 changed files with 24 additions and 25 deletions

View File

@ -82,7 +82,7 @@
{$twit-do iden command:twitter} ::
== ::
++ api-call :: REST apis
$? $: ?($twit-status $twit-feed) :: response mark
$? $: ?($twit-post $twit-feed) :: response mark
{$twit-req endpoint:twit quay} :: outgoing request
== == ::
++ card :: general card
@ -1374,7 +1374,7 @@
::
::
++ ra-sigh-twit-feed :: timeline response
|= {man/knot res/(list stat):twit} ^+ +>
|= {man/knot res/(list post):twit} ^+ +>
%- (ra-know man) |= par/_pa =< pa-abet :: XX all subscribed
%- pa-lesson:par
%+ turn res
@ -1541,7 +1541,7 @@
((slog (flop u.saw)) +>)
::
++ ra-diff-twit-post :: status received
|= {sen/serial sat/stat:twit} ^+ +>
|= {sen/serial sat/post:twit} ^+ +>
=. twit.sent (~(put by twit.sent) id.sat sen)
:: XX route through ra-repeat for proper handling of %accepted?
+>.$
@ -2258,13 +2258,13 @@
?> ?=({@ $~} way)
ra-abet:(ra-coup-post:ra (slav %uv i.way) saw)
::
++ diff-twit-stat-post
|= {way/wire res/stat:twit} ^- (quip move +>)
++ diff-twit-post-post
|= {way/wire res/post:twit} ^- (quip move +>)
?> ?=({@ $~} way)
ra-abet:(ra-diff-twit-post:ra (slav %uv i.way) res)
::
++ sigh-twit-feed-feed
|= {way/wire res/(list stat):twit} ^- (quip move +>)
|= {way/wire res/(list post):twit} ^- (quip move +>)
?> ?=({@ $~} way)
ra-abet:(ra-sigh-twit-feed:ra i.way res)
::

View File

@ -26,7 +26,7 @@
==
++ gilt
$% {$twit-feed p/(list stat)} :: posts in feed
{$twit-stat p/stat} :: tweet accepted
{$twit-post p/stat} :: tweet accepted
{$ares term (list tank)}
==
::
@ -39,14 +39,14 @@
== ==
::
++ api-call {response-mark $twit-req {endpoint quay}} :: full hiss payload
++ response-mark ?($twit-status $twit-feed) :: sigh options
++ response-mark ?($twit-post $twit-feed) :: sigh options
++ sign :: arvo response
$% {$e $thou p/httr} :: HTTP result
{$t $wake $~} :: timeout ping
==
::
:: XX =*
++ stat stat:twitter :: recieved tweet
++ stat post:twitter :: recieved tweet
++ command command:twitter :: incoming command
++ endpoint endpoint:reqs:twitter :: outgoing target
++ param param:reqs:twitter :: twit-req paramters
@ -101,7 +101,7 @@
=. out (~(put by out) p.act %& usr q.act)
%+ wait-new /peer/home
=+ req=[%twit-req `endpoint`stat-upda+[%status q.act]~ ~]
[ost %hiss post+(dray ~[%uv] p.act) `usr %twit-status req]~
[ost %hiss post+(dray ~[%uv] p.act) `usr %twit-post req]~
==
::
++ wake-peer
@ -126,15 +126,15 @@
:: ~& retrying-in+`@dr`(sub tym now)
:: :_(+>.$ [ost %wait pax tym]~)
::
++ sigh-twit-status-post :: post acknowledged
++ sigh-twit-post-post :: status acknowledged
|= {wir/wire rep/stat} ^+ done
=+ (raid wir mez=%uv ~)
=. out (~(put by out) mez %| rep)
:_ +>.$
=+ pax=/[who.rep]/status/(rsh 3 2 (scot %ui id.rep))
:- (show-url [& ~ &+/com/twitter] `pax ~)
%+ weld (spam post+wir (tweet-good rep))
(spam scry+x+post+wir (tweet-good rep))
=+ mof=~[[%twit-post rep] [%quit ~]]
(weld (spam post+wir mof) (spam scry+x+post+wir mof))
::
++ sigh-twit-feed :: feed data
|= {wir/wire rep/(list stat)} ^+ done
@ -204,7 +204,6 @@
?~ hiz ~ :: already in flight
[ost %hiss scry+pax usr u.hiz]~
::
++ tweet-good |=(rep/stat `(list gift)`~[[%diff %twit-stat rep] [%quit ~]])
++ peer |=(pax/path :_(+> (pear & `~. pax))) :: accept subscription
++ pear :: poll, possibly returning current data
|= {ver/? usr/(unit iden) pax/path}
@ -234,7 +233,7 @@
=+ sta=(~(get by out) mez)
?. ?=({$~ $| *} sta)
[%none ~]
[%full twit-stat+p.u.sta]
[%full twit-post+p.u.sta]
::
$user ::?($user $home)
[%part twit-feed+(flop (~(get ja fed) pax))]

View File

@ -85,9 +85,9 @@
++ fasp |*(a/{@tas *} [(gsub '-' '_' -.a) +.a]) :: XX usable electroplating
++ user (cook crip (plus ;~(pose aln cab)))
++ mean (ot errors+(ar (ot message+so code+ni ~)) ~):jo
++ stat
++ post
=+ jo
%+ ce stat:sur-twit
%+ ce post:sur-twit
%- ot
:~ id+ni
user+(ot (fasp screen-name+(su user)) ~)

View File

@ -3,11 +3,11 @@
:::: /hoon/feed/twit/mar
::
/+ twitter, httr-to-json
|_ (list stat:twitter)
|_ (list post:twitter)
++ grab
|%
++ noun (list stat:twitter)
++ json (corl need (ar:jo stat:parse:twitter))
++ noun (list post:twitter)
++ json (corl need (ar:jo post:parse:twitter))
++ httr (cork httr-to-json json) :: XX mark translation
--
++ grow

View File

@ -1,13 +1,13 @@
:: Twitter status
::
:::: /hoon/stat/twit/mar
:::: /hoon/post/twit/mar
::
/+ twitter, httr-to-json
|_ stat:twitter
|_ post:twitter
++ grab
|%
++ noun stat:twitter
++ json (corl need stat:parse:twitter)
++ noun post:twitter
++ json (corl need post:parse:twitter)
++ httr (cork httr-to-json json) :: XX mark translation
--
++ grow

View File

@ -1,5 +1,5 @@
|%
++ stat {id/@u who/@ta now/@da txt/@t} :: recieved tweet
++ post {id/@u who/@ta now/@da txt/@t} :: recieved tweet
++ keys :: twitter-key type
$: con/{tok/@t sec/@t} :: user key pair
acc/{tok/@t sec/@t} :: app key pair