mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
reformatted models
This commit is contained in:
@@ -1,47 +1,46 @@
|
||||
using System;
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
public class CourseAssignmentSummaryModel {
|
||||
|
||||
[JsonPropertyName("assignment_id")]
|
||||
public ulong AssignmentId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("muted")]
|
||||
public bool Muted { get; set; }
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public decimal PointsPossible { get; set; }
|
||||
|
||||
[JsonPropertyName("non_digital_submission")]
|
||||
public bool? NonDigitalSubmission { get; set; }
|
||||
|
||||
[JsonPropertyName("max_score")]
|
||||
public decimal? MaxScore { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public decimal? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("first_quartile")]
|
||||
public decimal? FirstQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("median")]
|
||||
public decimal? Median { get; set; }
|
||||
|
||||
[JsonPropertyName("third_quartile")]
|
||||
public decimal? ThirdQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("tardiness_breakdown")]
|
||||
public TardinessModel TardinessBreakdown { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public class CourseAssignmentSummaryModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("assignment_id")]
|
||||
public ulong AssignmentId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("muted")]
|
||||
public bool Muted { get; set; }
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public decimal PointsPossible { get; set; }
|
||||
|
||||
[JsonPropertyName("non_digital_submission")]
|
||||
public bool? NonDigitalSubmission { get; set; }
|
||||
|
||||
[JsonPropertyName("max_score")]
|
||||
public decimal? MaxScore { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public decimal? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("first_quartile")]
|
||||
public decimal? FirstQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("median")]
|
||||
public decimal? Median { get; set; }
|
||||
|
||||
[JsonPropertyName("third_quartile")]
|
||||
public decimal? ThirdQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("tardiness_breakdown")]
|
||||
public TardinessModel TardinessBreakdown { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,31 +1,30 @@
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
public class CourseStudentSummaryModel {
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("page_views")]
|
||||
public uint PageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("max_page_views")]
|
||||
public uint? MaxPageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("page_views_level")]
|
||||
public uint? PageViewsLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public uint Participations { get; set; }
|
||||
|
||||
[JsonPropertyName("max_participations")]
|
||||
public uint? MaxParticipations { get; set; }
|
||||
|
||||
[JsonPropertyName("participations_level")]
|
||||
public uint? ParticipationsLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("tardiness_breakdown")]
|
||||
public TardinessModel TardinessBreakdown { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public class CourseStudentSummaryModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonPropertyName("page_views")]
|
||||
public uint PageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("max_page_views")]
|
||||
public uint? MaxPageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("page_views_level")]
|
||||
public uint? PageViewsLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public uint Participations { get; set; }
|
||||
|
||||
[JsonPropertyName("max_participations")]
|
||||
public uint? MaxParticipations { get; set; }
|
||||
|
||||
[JsonPropertyName("participations_level")]
|
||||
public uint? ParticipationsLevel { get; set; }
|
||||
|
||||
[JsonPropertyName("tardiness_breakdown")]
|
||||
public TardinessModel TardinessBreakdown { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,39 +2,40 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
// The format of this model in the documentation is COMPLETELY WRONG. Each property is an array of objects, not an object,
|
||||
// and each of those objects have some extra fields: {id, date, views, participations} in by_date and
|
||||
// {id, category, views} in by_category. In both cases, id seems to be null 100% of the time, so I am omitting that one.
|
||||
// The primary keys (date and category) are thankfully discrete, so we can trivially build the dictionary ourselves.
|
||||
public class DepartmentParticipationModel {
|
||||
namespace CanvasModel.Analytics;
|
||||
// The format of this model in the documentation is COMPLETELY WRONG. Each property is an array of objects, not an object,
|
||||
// and each of those objects have some extra fields: {id, date, views, participations} in by_date and
|
||||
// {id, category, views} in by_category. In both cases, id seems to be null 100% of the time, so I am omitting that one.
|
||||
// The primary keys (date and category) are thankfully discrete, so we can trivially build the dictionary ourselves.
|
||||
public class DepartmentParticipationModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("by_date")]
|
||||
public IEnumerable<DepartmentParticipationDateEntryModel> ByDate { get; set; }
|
||||
[JsonPropertyName("by_date")]
|
||||
public IEnumerable<DepartmentParticipationDateEntryModel> ByDate { get; set; }
|
||||
|
||||
[JsonPropertyName("by_category")]
|
||||
public IEnumerable<DepartmentParticipationCategoryEntryModel> ByCategory { get; set; }
|
||||
}
|
||||
|
||||
public class DepartmentParticipationDateEntryModel {
|
||||
|
||||
[JsonPropertyName("date")]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
[JsonPropertyName("views")]
|
||||
public ulong Views { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public ulong Participations { get; set; }
|
||||
}
|
||||
|
||||
public class DepartmentParticipationCategoryEntryModel {
|
||||
|
||||
[JsonPropertyName("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonPropertyName("views")]
|
||||
public ulong Views { get; set; }
|
||||
}
|
||||
[JsonPropertyName("by_category")]
|
||||
public IEnumerable<DepartmentParticipationCategoryEntryModel> ByCategory { get; set; }
|
||||
}
|
||||
|
||||
public class DepartmentParticipationDateEntryModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("date")]
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
[JsonPropertyName("views")]
|
||||
public ulong Views { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public ulong Participations { get; set; }
|
||||
}
|
||||
|
||||
public class DepartmentParticipationCategoryEntryModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("category")]
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonPropertyName("views")]
|
||||
public ulong Views { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,31 +1,30 @@
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
public class DepartmentStatisticsModel {
|
||||
|
||||
[JsonPropertyName("courses")]
|
||||
public ulong Courses { get; set; }
|
||||
|
||||
[JsonPropertyName("subaccounts")]
|
||||
public ulong Subaccounts { get; set; }
|
||||
|
||||
[JsonPropertyName("teacher")]
|
||||
public ulong Teachers { get; set; }
|
||||
|
||||
[JsonPropertyName("students")]
|
||||
public ulong Students { get; set; }
|
||||
|
||||
[JsonPropertyName("discussion_topics")]
|
||||
public ulong DiscussionTopics { get; set; }
|
||||
|
||||
[JsonPropertyName("media_objects")]
|
||||
public ulong MediaObjects { get; set; }
|
||||
|
||||
[JsonPropertyName("attachments")]
|
||||
public ulong Attachments { get; set; }
|
||||
|
||||
[JsonPropertyName("assignments")]
|
||||
public ulong Assignments { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public class DepartmentStatisticsModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("courses")]
|
||||
public ulong Courses { get; set; }
|
||||
|
||||
[JsonPropertyName("subaccounts")]
|
||||
public ulong Subaccounts { get; set; }
|
||||
|
||||
[JsonPropertyName("teacher")]
|
||||
public ulong Teachers { get; set; }
|
||||
|
||||
[JsonPropertyName("students")]
|
||||
public ulong Students { get; set; }
|
||||
|
||||
[JsonPropertyName("discussion_topics")]
|
||||
public ulong DiscussionTopics { get; set; }
|
||||
|
||||
[JsonPropertyName("media_objects")]
|
||||
public ulong MediaObjects { get; set; }
|
||||
|
||||
[JsonPropertyName("attachments")]
|
||||
public ulong Attachments { get; set; }
|
||||
|
||||
[JsonPropertyName("assignments")]
|
||||
public ulong Assignments { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
public class TardinessModel {
|
||||
|
||||
[JsonPropertyName("missing")]
|
||||
public decimal Missing { get; set; }
|
||||
|
||||
[JsonPropertyName("late")]
|
||||
public decimal Late { get; set; }
|
||||
|
||||
[JsonPropertyName("on_time")]
|
||||
public decimal OnTime { get; set; }
|
||||
|
||||
[JsonPropertyName("floating")]
|
||||
public decimal Floating { get; set; }
|
||||
|
||||
[JsonPropertyName("total")]
|
||||
public decimal Total { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public class TardinessModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("missing")]
|
||||
public decimal Missing { get; set; }
|
||||
|
||||
[JsonPropertyName("late")]
|
||||
public decimal Late { get; set; }
|
||||
|
||||
[JsonPropertyName("on_time")]
|
||||
public decimal OnTime { get; set; }
|
||||
|
||||
[JsonPropertyName("floating")]
|
||||
public decimal Floating { get; set; }
|
||||
|
||||
[JsonPropertyName("total")]
|
||||
public decimal Total { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,56 +2,56 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
public struct UserAssignmentSubmissionDataModel {
|
||||
|
||||
[JsonPropertyName("submitted_at")]
|
||||
public DateTime? SubmittedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("score")]
|
||||
public double? Score { get; set; }
|
||||
}
|
||||
|
||||
public class UserAssignmentDataModel {
|
||||
|
||||
[JsonPropertyName("assignment_id")]
|
||||
public ulong AssignmentId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public double? PointsPossible { get; set; }
|
||||
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime? DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("muted")]
|
||||
public bool? Muted { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public double? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("max_score")]
|
||||
public double? MaxScore { get; set; }
|
||||
|
||||
[JsonPropertyName("median")]
|
||||
public double? Median { get; set; }
|
||||
|
||||
[JsonPropertyName("first_quartile")]
|
||||
public double? FirstQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("third_quartile")]
|
||||
public double? ThirdQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("module_ids")]
|
||||
public IEnumerable<ulong> ModuleIds { get; set; }
|
||||
|
||||
[JsonPropertyName("submission")]
|
||||
public UserAssignmentSubmissionDataModel? Submission { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public struct UserAssignmentSubmissionDataModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("submitted_at")]
|
||||
public DateTime? SubmittedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("score")]
|
||||
public double? Score { get; set; }
|
||||
}
|
||||
|
||||
public class UserAssignmentDataModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("assignment_id")]
|
||||
public ulong AssignmentId { get; set; }
|
||||
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonPropertyName("points_possible")]
|
||||
public double? PointsPossible { get; set; }
|
||||
|
||||
[JsonPropertyName("due_at")]
|
||||
public DateTime? DueAt { get; set; }
|
||||
|
||||
[JsonPropertyName("unlock_at")]
|
||||
public DateTime? UnlockAt { get; set; }
|
||||
|
||||
[JsonPropertyName("muted")]
|
||||
public bool? Muted { get; set; }
|
||||
|
||||
[JsonPropertyName("min_score")]
|
||||
public double? MinScore { get; set; }
|
||||
|
||||
[JsonPropertyName("max_score")]
|
||||
public double? MaxScore { get; set; }
|
||||
|
||||
[JsonPropertyName("median")]
|
||||
public double? Median { get; set; }
|
||||
|
||||
[JsonPropertyName("first_quartile")]
|
||||
public double? FirstQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("third_quartile")]
|
||||
public double? ThirdQuartile { get; set; }
|
||||
|
||||
[JsonPropertyName("module_ids")]
|
||||
public IEnumerable<ulong> ModuleIds { get; set; }
|
||||
|
||||
[JsonPropertyName("submission")]
|
||||
public UserAssignmentSubmissionDataModel? Submission { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,23 +2,23 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Model.Analytics {
|
||||
|
||||
public struct UserParticipationModel {
|
||||
|
||||
[JsonPropertyName("page_views")]
|
||||
public Dictionary<DateTime, ulong> PageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public IEnumerable<UserParticipationEventModel> Participations { get; set; }
|
||||
}
|
||||
namespace CanvasModel.Analytics;
|
||||
public struct UserParticipationModel
|
||||
{
|
||||
|
||||
public struct UserParticipationEventModel {
|
||||
|
||||
[JsonPropertyName("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
[JsonPropertyName("page_views")]
|
||||
public Dictionary<DateTime, ulong> PageViews { get; set; }
|
||||
|
||||
[JsonPropertyName("participations")]
|
||||
public IEnumerable<UserParticipationEventModel> Participations { get; set; }
|
||||
}
|
||||
|
||||
public struct UserParticipationEventModel
|
||||
{
|
||||
|
||||
[JsonPropertyName("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user