A .NET wrapper for Classeviva school registry
-Get a student's profile including their first and last name and school
-Get a student's grades
-Get assigned homework
-Get content published by teachers
-email: A string
containing a student's email used to access Classeviva
-password: A string
containing student's password used to access Classeviva
An instance of the Classeviva class
Classeviva classeviva = await Classeviva.LoginAsync("email", "password");
A string
containing a student's school name
string school = await classeviva.GetSchoolAsync();
WARNING: This method is significantly slower than Classeviva's Name and Surname properties, but is included for consistency
A string
containing a student's school name
string name = await classeviva.GetSchoolAsync();
An array of Grade
objects containing grade data
Grade[] grades = await classeviva.GetGradesAsync();
foreach (Grade grade in grades)
{
Console.WriteLine(grade.Subject);
}
An array of MaterialFile
objects containing file data
MaterialFile[] files = await classeviva.GetFilesAsync();
foreach (MaterialFile file in files)
{
Console.WriteLine(file.Link);
}
-startDate: A DateTime
object representing the start date of a homework span
-endDate: A DateTime
object representing the end date of a homework span
An array of Homework
objects containing data
DateTime startDate = new DateTime(2019, 9, 1);
DateTime endDate = new DateTime.Now;
Homework[] homework = await classeviva.GetHomeworkAsync(startDate, endDate);
foreach (Grade homeworkUnit in homework)
{
Console.WriteLine(grade.GetGradeString());
}
Returns the stringified version of a grade. Useful when dealing with both numerical and literal grades
A string
containing the stringified version of a grade
Grade[] grades = await classeviva.GetGradesAsync();
foreach (Grade grade in grades)
{
Console.WriteLine(grade.GetGradeString());
}
-Name: A string
containing a student's name
-Surname: A string
containing a student's surname
Classeviva classeviva = await Classeviva.LoginAsync("email", "password");
Console.WriteLine(classeviva.Name);
Console.WriteLine(Classeviva.Surname);
classeviva.GetGradesAsync();
-Comment: A string
containing a teacher's comment
-Date: A DateTime
object containing the date on which the grade was gotten
-Subject: A string
containing the subject the grade was gotten in
-Type: A string
containing the type of the grade (Oral, Written, Test, etc.)
NOTE: This is a string due to unknown amount of grade types
-CountsTowardsAverage: A bool
that tells whether this grade counts towards the average grade
Grade[] grades = await classeviva.GetGradesAsync();
foreach (Grade grade in grades)
{
Console.WriteLine(grade.Comment);
Console.WriteLine(grade.Date.ToString());
Console.WriteLine(grade.Subject);
Console.WriteLine(grade.Type);
Console.WriteLine(grade.CountsTowardsAverage);
}
-Id: A string
containing the ID of the assignment
-Title: A string
containing the title of the assignment
-StartDate: A DateTime
object containing the start date of the assignment
-EndDate: A DateTime
object containing the end date of the assignment
-IsAllDay: A bool
that tells whether this assignment is for the entire day
-CreationDate: A DateTime
containing the date on which the assignment was created
-Author: A string
containing the name of the teacher that gave the assignment
-Content: A string
containing the content/description of the assignment
Homework[] homework = await classeviva.GetHomeworkAsync(new DateTime(2019, 9, 1), DateTime.Now);
foreach (Homework assignment in homework)
{
Console.WriteLine(assignment.Id);
Console.WriteLine(assignment.Title);
Console.WriteLine(assignment.StartDate.ToString());
Console.WriteLine(assignment.EndDate.ToString());
Console.WriteLine(grade.IsAllDay);
Console.WriteLine(grade.CreationDate);
Console.WriteLine(grade.Author);
Console.WriteLine(grade.Content);
}
-Author: A string
containing the file's author
-Description: A string
containing the description of the file
-Link: A string
containing the link to the file
-RootFolder: A string
containing the name of the folder the file is in
-Date: A DateTime
object containing the date this file was created on
-MaterialFileType: A MaterialFileType
enum that defines the type of the file; can be File
or Link
MaterialFile[] files = await classeviva.GetFilesAsync();
foreach (MaterialFile file in files)
{
Console.WriteLine(file.Author);
Console.WriteLine(file.Description);
Console.WriteLine(file.Link);
Console.WriteLine(file.RootFolder);
Console.WriteLine(file.Date);
Console.WriteLine(file.MaterialFileType);
}
Classeviva cs = await Classeviva.LoginAsync("foo", "bar");
Console.WriteLine(cs.Name);
Console.WriteLine(cs.Surname);
Console.WriteLine(await cs.GetSchoolAsync());
Console.WriteLine(await cs.GetFullNameAsync());
Console.WriteLine((await cs.GetHomeworkAsync(new DateTime(2019, 9, 1), DateTime.Now))[1].Id);
MaterialFile[] files = await cs.GetFilesAsync();
foreach (MaterialFile file in files)
{
Console.WriteLine(file.RootFolder);
}