tweet-hs-1.0.2.1: Command-line tool for twitter

Safe HaskellNone
LanguageHaskell2010

Web.Tweet.API

Description

Module containing the functions directly dealing with twitter's API. Most functions in this module have two versions - one which takes a path to a TOML file containing api keyssecrets and tokenssecrets, the other takes api keyssecrets and tokenssecrets as an argument.

Synopsis

Documentation

getMarkov :: String -> Maybe Int -> FilePath -> IO [String] Source #

Get tweets (text only) for some user

getAll :: String -> Maybe Int -> FilePath -> IO Timeline Source #

Get all tweets by some user

tweetDataMem :: Tweet -> Config -> IO Int Source #

tweet, given a Tweet and a Config containing necessary data to sign the request.

tweetData :: Tweet -> FilePath -> IO Int Source #

tweet, given a Tweet and path to credentials. Return id of posted tweet.

getProfileMax :: String -> Int -> FilePath -> Maybe Int -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Gets user profile with max_id set.

getProfileMaxMem :: String -> Int -> Config -> Maybe Int -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Gets user profile with max_id set.

getProfileRaw :: String -> Int -> FilePath -> Maybe Int -> IO ByteString Source #

Gets user profile with max_id set.

getProfileRawMem :: String -> Int -> Config -> Maybe Int -> IO ByteString Source #

Gets user profile with max_id set

mentions :: Int -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Get mentions and parse response as a list of tweets

mentionsMem :: Int -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Get mentions and parse response as a list of tweets

searchMentionsRaw Source #

Arguments

:: Maybe Int

Max ID

-> String

Username

-> FilePath 
-> IO ByteString 

searchRepliesRaw Source #

Arguments

:: Maybe Int

Max ID

-> String

Username

-> Int

Tweet ID

-> FilePath 
-> IO ByteString 

muteMentions Source #

Arguments

:: String

Screen name

-> FilePath 
-> IO () 

getReplies Source #

Arguments

:: String

Screen name

-> Int

Tweet

-> FilePath 
-> IO (Either (ParseErrorBundle String Void) Timeline) 

mentionsRaw :: Int -> FilePath -> IO ByteString Source #

Gets mentions

mentionsRawMem :: Int -> Config -> IO ByteString Source #

Gets mentions

getProfile :: String -> Int -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Get user profile given screen name and how many tweets to return

mute :: String -> FilePath -> IO () Source #

Mute a user given their screen name

muteMem :: String -> Config -> IO () Source #

Mute a user given their screen name

unmute :: String -> FilePath -> IO () Source #

Unmute a user given their screen name

unmuteMem :: String -> Config -> IO () Source #

Unmute a user given their screen name

muteUserRaw :: String -> FilePath -> IO ByteString Source #

Mute a user given their screen name

muteUserRawMem :: String -> Config -> IO ByteString Source #

Mute a user given their screen name

unmuteUserRaw :: String -> FilePath -> IO ByteString Source #

Unmute a user given their screen name

unmuteUserRawMem :: String -> Config -> IO ByteString Source #

Unmute a user given their screen name

getDMsRaw :: Show p => p -> FilePath -> IO ByteString Source #

Get user's DMs.

getTimelineRaw :: Int -> FilePath -> IO ByteString Source #

Get a user's timeline and return response as a bytestring

getTimelineRawMem :: Int -> Config -> IO ByteString Source #

Get a user's timeline and return response as a bytestring

deleteTweet :: Integer -> FilePath -> IO () Source #

Delete a tweet given its id

deleteTweetMem :: Integer -> Config -> IO () Source #

Delete a tweet given its id

deleteTweetResponse :: Integer -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Get response, i.e. the tweet deleted

deleteTweetResponseMem :: Integer -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Get response, i.e. the tweet deleted

favoriteTweet :: Integer -> FilePath -> IO () Source #

Favorite a tweet given its id

favoriteTweetMem :: Integer -> Config -> IO () Source #

Favorite a tweet given its id

favoriteTweetList :: String -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Favorite a tweet and returned the (parsed) response

favoriteTweetListMem :: String -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Favorite a tweet and returned the (parsed) response

favoriteTweetResponse :: Integer -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Favorite a tweet and returned the (parsed) response

unfavoriteTweet :: Integer -> FilePath -> IO () Source #

Unfavorite a tweet given its id

unfavoriteTweetMem :: Integer -> Config -> IO () Source #

Unfavorite a tweet given its id

