The Haskell dgs
Library
Dragon Go Server publishes a bot-friendly interface. This library aims to make it easy to access that interface from Haskell. There is no good way to give a screenshot, but the following interaction from the documentation should give a feel for how the library can be used:
*Network.DGS> browse (silence >> login development "smartypants" "password") LoginSuccess *Network.DGS> browse (silence >> statusUID production 4155) >>= mapM_ print (453881,"jedge42",False,"2009-12-21 03:14 GMT","F: 30d 1h") (532927,"bartnix",False,"2009-12-20 06:06 GMT","F: 21d 13h") *Network.DGS> browse (silence >> statusUser production "dmwit") >>= mapM_ print (453881,"jedge42",False,"2009-12-21 03:14 GMT","F: 30d 1h") (532927,"bartnix",False,"2009-12-20 06:06 GMT","F: 21d 13h") *Network.DGS> :{ *Network.DGS| browse $ do { *Network.DGS| silence; *Network.DGS| login development "smartypants" "password"; *Network.DGS| (_, [(gid, _, black, _, _)]) <- status development; *Network.DGS| move development gid black (16, 18) (17, 16) *Network.DGS| } *Network.DGS| :} MoveSuccess
Documentation for the library is available on Hackage. New releases will be announced on the Haskell mailing list. Bugs should go to the bug tracker. Log in with the user name "guest" and password "secret" to see the current bugs and feature requests; log back out to submit a new bug or feature request. You can
- download the source for version 0.1 (released 21 December, 2009)
cabal install dgs
, assuming you have the cabal-install tool, to get all the dependencies automaticallygit clone http://dmwit.com/dgs/.git
for the latest, unstable version, whatever state it happens to be in