citymapper-rs Build Status Crates.io Docs

This is a tiny library wrapping the citymapper API in a futures aware interface.

Usage

Install the thing

cargo install citymapper

Use the thing

```rust extern crate chrono; extern crate tokiocore; extern crate citymapper; use tokiocore::reactor::Core;

fn main() { let apikey = "".tostring(); let startcoord = (51.525246, 0.084672); let endcoord = (51.559098, 0.074503); let mut core = Core::new().unwrap(); let handle = core.handle(); let client = citymapper::ClientBuilder::new(&handle, apikey).build(); let timeinfo = citymapper::TimeConstraint::arrivalby( chrono::Utc::now() + chrono::Duration::seconds(1800), ); let responsefuture = client.traveltime(startcoord, endcoord, timeinfo); let response = core.run(response_future).unwrap(); println!("Response: {:?}", response); } ```

See the documentation for more details.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.