nationstates-0.5.0.0: NationStates API client

Safe HaskellNone
LanguageHaskell2010

NationStates.Verify

Description

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"

Synopsis

Documentation

verify Source

Arguments

:: String

Checksum

-> Maybe String

Site-specific token

-> Nation Bool 

Add an authentication token to an existing Nation request.