diff --git a/src/attachment.rs b/src/attachment.rs index 06f6ceb..8e34eba 100644 --- a/src/attachment.rs +++ b/src/attachment.rs @@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct Attachment { - id: String, - name: String, - r#type: String, - size: u64, + pub id: String, + pub name: String, + pub r#type: String, + pub size: u64, } diff --git a/src/lib.rs b/src/lib.rs index 64f1c6c..aee0de6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ pub use absence::{Absence, AbsenceListItem, SubjectAbsence}; pub use api_info::ApiInfo; pub use attachment::Attachment; pub use error::Error; -pub use events::Events; +pub use events::{Event, Events, Time}; pub use gdpr::{GDPRcommissioner, GDPRcommissioners}; pub use homework::{Homework, HomeworkListItem}; pub use marks::{Mark, Marks, SubjectMarks}; diff --git a/src/marks.rs b/src/marks.rs index 7b67688..251f270 100644 --- a/src/marks.rs +++ b/src/marks.rs @@ -1,10 +1,19 @@ use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; +use crate::StdType; + #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct Marks { pub subjects: Vec, + pub subject: StdType, + pub average_text: String, + pub temporary_mark: String, + pub subject_note: String, + pub temporary_mark_note: String, + pub points_only: bool, + pub mark_prediction_enabled: bool, } #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/payments.rs b/src/payments.rs index e53f14c..758b8c7 100644 --- a/src/payments.rs +++ b/src/payments.rs @@ -31,6 +31,8 @@ pub struct Payment { pub amount: i64, } +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "PascalCase")] pub struct AddBalance { pub instructions: String, pub bank_account: String, diff --git a/src/user.rs b/src/user.rs index 202002e..edc715b 100644 --- a/src/user.rs +++ b/src/user.rs @@ -34,8 +34,8 @@ pub struct Module { #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct Student { - full_name: String, - class: Vec, - school_type: String, - study_year: u8, + pub full_name: String, + pub class: Vec, + pub school_type: String, + pub study_year: u8, } diff --git a/src/what_if.rs b/src/what_if.rs index 5b9a9d3..8eb7d59 100644 --- a/src/what_if.rs +++ b/src/what_if.rs @@ -6,11 +6,11 @@ use crate::StdType; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct WhatIfStartingEnviromentMark { - id: String, - mark_text: String, - weight: u8, - max_points: u16, - subject_id: String, + pub id: String, + pub mark_text: String, + pub weight: u8, + pub max_points: u16, + pub subject_id: String, } #[derive(Debug, Clone, Serialize, Deserialize)]