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

Safe HaskellNone
LanguageHaskell2010

Web.Twitter.Conduit.Base

Synopsis

Documentation

call Source #

Arguments

:: FromJSON 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

:: FromJSON 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

:: FromJSON 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' :: FromJSON 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

:: (MonadBase IO m, FromJSON responseType, AsStatus responseType, HasMaxIdParam (APIRequest apiName [responseType])) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName [responseType] 
-> Source m responseType 

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

This function cooperate with instances of HasMaxIdParam.

sourceWithMaxId' Source #

Arguments

:: (MonadBase IO m, HasMaxIdParam (APIRequest apiName [responseType])) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName [responseType] 
-> Source m Value 

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

:: (MonadBase IO m, FromJSON responseType, CursorKey ck, HasCursorParam (APIRequest apiName (WithCursor ck responseType))) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName (WithCursor ck responseType) 
-> Source m responseType 

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

This function cooperate with instances of HasCursorParam.

sourceWithCursor' Source #

Arguments

:: (MonadBase IO m, CursorKey ck, HasCursorParam (APIRequest apiName (WithCursor ck responseType))) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName (WithCursor ck responseType) 
-> Source m Value 

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

:: (MonadBase IO m, FromJSON responseType) 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName (SearchResult [responseType]) 
-> m (SearchResult (Source m responseType)) 

A wrapper function to perform multiple API request with SearchResult.

sourceWithSearchResult' Source #

Arguments

:: MonadBase IO m 
=> TWInfo

Twitter Setting

-> Manager 
-> APIRequest apiName (SearchResult [responseType]) 
-> m (SearchResult (Source m Value)) 

A wrapper function to perform multiple API request with SearchResult.

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