From 23e45e0e14cce4164e296a1580cbc1b79d750a0b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 22 Oct 2020 18:27:13 -0400 Subject: [PATCH] add simple readme and doc edit --- README.md | 9 +++++++++ Urbit/Airlock.hs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f8c0e59 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Haskell Urbit API + +This library helps you talk to your Urbit from Haskell, via HTTP. + +The "Urbit Airlock" API is a command-query API that lets you hook into apps +running on your Urbit. You can submit commands (called "pokes") and subscribe to +responses. + +See the `test.hs` file for some example usages. diff --git a/Urbit/Airlock.hs b/Urbit/Airlock.hs index d492852..b979eec 100644 --- a/Urbit/Airlock.hs +++ b/Urbit/Airlock.hs @@ -31,6 +31,7 @@ import qualified Network.HTTP.Req as Req import qualified Network.HTTP.Req.Conduit as Req import qualified Text.URI as URI +-- | Some information about your ship needed to establish connection. data Ship = Ship { -- | A random string for your channel. uid :: Text, @@ -58,7 +59,6 @@ type Mark = Text -- | The `@p` for the ship (no leading ~). type ShipName = Text --- | nextEventId :: Ship -> Int nextEventId Ship {lastEventId} = lastEventId + 1