Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TWToken = TWToken {}
- data TWInfo = TWInfo {}
- twitterOAuth :: OAuth
- setCredential :: OAuth -> Credential -> TWInfo -> TWInfo
Documentation
twitterOAuth :: OAuth Source #
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