X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FTwitter%2FHttp.hs;h=c8b8e470b5d0f9cfafdaea0df39b89fbf26f495a;hp=112c2ea2fa293f75aa16382ab7770b07c9607c2f;hb=cf0e5470657c80d2e4db116b309e8ca35b4136ad;hpb=9b6d95a82745ced2a58d9bc4ded555ee36b36673 diff --git a/src/Twitter/Http.hs b/src/Twitter/Http.hs index 112c2ea..c8b8e47 100644 --- a/src/Twitter/Http.hs +++ b/src/Twitter/Http.hs @@ -49,26 +49,23 @@ user_new_statuses_url username last_status_id = get_status :: Integer -> IO B.ByteString get_status status_id = do - let uri = (status_url status_id) - status <- (http_get uri) - return status + let uri = status_url status_id + http_get uri -- | Return's username's timeline. get_user_timeline :: String -> IO B.ByteString get_user_timeline username = do - let uri = (user_timeline_url username) - timeline <- (http_get uri) - return timeline + let uri = user_timeline_url username + http_get uri -- | Returns the JSON representing all of username's statuses that are -- newer than last_status_id. get_user_new_statuses :: String -> Integer -> IO B.ByteString 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 + let uri = user_new_statuses_url username last_status_id + http_get uri -- | Retrieve a URL, or crash.