unfavoriteTweetResponse :: Integer -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Unfavorite a tweet and returned the (parsed) response

unfavoriteTweetResponseMem :: Integer -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Unfavorite a tweet and returned the (parsed) response

unretweetTweet :: Integer -> FilePath -> IO () Source #

Unretweet a tweet given its id

unretweetTweetMem :: Integer -> Config -> IO () Source #

Unretweet a tweet given its id

unretweetTweetResponse :: Integer -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Unretweet a tweet and returned the (parsed) response

unretweetTweetResponseMem :: Integer -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Unretweet a tweet and returned the (parsed) response

unfollow :: String -> FilePath -> IO () Source #

Unfollow a user given their screen name

unfollowMem :: String -> Config -> IO () Source #

Unfollow a user given their screen name

follow :: String -> FilePath -> IO () Source #

Follow a user given their screen name

followMem :: String -> Config -> IO () Source #

Follow a user given their screen name

block :: String -> FilePath -> IO () Source #

Block a user given their screen name

blockMem :: String -> Config -> IO () Source #

Block a user given their screen name

unblock :: String -> FilePath -> IO () Source #

Unblock a user given their screen name

unblockMem :: String -> Config -> IO () Source #

Unblock a user given their screen name

retweetTweet :: Integer -> FilePath -> IO () Source #

Retweet a tweet given its id

retweetTweetMem :: Integer -> Config -> IO () Source #

Retweet a tweet given its id

retweetTweetResponse :: Integer -> FilePath -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Retweet a tweet and returned the (parsed) response

retweetTweetResponseMem :: Integer -> Config -> IO (Either (ParseErrorBundle String Void) Timeline) Source #

Retweet a tweet and returned the (parsed) response

favoriteTweetListRaw :: String -> FilePath -> IO ByteString Source #

Get a lisr of favorited tweets by screen name; return bytestring response

favoriteTweetListRawMem :: String -> Config -> IO ByteString Source #

Get a lisr of favorited tweets by screen name; return bytestring response

favoriteTweetRaw :: Integer -> FilePath -> IO ByteString Source #

Favorite a tweet given its id; return bytestring response

favoriteTweetRawMem :: Integer -> Config -> IO ByteString Source #

Favorite a tweet given its idNum; return bytestring response

retweetTweetRaw :: Integer -> FilePath -> IO ByteString Source #

Retweet a tweet given its idNum; return bytestring response

retweetTweetRawMem :: Integer -> Config -> IO ByteString Source #

Retweet a tweet given its idNum; return bytestring response

sendDMRaw :: String -> String -> FilePath -> IO ByteString Source #

Send a DM given text, screen name of recipient.

getDMs :: Int -> FilePath -> IO ByteString Source #

Get DMs, return bytestring of response

getDMMem :: Int -> Config -> IO ByteString Source #

Get DMs, return bytestring of response

followUserRaw :: String -> FilePath -> IO ByteString Source #

Follow a user given their screen name

followUserRawMem :: String -> Config -> IO ByteString Source #

Follow a user given their screen name

blockUserRaw :: String -> FilePath -> IO ByteString Source #

Block a user given their screen name

blockUserRawMem :: String -> Config -> IO ByteString Source #

Block a user given their screen name

unblockUserRaw :: String -> FilePath -> IO ByteString Source #

Unblock a user given their screen name

unblockUserRawMem :: String -> Config -> IO ByteString Source #

Unblock a user given their screen name

unfollowUserRaw :: String -> FilePath -> IO ByteString Source #

Follow a user given their screen name

unfollowUserRawMem :: String -> Config -> IO ByteString Source #

Follow a user given their screen name

unretweetTweetRaw :: Integer -> FilePath -> IO ByteString Source #

Unretweet a tweet given its id; return bytestring response

unretweetTweetRawMem :: Integer -> Config -> IO ByteString Source #

Unretweet a tweet given its idNum; return bytestring response

unfavoriteTweetRaw :: Integer -> FilePath -> IO ByteString Source #

Unfavorite a tweet given its idNum; return bytestring response

unfavoriteTweetRawMem :: Integer -> Config -> IO ByteString Source #

Unfavorite a tweet given its idNum; return bytestring response

deleteTweetRaw :: Integer -> FilePath -> IO ByteString Source #

Delete a tweet given its idNum; return bytestring response

deleteTweetRawMem :: Integer -> Config -> IO ByteString Source #

Delete a tweet given its idNum; return bytestring response