diff --git a/src/class_book/class_book_lesson_past.rs b/src/class_book/class_book_lesson_past.rs new file mode 100644 index 0000000..fd6f3bf --- /dev/null +++ b/src/class_book/class_book_lesson_past.rs @@ -0,0 +1,5 @@ +pub struct ClassBookLessonPast{ + pub lesson_id: String, + pub last_theme: Option, + pub next_label: Option, +} \ No newline at end of file diff --git a/src/class_book/endpoints.rs b/src/class_book/endpoints.rs index 8c740c8..c525783 100644 --- a/src/class_book/endpoints.rs +++ b/src/class_book/endpoints.rs @@ -1,4 +1,4 @@ -use crate::{ClassBookSaveAbsenceRequest, ContentType, Endpoint}; +use crate::{ClassBookLessonPast, ClassBookSaveAbsenceRequest, ContentType, Endpoint}; use std::marker::PhantomData; pub const EDIT_CLASSBOOK_ENDPOINT: Endpoint<(), ClassBookSaveAbsenceRequest> = Endpoint::Post { @@ -7,3 +7,9 @@ pub const EDIT_CLASSBOOK_ENDPOINT: Endpoint<(), ClassBookSaveAbsenceRequest> = E content_type: ContentType::Json, _types: PhantomData, }; + +pub const PREVIOUS_LESSON_INFO_CLASSBOOK_ENDPOINT: Endpoint = Endpoint::Get { + url: "/api/3/classbook/{recordId}", + auth: true, + _types: PhantomData, +}; diff --git a/src/class_book/mod.rs b/src/class_book/mod.rs index 7a811b5..94ed1f2 100644 --- a/src/class_book/mod.rs +++ b/src/class_book/mod.rs @@ -1,5 +1,7 @@ mod endpoints; mod class_book_save_absence_request; +mod class_book_lesson_past; pub use class_book_save_absence_request::*; -pub use endpoints::*; \ No newline at end of file +pub use endpoints::*; +pub use class_book_lesson_past::*; \ No newline at end of file