1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Client for the HAFAS ReST public transport API.
//!
//! The types follow the dialect versions [`DIALECT_VERSIONS`] of the API
//! and read both: fields that only one of them sends are optional. They
//! cover location search, departure and arrival boards, trip search, journey
//! details and the reconstruction of a trip.
//!
//! The crate is neutral towards the operator: it has no default base URL and
//! no policy for the access key.
//!
//! ```no_run
//! # async fn run() -> Result<(), hafas::Error> {
//! use hafas::{Client, LocationName};
//!
//! let client = Client::builder("https://hafas.example.org/api/")
//! .access_id("secret")
//! .user_agent("my-app/1.0 (+https://example.org)")
//! .build()?;
//! let list = client.send(&LocationName::new("Hauptwache")).await?;
//! for stop in list.stops() {
//! println!("{} {}", stop.ext_id, stop.name);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! The access key is a query parameter, so every request URL contains it.
//! The client keeps it out of everything it returns or logs: [`Client::url`]
//! leaves it out, errors carry no URL, and texts of the API that echo the key
//! have it replaced by [`REDACTED`].
//!
//! The client sends every request once. It does not retry, and it does not
//! cache: that is up to the caller.
pub use ;
pub use ;
pub use Error;
pub use ;
pub use Url;
pub use ;
/// The dialect versions of the API this crate reads.
pub const DIALECT_VERSIONS: = ;