wmata is a high level Rust interface to the Washington Metropolitan Area Transit Authority API.
toml
wmata = "3.0.0"
```rust use wmata::MetroRail;
let client = MetroRail::new(api_key);
let trains = client.next_trains()?; ```
wmata breaks the WMATA API into two components: MetroRail
and MetroBus
.
MetroRail
Provides access to all MetroRail related endpoints.
MetroRail
```rust use wmata::MetroRail;
let client = MetroRail::new(api_key);
let trains = client.next_trains()?; ```
MetroBus
Provides access to all MetroBus related endpoints.
MetroBus
```rust use wmata::MetroBus;
let client = MetroBus::new(api_key);
let routes = client.routes()?; ```
Note that tests must currently be run with --test-threads 1
in order to pass, due to using live data.
Feel free to email questions and comments to emma@emma.sh
wmata is released under the MIT license. See LICENSE for details.