Crates.io | motis-openapi-progenitor |
lib.rs | motis-openapi-progenitor |
version | 0.2.2 |
created_at | 2025-03-29 22:52:38.089672+00 |
updated_at | 2025-06-10 00:31:58.817788+00 |
description | API-wrapper around the motis api used for routing |
homepage | https://motis-project.de/ |
repository | https://github.com/TUM-Dev/navigatum |
max_upload_size | |
id | 1611804 |
size | 454,733 |
This API-client was automatically generated to support the motis v2 api. It was generated (mostly, some manual editing was done) using
See https://github.com/oxidecomputer/progenitor for docs on the generator used
wget https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml
sed -i 's/openapi: 3.1.0/openapi: 3.0.0/' openapi.yaml
cargo progenitor -i openapi.yaml -o motis-openapi-progenitor -n motis-openapi-progenitor -v 2.0.0 --interface builder
rm openapi.yaml
To use it, you can use the
Client
as following
# tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async {
let res = motis_openapi_progenitor::Client::new("https://api.transitous.org").plan()
.from_place("de-DELFI_000010073203") // landshut süd trains station
.to_place("48.1371079,11.5753822,0") // munich coordinate at level 0
.detailed_transfers(false)
.send().await.unwrap();
println!("{res:?}");
# });