added webmodules

This commit is contained in:
vextrixes committed 2026-11-01 16:46:50 +01:00
1 parent eab1110c75
commit ba5d74d898
9 files changed
+85 -8

No files matched your search

+6 -5
View File
@@ -1,14 +1,11 @@
mod absence;
mod others;
//campaign
mod auth;
mod endpoints;
mod events;
mod gdpr;
//komens
mod homework;
//marking
mod marks;
mod others;
mod payments;
mod semester;
mod stdtype;
@@ -17,7 +14,10 @@ mod substitutions;
mod teaching;
mod timetable;
mod user;
//webmodules
mod webmodules;
//campaign
//marking
//komens
//predictor
pub use absence::*;
@@ -36,3 +36,4 @@ pub use substitutions::*;
pub use teaching::*;
pub use timetable::*;
pub use user::*;
pub use webmodules::*;
+8
View File
@@ -0,0 +1,8 @@
use crate::{Endpoint, WebModulesResponse};
use std::marker::PhantomData;
pub const WEBMODULES_ENDPOINT: Endpoint<WebModulesResponse, ()> = Endpoint::Get {
url: "/api/3/webmodule",
auth: true,
_types: PhantomData,
};
+13
View File
@@ -0,0 +1,13 @@
mod endpoints;
mod web_module;
mod web_module_dashboard;
mod web_module_icon;
mod web_module_sub_menu;
mod web_modules_response;
pub use endpoints::*;
pub use web_module::*;
pub use web_module_dashboard::*;
pub use web_module_icon::*;
pub use web_module_sub_menu::*;
pub use web_modules_response::*;
+12
View File
@@ -0,0 +1,12 @@
use serde::{Deserialize, Serialize};
use crate::{WebModuleIcon, WebModuleSubMenu};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebModule {
pub icon_id: WebModuleIcon,
pub url: Option<String>,
pub name: String,
pub sub_menu: Vec<WebModuleSubMenu>,
}
+12
View File
@@ -0,0 +1,12 @@
use serde::{Deserialize, Serialize};
use crate::{WebModuleIcon, WebModuleSubMenu};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebModuleDashboard {
pub icon_id: WebModuleIcon,
pub url: String,
pub name: Option<String>,
pub sub_menu: Vec<WebModuleSubMenu>,
}
+13
View File
@@ -0,0 +1,13 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum WebModuleIcon {
Akademie,
Ankety,
Dokumenty,
Druzina,
Potvrzeni,
VyukoveZdroje,
WebovyModul,
}
+8
View File
@@ -0,0 +1,8 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebModuleSubMenu {
pub url: String,
pub name: String,
}
+10
View File
@@ -0,0 +1,10 @@
use serde::{Deserialize, Serialize};
use crate::{WebModule, WebModuleDashboard};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct WebModulesResponse {
pub web_modules: Vec<WebModule>,
pub dashboard: WebModuleDashboard,
}
+3 -3
View File
@@ -1,6 +1,6 @@
# implementations
- [ ] absence
- [x] absence
- [x] campaign
- [ ] campaign error
- [ ] class book
@@ -17,7 +17,7 @@
- [x] substitutions
- [x] teaching
- [x] timetable
- [ ] webmodules
- [x] webmodules
- [x] user
# Features
@@ -35,7 +35,7 @@
- [ ] /api/3/classbook/lessonTags
- [ ] /api/3/komens/messages/rating/:messageId
- [x] /api/3/absence/student
- [ ] /api/3/webmodule
- [x] /api/3/webmodule
- [x] /api/3/timetable/actual
- [x] /api/3/payments/classfund/teacher/document/detail/:documentId
- [x] /api/3