mirror of
https://github.com/bsima/haskell-urbit-api.git
synced 2024-10-27 02:30:46 +03:00
add simple readme and doc edit
This commit is contained in:
parent
0fa5ac2461
commit
23e45e0e14
9
README.md
Normal file
9
README.md
Normal file
@ -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.
|
@ -31,6 +31,7 @@ import qualified Network.HTTP.Req as Req
|
|||||||
import qualified Network.HTTP.Req.Conduit as Req
|
import qualified Network.HTTP.Req.Conduit as Req
|
||||||
import qualified Text.URI as URI
|
import qualified Text.URI as URI
|
||||||
|
|
||||||
|
-- | Some information about your ship needed to establish connection.
|
||||||
data Ship = Ship
|
data Ship = Ship
|
||||||
{ -- | A random string for your channel.
|
{ -- | A random string for your channel.
|
||||||
uid :: Text,
|
uid :: Text,
|
||||||
@ -58,7 +59,6 @@ type Mark = Text
|
|||||||
-- | The `@p` for the ship (no leading ~).
|
-- | The `@p` for the ship (no leading ~).
|
||||||
type ShipName = Text
|
type ShipName = Text
|
||||||
|
|
||||||
-- |
|
|
||||||
nextEventId :: Ship -> Int
|
nextEventId :: Ship -> Int
|
||||||
nextEventId Ship {lastEventId} = lastEventId + 1
|
nextEventId Ship {lastEventId} = lastEventId + 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user