3 releases

0.1.2 Aug 14, 2024
0.1.1 Aug 14, 2024
0.1.0 Aug 11, 2024

#671 in Encoding

Download history 356/week @ 2024-08-11 42/week @ 2024-08-18 43/week @ 2024-08-25 105/week @ 2024-09-01 31/week @ 2024-09-08

231 downloads per month
Used in 3 crates

MIT AND Apache-2.0

25KB

gtfs-realtime

This library is a fork of the original https://github.com/barzamin/gtfs-rt.


lib.rs:

Decoding and Encoding example GTFS data example

use prost::Message;

let url = "https://lbtgtfs.lbtransit.com/TMGTFSRealTimeWebService/Vehicle/VehiclePositions.pb";
let response = reqwest::get(url).await.unwrap();
let bytes = response.bytes().await.unwrap();
let data: Result<gtfs_realtime::FeedMessage, prost::DecodeError> = prost::Message::decode(bytes.as_ref());
let data = data.unwrap();

//encode back into protobuf
let rencoded = data.encode_to_vec();

Dependencies

~1.1–3.5MB
~60K SLoC