wmata is a lightweight Rust interface to the Washington Metropolitan Area Transit Authority API.
toml
wmata = "2.0.0"
```rust use wmata::RailClient;
let client = RailClient::new(api_key);
let trains = client.next_trains()?; ```
wmata breaks the WMATA API into two components: RailClient
and BusClient
.
RailClient
Provides access to all MetroRail related endpoints.
BusClient
Provides access to all MetroBus related endpoints.
RailClient
```rust use wmata::RailClient;
let client = RailClient::new(api_key);
let trains = client.next_trains()?; ```
BusClient
```rust use wmata::BusClient;
let client = BusClient::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.swift is released under the MIT license. See LICENSE for details.