Crates.io | roughly-rs |
lib.rs | roughly-rs |
version | 0.1.7 |
source | src |
created_at | 2024-09-29 09:49:04.281915 |
updated_at | 2024-09-30 06:08:42.43695 |
description | A Rust library for the RoughlyRight API |
homepage | |
repository | |
max_upload_size | |
id | 1390758 |
size | 52,482 |
This create allows us to communicate with RoughtRight to get data from its api. It has some 1:1 functions:
And also some helper functions
use std::{env, error::Error};
use roughly_rs::RoughlyRight;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let username = env::var("EMAIL").unwrap();
let password = env::var("PASSWORD").unwrap();
let week = "202440";
let mut roughly_right = RoughlyRight::new(&username, &password);
let the_week = roughly_right.weekly_work(week).await?;
for (_key, value) in the_week.iter() {
println!("{}: {:?}", value.project, value.employees);
}
Ok(())
}