 : set-request-twitter-auth ( request -- request )
     twitter-username get twitter-password get set-basic-auth ;
 
-: twitter-request ( string quot -- data )
-    [ twitter-url ] dip call
+: twitter-request ( request -- data )
     set-request-twitter-auth
     http-request nip ; inline
 

<PRIVATE

: timeline ( url -- tweets )
    [ <get-request> ] twitter-request json>twitter-statuses ;

PRIVATE>


    [
        "status" set
        twitter-source get "source" set
    ] H{ } make-assoc ;

: (tweet) ( string -- json )
    update-post-data "update" twitter-url
    <post-request> twitter-request ;

PRIVATE>

