Crates.io | monzo-lib |
lib.rs | monzo-lib |
version | |
source | src |
created_at | 2019-10-15 11:08:53.797779+00 |
updated_at | 2025-04-05 16:32:06.924961+00 |
description | async Monzo client in pure rust. |
homepage | https://github.com/danieleades/monzo-lib |
repository | https://github.com/danieleades/monzo-lib |
max_upload_size | |
id | 172665 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This crate is a Monzo client in pure rust.
It's ergonomic, strongly-typed, and asynchronous.
In order to use this client, you will first need to get an access token and/or refresh token for the Monzo API (see the monzo API docs)
use monzo::Client;
#[tokio::main]
async fn main() -> monzo::Result<()> {
// You can create a simple monzo client using only an access token
let quick_client = Client::new("ACCESS_TOKEN");
// get a list of accounts
let accounts = quick_client.accounts().await?;
// get the id of one of the accounts
let account_id = &accounts[0].id;
// get the balance of that account
let balance = quick_client.balance(account_id).await?;
// If you have a refresh token and client credentials
// you can create or upgrade a client which is capable
// of refreshing its own access token.
let mut refreshable_client =
quick_client.with_refresh_tokens("CLIENT_ID", "CLIENT_SECRET", "REFRESH_TOKEN");
refreshable_client.refresh_auth().await?;
Ok(())
}
see the following issue tags for good starting points for contributions
or checkout the project board
There are a couple of small gaps in the API surface, but the majority of the endpoints are already supported. If you need a piece of functionality that is not yet implemented, please open an issue or even better, a pull request.
License: Apache-2.0
Was this useful? Buy me a coffee