Skip to main content

Module si

Module si 

Source
Expand description

Internal SiServer API client for company reporting and calendar integration.

Provides integration with an internal company API system that handles employee time tracking reports and company calendar information.

§Features

  • Report Submission: Submit daily and monthly time tracking reports
  • Calendar Integration: Fetch company rest dates and holidays
  • Two-Stage Authentication: LDAP authentication followed by session token exchange
  • Error Resilience: Graceful handling of network failures and API errors
  • Session Management: Automatic session caching and renewal

§Usage

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
Authentication payload containing the temporary token.
AuthSession
Response structure for SiServer LDAP authentication.
LoginCredentials
User credentials for SiServer authentication.
RestDatesResponse
Response structure for SiServer rest dates API.
Si
SiServer API client with advanced session management.
SiConfig
Configuration for SiServer API integration.