 : set-request-twitter-auth ( request -- request )
     [ <oauth-request-params> set-oauth ] with-twitter-oauth ;
 
-: twitter-request ( request -- data )
+: http-twitter-request ( request -- data )
     set-request-twitter-auth http-request* ; inline
 
 PRIVATE>


: tweet ( string -- ) (tweet) drop ;

: verify-credentials ( -- foo )
    "1.1/account/verify_credentials.json" twitter-url
    <get-request> twitter-request json> ;

! Timelines
<PRIVATE

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

PRIVATE>

: public-timeline ( -- tweets )
    "public_timeline" timeline ;


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

PRIVATE>

