diff options
author | stuebinm | 2022-12-12 01:36:59 +0100 |
---|---|---|
committer | stuebinm | 2022-12-12 01:36:59 +0100 |
commit | 9b9e6934f74f8f1a95cdf4c22b57770d62091aea (patch) | |
tree | 10538bca4619bfb9d17418326edebe412e76aeb9 /lib/API.hs | |
parent | 13d3f3afd894c556a9b34bc1e56fdab387d3f6e2 (diff) |
a subscribe websocket for real-time location info
(for a leaflet map view or sth which isn't implemented yet)
Diffstat (limited to 'lib/API.hs')
-rw-r--r-- | lib/API.hs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -61,6 +61,7 @@ type API = "stations" :> Get '[JSON] (Map StationID Station) -- TODO: perhaps a websocket instead? :<|> "train" :> "ping" :> ReqBody '[JSON] TrainPing :> Post '[JSON] (Maybe TrainAnchor) :<|> "train" :> "ping" :> "ws" :> WebSocket + :<|> "train" :> "subscribe" :> Capture "Trip ID" TripID :> WebSocket -- debug things :<|> "debug" :> "pings" :> Get '[JSON] (Map Token [TrainPing]) :<|> "debug" :> "pings" :> Capture "Trip ID" TripID :> Capture "day" Day :> Get '[JSON] [TrainPing] |