diff options
| author | Carlos Sosa <gnusosa@gnusosa.net> | 2019-08-01 00:09:54 -0700 |
|---|---|---|
| committer | Carlos Sosa <gnusosa@gnusosa.net> | 2019-08-01 00:09:54 -0700 |
| commit | 4d98dc944c17961b2c1f9bf0a92274700d20ccb4 (patch) | |
| tree | 1c0eb8c1471cc07ce55d833818d8041235b96461 | |
| parent | 5bb95e50042fbd4de376a9d02c3ec6edf2eb1561 (diff) | |
Add logic to erase follower that already exists as a list memberfeat/adding-diffs-lists-contacts
| -rw-r--r-- | app/diff-lists-contacts/Main.hs | 9 | ||||
| -rw-r--r-- | package.yaml | 13 |
2 files changed, 18 insertions, 4 deletions
diff --git a/app/diff-lists-contacts/Main.hs b/app/diff-lists-contacts/Main.hs index 671100c..523de3e 100644 --- a/app/diff-lists-contacts/Main.hs +++ b/app/diff-lists-contacts/Main.hs @@ -32,13 +32,18 @@ main = do mgr <- newManager tlsManagerSettings putStrLn $ "# your home timeline (up to 200 tweets):" listMembers <- runConduit $ - sourceWithMaxId twInfo mgr (listMembers (ListNameParam "user/someList")) + sourceWithCursor twInfo mgr (listsMembers (ListNameParam "user/someList")) .| (CL.isolate 200) .| (mapC (\user -> do user ^. userId)) + .| (mapC UserIdParam) + .| (mapC friendshipsDestroy) + .| (mapC (\req -> do + callWithResponse twInfo mgr req)) .| sinkList - mapM_ (putStrLn . show) listMembers + resp <- sequence listMembers + mapM_ (putStrLn . show) resp diff --git a/package.yaml b/package.yaml index 9c3e120..8bab728 100644 --- a/package.yaml +++ b/package.yaml @@ -33,9 +33,18 @@ library: source-dirs: src executables: - twitter-tools-exe: + diff-lists-contacts: main: Main.hs - source-dirs: app + source-dirs: app/diff-lists-contacts + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - twitter-tools + timeline-delete: + main: Main.hs + source-dirs: app/timeline-delete ghc-options: - -threaded - -rtsopts |
