Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doco #90

Merged
merged 3 commits into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions Web/Twitter/Conduit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,28 @@ import qualified Data.Text.IO as T
-- or use the conduit wrapper 'sourceWithCursor' as below:
--
-- @
-- friends \<- 'sourceWithCursor' twInfo mgr ('friendsList' ('ScreenNameParam' \"thimura\") '&' #count '?~' 200) '$$' 'CL.consume'
-- friends \<- 'sourceWithCursor' twInfo mgr ('friendsList' ('ScreenNameParam' \"thimura\") '&' #count '?~' 200) '.|' 'CL.consume'
-- @
--
-- Statuses APIs, for instance, 'homeTimeline', are also wrapped by 'sourceWithMaxId'.
--
-- For example, you can print 1000 tweets from your home timeline, as below:
-- For example, you can print 60 tweets from your home timeline, as below:
--
-- @
-- main :: IO ()
-- main = do
-- mgr \<- 'newManager' 'tlsManagerSettings'
-- 'sourceWithMaxId' twInfo mgr 'homeTimeline'
-- $= CL.isolate 60
-- $$ CL.mapM_ $ \\status -> liftIO $ do
-- T.putStrLn $ T.concat [ T.pack . show $ status ^. statusId
-- , \": \"
-- , status ^. statusUser . userScreenName
-- , \": \"
-- , status ^. statusText
-- ]
-- runConduit $ 'sourceWithMaxId' twInfo mgr 'homeTimeline'
-- .| CL.isolate 60
-- .| CL.mapM_
-- (\\status -> do
-- T.putStrLn $
-- T.concat
-- [ T.pack . show $ status ^. statusId
-- , \": \"
-- , status ^. statusUser . userScreenName
-- , \": \"
-- , status ^. statusText
-- ]
-- )
-- @