getUserTimeline :: Token
                -> String -- ^ screen_name
                -> Maybe Int -- ^ number of record to retrieve
                -> IO (Result Timeline)
getUserTimeline tok sname mnum = do
    json <- callAPI GET tok "statuses/user_timeline" $ catMaybes [Just ("screen_name", sname)
                                                                 ,Just ("include_entities", "1")
                                                                 , ("count", ) . show <$> mnum]
    return $ json >>= decodeTimeline


-- | get rate limit status
-- return value is tuple of
-- (remaining_hits, hourly_limit)
getUserTimeline :: Token
                -> String -- ^ screen_name
                -> Maybe Int -- ^ number of record to retrieve
                -> IO (Result Timeline)
getUserTimeline tok sname mnum = do
    json <- callAPI GET tok "statuses/user_timeline" $ catMaybes [Just ("screen_name", sname)
                                                                 ,Just ("include_entities", "1")
                                                                 , ("count", ) . show <$> mnum]
    return $ json >>= decodeTimeline


-- | get rate limit status
-- return value is tuple of
-- (remaining_hits, hourly_limit)
getUserTimeline tok sname mnum = do
    json <- callAPI GET tok "statuses/user_timeline" $ catMaybes [Just ("screen_name", sname)
                                                                 ,Just ("include_entities", "1")
                                                                 , ("count", ) . show <$> mnum]
    return $ json >>= decodeTimeline


-- | get rate limit status
-- return value is tuple of
-- (remaining_hits, hourly_limit)