twitter-conduit-0.5.0: Twitter API package with conduit interface and Streaming API support.

Safe HaskellNone
LanguageHaskell2010

Web.Twitter.Conduit.Base

Synopsis

Documentation

type NoContent = () Source #

call Source #

Arguments

:: ResponseBodyType responseType 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName responseType 
-> IO responseType 

Perform an APIRequest and then provide the response which is mapped to a suitable type of twitter-types.

Example:

user <- call twInfo mgr $ accountVerifyCredentials
print user

If you need raw JSON value which is parsed by aeson, use call' to obtain it.

call' Source #

Arguments

:: ResponseBodyType value 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName responseType 
-> IO value 

Perform an APIRequest and then provide the response. The response of this function is not restrict to responseType, so you can choose an arbitrarily type of FromJSON instances.

callWithResponse Source #

Arguments

:: ResponseBodyType responseType 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName responseType 
-> IO (Response responseType) 

Perform an APIRequest and then provide the Response.

Example:

res <- callWithResponse twInfo mgr $ accountVerifyCredentials
print $ responseStatus res
print $ responseHeaders res
print $ responseBody res

callWithResponse' :: ResponseBodyType value => TWInfo -> Manager -> APIRequest apiName responseType -> IO (Response value) Source #

Perform an APIRequest and then provide the Response. The response of this function is not restrict to responseType, so you can choose an arbitrarily type of FromJSON instances.

Example:

res <- callWithResponse' twInfo mgr $ accountVerifyCredentials
print $ responseStatus res
print $ responseHeaders res
print $ responseBody (res :: Value)

sourceWithMaxId Source #

Arguments

:: (MonadIO m, FromJSON responseType, AsStatus responseType, HasParam "max_id" Integer supports) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports [responseType] 
-> ConduitT () responseType m () 

A wrapper function to perform multiple API request with changing max_id parameter.

This function cooperate with instances of HasMaxIdParam.

sourceWithMaxId' Source #

Arguments

:: (MonadIO m, HasParam "max_id" Integer supports) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports [responseType] 
-> ConduitT () Value m () 

A wrapper function to perform multiple API request with changing max_id parameter. The response of this function is not restrict to responseType, so you can choose an arbitrarily type of FromJSON instances.

This function cooperate with instances of HasMaxIdParam.

sourceWithCursor Source #

Arguments

:: (MonadIO m, FromJSON responseType, CursorKey ck, HasParam "cursor" Integer supports) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports (WithCursor Integer ck responseType) 
-> ConduitT () responseType m () 

A wrapper function to perform multiple API request with changing cursor parameter.

This function cooperate with instances of HasCursorParam.

sourceWithCursor' Source #

Arguments

:: (MonadIO m, CursorKey ck, HasParam "cursor" Integer supports) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports (WithCursor Integer ck responseType) 
-> ConduitT () Value m () 

A wrapper function to perform multiple API request with changing cursor parameter. The response of this function is not restrict to responseType, so you can choose an arbitrarily type of FromJSON instances.

This function cooperate with instances of HasCursorParam.

sourceWithSearchResult Source #

Arguments

:: (MonadIO m, FromJSON responseType) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports (SearchResult [responseType]) 
-> m (SearchResult (ConduitT () responseType m ())) 

A wrapper function to perform multiple API request with SearchResult.

sourceWithSearchResult' Source #

Arguments

:: MonadIO m 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest supports (SearchResult [responseType]) 
-> m (SearchResult (ConduitT () Value m ())) 

A wrapper function to perform multiple API request with SearchResult.

makeRequest :: APIRequest apiName responseType -> IO Request Source #