lambda-fairy / nationstates

:earth_americas: NationStates API client for Haskell
https://lambda.xyz/nationstates/
Apache License 2.0
4 stars 1 forks source link

NationStates for Haskell Build Status

NationStates is an online government simulation game, created by Max Barry. The site generates a wealth of data, some of which can be accessed through its official API.

This library lets you query this API using the Haskell programming language.

Features

Dependencies

Installation

nationstates is hosted on Hackage.

cabal install nationstates

Example

import NationStates
import qualified NationStates.Nation as Nation
import Text.Printf

main = do
    c <- newContext "ExampleBot/2000"
    (name, motto) <- Nation.run "Montesardo-East Adanzi" shards c
    printf "%s has the motto: %s\n" name motto
  where
    shards = (,) <$> Nation.name <*> Nation.motto