firefly-iii-rust

Crates.iofirefly-iii-rust
lib.rsfirefly-iii-rust
version0.1.5
created_at2025-01-12 13:37:04.217379+00
updated_at2025-01-27 21:10:46.062713+00
descriptionAn API wrapper for Firefly III https://www.firefly-iii.org/
homepage
repositoryhttps://github.com/catouc/firefly-iii-rust
max_upload_size
id1513234
size34,497
Philipp Böschen (catouc)

documentation

README

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});
Commit count: 13

cargo fmt