| Crates.io | iceportal |
| lib.rs | iceportal |
| version | 3.1.1 |
| created_at | 2022-12-28 21:16:30.551723+00 |
| updated_at | 2025-06-10 21:41:02.976822+00 |
| description | Fetch data from the iceportal api in a train |
| homepage | |
| repository | https://github.com/AdriDevelopsThings/iceportal_rs |
| max_upload_size | |
| id | 746989 |
| size | 94,147 |
Fetch data from the iceportal api in a train
cargo add iceportal
Look to the documentation to see response structs.
Make a request to the /api1/rs/status api.
use iceportal::ICEPortal;
let status_response = ICEPortal::fetch_status().await.unwrap();
println!("{:?}", status_response);
Make a request to the /bap/api/bap-service-status api.
use iceportal::ICEPortal;
let bap_response = ICEPortal::fetch_bap().await.unwrap();
println!("{:?}", bap_response);
Make a request to the /api1/rs/tripInfo/trip api.
use iceportal::ICEPortal;
let trip_info_response = ICEPortal::fetch_trip_info().await.unwrap();
println!("{:?}", trip_info_response);
Make a request to the /api1/rs/tripInfo/connection/EVA_NUMBER api.
use iceportal::ICEPortal;
let eva_nr = "8073368";
let connection_response = ICEPortal::fetch_connection(eva_nr).await.unwrap();
println!("{:?}", connection_response);