4 releases
new 0.1.3 | Jan 12, 2025 |
---|---|
0.1.2 | Jan 12, 2025 |
0.1.1 | Jan 12, 2025 |
0.1.0 | Jan 12, 2025 |
#1502 in Network programming
261 downloads per month
21KB
469 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