diff options
| author | Carlos Sosa <gnusosa@gnusosa.net> | 2019-07-31 22:43:08 -0700 |
|---|---|---|
| committer | Carlos Sosa <gnusosa@gnusosa.net> | 2019-07-31 22:43:08 -0700 |
| commit | 5bb95e50042fbd4de376a9d02c3ec6edf2eb1561 (patch) | |
| tree | dd13605a6895aa45dba5bb3efba01bbb846837d9 /app/Main.hs | |
| parent | adb2efc538cc780fbc3282f6be9706191bb057d0 (diff) | |
Remove app/Main.hs given that we are going to use separate exes
Diffstat (limited to 'app/Main.hs')
| -rw-r--r-- | app/Main.hs | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/app/Main.hs b/app/Main.hs deleted file mode 100644 index c2b7765..0000000 --- a/app/Main.hs +++ /dev/null @@ -1,48 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE FlexibleContexts #-} - -module Main where - -import Web.Twitter.Conduit -import Web.Twitter.Types.Lens -import Control.Lens -import Conduit -import qualified Data.Conduit.List as CL - -tokens :: OAuth -tokens = twitterOAuth - { oauthConsumerKey = "YOUR_OAUTH_CONSUMER_KEY" - , oauthConsumerSecret = "YOUR_OAUTH_CONSUMER_SECRET" - } - -credential :: Credential -credential = Credential - [ ("oauth_token", "YOUR_OAUTH_TOKEN") - , ("oauth_token_secret", "YOUR_OAUTH_TOKEN_SECRET") - ] - -twInfo :: TWInfo -twInfo = def - { twToken = def { twOAuth = tokens, twCredential = credential } - , twProxy = Nothing - } - -main :: IO () -main = do - mgr <- newManager tlsManagerSettings - putStrLn $ "# your home timeline (up to 200 tweets):" - destroyReqs <- runConduit $ - sourceWithMaxId twInfo mgr (userTimeline (ScreenNameParam "someUser")) - .| (CL.isolate 200) - .| (mapC (\status -> do - status ^. statusId)) - .| (mapC destroyId) - .| (mapC (\req -> do - callWithResponse twInfo mgr req)) - .| sinkList - - resp <- sequence destroyReqs - mapM_ (putStrLn . show) resp - - - |
