File: fav.hs

package info (click to toggle)
haskell-twitter-conduit 0.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 284 kB
  • sloc: haskell: 2,066; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 482 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{-# LANGUAGE OverloadedStrings #-}

module Main where

import Common
import Web.Twitter.Conduit

import Control.Lens
import System.Environment

main :: IO ()
main = do
    [statusIdStr] <- getArgs
    twInfo <- getTWInfoFromEnv
    mgr <- newManager tlsManagerSettings
    let sId = read statusIdStr

    targetStatus <- call twInfo mgr $ statusesShowId sId
    putStrLn $ "Favorite Tweet: " ++ targetStatus ^. to show
    res <- call twInfo mgr $ favoritesCreate sId
    print res