8 releases

0.1.8 Mar 7, 2025
0.1.7 Sep 30, 2024

#334 in Graphics APIs

Download history 1/week @ 2024-12-11 14/week @ 2025-02-12 122/week @ 2025-03-05

136 downloads per month

MIT license

35KB
686 lines

RoughtRight API

This create allows us to communicate with RoughtRight to get data from its api. It has some 1:1 functions:

  • Get all projects
  • Get all employees
  • Get all customers
  • Get all projects for a certain week

And also some helper functions

  • Get all projects as a hashmap
  • Get all employees as a hashmap
  • Get all customers as a hashmap
  • Get all projects on a certain week and return who will work on those procects

Usage


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(())

}

Dependencies

~17–30MB
~493K SLoC