--- |Return's username's timeline, or 'Nothing' if there was an error.
-get_user_timeline :: String -> IO (Maybe String)
-get_user_timeline username = do
- let uri = (user_timeline_url username)
- timeline <- (http_get uri)
- return timeline
-
-
--- | Returns the XML representing all of username's statuses that are
--- newer than last_status_id.
-get_user_new_statuses :: String -> Integer -> IO (Maybe String)
-get_user_new_statuses username last_status_id = do
- let uri = (user_new_statuses_url username last_status_id)
- new_statuses <- (http_get uri)
- return new_statuses
-
-
--- | Options that will be passed to every curl request.
-curl_options :: [CurlOption]
-curl_options =
- [ CurlTimeout 45,
- -- The Global cache is not thread-friendly.
- CurlDNSUseGlobalCache False,
- -- And we don't want to use a DNS cache anyway.
- CurlDNSCacheTimeout 0 ]
+-- | Return's username's timeline.
+--
+get_user_timeline :: Cfg -> String -> IO B.ByteString
+get_user_timeline cfg username = do
+ let uri = user_timeline_url username
+ http_get cfg uri