]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/Twitter/Http.hs
Rewrite CommandLine to use cmdargs and integrate the command-line and RC file options.
[dead/halcyon.git] / src / Twitter / Http.hs
index 3b834859f37fcdbeeec0892588024da794238d60..be10b8697a5be241a23b22ca0e8b5b197ab54013 100644 (file)
@@ -1,4 +1,8 @@
-module Twitter.Http
+module Twitter.Http (
+  get_user_new_statuses,
+  get_user_timeline,
+  http_get
+  )
 where
 
 import qualified Data.ByteString.Lazy as B
@@ -13,7 +17,7 @@ import Web.Authenticate.OAuth (
   newOAuth,
   signOAuth)
 
-import Configuration
+import Configuration (Cfg(..))
 
 -- |The API URL of username's timeline.
 --
@@ -32,13 +36,6 @@ user_timeline_url username =
            "&include_rts=true&",
            "count=10" ]
 
-status_url :: Integer -> String
-status_url status_id =
-  concat [ "https://api.twitter.com/",
-           "1.1/",
-           "statuses/",
-           "show.json?id=",
-           (show status_id) ]
 
 -- | Given username's last status id, constructs the API URL for
 --   username's new statuses. Essentially, 'user_timeline_url' with a
@@ -50,11 +47,6 @@ user_new_statuses_url username last_status_id =
     url = user_timeline_url username
     since_id = show last_status_id
 
-get_status :: Cfg -> Integer -> IO B.ByteString
-get_status cfg status_id = do
-  let uri = status_url status_id
-  http_get cfg uri
-
 
 -- | Return's username's timeline.
 get_user_timeline :: Cfg -> String -> IO B.ByteString