fix: expose all fields of course structs
This commit is contained in:
parent
892112e568
commit
288c4cbfe9
1 changed files with 49 additions and 49 deletions
|
@ -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<String>,
|
||||
grading_standard_id: Option<u32>,
|
||||
is_public: bool,
|
||||
created_at: String,
|
||||
course_code: String,
|
||||
default_view: Option<String>,
|
||||
root_account_id: u32,
|
||||
enrollment_term_id: u32,
|
||||
term: Option<String>,
|
||||
permissions: Option<Permissions>,
|
||||
course_progress: Option<String>,
|
||||
license: String,
|
||||
public_description: Option<String>,
|
||||
access_restricted_by_date: Option<bool>,
|
||||
blueprint_restrictions: Option<String>,
|
||||
blueprint_restrictions_by_object_type: Option<String>,
|
||||
syllabus_body: Option<String>,
|
||||
needs_grading_count: Option<u32>,
|
||||
grade_passback_setting: Option<String>,
|
||||
end_at: Option<String>,
|
||||
public_syllabus: bool,
|
||||
public_syllabus_to_auth: bool,
|
||||
storage_quota_mb: usize,
|
||||
is_public_to_auth_users: bool,
|
||||
homeroom_course: bool,
|
||||
course_color: Option<String>,
|
||||
friendly_name: Option<String>,
|
||||
apply_assignment_group_weights: bool,
|
||||
calendar: Calendar,
|
||||
time_zone: String,
|
||||
blueprint: bool,
|
||||
template: bool,
|
||||
enrollments: Option<Vec<Enrollment>>,
|
||||
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<String>,
|
||||
pub grading_standard_id: Option<u32>,
|
||||
pub is_public: bool,
|
||||
pub created_at: String,
|
||||
pub course_code: String,
|
||||
pub default_view: Option<String>,
|
||||
pub root_account_id: u32,
|
||||
pub enrollment_term_id: u32,
|
||||
pub term: Option<String>,
|
||||
pub permissions: Option<Permissions>,
|
||||
pub course_progress: Option<String>,
|
||||
pub license: String,
|
||||
pub public_description: Option<String>,
|
||||
pub access_restricted_by_date: Option<bool>,
|
||||
pub blueprint_restrictions: Option<String>,
|
||||
pub blueprint_restrictions_by_object_type: Option<String>,
|
||||
pub syllabus_body: Option<String>,
|
||||
pub needs_grading_count: Option<u32>,
|
||||
pub grade_passback_setting: Option<String>,
|
||||
pub end_at: Option<String>,
|
||||
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<String>,
|
||||
pub friendly_name: Option<String>,
|
||||
pub apply_assignment_group_weights: bool,
|
||||
pub calendar: Calendar,
|
||||
pub time_zone: String,
|
||||
pub blueprint: bool,
|
||||
pub template: bool,
|
||||
pub enrollments: Option<Vec<Enrollment>>,
|
||||
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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue