[−][src]Crate monzo_lib
This crate is an async Monzo API client in pure rust.
It is intended as the backend of a monzo CLI app that i'll probably never get to building.
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 docs)
Usage
use monzo_lib::{Client, Result}; #[tokio::main] async fn main() -> Result<()> { let client = Client::builder() .access_token("ACCESS_TOKEN") .refresh_token("REFRESH_TOKEN") .build(); let accounts = client.accounts().await?; let account_id = &accounts[0].id; let balance = client.balance(account_id).await?; Ok(()) }
Modules
accounts | |
balance | |
pots |
Structs
Client | Monzo Client |
ClientBuilder | The ClientBuilder is used for configuring and constructing a new Monzo Client |
Enums
Error | Common error type for anything that can go wrong with this crate |
Type Definitions
Result | Result type for all methods in this crate which can fail. |