aboutsummaryrefslogtreecommitdiff
path: root/lib/API.hs
diff options
context:
space:
mode:
authorstuebinm2024-05-16 22:07:35 +0200
committerstuebinm2024-05-16 22:07:35 +0200
commit403c2c7ade31861c36334f0185b644e38d2dd71f (patch)
tree9a752a80c1081807cbef22e65fbbfbd37ab8807c /lib/API.hs
parentf7b461e244b825b443eee429bbafa8797d7dc56c (diff)
new feature: Server.Frontend.Ticker
A simple way to have "announcements" available via API, and otherwise distinct from the service announcements which show up in Gtfs Realtime. These are meant to go e.g. be embedded on the operator's website, or in other places where it's not as easy to display per-trip specific messages.
Diffstat (limited to 'lib/API.hs')
-rw-r--r--lib/API.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/API.hs b/lib/API.hs
index 7ebfb06..416f71e 100644
--- a/lib/API.hs
+++ b/lib/API.hs
@@ -69,6 +69,7 @@ type API =
"tracker" :> "register" :> ReqBody '[JSON] RegisterJson :> Post '[JSON] Token
:<|> "tracker" :> "ping" :> ReqBody '[JSON] SentPing :> Post '[JSON] (Maybe TrainAnchor)
:<|> "tracker" :> "ping" :> "ws" :> WebSocket
+ :<|> "ticker" :> "current" :> Get '[JSON] Value
:<|> "ticket" :> "subscribe" :> Capture "Ticket Id" UUID :> WebSocket
:<|> "debug" :> "pings" :> Get '[JSON] (Map Token [TrainPing])
:<|> "debug" :> "pings" :> Capture "Ticket Id" UUID :> Get '[JSON] [TrainPing]