Skip to main content

Module si

Module si 

Source
Expand description

SiServer client: daily/monthly report submission and the company rest-date calendar.

let config = SiConfig {
    login: "username".to_string(),
    auth_url: "https://auth.company.com".to_string(),
    api_url: "https://api.company.com".to_string(),
};

let mut si = Si::new(&config);
let today = Local::now().date_naive();
let rest_dates = si.rest_dates(today).await?;

Structsยง

AuthPayload
AuthSession
First-stage (LDAP) response carrying the temporary token.
LoginCredentials
Login and the double-base64-encoded password SiServer expects.
RestDatesResponse
Rest-date calendar response: three categories of non-working days.
Si
SiServer client. Authentication is two-stage: LDAP login yields a token, the token is exchanged for a PORTALSESSID cookie, and the cookie rides on every API call.
SiConfig
SiServer connection settings; auth and API live on separate hosts.