EclassMobileApi v2 is here

Introduction

GUnet’s open eclass is an e-learning platform written in PHP. It is used from the most of the universities in Greece and from my university as well.

The story

So, my Windows 10 app written for learning purposes needed to comunicate with eclass to show some information about the user. The user would login, see information about the courses, in which he/she is enrolled and logout. This process was implemented inside the app on that time.

I decided to write an external nuget library and use it in my project. I wrote the first verion in 2018 and I updated the code with some improvements in the summer of 2019.

Wrapping app those changes in the summer of 2019 for the EclassMobileApi v1, I was working on improving the library’s fetch time and consistency for some extended data from eClass mobile api and from the installations(demo installation here).

2nd version released on Aug 21, 2019

Available on nuget.org and GitHub Packages, the eClass API wrapper has simple yet powerfull capabilities any developer can take advandage of in his/her application. The fact that anyone can use eClass for free as their e-learning platform, makes it even necessary to develop apps for their distros and with 0 effort.

In the current version, you can login/logout, get Tools for each course and a data structure that saves the announcements, the directoriss(the download link and the link to the home page), the course description, and the generic description of each course, the user has registered to. These data are saved to a list of courses, each course as a name, an id and a wrapper for the tools mentioned above.

An announcement

As you can see in the snippet bellow, the avalaible data for an announement are the title, the content(Description property), the date published and a link to the eclass page for the announcement.

    class Announcement
    + Title: string
    + Link: Uri
    + Description: string
    + DatePublished: string

A simple session

//Init an Eclass Session for eclass.aueb.gr

EclassUser eclassUser = new EclassUser("aueb");
//Start a session with given usename and pass

await eclassUser.StartAsync("Username", "Password");

//Add courses

user.AddCourses();

//Add tools apart from announcements

await user.UserCourses.AddToolsAsync();

//Add Announcements

await user.AddAnnouncementsAsync();

//Print for all User Courses: Course Name, Course ID, Tools by Name

eclassUser.UserCourses.ForEach(course => {
        Console.WriteLine(course.Name + " " + course.ID);
        course.ToolViewModel.Tools.ForEach(tool=>Console.WriteLine(tool.Name));
    });

//Logout

await eclassUser.DestroySessionAsync();

A JSON converter

A JSON converter for the main EclassUser object is also avalaible in the project.

Navigate to the unit tests, and see how easy is to store an EclassUser as a JSON object.

Targeting

Currently, the nuget package is targeting .net core 2.0 and .NETStandard 1.4, but we can easily add other targets to the project.

Conclution

You can request features via GitHub Issues or even contribute to the project.

This was my effort to integrate eClass in my application back then and I wanted to spread the word about it, in case anyone needs to use it.


Share this:

Buy me a coffeeBuy me a coffee