added teaching endpoints

This commit is contained in:
vextrixes committed 2026-10-29 18:07:19 +01:00
1 parent dd48a53be9
commit 01607db3e4
6 files changed
+21 -6

No files matched your search

+2 -2
View File
@@ -11,12 +11,12 @@ pub const HOMEWORKS_COUNT_ENDPOINT: Endpoint<(), i64> = Endpoint::Get {
/// ID = homework ID (String)
/// finished = homework state (bool)
pub const HOMEWORK_DONE_ENDPOINT: Endpoint<(), bool> = Endpoint::Get {
url: "api/3/homeworks/:id/student-done/:finished",
url: "api/3/homeworks/{id}/student-done/{finished}",
auth: true,
_types: PhantomData,
};
/// Query from and to (Datetime)
/// Query 'from' and 'to' (Datetime)
pub const HOMEWORKS_ENDPOINT: Endpoint<(), HomeworkList> = Endpoint::Get {
url: "api/3/homeworks",
auth: true,
+1 -1
View File
@@ -49,6 +49,6 @@ pub use subjects::*;
pub use substitutions::{
ChangeDisplayType, ChangeLessonInfo, SubstitutionChange, SubstitutionChangeType, Substitutions,
};
pub use teaching::{Lesson, Teaching, TeachingTheme};
pub use teaching::*;
pub use timetable::*;
pub use user::*;
+10
View File
@@ -0,0 +1,10 @@
use std::marker::PhantomData;
use crate::{Endpoint, Teaching};
/// Subject ID = String
pub const TEACHING_ENDPOINT: Endpoint<(), Teaching> = Endpoint::Get {
url: "/api/3/subjects/themes/{subjectId}",
auth: true,
_types: PhantomData,
};
+5
View File
@@ -0,0 +1,5 @@
mod endpoints;
mod teaching;
pub use endpoints::*;
pub use teaching::*;
File renamed without changes.