personio-rs

Crates.iopersonio-rs
lib.rspersonio-rs
version0.1.1
created_at2025-02-13 00:45:29.437241+00
updated_at2025-02-13 01:23:09.987247+00
descriptionAsync Rust client for the Personio HR management system.
homepage
repository
max_upload_size
id1553650
size49,900
Bayram K (fade2black)

documentation

README

personio-rs

crates.io License: MIT

Async Rust client for Personio backed by tokio.

Usage

Add this to your Cargo.toml:

[dependencies]
personio-rs = "0.1.0"
tokio = { version = "1.0", features = ["full"] }

To get auth token:

use personio_rs::client::Client;
use std::env;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    println!("Authenticating...");

    let client_id = env::var("CLIENT_ID")?;
    let client_secret = env::var("CLIENT_SECRET")?;

    let client = Client::new("MY_COMPANY", "MY_APP")?;
    let creds = client.auth(&client_id, &client_secret).await?;

    println!("{creds}");

    Ok(())
}
Commit count: 0

cargo fmt