Safe Haskell | None |
---|---|
Language | Haskell2010 |
The Authentication API.
See https://www.nationstates.net/pages/api.html#authentication.
Here's a short example:
import NationStates
import qualified NationStates.Nation as Nation
import qualified NationStates.Verify as Nation
main = do
c <- newContext
"ExampleBot/2000"
ok <- Nation.run "The Vines" (Nation.verify checksum token) c
putStrLn $ if ok then "Success" else "Failure"
where
checksum = "CCT60sf2CfylDqSNzCMleqsvxrwjiG-9Zw4TXZjdMmk"
token = Just "testing123"