Posting tweets

This commit is contained in:
Anton Dyudin 2015-01-26 20:30:22 -08:00
parent 83007d6c30
commit f00f2a744e
5 changed files with 54 additions and 22 deletions

View File

@ -2,7 +2,7 @@
:::: /hook/core/rodeo/app :::: /hook/core/rodeo/app
:: ::
/? 314 /? 314
/- *rodeo /- *rodeo, *twitter
/+ rodeo /+ rodeo
:: ::
:::: ::::
@ -60,11 +60,15 @@
$: %g :: application $: %g :: application
$% [%mean p=ares] :: cancel $% [%mean p=ares] :: cancel
[%nice ~] :: acknowledge [%nice ~] :: acknowledge
[%rush %rodeo-report report] :: refresh [%rush p=silt] :: subs data
== == :: == == ::
$: %t :: $: %t ::
$% [%wake ~] :: timer wakeup $% [%wake ~] :: timer wakeup
== == == :: == == == ::
++ silt
$% [%rodeo-report p=report] :: refresh
[%twit-stat p=twit-stat] :: tweet reciept
==
++ move ,[p=bone q=(mold note gift)] :: all actions ++ move ,[p=bone q=(mold note gift)] :: all actions
++ hapt ,[p=ship q=path] :: app instance ++ hapt ,[p=ship q=path] :: app instance
++ note :: requests ++ note :: requests
@ -84,7 +88,7 @@
$% [%wait p=@da] :: $% [%wait p=@da] ::
== == == :: == == == ::
++ twim :: twitter endpoints ++ twim :: twitter endpoints
$%([%mine p=span] [%stat p=@uv]) :: $%([%stat p=@uv]) ::
-- --
|_ [hid=hide house] |_ [hid=hide house]
++ ra :: transaction core ++ ra :: transaction core
@ -176,7 +180,13 @@
++ ra-twitter :: %twitter response ++ ra-twitter :: %twitter response
|= [met=twim sih=sign] |= [met=twim sih=sign]
^+ +> ^+ +>
!! ?+ sih ~&([%rodeo-bad-twitter sih] !!)
[%g ?(%nice %mean) ~]
+>
[%g %rush %twit-stat *]
~& got-tweet/p.p.sih
+>
==
:: ::
++ ra-repeat :: %repeat response ++ ra-repeat :: %repeat response
|= [num=@ud her=ship man=span sih=sign] |= [num=@ud her=ship man=span sih=sign]
@ -267,7 +277,7 @@
%| ?. pub +> %| ?. pub +>
?- -.p.tay ?- -.p.tay
%twitter %twitter
!! (ra-tweet p.p.tay tip)
== == == ==
:: ::
++ ra-record :: add to story ++ ra-record :: add to story
@ -294,6 +304,22 @@
== ==
+>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip)) +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
:: ::
++ ra-tweet :: send to /twit
|= [who=span sey=serial * sta=statement]
~! sta
?> ?=(%lin -.r.sta)
%^ ra-emil
:* ost
%pass /twitter/stat/(scot %uv sey)
%g %mess
[our.hid /twit] our.hid
[%twit-do !>(`twit-do`[who %post sey q.r.sta])]
==
:* ost
%pass /twitter/stat/(scot %uv sey)
[%g %show [our.hid /twit] our.hid /post/(scot %uv sey)]
==
~
++ pa :: story core ++ pa :: story core
|_ $: man=span |_ $: man=span
story story
@ -369,10 +395,10 @@
:_ ~ :_ ~
:- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] :- /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
[%g %took [p.p.tay /rodeo] our.hid] [%g %took [p.p.tay /rodeo] our.hid]
?+ -.+>+.sih ~&([%rodeo-odd-friend sih] !!) ?+ -.p.p.sih ~&([%rodeo-odd-friend sih] !!)
%config +>.$ %config +>.$
%group (pa-remind tay +.+>+.sih) %group (pa-remind tay +.p.p.sih)
%grams (pa-lesson q.+.+>+.sih) %grams (pa-lesson q.+.p.p.sih)
== ==
== ==
:: ::
@ -618,8 +644,8 @@
=- ra-abet:(~(ra-twitter ra ost ~) met sih) =- ra-abet:(~(ra-twitter ra ost ~) met sih)
^= met ^= met
?+ t.pax ~& [%rodeo-twitter-strange-path pax] !! ?+ t.pax ~& [%rodeo-twitter-strange-path pax] !!
[%mine @ @ ~] :: [%mine @ @ ~]
[i.t.pax i.t.t.t.pax] :: [i.t.pax i.t.t.t.pax]
[%stat @ ~] [%stat @ ~]
[i.t.pax (slav %uv i.t.t.pax)] [i.t.pax (slav %uv i.t.t.pax)]
== ==

View File

@ -597,6 +597,7 @@
++ pour ++ pour
|= [ost=bone pax=path sih=*] |= [ost=bone pax=path sih=*]
^- [(list move) _+>] ^- [(list move) _+>]
~| sign=sih
=> .(sih ((hard sign) sih)) => .(sih ((hard sign) sih))
:: ~& talk-pour/sih :: ~& talk-pour/sih
?~ pax ~& talk-pour-strange-path/pax !! ?~ pax ~& talk-pour-strange-path/pax !!

View File

@ -16,7 +16,7 @@
:: ::
++ axle :: app state ++ axle :: app state
$: %0 $: %0
kes=(map span keys) :: auth kes=(map span keys:twit-do) :: auth
out=(map ,@uvI (each ,[span cord] stat)) :: sent tweets out=(map ,@uvI (each ,[span cord] stat)) :: sent tweets
ran=(map path ,[p=@ud q=@da]) :: polls active ran=(map path ,[p=@ud q=@da]) :: polls active
fed=(jar path stat) :: feed cache fed=(jar path stat) :: feed cache
@ -44,7 +44,7 @@
[%t %wake ~] :: timeout ping [%t %wake ~] :: timeout ping
== ==
:: ::
++ stat ,[id=@u who=@ta now=@da txt=@t] :: recieved tweet ++ stat twit-stat :: recieved tweet
-- --
!: !:
:::: ::::

View File

@ -4,6 +4,7 @@
:: ::
/? 314 /? 314
/- *twitter /- *twitter
=+ twit
!: !:
:::: functions :::: functions
:: ::

View File

@ -1,12 +1,16 @@
|% |%
++ twit-do ,[p=span q=command] :: user and action ++ twit-do => twit ,[p=span q=command] :: user and action
++ command :: poke action ++ twit-stat ,[id=@u who=@ta now=@da txt=@t] :: recieved tweet
$% [%auth p=keys] :: set API keys ++ twit
[%post p=@uvI q=cord] :: post a tweet |%
== ++ keys :: twitter-key type
:: $: con=[tok=@t sec=@t] :: user key pair
++ keys :: twitter-key type acc=[tok=@t sec=@t] :: app key pair
$: con=[tok=@t sec=@t] :: user key pair ==
acc=[tok=@t sec=@t] :: app key pair ::
== ++ command :: poke action
$% [%auth p=keys] :: set API keys
[%post p=@uvI q=cord] :: post a tweet
==
--
-- --