wmata
wmata is a high level Rust interface to the Washington Metropolitan Area Transit Authority API.
Contents
Requirements
- Rust 2018
Installation
Cargo
= "5.0.0"
Usage
Getting Started
use ;
let client = new;
let trains = client.next_trains?;
Design
wmata breaks the WMATA API into two components: MetroRail and MetroBus.
MetroRail
Provides access to all MetroRail related endpoints.
Using MetroRail
use ;
let client = new;
let trains = client.next_trains?;
MetroBus
Provides access to all MetroBus related endpoints.
Using MetroBus
use MetroBus;
let client = new;
let routes = client.routes?;
Testing
Note that tests must currently be run with --test-threads 1 in order to pass, due to using live data.
Dependencies
- serde
- serde_json
- reqwest
- chrono
Contact
Feel free to email questions and comments to emma@emma.sh
License
wmata is released under the MIT license. See LICENSE for details.