# GTFS RealTime Haskell protobuf definitions for [GTFS RealTime][1] feed data. Autogenerated by and supposed to be used with [protocol-buffers][2]. ### Usage example ```haskell {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Data.ByteString.Lazy as LBS import Data.Function import GTFS.RealTime.Protobuf.FeedMessage import Network.HTTP.Simple (Request, setRequestQueryString, httpLBS, getResponseBody) import qualified Text.ProtocolBuffers as Protobuf main :: IO () main = do resp <- httpLBS $ "http://transport.orgp.spb.ru/Portal/transport/internalapi/gtfs/realtime/vehicle" & setRequestQueryString [("routeIDs", Just "1843")] msg <- case Protobuf.messageGet $ getResponseBody resp of Left err -> fail err Right (msg :: FeedMessage, "") -> pure msg _ -> fail "parse incomplete" -- | You now have FeedMessage parsed print msg ``` ### Source proto file This [transport.proto][3] file was used to generate the modules, it is the same as provided [here][4], only with modified package name. [1]: https://developers.google.com/transit/gtfs-realtime/reference/ [2]: http://hackage.haskell.org/package/protocol-buffers [3]: https://github.com/CthulhuDen/gtfs-realtime/blob/master/transport.proto [4]: https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto