nationstates: NationStates API client

[ apache, library, network, web ] [ Propose Tags ]

NationStates API client

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.1.0,,,,,,,,,,, (info)
Dependencies base (>=4.6 && <5), bytestring, clock, containers, http-client, http-client-tls, http-types, multiset, tls (>=1.3.3), transformers, xml [details]
License Apache-2.0
Copyright 2015 Chris Wong
Author Chris Wong
Category Network, Web
Home page
Source repo head: git clone
Uploaded by ChrisWong at 2015-10-29T05:38:58Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 7589 total (25 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-10-30 [all 1 reports]

Readme for nationstates-

[back to package description]

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.


  • Type safe: you can't refer to a shard unless you explicitly request it.

  • Automatic rate limiting, which can be disabled or overridden if you want.

  • HTTPS support via the tls library.

  • Free and open source under the Apache License, version 2.0.


  • GHC 7.6 or newer


nationstates is hosted on Hackage.

cabal install nationstates


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

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