small refactors

This commit is contained in:
vextrixes committed 2026-11-01 01:08:28 +01:00
1 parent df592e30f4
commit 35536247db
38 files changed
+213 -244

No files matched your search

+1 -4
View File
@@ -1,6 +1,5 @@
use std::marker::PhantomData;
use crate::{Endpoint, Timetable};
use std::marker::PhantomData;
pub const PERNAMENT_TIMETABLE_ENDPOINT: Endpoint<Timetable, ()> = Endpoint::Get {
url: "/api/3/timetable/permanent",
@@ -14,14 +13,12 @@ pub const PERNAMENT_TIMETABLE_CLASS_ENDPOINT: Endpoint<Timetable, ()> = Endpoint
_types: PhantomData,
};
pub const WEEK_TIMETABLE_ENDPOINT: Endpoint<Timetable, ()> = Endpoint::Get {
url: "/api/3/timetable/actual",
auth: true,
_types: PhantomData,
};
pub const WEEK_TIMETABLE_CLASS_ENDPOINT: Endpoint<Timetable, ()> = Endpoint::Get {
url: "/api/3/timetable/actual/class/{classId}",
auth: true,
+2 -2
View File
@@ -1,5 +1,5 @@
mod timetable;
mod endpoints;
mod timetable;
pub use endpoints::*;
pub use timetable::*;
pub use endpoints::*;
+4 -5
View File
@@ -1,8 +1,7 @@
use crate::StdType;
use chrono::{DateTime, FixedOffset};
use serde::{Deserialize, Serialize};
use crate::{Room, StdType, Student, Teacher};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct Timetable {
@@ -11,10 +10,10 @@ pub struct Timetable {
pub classes: Vec<StdType>,
pub groups: Vec<Group>,
pub subjects: Vec<StdType>,
pub rooms: Vec<Room>,
pub teachers: Vec<Teacher>,
pub rooms: Vec<StdType>,
pub teachers: Vec<StdType>,
pub cycles: Vec<StdType>,
pub students: Vec<Student>,
pub students: Vec<StdType>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]