-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Post tweets from stdin -- -- a Command Line Interface Tweeter @package clit @version 0.4.0.6 -- | Various utilities to tweet using the twitter api -- -- Make sure you have a file credentials file (default the executable -- looks for is `.cred`) with the following info: -- --
--   api-key: API_KEY
--   
--   api-sec: API_SECRE
--   
--   tok: OAUTH_TOKEN
--   
--   tok-sec: TOKEN_SECRET
--   
module Web.Tweet -- | Tweet a string given a path to credentials; return the id of the -- status. -- --
--   basicTweet "On the airplane." ".cred"
--   
basicTweet :: String -> FilePath -> IO Int -- | tweet, given a Tweet and path to credentials. Return id of -- posted tweet. tweetData :: Tweet -> FilePath -> IO Int -- | thread tweets together nicely. Takes a string, a list of handles to -- reply to, plus the ID of the status you're replying to. If you need to -- thread tweets without replying, pass a Nothing as the third -- argument. -- --
--   thread "Hi I'm back in New York!" ["friend1","friend2"] Nothing 1 ".cred"
--   
thread :: String -> [String] -> Maybe Int -> Int -> FilePath -> IO () -- | Default value for Bool for trim_user (True in our case) -- | Data type for our request: consists of the status text, whether to -- trium user information in the response, the handles to mention, and -- optionally the id of the status to reply to. data Tweet Tweet :: String -> Bool -> [String] -> Maybe Int -> Tweet [_status] :: Tweet -> String [_trimUser] :: Tweet -> Bool [_handles] :: Tweet -> [String] [_replyID] :: Tweet -> Maybe Int -- | Data type for tweets as they are returned data TweetEntity TweetEntity :: String -> String -> Maybe String -> Int -> Bool -> Int -> Int -> TweetEntity [_text] :: TweetEntity -> String [_name] :: TweetEntity -> String [_screenName] :: TweetEntity -> Maybe String [_tweetId] :: TweetEntity -> Int [_isQuoteStatus] :: TweetEntity -> Bool [_retweets] :: TweetEntity -> Int [_favorites] :: TweetEntity -> Int -- | Stores data like (name, text, favoriteCount, retweetCount) type Timeline = [(String, String, String, String)] trimUser :: Lens' Tweet Bool status :: Lens' Tweet String replyID :: Lens' Tweet (Maybe Int) handles :: Lens' Tweet [String] tweetId :: Lens' TweetEntity Int text :: Lens' TweetEntity String screenName :: Lens' TweetEntity (Maybe String) retweets :: Lens' TweetEntity Int name :: Lens' TweetEntity String isQuoteStatus :: Lens' TweetEntity Bool favorites :: Lens' TweetEntity Int -- | Sign a request using your OAuth dev token. Uses the IO monad because -- signatures require a timestamp signRequest :: FilePath -> Request -> IO Request -- | Convert a tweet to a percent-encoded url for querying an API urlString :: Tweet -> String -- | Get a timeline getTimeline :: Show t => t -> FilePath -> IO (Either (ParseError Char Dec) Timeline) -- | Display user timeline showTimeline :: Show t => t -> Bool -> FilePath -> IO String -- | Get user profile given screen name and how many tweets to return getProfile :: Show t => [Char] -> t -> FilePath -> IO (Either (ParseError Char Dec) Timeline) -- | Show a user profile given screen name, how many tweets to return (API -- maximum is 3200), and whether to print them in color. showProfile :: Show t => String -> t -> Bool -> FilePath -> IO String -- | Get user's DMs. getDMs :: Show t => t -> FilePath -> IO (Either (ParseError Char Dec) Timeline) -- | Show your DMs, given how many to return and whether or not to use -- color. showDMs :: Show t => t -> Bool -> FilePath -> IO String -- | Get tweets (text only) for some user getRaw :: [Char] -> FilePath -> IO [String] -- | Provides IO action that parses command line options and tweetInputs -- from stdin module Web.Tweet.Exec -- | Executes parser exec :: IO () -- | Data type for our program: one optional path to a credential file, -- (optionally) the number of tweetInputs to make, the id of the status -- you're replying to, and a list of users you wish to mention. data Program Program :: Command -> Maybe FilePath -> Program [subcommand] :: Program -> Command [cred] :: Program -> Maybe FilePath -- | Data type for a data Command Timeline :: Maybe Int -> Bool -> Command [count] :: Command -> Maybe Int [color] :: Command -> Bool SendInput :: Maybe Int -> Maybe String -> Maybe [String] -> Command [tweetInputs] :: Command -> Maybe Int [replyId] :: Command -> Maybe String [replyHandles] :: Command -> Maybe [String] Profile :: Maybe Int -> Bool -> String -> Command [count] :: Command -> Maybe Int [color] :: Command -> Bool [screenName] :: Command -> String Raw :: String -> Command [screenName] :: Command -> String Send :: Maybe Int -> Maybe String -> Maybe [String] -> String -> Command [tweets] :: Command -> Maybe Int [replyId] :: Command -> Maybe String [replyHandles] :: Command -> Maybe [String] [userInput] :: Command -> String