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

Safe HaskellNone
LanguageHaskell2010

Web.Twitter.Conduit.Types

Synopsis

Documentation

setCredential :: OAuth -> Credential -> TWInfo -> TWInfo Source #

set OAuth keys and Credentials to TWInfo.

>>> let proxy = Proxy "localhost" 8080
>>> let twinfo = def { twProxy = Just proxy }
>>> let oauth = twitterOAuth { oauthConsumerKey = "consumer_key", oauthConsumerSecret = "consumer_secret" }
>>> let credential = Credential [("oauth_token","...")]
>>> let twinfo2 = setCredential oauth credential twinfo
>>> oauthConsumerKey . twOAuth . twToken $ twinfo2
"consumer_key"
>>> twProxy twinfo2 == Just proxy
True