diff --git a/src/libcanvas/courses.rs b/src/libcanvas/courses.rs index 1de3374..7a80700 100644 --- a/src/libcanvas/courses.rs +++ b/src/libcanvas/courses.rs @@ -19,65 +19,65 @@ impl CanvasClient { /// HTML. Some JSON objects which have not yet been typed are deserialized into plaintext instead. #[derive(Serialize, Deserialize, Debug)] pub struct Course { - id: u32, - name: String, - account_id: u32, - uuid: String, - start_at: Option, - grading_standard_id: Option, - is_public: bool, - created_at: String, - course_code: String, - default_view: Option, - root_account_id: u32, - enrollment_term_id: u32, - term: Option, - permissions: Option, - course_progress: Option, - license: String, - public_description: Option, - access_restricted_by_date: Option, - blueprint_restrictions: Option, - blueprint_restrictions_by_object_type: Option, - syllabus_body: Option, - needs_grading_count: Option, - grade_passback_setting: Option, - end_at: Option, - public_syllabus: bool, - public_syllabus_to_auth: bool, - storage_quota_mb: usize, - is_public_to_auth_users: bool, - homeroom_course: bool, - course_color: Option, - friendly_name: Option, - apply_assignment_group_weights: bool, - calendar: Calendar, - time_zone: String, - blueprint: bool, - template: bool, - enrollments: Option>, - hide_final_grades: bool, - workflow_state: String, - restrict_enrollments_to_course_dates: bool, + pub id: u32, + pub name: String, + pub account_id: u32, + pub uuid: String, + pub start_at: Option, + pub grading_standard_id: Option, + pub is_public: bool, + pub created_at: String, + pub course_code: String, + pub default_view: Option, + pub root_account_id: u32, + pub enrollment_term_id: u32, + pub term: Option, + pub permissions: Option, + pub course_progress: Option, + pub license: String, + pub public_description: Option, + pub access_restricted_by_date: Option, + pub blueprint_restrictions: Option, + pub blueprint_restrictions_by_object_type: Option, + pub syllabus_body: Option, + pub needs_grading_count: Option, + pub grade_passback_setting: Option, + pub end_at: Option, + pub public_syllabus: bool, + pub public_syllabus_to_auth: bool, + pub storage_quota_mb: usize, + pub is_public_to_auth_users: bool, + pub homeroom_course: bool, + pub course_color: Option, + pub friendly_name: Option, + pub apply_assignment_group_weights: bool, + pub calendar: Calendar, + pub time_zone: String, + pub blueprint: bool, + pub template: bool, + pub enrollments: Option>, + pub hide_final_grades: bool, + pub workflow_state: String, + pub restrict_enrollments_to_course_dates: bool, } #[derive(Serialize, Deserialize, Debug)] pub struct Enrollment { - r#type: String, - role: String, - role_id: u32, - user_id: u32, - enrollment_state: String, - limit_privileges_to_course_section: bool, + pub r#type: String, + pub role: String, + pub role_id: u32, + pub user_id: u32, + pub enrollment_state: String, + pub limit_privileges_to_course_section: bool, } #[derive(Serialize, Deserialize, Debug)] pub struct Calendar { - ics: String, + pub ics: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Permissions { - create_discussion_topic: bool, - create_announcement: bool, + pub create_discussion_topic: bool, + pub create_announcement: bool, }