Crates.io | monzo |
lib.rs | monzo |
version | 0.0.2 |
source | src |
created_at | 2017-08-26 16:18:29.511446 |
updated_at | 2017-09-02 14:45:00.737782 |
description | A library that wraps over the Monzo API in a future aware manner. |
homepage | https://github.com/nielsegberts/rust-monzo |
repository | https://github.com/nielsegberts/rust-monzo |
max_upload_size | |
id | 29288 |
size | 27,464 |
This is a library that wraps over the Monzo API in a future aware manner.
extern crate monzo;
extern crate tokio_core;
let mut core = tokio_core::reactor::Core::new().unwrap();
let monzo = monzo::Client::new(&core.handle(), "<access_token>");
let work = monzo.balance("<account_id>".into());
let response = core.run(work).unwrap();
println!("Balance: {} {}", response.balance, response.currency);
println!("Spent today: {}", response.spend_today);
Send me a pull request if you want to help out!
Tests use mockito so need to be ran one at the time:
cargo test -- --test-threads=1
Inspired by citymapper-rs and monzo-rust.