Crates.io | kilnfi_connect_rs |
lib.rs | kilnfi_connect_rs |
version | 0.2.2 |
created_at | 2025-02-02 03:33:54.410204+00 |
updated_at | 2025-03-28 12:33:04.652066+00 |
description | A Rust API Client for the Kiln Connect API |
homepage | https://github.com/Neal-C/kilnfi_connect_rs |
repository | https://github.com/Neal-C/kilnfi_connect_rs.git |
max_upload_size | |
id | 1539237 |
size | 422,700 |
[!NOTE] follows v1.6 API version
The Rust Client for the Kiln connect API (v.1.6)
Just HTTPS requests and static typing for an ergonomic developer experience.
Expect breaking changes (and renamings) while below v1.0.0.
Focus is on ease of use and developer experience. Point innacuries in issues or Direct Messages.
Developed on a strict no-unwrap policy.
https://connect-rs-docs.vercel.app/docs/connect_rs/
Kiln documentation : https://docs.api.kiln.fi/docs/quickstart
Kiln API reference documentation : https://docs.api.kiln.fi/reference/getaccounts
cargo add kilnfi_connect_rs
you may need to use the uuid crate
cargo add uuid --features v4,serde
you may need to use the chrono crate
cargo add chrono --features serde
use kilnfi_connect_rs::Kiln;
use uuid::Uuid;
// required to create a uuid from a &'str
use std::str::FromStr;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let kiln_api_token: String = std::env::var("KILN_API_TOKEN")
.expect("KILN_API_TOKEN is not set in the environment. It is required.");
let kiln: Kiln = Kiln::builder()
.api_token(kiln_api_token)
// no trailing slash, or else it will break
.base_url("https://api.kiln.fi/v1")
.seal()
.build()?;
let account_id = Uuid::from_str("9e1a6784-9657-4757-b463-8454a34c92b4").unwrap();
let _data = kiln.accounts().get_by_uuid(account_id).unwrap();
Ok(())
}
Find more examples in the examples
directory and the complete examples on the documentation website https://connect-rs-docs.vercel.app/docs/connect_rs/accounts.
I am open to random pull requests that do at least 1 of the following :
This package is source available software licensed under the BUSL-1.1 license.
Send some love ❤️ :