6 releases
0.1.5 | Jan 27, 2025 |
---|---|
0.1.4 | Jan 27, 2025 |
#22 in #endpoint
522 downloads per month
26KB
593 lines
Firefly III Rust API wrapper
This is a uncomplete API wrapper for Firefly III. It is built against the API documentation here.
Usage
The crate exposes every endpoint under a module, currently I have
- account
- transaction
There is a generic client that consumes the request types from the endpoint modules:
use firefly_iii_rust::account::{Create, Delete};
let token = std::env::var("FIREFLY_III_ACCESS_TOKEN")
.expect("FIREFLY_III_ACCESS_TOKEN needs to be set in the environment.");
let base_url = std::env::var("FIREFLY_III_BASE_URL")
.expect("FIREFLY_III_BASE_URL needs to be set in the environment.");
let client = client::new(&base_url, &token);
let account_create_request = account::Create::default();
let account = client.call(account_create_request).unwrap();
let _ = client.call(account::Delete{id: account.id});
Dependencies
~3.5–5MB
~87K SLoC