Expand description
§Up Bank API wrapper
This crate is an API wrapper for the Up Bank API.
§Example Usage
use uprs::api_endpoints::ListAccounts;
use uprs::models::Account;
use uprs::request_sender::ApiRequest;
#[tokio::main]
async fn main() {
let api_key: String = "$your_access_token".parse().unwrap();
let list_accounts: Vec<Account> = ListAccounts::new(&api_key).send().await.unwrap();
for account in list_accounts {
println!("{}: ${}", account.attributes.display_name, account.attributes.balance.value)
}
}
Modules§
- api_
endpoints - Contains structs that represent the endpoints within the API.
- models
- Contains the different models as structs used in the API (e.g. Account, Transaction).
- request_
sender - Contains structs and traits that handle sending requests to the API.