iceportal

Crates.ioiceportal
lib.rsiceportal
version
sourcesrc
created_at2022-12-28 21:16:30.551723
updated_at2024-12-08 19:57:43.051755
descriptionFetch data from the iceportal api in a train
homepage
repositoryhttps://github.com/AdriDevelopsThings/iceportal_rs
max_upload_size
id746989
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
AdriDevelopsThings (AdriDevelopsThings)

documentation

README

iceportal_rs

Fetch data from the iceportal api in a train

Install

cargo add iceportal

Using

Look to the documentation to see response structs.

Status query

Make a request to the /api1/rs/status api.

use iceportal::ICEPortal;

let status_response = ICEPortal::fetch_status().await.unwrap();
println!("{:?}", status_response);

BAP (Bestellen am Platz) query

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);

Trip info query

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);

Connection query

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);
Commit count: 29

cargo fmt